In my angular2 app I have different pages. Every page except login page should contain menu area. I tried to make like that first:
RootComponentTemplate:
<menu></menu>
<router-outlet></router-outlet>
But I did not find the way to hide menu tag if the user is in login page.
I think that another way is to add menu tag to template of every component, but it seems a little bit weired.
Example:
ExamplePage
<menu></menu>
<content></content>
Example Page1
<menu></menu>
<content1></content1>
What is the right way to add common component to every page? Or is there a good way to say the root component to hide menu in login page?
I also found this question/solution , is it the right way?