Why is the component in this simple plunk
@Component({
selector: \'my-app\',
template: `I\'m {{message}} `,
})
export class App {
I switched from AfterViewInit to AfterContentChecked and It worked for me.
Here is the process
Add dependency in your constructor:
constructor (private cdr: ChangeDetectorRef) {}
and call your login in implemented method code here:
ngAfterContentChecked() {
this.cdr.detectChanges();
// call or add here your code
}