Hi everyone, I have a question. I'll explain what I wanted to do.

The idea is my AppComponent to be a MasterLayoutPage for example

<div class="layout-wrapper" *ngIf="!showLoginLayout">
 <app-sidebar></app-sidebar>
 <div id="layout-content">
   <app-topbar></app-topbar>
   <div >
     <router-outlet></router-outlet>
   </div>
   <app-footer></app-footer>
 </div>
</div>


However, I want the login screen to load another template 

I've tried it that way.

<div class="layout-wrapper" *ngIf="!showLoginLayout">
 <app-sidebar></app-sidebar>
 <div id="layout-content">
   <app-topbar></app-topbar>
   <div >
     <router-outlet></router-outlet>
   </div>
   <app-footer></app-footer>
 </div>
</div>


<div class="loginLayout" *ngIf="showLoginLayout">
 <router-outlet></router-outlet>    
</div>


But I do not know if it's a good way to do this

My route file looks like this

const appRoutes: Routes = [
 { path: '', redirectTo: 'home', pathMatch: 'full' },
 { path: 'home', component: HomeComponent, canActivate: [AuthGuard]},
 { path: 'login', component: LoginComponent }
];

Is there any other way to do this?

Thank you guys, waiting

-- 
You received this message because you are subscribed to the Google Groups 
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to