Skip to content

Instantly share code, notes, and snippets.

@theoomoregbee
Last active July 29, 2018 13:56
Show Gist options
  • Save theoomoregbee/b0c7aa184db578dfa490790414c1b310 to your computer and use it in GitHub Desktop.
Save theoomoregbee/b0c7aa184db578dfa490790414c1b310 to your computer and use it in GitHub Desktop.
Dashboard routes for route guard post
import { Routes } from '@angular/router';
import { LayoutComponent } from './layout/layout.component';
import { HomeComponent } from './home/home.component';
import { AdminComponent } from './admin/admin.component';
export const dashboardRoutes: Routes = [
{
path: 'dashboard',
component: LayoutComponent,
children: [
{ path: '', redirectTo: 'home', pathMatch: 'full' },
{ path: 'home', component: HomeComponent},
{ path: 'admin', component: AdminComponent}
]
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment