forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index08on.html
33 lines (30 loc) · 947 Bytes
/
index08on.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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>ms-on-*</title>
<script src="avalon.js" type="text/javascript"></script>
<script>
avalon.define("xxx", function(vm) {
vm.firstName = "司徒"
vm.array = ["aaa", "bbb", "ccc"]
vm.argsClick = function(e, a, b) {
alert(a + " " + b)
}
vm.loopClick = function(a) {
alert(a)
}
});
</script>
</head>
<body>
<h3 style="text-align: center">ms-on-*</h3>
<fieldset ms-controller="xxx">
<legend>有关事件回调传参</legend>
<div ms-click="argsClick($event, 100, firstName)">点我</div>
<div ms-each-el="array" >
<p ms-click="loopClick(el)">{{el}}</p>
</div>
</fieldset>
</body>
</html>