Last active
April 22, 2018 14:10
-
-
Save topnotch48/a03b626c600c99c90c452815f6ab0adc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get(token: any, notFoundValue: any = Injector.THROW_IF_NOT_FOUND) { | |
this._initIfNeeded(); | |
if (token === TestBed) { | |
return this; | |
} | |
const result = this._moduleRef.injector.get(token, UNDEFINED); | |
return result === UNDEFINED ? this._compiler.injector.get(token, notFoundValue) : result; | |
} | |
… | |
compileComponents(): Promise<any> { | |
if (this._moduleFactory || this._instantiated) { | |
return Promise.resolve(null); | |
} | |
const moduleType = this._createCompilerAndModule(); | |
return this._compiler.compileModuleAndAllComponentsAsync(moduleType) | |
.then((moduleAndComponentFactories) => { | |
this._moduleFactory = moduleAndComponentFactories.ngModuleFactory; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment