Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.loader.load('path-to-module')
- .then(factory => {
- const module = factory.create(this._injector);
- return module.injector.get(EntryService);
- });
- import('path-to-module')
- .then(m => m.MyModule)
- .then(myModule => {
- ...
- });
- import('path-to-module')
- .then(m => m.MyModule)
- .then(myModule => {
- return this._compiler.compileModuleAsync(myModule)
- .then(factory => {
- const module = factory.create(this._injector);
- return module.injector.get(EntryService);
- });
- });
- import('path-to-module')
- .then(m => m.MyModule)
- .then(myModule => {
- const providers = myModule['ngInjectorDef'].providers; // Array<Providers>
- ... find EntryService in providers
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement