Multiple layouts
I trying to achieve the following and I'm not sure if it's possible.
I would like the home page of the application as well as most of the other routes to share a common layout, but for a particular path and it's children to have a completely different layout.
Imagine the majority of the pages have an unauthenticated layout but a select few use an authenticated layout.
4 Replies
xenial-black•2y ago
Could you maybe describe the URLs you are trying to achieve, and which routes are nested with something else.
extended-salmon•17mo ago
Im tryiung to archive the same @Sean Cassiere
I would say.
/login ---> to have no layout (or empty layout?)
/ ---> main layout
/tickets / ---> main layout
I don't see anything in the docs related to multiple layoutss. I guess, I could use a hack with the <Outlet /> but first wanted to know if there are specifics solutions for this.
xenial-black•17mo ago
Using multiple layouts are easy.
Its just a matter of naming your files like this.
This generates the following URLs.
- /
- /tickets
- /login
- /a-route-outside-of-all-layouts
extended-salmon•17mo ago
Thanks! Appreciate it!