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.
NgBusyModule.forRoot(<BusyConfig>{
message: null,
backdrop: true,
template: LoaderComponent,
wrapperClass: 'ng-busy'
})
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?