Expression ___ has changed after it was checked

后端 未结 17 1896
太阳男子
太阳男子 2020-11-22 05:53

Why is the component in this simple plunk

@Component({
  selector: \'my-app\',
  template: `
I\'m {{message}}
`, }) export class App {
17条回答
  •  鱼传尺愫
    2020-11-22 06:13

    You can also create a timer using the rxjs Observable.timer function, and then update the message in your subscription:                    

    Observable.timer(1).subscribe(()=> this.updateMessage());
    

提交回复
热议问题