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!
Asked
Active
Viewed 681 times
1 Answers
3
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();
})

halfer
- 19,824
- 17
- 99
- 186

alexKhymenko
- 5,450
- 23
- 40