<html>
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="avalon.js"></script>
    <script>
      var vm =avalon.define({
        $id:"root1",
        myDatas: [{ "name": "aaa" }, { "name": "bbb" }, { "name": "ccc" }, { "name": "ddd"}], /*ajax 请求后台返回的数据*/

doClick:function(data) {
alert(data.name);
console.log(data);
}


    })    
    </script>
  </head>
  <body ms-controller="root1">
          <ul>
            <li ms-repeat="myDatas" ms-click="doClick(el)">{{$index}}--{{el.name}}</li>
          </ul>
  </body>
</html>

avalon.js 1.4.6简单列表数据绑定ms-repeat ms-click

 

From:http://www.cnblogs.com/xuejianxiyang/p/5554146.html

相关文章:

  • 2021-09-23
  • 2022-12-23
  • 2021-08-01
  • 2021-04-03
  • 2021-11-20
  • 2021-09-22
  • 2021-07-17
猜你喜欢
  • 2021-07-11
  • 2022-12-23
  • 2022-03-06
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
  • 2021-11-18
相关资源
相似解决方案