Created
November 15, 2018 23:31
-
-
Save LayZeeDK/52b91ef9d13bb2c00366bfe06da945f4 to your computer and use it in GitHub Desktop.
Angular routes with layout options in route data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const routes: Routes = [ | |
{ | |
path: '', | |
redirectTo: '/dashboard', | |
pathMatch: 'full', | |
}, | |
{ | |
path: '', | |
component: MainLayoutComponent, | |
children: [ | |
{ path: 'dashboard', loadChildren: () => DashboardModule }, | |
{ path: 'users', loadChildren: () => UsersModule }, | |
{ path: 'account-settings', loadChildren: () => AccountSettingsModule }, | |
{ path: 'login', loadChildren: () => LoginModule, data: { footer: false } }, | |
{ path: 'registration', loadChildren: () => RegistrationModule, data: { footer: false } }, | |
], | |
}, | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment