Created
April 27, 2017 18:27
-
-
Save cosemansp/9efbe48625c0d32001c64ddaf5c9cc1b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; | |
// create a platform | |
let platform = platformBrowserDynamic(); | |
// save reference to the global object | |
window['rootInjector'] = platform.injector; | |
// boostrap application | |
platform.bootstrapModule(AppModule); | |
platform.bootstrapModule(AppModule).then((module) => { | |
window['rootInjector'] = module.injector; | |
}); | |
platform.bootstrapModule(AppModule).then((module) => { | |
let applicationRef = module.injector.get(ApplicationRef); | |
let rootComponentRef = applicationRef.components[0]; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment