Open tirelyl opened 4 years ago
You can extract the data source for <app-loading>
, and I think it's easy to solve.
I debugged it and it seems that Popover works correctly. When togging its visibility, nz-popover does not re-create the overlay component.
IMHO, the reason may be that you put a component in the template
<ng-template #contentTemplate>
<app-loading></app-loading>
</ng-template>
It seems that this property is always true
and hence the view get re-created every time. Could you please take a look at this? @vthinkxie
I will have a look, thanks @wendellhu95
What problem does this feature solve?
I have a loading component in popover which will increase after ngOnInit triggering. when the popover close, the loading compinent will be destroied, the loading process bar will start over again after popover opening.
there is a demo: demo
What does the proposed API look like?
Provides an API for popover , such as
nzNotDestroyContent