-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
37 lines (33 loc) · 870 Bytes
/
test.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>test</title>
<style>
ul {
list-style-type: none;
}
</style>
</head>
<body>
<div id="test">
<ul>
<li v-for="book in books">{{ book.title}} - {{ book.author}}</li>
</ul>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
<script type="text/javascript">
var app = new Vue ({
el: '#test',
data: {
books: [
{title: 'PHP', author: 'Zandrsta'},
{title: 'JavaScript', author: 'Flanagan'}
]
}
});
</script>
</body>
</html>