Changing router-outlet with *ngIf in app.component.html in angular2
I am using angular 2.0 final. I am trying to change the location of the router-outlet in the main app.component.html. The template is updating fine display wise except, the first time I use router.navigate the component won't display in the new router-outlet, and there is no error. The second and every time after I use router.navigate it works properly. example template of app.component.html <div *ngIf="authenticated() == false"> <h1>not logged in</h1> <router-outlet> </router-outlet> </div> <div *ngIf="authenticated()"> <h1>logged in</h1> <router-outlet> </router-outlet> </div> I'd like to