Angular 2.4.8... My app has a primary module with its own routing module. It lazy loads a secondary module with its own routing module. The primary module references the secondary routing module so Angular keeps track of the routing arrays in proper order and everything works groovy.
The secondary module declares a custom provider that implements RouterReuseStrategy so it can reuse one of its child components. This worked great while the primary module directly referenced the secondary module, pre-loading everything up front. But then I changed the primary route to lazy load the secondary module and the custom RouterReuseStrategy provider stopped working altogether, in fact its constructor isn't even invoked. The primary module declares the provider like this: providers: [{ provide: RouteReuseStrategy, useClass: CustomReuseStrategy }] The primary routing module lazy loads the secondary module like this: loadChildren: '../foo/foo.module#FooModule'. *More simply*: *Can a module both have its own RouterReuseStrategy and be lazy loaded?* Any help would be greatly appreciated -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to angular+unsubscr...@googlegroups.com. To post to this group, send email to angular@googlegroups.com. Visit this group at https://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.