Skip to content

Instantly share code, notes, and snippets.

@LayZeeDK
Created November 15, 2018 23:31
Show Gist options
  • Save LayZeeDK/52b91ef9d13bb2c00366bfe06da945f4 to your computer and use it in GitHub Desktop.
Save LayZeeDK/52b91ef9d13bb2c00366bfe06da945f4 to your computer and use it in GitHub Desktop.
Angular routes with layout options in route data
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