{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/107","repository_url":"https://api.github.com/repos/aspnet/JavaScriptServices","labels_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/107/comments","events_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/107/events","html_url":"https://github.com/aspnet/JavaScriptServices/issues/107","id":157869345,"number":107,"title":"Proposal: Add ability to pass @Model to prerendered boot func","user":{"login":"laskoviymishka","id":2754361,"avatar_url":"https://avatars.githubusercontent.com/u/2754361?v=3","gravatar_id":"","url":"https://api.github.com/users/laskoviymishka","html_url":"https://github.com/laskoviymishka","followers_url":"https://api.github.com/users/laskoviymishka/followers","following_url":"https://api.github.com/users/laskoviymishka/following{/other_user}","gists_url":"https://api.github.com/users/laskoviymishka/gists{/gist_id}","starred_url":"https://api.github.com/users/laskoviymishka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laskoviymishka/subscriptions","organizations_url":"https://api.github.com/users/laskoviymishka/orgs","repos_url":"https://api.github.com/users/laskoviymishka/repos","events_url":"https://api.github.com/users/laskoviymishka/events{/privacy}","received_events_url":"https://api.github.com/users/laskoviymishka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-06-01T10:05:50Z","updated_at":"2016-06-14T10:50:26Z","closed_at":null,"body":"It would be nice to see some ability to pass extension model for our prerendered components. It could be very helpfull for some redux/flux apps (we could populate initial state with them). And it could reduce total overhead of loading some info via Http requests.\r\nProposal api looks pretty simple. In tag helper add populate new attribute:\r\n```\r\n<app asp-prerender-module=\"ClientApp/boot-server\"\r\n     asp-prerender-model=\"Model\"\r\n     asp-prerender-webpack-config=\"webpack.config.js\">Loading...</app>\r\n```\r\n\r\nInside boot func there is new optional parameter, which popuated from `asp-prerender-model` attribute:\r\n```\r\nexport interface BootFunc {\r\n  (params: BootFuncParams, model: any): Promise<RenderToStringResult>;\r\n}\r\n```\r\nSuch feature would be really good for building some dynamic parts for exist applications (not whole application handled by some JS-framework)."},"comment":{"url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/comments/225846390","html_url":"https://github.com/aspnet/JavaScriptServices/issues/107#issuecomment-225846390","issue_url":"https://api.github.com/repos/aspnet/JavaScriptServices/issues/107","id":225846390,"user":{"login":"SteveSandersonMS","id":1101362,"avatar_url":"https://avatars.githubusercontent.com/u/1101362?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveSandersonMS","html_url":"https://github.com/SteveSandersonMS","followers_url":"https://api.github.com/users/SteveSandersonMS/followers","following_url":"https://api.github.com/users/SteveSandersonMS/following{/other_user}","gists_url":"https://api.github.com/users/SteveSandersonMS/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveSandersonMS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveSandersonMS/subscriptions","organizations_url":"https://api.github.com/users/SteveSandersonMS/orgs","repos_url":"https://api.github.com/users/SteveSandersonMS/repos","events_url":"https://api.github.com/users/SteveSandersonMS/events{/privacy}","received_events_url":"https://api.github.com/users/SteveSandersonMS/received_events","type":"User","site_admin":false},"created_at":"2016-06-14T10:50:26Z","updated_at":"2016-06-14T10:50:26Z","body":"Having the ability to pass an arbitrary set of properties into the boot function will cover all the requirements we've discussed here. It's up to the developer to assign whatever meaning they want to those properties, and as such they can separate their concerns in any way they want."}}
{"actor":{"display_login":"SteveSandersonMS"}}