forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex_each6.html
More file actions
28 lines (27 loc) · 761 Bytes
/
Copy pathindex_each6.html
File metadata and controls
28 lines (27 loc) · 761 Bytes
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
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="avalon.js"></script>
<script>
var model = avalon.define("clear", function(vm) {
vm.array = [1, 2, 3, 4, 5]
})
setTimeout(function() {
model.array.clear()
setTimeout(function() {
model.array.push("aa", "bb", "cc", "dd")
}, 3000)
}, 3000)
</script>
</head>
<body ms-controller='clear'>
<ol ms-each='array'>
<li>{{el}}</li>
</ol>
<ul>
<li ms-repeat='array'>{{el}}</li>
</ul>
</body>
</html>