Skip to content

Instantly share code, notes, and snippets.

@NetanelBasal
Last active November 16, 2018 11:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NetanelBasal/a1c3199ccb71a20a1a9586527d4ad7a5 to your computer and use it in GitHub Desktop.
Save NetanelBasal/a1c3199ccb71a20a1a9586527d4ad7a5 to your computer and use it in GitHub Desktop.
ngOnInit() {
const factory = this.fr.resolveComponentFactory(HelloComponent);
const ref = this.vcr.createComponent(factory);
ref.instance.name = 'World';
setTimeout(() => {
ref.instance.name = 'Netanel';
ref.changeDetectorRef.detectChanges()
}, 3000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment