Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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);
- }
Add Comment
Please, Sign In to add comment