Skip to content

Commit

Permalink
Part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jacurtis committed Oct 31, 2016
1 parent 1af5afa commit f56d88a
Show file tree
Hide file tree
Showing 10 changed files with 325 additions and 0 deletions.
39 changes: 39 additions & 0 deletions part3/end.html
@@ -0,0 +1,39 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<style>
[v-cloak] {
display: none;
}
</style>
</head>

<body>
<div id="app">
<h1 v-cloak>{{ message }}</h1>
<!-- <h1 v-else>You have NOT viewed this page</h1> -->
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: false,
viewed2: true
}
})
</script>
</html>
29 changes: 29 additions & 0 deletions part3/start.html
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1>{{message}}</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World'
}
})
</script>
</html>
41 changes: 41 additions & 0 deletions part3/v-cloak.html
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

<style>

[v-cloak] {
background-color: red;
}

</style>

</head>

<body>
<div id="app">
<h1 v-cloak>{{ message }}</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: false,
viewed2: true
}
})
</script>
</html>
32 changes: 32 additions & 0 deletions part3/v-else.html
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-show="viewed">You have viewed this page</h1>
<h1 v-else>You have NOT viewed this page</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: true
}
})
</script>
</html>
30 changes: 30 additions & 0 deletions part3/v-html.html
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-html="intro"></h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>"
}
})
</script>
</html>
32 changes: 32 additions & 0 deletions part3/v-if.html
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-show="viewed">You have viewed this page</h1>
<h1 v-show="viewed == viewed2">Viewed == viewed2</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: true
}
})
</script>
</html>
31 changes: 31 additions & 0 deletions part3/v-once.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-once>{{message}}</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: true
}
})
</script>
</html>
31 changes: 31 additions & 0 deletions part3/v-pre.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-pre>{{message}}</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: true
}
})
</script>
</html>
31 changes: 31 additions & 0 deletions part3/v-show.html
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-show="viewed">You have viewed this page</h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World',
intro: "Welcome to the Tutorial <small>It is all about Vue.js</small>",
viewed: true
}
})
</script>
</html>
29 changes: 29 additions & 0 deletions part3/v-text.html
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Vue.js Tutorial | Directives</title>

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>

<body>
<div id="app">
<h1 v-text="message"></h1>
</div>
</body>

<script src="https://unpkg.com/vue@2.0.3/dist/vue.js"></script>

<script>
var app = new Vue({
el: '#app',
data: {
message: 'Hello Vue World'
}
})
</script>
</html>

0 comments on commit f56d88a

Please sign in to comment.