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/2d00c7b44739605672760f95d5c9cf82 to your computer and use it in GitHub Desktop.
Save NetanelBasal/2d00c7b44739605672760f95d5c9cf82 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.injector.get(ChangeDetectorRef).markForCheck(); // or detectChanges()
}, 3000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment