Search Posts

Category: tabs

Angular md-tab & ng-repeat: adding custom style to specific tabs

I’m trying to customize a couple tabs because they’re different. Here’s what I have: <md-tabs> <md-tab ng-repeat=”tab in tabs” ng-class=”tab.customClass”> <md-tab-label ng-bind=”tab.label”></md-tab-label> </md-tab> </md-tabs> My issue: the custom class is not in the compiled md-tab-item I don’t know how many tabs I have, so I cannot write CSS based on position. Any ideas? Source: AngularJS

AngularJS Select Tab from Button Click

Using the AngularJS tabs directive, is there a way to select a tab from a button. Effectively what I would like to do is click the button ‘Select Tab 3’ and the third tab will be selected. <md-button id=”button” class=”md-raised”>Select Tab Three</md-button> <div ng-cloak> <md-content> <md-tabs md-dynamic-height md-border-bottom> <md-tab label=”one”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab One</h1> </md-content> </md-tab> <md-tab label=”two”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab Two</h1> </md-tab> <md-tab label=”three” id=”three”> <md-content class=”md-padding”> <h1 class=”md-display-2″>Tab Three</h1> </md-content> </md-tab> […]