New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ngOnDestroy hook not called for custom component set as template #28
Comments
When the loader disappears, the event busyStop will be called. You can use that event instead as a workaround. |
@victos The use case that I am trying to fulfil is a tad bit different. I would like to know of the disappearance of loader from the .ts file instead of the template. Is there any way we can know of the disappearance of the loader from the .ts file? |
@victos - FYI - The fix contributed to version 12.0.2 for this issue breaks NgBusy in a way that is hard to diagnose.
I rolled back my application to 12.0.1 and the ngBusy message now updates as expected when I change the message and assign a new promise to the busy defined in the template. |
I'm using the ng-busy package with the following configurations:
ng-busy: 9.0.0
Angular & Angular CLI: 10.1.2
Node: 12.16.3
I have created a custom loader component and set it as the template when configuring the NgBusy module in my Angular application.
Issue
On completion of an observable (tied with an HTTP call to an API server), the loader disappears from the screen as expected. However, the ngOnDestroy hook of the custom Loader component is not called.
The custom Loader component's ngOnInit hook is called just fine as soon as the loader appears on the screen. However, the converse doesn't happen on completion of the API call.
Does the ng-busy package not support destruction of a custom component passed to it as template? Or is something incorrect regarding the configuration or usage of the module?
The text was updated successfully, but these errors were encountered: