Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. platformBrowserDynamic().bootstrapModule(AppModule).then((ngModuleRef: NgModuleRef<AppModule>) => {
  2. let componentFactoryResolver = ngModuleRef.componentFactoryResolver;
  3. let componentFactory = ngModuleRef.componentFactoryResolver.resolveComponentFactory(HelloComponent);
  4. let componentRef = componentFactory.create(ngModuleRef.injector, [], document.querySelector('hello'));
  5. ngModuleRef.injector.get(ApplicationRef).attachView(componentRef.hostView);
  6. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement