My route is declared like this:
const routes: Routes = [
{
path: 'somepath',
component: SomeComponent,
canActivate: [LoginGuard],
data: {
showSidebar: true
}
}
];
Then, later on, in my NgModule imports, i load the route like this:
imports: [
RouterModule.forChild(routes),
...
]
I'm wondering how I can access the data.showSidebar
flag on route-change?
Thanks.