5

I am working on the Angular Material's Tabs Component (https://material.angular.io/components/tabs/overview)

By default, the first tab is selected after the page load.

How can I change to some another specific tab to already be selected when the page loads.

Nechar Joshi
  • 630
  • 1
  • 7
  • 14
  • Possible duplicate of [How to get the active tab In Angular Material2](https://stackoverflow.com/questions/41653180/how-to-get-the-active-tab-in-angular-material2) – Aditya Shukla Nov 30 '17 at 07:22

1 Answers1

13

You can use [selectedIndex]="selectedIndex" for your tab to specifically pick which tab to be display

i3lai3la
  • 980
  • 6
  • 10
  • 1
    in addition, once the tabs have been rendered, if you want to change it programmatically use `[(selectedIndex)]="selectedIndex"` . – csantana Jul 26 '19 at 16:34