0

I am trying to rewrite Angular5 app into lazy loaded modules, but cannot identify why resolvers are not triggered. Modules are loaded properly, but resolver never. I have tried multiple different components and always facing the same issue. How should I debug this problem?

app.modules.ts

    {
        path: 'room',
        children: [
            {
                path: ':name',
                pathMatch: 'full',
                loadChildren: './expert/room/room.module#RoomModule',
                resolve: {
                    room: RoomResolver,
                },
            },
        ],
    },

room.module.ts

const routes: Routes = [
    {
      path: '',
      component: RoomComponent,
    }
  ];

@NgModule({
  imports: [
    CommonModule,
    BrowserModule,
    RouterModule.forChild(<any> routes),
  ],
  declarations: [RoomComponent],
})
export class RoomModule { }
jokuja
  • 89
  • 1
  • 15
  • Does this answer your question? [resolver on lazy loading angular](https://stackoverflow.com/questions/53346976/resolver-on-lazy-loading-angular) – Sachith Rukshan Aug 14 '20 at 18:00
  • Thanks for sharing, but I already went through this question in detail and removed all AuthGuard and it makes no difference. – jokuja Aug 14 '20 at 18:10

0 Answers0