I am trying to set side bar routes based on different user role privileges. The code for setting side bar routes is in site-resolver service. Which I have called in parent path which I think should be also called for its child routes. But instead, this resolver is getting called only when I refresh the particular child route.
Here's the example of my site-routing service:
{
path: ':siteId',
resolve: { site: SiteResolverService },
children: [
// ... other child routes
{
path: 'jsa-training-user-assigned-jsa',
loadChildren: () => import('../jsa-quiz/jsa-quiz.module').then(m => m.JsaQuizModule),
canActivate: [RoleGuardService],
data: { expectedRole: [UserRole.SystemAdmin, UserRole.JsaCreator, UserRole.SiteAdmin, UserRole.PasscodeUser] },
runGuardsAndResolvers: 'always'
},
// ... other child routes
]
here in this route i want the resolver to get called without refreshing, so i have tried below, but not working.
runGuardsAndResolvers: 'always'