I am using Lazy Loading strategy of subcomponents in my application. On the top level of application, I have custom HTTP provider which intercept all ajax calls.
providers:[{
provide: Http,
useFactory: (backend: XHRBackend, defaultOptions: RequestOptions, cookieService: CookieService) => new CustomHttp(backend, defaultOptions, cookieService),
deps: [XHRBackend, RequestOptions, CookieService]
}]
My lazy loaded modules do not affect this custom provider. Is there a way to provide it for them too? Without duplication of code in the providers
property in the component.module file. Thank you!