Drift Angular
Search…
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 }
1
const appRoutes: Routes = [
2
{
3
path: '',
4
pathMatch: 'full',
5
redirectTo: '/home'
6
},
7
{
8
path: '',
9
loadChildren: './layouts/auth-layout/auth.module#AuthModule'
10
},
11
{
12
path: '',
13
loadChildren: './layouts/default-layout/default-layout.module#DefaultLayoutModule',
14
canActivate: [AuthGuard]
15
},
16
{
17
path: '**',
18
redirectTo: '/home'
19
}
20
];
Copied!
We are using Default Layout in the above example. You can chenge layout you want to use. To see layouts list, go to Layouts.
Last modified 2yr ago
Copy link