标签:
<head>
<meta charset="UTF-8">
<title>avalon-prop</title>
<script type="text/javascript" src="../avalon.min.js"></script>
<script>
avalon.ready(function () {
avalon.define({
$id:"test",
word:"Hello avalon"
})
avalon.scan();
})
</script>
</head>
<body>
<div ms-controller="test">
{{word}}
</div>
</body>
<style>
.ms-controller{
visibility:hidden;
}
</style>
avalon.config({
interpolate:["[","]"]
})
<head>
<meta charset="UTF-8">
<title>avalon-prop</title>
<script type="text/javascript" src="../avalon.min.js"></script>
<script>
avalon.config({
interpolate:["[[","]]"]
})
avalon.ready(function () {
avalon.define({
$id:"test",
word:"Hello avalon"
})
avalon.scan();
})
</script>
</head>
<body>
<div ms-controller="test">
[[word]]
</div>
</body>
<head>
<meta charset="UTF-8">
<title>avalon-prop</title>
<script type="text/javascript" src="../avalon.min.js"></script>
<script>
avalon.ready(function () {
avalon.define({
$id:"test",
word:"Hello avalon"
})
avalon.scan();
})
</script>
</head>
<body>
<div ms-controller="test" ms-text="word"></div>
</body>
<head>
<meta charset="UTF-8">
<title>avalon-prop</title>
<script type="text/javascript" src="../avalon.min.js"></script>
<script>
avalon.ready(function () {
avalon.define({
$id:"test",
word:"<p>Hello avalon<p>"
})
avalon.define({
$id:"test2",
word:"<p>Hello avalon</p>"
})
avalon.scan();
})
</script>
</head>
<body>
<div ms-controller="test" ms-text="word"></div>
<div ms-controller="test2" ms-html="word"></div>
</body>
</html>
<head>
<meta charset="UTF-8">
<title>avalon-prop2</title>
<script type="text/javascript" src="../avalon.min.js"></script>
<script type="text/javascript">
avalon.ready(function () {
avalon.define({
$id:"text",
text:‘111‘
})
avalon.scan();
})
</script>
</head>
<body>
<div ms-controller="text">
<input type="text" ms-value="text">
<textarea name="" id="" cols="30" rows="10" ms-value="xxx{{text+‘!!!‘}}yyy"></textarea>
</div>
</body>
标签:
原文地址:http://www.cnblogs.com/Zjingwen/p/4455734.html