Skip to content

Instantly share code, notes, and snippets.

@arturovt
Created July 28, 2019 17:35
Show Gist options
  • Save arturovt/2bd8edc4936ff57dfbfa37dddeeac992 to your computer and use it in GitHub Desktop.
Save arturovt/2bd8edc4936ff57dfbfa37dddeeac992 to your computer and use it in GitHub Desktop.
import { Component, ɵrenderComponent as renderComponent, Injector } from '@angular/core';
@Component({
selector: 'app-root',
template: `
<app-button></app-button>
`
})
export class AppComponent {
constructor(injector: Injector) {
import('./button.component').then(({ ButtonComponent }) => {
renderComponent(ButtonComponent, { injector });
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment