且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

angular 2-负载共享服务

更新时间:2023-08-25 13:28:28

我可以建议ExpressionChangedAfterItHasBeenCheckedError的解决方法.

I can suggest a work around for the ExpressionChangedAfterItHasBeenCheckedError.

这是枪手在这里 https://***.com/a/43375600/2708210

您可以做的是在setTimeout内进行呼叫,这是我遇到的问题,并且可以解决此问题.

what you can do is make the call inside of a setTimeout i had this issue and this was a work around.

 this.subscription = this.service.spinner$
  .subscribe(item => setTimeout(() => this.showProgress = item, 0)); 

这是我的应用程序 git链接