解决 ng-zorro控件 tplModal 报错Error: ExpressionChangedAfterItHasBeenCheckedError

2019-05-28 16:23:07 浏览数 (1)

报错信息

ERROR Error: ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked. Previous value: 'ngIf: undefined'. Current value:...

解决办吧 将相关语句包裹在setTimeout里 ,例如

代码语言:javascript复制
 setTimeout(() => {

      this.createTplModal(this.tplTitle, this.tplContent, this.tplFooter);


    }, 300);

0 人点赞