{"action":"created","issue":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/410","labels_url":"https://api.github.com/repos/lhorie/mithril.js/issues/410/labels{/name}","comments_url":"https://api.github.com/repos/lhorie/mithril.js/issues/410/comments","events_url":"https://api.github.com/repos/lhorie/mithril.js/issues/410/events","html_url":"https://github.com/lhorie/mithril.js/issues/410","id":54042213,"number":410,"title":"handle embedding modules in views","user":{"login":"weepy","id":820,"avatar_url":"https://avatars.githubusercontent.com/u/820?v=3","gravatar_id":"","url":"https://api.github.com/users/weepy","html_url":"https://github.com/weepy","followers_url":"https://api.github.com/users/weepy/followers","following_url":"https://api.github.com/users/weepy/following{/other_user}","gists_url":"https://api.github.com/users/weepy/gists{/gist_id}","starred_url":"https://api.github.com/users/weepy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weepy/subscriptions","organizations_url":"https://api.github.com/users/weepy/orgs","repos_url":"https://api.github.com/users/weepy/repos","events_url":"https://api.github.com/users/weepy/events{/privacy}","received_events_url":"https://api.github.com/users/weepy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/lhorie/mithril.js/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-12T11:13:14Z","updated_at":"2015-03-18T23:10:07Z","closed_at":"2015-01-13T22:32:35Z","body":"I wanted to know if mithril might ever be able to support embedding like this :\r\n\r\n ```\r\nvar inner = {\r\n        controller: function() { return this }, \r\n        view: function() {\r\n                  return    m(\"div\", \"inner\")\r\n        }        \r\n}\r\n\r\nvar outer = {\r\n        controller: function() { return this }, \r\n        view: function() {\r\n            return    [  \r\n                            m(\"inner\", \"outer\"), \r\n                            m.module( inner )\r\n                         ]\r\n          }\r\n }\r\n\r\nm.module(document.body, outer() );\r\n\r\n```\r\n\r\nHere's a larger example:\r\n\r\nhttp://jsfiddle.net/odj8h4fa/1/"},"comment":{"url":"https://api.github.com/repos/lhorie/mithril.js/issues/comments/83220093","html_url":"https://github.com/lhorie/mithril.js/issues/410#issuecomment-83220093","issue_url":"https://api.github.com/repos/lhorie/mithril.js/issues/410","id":83220093,"user":{"login":"JoeDRL","id":4594265,"avatar_url":"https://avatars.githubusercontent.com/u/4594265?v=3","gravatar_id":"","url":"https://api.github.com/users/JoeDRL","html_url":"https://github.com/JoeDRL","followers_url":"https://api.github.com/users/JoeDRL/followers","following_url":"https://api.github.com/users/JoeDRL/following{/other_user}","gists_url":"https://api.github.com/users/JoeDRL/gists{/gist_id}","starred_url":"https://api.github.com/users/JoeDRL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JoeDRL/subscriptions","organizations_url":"https://api.github.com/users/JoeDRL/orgs","repos_url":"https://api.github.com/users/JoeDRL/repos","events_url":"https://api.github.com/users/JoeDRL/events{/privacy}","received_events_url":"https://api.github.com/users/JoeDRL/received_events","type":"User","site_admin":false},"created_at":"2015-03-18T23:10:07Z","updated_at":"2015-03-18T23:10:07Z","body":"I tend to do exactly like @StephanHoyer, except I called that function c() for component ;)\r\nWorks fine for now."}}