Last active
November 8, 2018 08:58
-
-
Save Muzammil-Bilwani/103f9790bb5e82243b427694a13323be to your computer and use it in GitHub Desktop.
Breadcrumbs for Angular
This file contains 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: '', | |
component: MainComponent, | |
data: { | |
breadcrumb: '' | |
}, | |
children: [ | |
{ | |
path: "orders", component: ordersComponent, | |
data: { | |
breadcrumb: 'Order List' | |
}, | |
children: | |
[ | |
{ | |
path: "", component: OrderListComponent | |
}, | |
{ | |
path: ":id", component: SingleOrderComponent, data: { | |
breadcrumb: 'Order Detail' | |
} | |
} | |
] | |
}, | |
{ | |
path: 'dashboard', component: OrderList | |
}, | |
{ path: "", redirectTo: "orders", pathMatch: "full" }, | |
] | |
}]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment