tomastrajan / angular-ngrx-material-starter

Angular, NgRx, Angular CLI & Angular Material Starter Project
https://tomastrajan.github.io/angular-ngrx-material-starter
MIT License
2.82k stars 919 forks source link

A router path with full screen? #515

Closed goforu closed 4 years ago

goforu commented 4 years ago

Hi, I want to have a full screen page with no sidebar toolbar etc. How can I achieve that?

tomastrajan commented 4 years ago

@goforu I am not sure if I understand ? Can you please provide screenshot?

goforu commented 4 years ago

for say.. like I want to create an isolated login page, I add my path to the router as below. image It shows in the middle of the page with toolbar, footer and so on because the outlet tag is surrounded by those components. That's obviously not what I want. I want a new blank page when I type http://xxx/login. How to achieve this? image

tomastrajan commented 4 years ago

You would have to restructure whole application so that the is the <router-outlet> as the first component and everything is a route, then there will be some main-layout route which would have children which are all the current routes... Then you can have sibling routes like login without any layout...

Another way would be to have special service where some routes would set some special state... That state can be used in main layout to hide toolbar and footer..

This is out of scope for this project and will not be implemented in the starter.

Good luck with your project!