Comment on page
Setup Layout
Setup layout which we want to use in our App.
To setup layout point path of that layout in routes as following :
{
path: '',
loadChildren: './layouts/default-layout/default-layout.module#DefaultLayoutModule',
canActivate: [AuthGuard] // Make Auth Route
}
const appRoutes: Routes = [
{
path: '',
pathMatch: 'full',
redirectTo: '/home'
},
{
path: '',
loadChildren: './layouts/auth-layout/auth.module#AuthModule'
},
{
path: '',
loadChildren: './layouts/default-layout/default-layout.module#DefaultLayoutModule',
canActivate: [AuthGuard]
},
{
path: '**',
redirectTo: '/home'
}
];
We are using Default Layout in the above example. You can chenge layout you want to use. To see layouts list, go to Layouts.