Reputation: 119
I'm developing an application where I need to run some code after *ngIf has completely finished removing a component from the DOM. Specifically, I need to resize a google map, but only once the component in question is completely removed from the DOM. Is this possible? Thanks!
Upvotes: 4
Views: 686
Reputation: 5598
After you flip the switch to false just use setTimeout and run resize code there. For more information, check out this answer.
this.show = false;
setTimeout(() => {
this.resizeSomething();
})
Upvotes: 3