material icon indicating copy to clipboard operation
material copied to clipboard

$mdTabs service? Select tab from controller

Open juanpujol opened this issue 11 years ago • 3 comments

Is there a way to select an md-tab from the Controller? Thank you.

juanpujol avatar May 18 '15 20:05 juanpujol

In md-tabs directive, you can add the md-selected attribute, for example:

<md-tabs md-selected="selectedIndex">
$scope.selectedIndex = newTabIndex;

ferc avatar May 18 '15 23:05 ferc

thanks @ferc, thats exactly what I needed.

juanpujol avatar May 19 '15 02:05 juanpujol

@ferc hello ,do u know how to select an md-tab from the other controller

PeaFull avatar Apr 24 '17 06:04 PeaFull