Using:
"@angular/core": "2.2.2", "@angular/router": "3.2.2",
Routes look like:
export const rootRouterConfig: Routes = [ { path: '', resolve: { profile: PrefetchProfileService }, children: [ {path: '', component: Pages.LandingComponent, pathMatch: 'full'}, {path: 'pl', component: PersonalLoanComponent}, {path: 'login', component: Pages.LoginComponent, canActivate: [ExistingSessionGuard]}, {path: 'register', component: Pages.RegisterComponent, canActivate: [ExistingSessionGuard]}, {path: 'home', component: Pages.HomeComponent, canActivate: [AuthGuard]}, ] } ];
The issue is that resolve is not triggering for any direct navigation to a child path. Ex: if user navigates directly to /login, PrefetchProfileService is not called. If user navigates to /, then goes to /login, everything is fine. How do I deal with this correctly?