Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- platformBrowserDynamic().bootstrapModule(AppModule).then((ngModuleRef: NgModuleRef<AppModule>) => {
- let componentFactoryResolver = ngModuleRef.componentFactoryResolver;
- let componentFactory = ngModuleRef.componentFactoryResolver.resolveComponentFactory(HelloComponent);
- let componentRef = componentFactory.create(ngModuleRef.injector, [], document.querySelector('hello'));
- ngModuleRef.injector.get(ApplicationRef).attachView(componentRef.hostView);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement