I\'ve been using the approach described in an MSDN blog post to simplify extending components without needing to provide all the dependencies in the super()
cal
I have set the injector service in AppModule and that mean I will inject Injector and set it in the constractor of AppModule and store the injector service in global object
export class AppModule {
constructor(injector:Injector){
// Store module's injector in the AppInjector class
console.log('Expected #1: storing app injector');
AppInjector.setInjector(injector);
}
}
demo