{"action":"created","issue":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/894","labels_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/894/labels{/name}","comments_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/894/comments","events_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/894/events","html_url":"https://github.com/RubyLouvre/avalon/issues/894","id":92649966,"number":894,"title":"数组、ms-visible的问题，为何点击链接，对应的div不显示呢？","user":{"login":"zinda2000","id":4176821,"avatar_url":"https://avatars.githubusercontent.com/u/4176821?v=3","gravatar_id":"","url":"https://api.github.com/users/zinda2000","html_url":"https://github.com/zinda2000","followers_url":"https://api.github.com/users/zinda2000/followers","following_url":"https://api.github.com/users/zinda2000/following{/other_user}","gists_url":"https://api.github.com/users/zinda2000/gists{/gist_id}","starred_url":"https://api.github.com/users/zinda2000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zinda2000/subscriptions","organizations_url":"https://api.github.com/users/zinda2000/orgs","repos_url":"https://api.github.com/users/zinda2000/repos","events_url":"https://api.github.com/users/zinda2000/events{/privacy}","received_events_url":"https://api.github.com/users/zinda2000/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-02T14:20:09Z","updated_at":"2015-07-03T00:49:09Z","closed_at":null,"body":"\t<!DOCTYPE HTML>\r\n\t<html>\r\n\t<head>\r\n\t<title></title>\r\n\t<script src=\"avalon.js\"></script>\r\n\t</head>\r\n\t<body>\r\n\t<div ms-controller=\"hm\">\r\n\t\t<div>\r\n\t\t\t<a ms-click=\"switchPage(0)\" href=\"#\">&gt;&gt; 1</a>\r\n\t\t\t<a ms-click=\"switchPage(1)\" href=\"#\">&gt;&gt; 2</a>\r\n\t\t</div>\r\n\t\t<div ms-visible=\"vm.toggle[0]\">\r\n\t\t\t<h4>第1区</h4>\r\n\t\t</div>\r\n\t\t<div ms-visible=\"vm.toggle[1]\">\r\n\t\t\t<h4>第2区</h4>\r\n\t\t</div>\r\n\t</div>\r\n\t<script>\r\n\tvar vm = avalon.define({\r\n\t\t$id: \"hm\",\r\n\t\ttoggle: [false, false],\r\n\t\tswitchPage: function (n) { vm.toggle[n] = !(vm.toggle[n]);alert(vm.toggle[n]);}\r\n\t});\r\n\t</script>\r\n\r\n\t</body>\r\n\t</html> "},"comment":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/comments/118203912","html_url":"https://github.com/RubyLouvre/avalon/issues/894#issuecomment-118203912","issue_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/894","id":118203912,"user":{"login":"RubyLouvre","id":190846,"avatar_url":"https://avatars.githubusercontent.com/u/190846?v=3","gravatar_id":"","url":"https://api.github.com/users/RubyLouvre","html_url":"https://github.com/RubyLouvre","followers_url":"https://api.github.com/users/RubyLouvre/followers","following_url":"https://api.github.com/users/RubyLouvre/following{/other_user}","gists_url":"https://api.github.com/users/RubyLouvre/gists{/gist_id}","starred_url":"https://api.github.com/users/RubyLouvre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubyLouvre/subscriptions","organizations_url":"https://api.github.com/users/RubyLouvre/orgs","repos_url":"https://api.github.com/users/RubyLouvre/repos","events_url":"https://api.github.com/users/RubyLouvre/events{/privacy}","received_events_url":"https://api.github.com/users/RubyLouvre/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T00:49:09Z","updated_at":"2015-07-03T00:49:09Z","body":"连一个切换卡都写不好，还能让我说什么好呢！\r\n这里的例子看过了没有  https://github.com/RubyLouvre/avalon/tree/master/examples ？！\r\n这里的视频看过了没有 http://www.imooc.com/learn/270 ？！\r\navalon论坛上的基础教程看过了没有 http://www.avalon.org.cn/?number=20&category=1&from=20 ？！\r\n\r\n```html\r\n<!DOCTYPE HTML>\r\n<html>\r\n    <head>\r\n        <title></title>\r\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\r\n        <script src=\"avalon.js\"></script>\r\n    </head>\r\n    <body>\r\n        <div ms-controller=\"hm\">\r\n            <div>\r\n                <a ms-repeat=\"array\"  ms-click=\"switchPage($index)\" href=\"javascript:void(0)\">&gt;&gt; {{$index}}</a>\r\n            </div>\r\n            <div ms-repeat=\"array\"  ms-visible=\"$index === curIndex\">\r\n                <h4>第{{$index}}区</h4>\r\n            </div>\r\n        </div>\r\n        <script>\r\n            var vm = avalon.define({\r\n                $id: \"hm\",\r\n                curIndex: 0,\r\n                array: [1,2,3],\r\n                switchPage: function (a) {\r\n                    vm.curIndex = a;\r\n                }\r\n            });\r\n        </script>\r\n\r\n    </body>\r\n</html> \r\n```"}}