Skip to content
This repository was archived by the owner on Oct 14, 2024. It is now read-only.

ngOnDestroy hook not called for custom component set as template #28

@Syeda-Urooj-Fatima

Description

@Syeda-Urooj-Fatima

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions