How to Get Active Angular Material Tab

I want to find the active tab in the material and save it in a cookie:

var activeTab = $cookieStore.get("active"); $cookieStore.put('active',$scope.selectedIndex); console.log(active); 

How to find active tab in angular material

Here is an example codepen

+7
angularjs angular-material
source share
1 answer

Using md-on-select="onTabChanges(tabNumber)" , you can "monitor" tab changes.

Example in this codec: Angular Material selected by tab

+7
source share

All Articles