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 655 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,471
- 17
- 87
- 173
alexKhymenko
- 5,180
- 20
- 39