I am facing an issue with hiding the side-menu on my login page within my Angular2 application. The app component consists of a top menu, side menu, and router-outlet.
app.component.html
<div class="row content-container">
<top-menu></top-menu>
<side-menu></side-menu>
</div>
<div class="container">
<router-outlet></router-outlet>
</div>
I currently hide the side-menu on the login page using *ngIf in side-menu.component.html as shown below.
side-menu.component.html
<div class="side-menu sidebar-inverse" background-color="black" *ngIf="isLoggedIn">
...
</div>
login.component.html
<div class="ui-g-12">
....
....
</div>
I tried embedding the entire HTML in login.component.html, but this method requires a browser refresh upon login and logout to show or hide the side menu, which is not ideal. I am seeking a more efficient way to hide the side-menu on my login page. I am using Angular-cli, Typescript, and Angular2. Any suggestions would be greatly appreciated. Thank you.