forked from RubyLouvre/avalon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test1.html
34 lines (32 loc) · 1003 Bytes
/
test1.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 id="html">
<head>
<meta charset="utf-8">
<title>测试用例-yuewang</title>
<style>
</style>
</head>
<body>
<script src="avalon.js"></script>
<script>
avalon.define("test", function(vm) {
vm.array = [{value: "aaa", text: "111"}, {value: "bbb", text: "222"}, {value: "bbb", text: "333"}]
})
var model = avalon.define("index", function(vm) {
vm.message = "XXXX";
});
</script>
<div ms-controller="test">
<select ms-each-el="array">
<option ms-value="el.value">{{$index}}、{{el.value}}</option>
</select>
</div>
<script type="text/avalon" id="index">
<div ms-controller="index">
<h2>{{message}}</h2>
<input ms-model="message">
</div>
</script>
<div ms-include="'index'"></div>
</body>
</html>