-
-
Save NetanelBasal/2d00c7b44739605672760f95d5c9cf82 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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