I am trying to create an input / release animation for a slide menu. The menu opens with * ngIf (because I need ngOnInt)
Outwardly:
<app-slide-menu *ngIf="isOpen"></app-slide-menu>
inside
<div class="dark-overlay" [@fadeinout] ></div> <nav class="menu" [@slideinout] > <a>Link</a> <a>Link</a> <a>Link</a> <a>Link</a> </nav>
When isOpen changes externally, the :enter animations for the children of the app-slide-menu work, however the :leave animation :leave not used when isOpen = false .
It seems that the *ngIf parent is not delayed for child animations / they donβt even know that they are dying.
Should I do something like passing in isOpen: boolean via @Input() and apply it to child elements?
Perhaps even add animations to HostBinding that does nothing but delay *ngIf ?
source share