I have a question regarding material design md-tabs control. I am using md-tabs with Angularjs on one of the pages and it works fine. I also have a md-button on that page and what we want to do is, when user click that button we want to move to the next tab. I am new to this whole material-angular thing and would appreciate if somebody could guide me in right direction.
相关问题
- angularJS: ui-router equivalent to $location.searc
- Separate AngularJS Controllers Into Separate Files
- Angular ngAnimate not working first time on page l
- Ionic Spinner not showing up
- Angular Mat Select CompareWith ID number, and Emit
相关文章
- Angular Material Stepper causes mat-formfield to v
- Angular material table not showing data
- Passing variable through URL with angular js
- Watch entire object (deep watch) with AngularJS
- Angular ng-if change span text
- Can ng-show directive be used with a delay
- AngularJS $routeParams vs $stateParams
- Multiple parameters in AngularJS $resource GET
You can use the
md-selected
attribute onmd-tabs
directive.md-tabs
usesmd-selected
attribute to decide which tab is selected. So you can simply update$scope.selectedTab
on click of yourmd-button
to select the desired tab.Have a look at this code snippet:
we can use "
selectedIndex
" for doing this, put the tab index value as selectedindex then it will make that tab active, we can use selectedIndex in<md-tab-group>
it will start from zero. For more details please review tabs