-
Notifications
You must be signed in to change notification settings - Fork 0
/
1.html
34 lines (30 loc) · 787 Bytes
/
1.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
<!DOCTYPE html>
<html>
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<body>
<!-- Loops -->
<div id="app_loops" class="experiment-block">
<ol>
<li v-for="todo in todos"> {{ todo.text }} </li>
</ol>
</div>
<script>
var vm =new Vue(
{
el: '#app_loops',
data: {
todos: [
{text: 'Learn JavaScript'},
{text: 'Learn Vue'},
{text: 'Build something awesome'},
{text: 'Build something awesome111111111'},
],
}
});
vm.todos.push({ text: 1});
vm.todos.push({ text: 2});
vm.todos.push({ text: 3});
// vm.todos=[{ text: 1}, {text: 2 }];
</script>
</body>
</html>