Closed
Description
Reproduction
https://stackblitz.com/edit/angular-jpbc7v
I believe the root of the issue is when the mat-tab-nav-bar is rendered before the data the fills the nav-bar is available. In the stackblitz you will see in the data-send.ts file two ways of assigning links to be passed into the nav-bar. With the timeout the ink-bar does not indicate the active tab, but without the timeout it does.
EDIT: a relatively simple fix is to either add *ngIf="links" to the data-send.html or on the actual
Expected Behavior
Ink-bar should indicate active tab regardless on when the data for the nav-bar is present.
Actual Behavior
Ink-bar only shows active tab if data is present before nav-bar is rendered
Environment
- Angular: 8.1.2
- CDK/Material: 8.1.1
- Browser(s): Chrome, Firefox
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10