I've a simple sidebar
component in my Angular
app:
<sidebar [visible]="isSidebarVisible$ | async">
<ng-container #vc [@enterLeaveAnimation]></ng-container>
</sidebar>
Inside this component I'm displaying components dynamically by lazy loading (they are getting rendered to <ng-container>
).
The problem I'm facing: according to this answer it's not possible to use animation on <ng-container>
. I can define the same animation inside every single component I wan't to lazy load, then it would work, but I don't wan't to do that. Is there a cleaner way of doing this?