ExpressionChangedAfterItHasBeenCheckedError Explained

前端 未结 26 1884
慢半拍i
慢半拍i 2020-11-22 14:46

Please explain to me why I keep getting this error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked.

Obviously,

26条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-22 15:26

    I got this error because i was using a variable in component.html which was not declared in component.ts. Once I removed the part in HTML, this error was gone.

提交回复
热议问题