-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexample_02.html
More file actions
57 lines (50 loc) · 1.7 KB
/
example_02.html
File metadata and controls
57 lines (50 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<html>
<head>
<title>Vue.js Example 02</title>
<link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="styles/site.css">
<script src="lib/vue@2.2.1.js"></script>
</head>
<body>
<div id="app">
<div class="panel-group">
<div class="panel panel-default card">
<div class="panel-heading">
<h2>{{ title }}</h2>
<h3>{{ subtitle }}</h3>
</div>
<div class="panel-body" v-html="content"></div>
</div>
</div>
</div>
<script>
/**
The variables in the data section are called: fields
We can declare as many fields as we want.
We have a title, subtitle and a content field.
Some fields may contain HTML.
We use v-html to render fields that contains html instead
of curly braces.
This tells Vue to render HTML instead of plain text.
*/
var app = new Vue({
el: '#app',
data: function () {
return {
title: 'Making our first Pizza !',
subtitle: 'The good things are already in',
content: '<b>Vue & CSS</b>'
};
}
});
</script>
</body>
</html>
<!--
Example 02:
Make your Pizza place business card:
Name
Email / facebook page
Phone
Opening Hours
-->