Expression ___ has changed after it was checked

后端 未结 17 1880
太阳男子
太阳男子 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:17

    I couldnt comment on @Biranchi s post since I dont have enough reputation, but it fixed the problem for me.

    One thing to note! If adding changeDetection: ChangeDetectionStrategy.OnPush on the component didn't work, and its a child component (dumb component) try adding it to the parent also.

    This fixed the bug, but I wonder what are the side effects of this.

提交回复
热议问题