【发布时间】:2020-06-29 07:51:40
【问题描述】:
我正在尝试使用以下示例为 div 背景分配随机颜色
但面临以下错误:
错误:ExpressionChangedAfterItHasBeenCheckedError:表达式有 检查后改了。
您可以签入控制台创建的stackblitz。
我已经尝试过以下答案:
- How to manage Angular2 "expression has changed after it was checked" exception when a component property depends on current datetime
- Expression ___ has changed after it was checked
但没有运气!任何人都可以看看这个并提供帮助吗?
【问题讨论】:
标签: html angular typescript random background-color