{"action":"created","issue":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/857","repository_url":"https://api.github.com/repos/aspnet/Blazor","labels_url":"https://api.github.com/repos/aspnet/Blazor/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/aspnet/Blazor/issues/857/comments","events_url":"https://api.github.com/repos/aspnet/Blazor/issues/857/events","html_url":"https://github.com/aspnet/Blazor/issues/857","id":324448000,"number":857,"title":"Need a way to access a layout from a page","user":{"login":"masonwheeler","id":7650031,"avatar_url":"https://avatars2.githubusercontent.com/u/7650031?v=4","gravatar_id":"","url":"https://api.github.com/users/masonwheeler","html_url":"https://github.com/masonwheeler","followers_url":"https://api.github.com/users/masonwheeler/followers","following_url":"https://api.github.com/users/masonwheeler/following{/other_user}","gists_url":"https://api.github.com/users/masonwheeler/gists{/gist_id}","starred_url":"https://api.github.com/users/masonwheeler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masonwheeler/subscriptions","organizations_url":"https://api.github.com/users/masonwheeler/orgs","repos_url":"https://api.github.com/users/masonwheeler/repos","events_url":"https://api.github.com/users/masonwheeler/events{/privacy}","received_events_url":"https://api.github.com/users/masonwheeler/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-18T15:07:44Z","updated_at":"2018-05-22T12:54:29Z","closed_at":"2018-05-22T09:53:59Z","author_association":"NONE","body":"Currently, if a page has a layout, there doesn't appear to be any way for the page to get a reference to it.  This can be very frustrating if you want to pass parameters from the route data to the layout, for example.\r\n\r\nIs there a way to do this that isn't obvious?  If not, can it get added to the next release?"},"comment":{"url":"https://api.github.com/repos/aspnet/Blazor/issues/comments/390979063","html_url":"https://github.com/aspnet/Blazor/issues/857#issuecomment-390979063","issue_url":"https://api.github.com/repos/aspnet/Blazor/issues/857","id":390979063,"user":{"login":"SteveSandersonMS","id":1101362,"avatar_url":"https://avatars3.githubusercontent.com/u/1101362?v=4","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":"2018-05-22T12:54:29Z","updated_at":"2018-05-22T12:54:29Z","author_association":"MEMBER","body":"> I come from a React/Redux world, where the router is an explicit component like any other, rather than the somewhat implicit routing we have here in Blazor.\r\n\r\nThe router is also an explicit component in Blazor. In the default template, you'll find it in `App.cshtml`. The thing that's more different between Blazor and `react-router` is that Blazor has a layout system whereby a component can nominate its own layout. With `react-router` you don't really have layouts as a build-in notion; instead you just create a hierarchy of components where you vary the render output at some point in the tree based on the current route. We could do the same in Blazor but have designed the current system to be more familiar to Razor Pages developers. Maybe we'll end up changing it. I'd appreciate any feedback you come up with about advantages and disadvantages of different possible approaches."}}
{"actor":{"display_login":"SteveSandersonMS"}}