{"action":"created","issue":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1655","repository_url":"https://api.github.com/repos/RubyLouvre/avalon","labels_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1655/labels{/name}","comments_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1655/comments","events_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1655/events","html_url":"https://github.com/RubyLouvre/avalon/issues/1655","id":169049339,"number":1655,"title":"如何将页面模块化？","user":{"login":"rubyisapm","id":5107016,"avatar_url":"https://avatars.githubusercontent.com/u/5107016?v=3","gravatar_id":"","url":"https://api.github.com/users/rubyisapm","html_url":"https://github.com/rubyisapm","followers_url":"https://api.github.com/users/rubyisapm/followers","following_url":"https://api.github.com/users/rubyisapm/following{/other_user}","gists_url":"https://api.github.com/users/rubyisapm/gists{/gist_id}","starred_url":"https://api.github.com/users/rubyisapm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubyisapm/subscriptions","organizations_url":"https://api.github.com/users/rubyisapm/orgs","repos_url":"https://api.github.com/users/rubyisapm/repos","events_url":"https://api.github.com/users/rubyisapm/events{/privacy}","received_events_url":"https://api.github.com/users/rubyisapm/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-03T05:13:18Z","updated_at":"2016-08-03T09:20:02Z","closed_at":null,"body":"因为是后台系统，页面相对复杂，有各种弹框操作。\r\n我的想法是把vm的js和其相关的html都分离出来。\r\n一种方法是单独分离：\r\n在avalon1时，使用ms-include-src引用html；在js层面将每一个模块的vm分离为一个单独的模块，向外部提供方法。\r\n但是ms-include-src在avalon2里删除了。所以我找不到方法可以让现有页面去引用另一个html模板文件。\r\n另外还想到的一种方法：\r\n使用avalon的组件概念；\r\n但这个解决方案有一些问题：\r\n1. 这种组件定义很奇怪，不是为了重用，而是为了分离。似乎不符合组件的初衷。\r\n2. 组件定义时要写的是字符串，感觉相当难写难改，因为都是大段的html。\r\n\r\n我想请教下老师，如何做是合理的方案？或者avalon里面有哪些特性是我可以用来解决这种问题的吗？\r\n"},"comment":{"url":"https://api.github.com/repos/RubyLouvre/avalon/issues/comments/237187096","html_url":"https://github.com/RubyLouvre/avalon/issues/1655#issuecomment-237187096","issue_url":"https://api.github.com/repos/RubyLouvre/avalon/issues/1655","id":237187096,"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":"2016-08-03T09:20:02Z","updated_at":"2016-08-03T09:20:02Z","body":"webpack有一些插件可以将多个子页面合成一个完整的页面"}}
{"actor":{"display_login":"RubyLouvre"}}