Open keved93 opened 3 years ago
@crisbeto with your knowledge of angular/animations, do you know why the labels/content of the animating content there would be missing? I don't know if I understand what's going on under the hood well enough to say, but my hunch would be that it has to do with change detection not being run when one might expect it to?
What I think is going on here is that the portal that we use for the mat-tab-label
directive gets detached immediately in ngOnDestroy
and it doesn't wait for the exit animation to finish. We've had similar issue reports about mat-table
in the past. In this particular case, it can be worked around by using the label
input to set the tab label. See https://stackblitz.com/edit/angular-ivy-ppi84e?file=src%2Fapp%2Ftabs%2Ftabs.component.html.
Reproduction
StackBlitz: https://stackblitz.com/edit/angular-ivy-mdjz31
Steps to reproduce:
Expected Behavior
The label and content of the tabs should remain visible during the router animation.
Actual Behavior
The label and content are removed during the router animation
Environment