We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
最简单的应用场景是一个ul的商品列表,显示的数据可能是从三个数组里抽出来的,如果用ms-each不得不增加三个仅用于循环的父级标签
<ul> <ul ms-each="arr1"> <li>test</li> </ul> <ul ms-each="arr2"> <li>test</li> </ul> </ul>
有ms-repeat的话三个数组自己循环就行了,不会影响标签的层级
<ul> <li ms-repeat="arr1">test</li> <li ms-repeat="arr2">test</li> </ul>
The text was updated successfully, but these errors were encountered:
<!DOCTYPE HTML> <html> <head> <meta charset="UTF-8"> <title>ms-repeat</title> <script src="avalon.mobile.js" type="text/javascript"></script> <script> var model = avalon.define("xxx", function(vm) { vm.array = [2, 3, 1, 7, 4] }) setTimeout(function() { model.array.splice(2, 1, "aaa") }, 1000) setTimeout(function() { model.array.sort() }, 3000) setTimeout(function() { model.array.clear() }, 5000) </script> </head> <body ms-controller="xxx"> <h1>ms-repeat</h1> <p>用法与ms-each一致,ms-repeat-el?-index?,后两个参数可选 </p> <ul> <li ms-repeat="array">{{el}} ---- {{$index}}</li> </ul> </body> </html>
7450715
Sorry, something went wrong.
No branches or pull requests
最简单的应用场景是一个ul的商品列表,显示的数据可能是从三个数组里抽出来的,如果用ms-each不得不增加三个仅用于循环的父级标签
有ms-repeat的话三个数组自己循环就行了,不会影响标签的层级
The text was updated successfully, but these errors were encountered: