ObjectUnsubscribedError: object unsubscribed error when I am using ngx-progress in angular 2

前端 未结 4 1066
自闭症患者
自闭症患者 2021-02-04 03:12

I am using ngx-progressbar bar in Angular 2 application. When app loading first it is working fine. second time it is showing error. I referred few article like medium.com for s

4条回答
  •  萌比男神i
    2021-02-04 03:33

    This is happening because the component that holds the progressbar is being destroyed while the progressbar is running, so you should put in a root component (or a component that does not get destroyed)

    If you are using the progress for http requests there is a new feature called automagic progressbar, you might want to try it out!

    Update

    Since v2.1.1, you can use the component anywhere without getting that error

提交回复
热议问题