Dynamically disable tab not working


#1

Can somebody help me figure out why the following does not work for disabling tabs via the disabled attribute? It works when you use: disabled=“true” but does not work with any dynamic expression or with ng-disabled.

Thanks in advance!

James


#2

Did you ever get this resolved? I need to do the same but can’t figure out how to “re-enable” the tab once a particular variable is set.


#3

I ended up not disabling them but instead “hiding” them. We then overrode tab-hidden class to make it look disabled even though it is still active. Finally we added a $scope.$watch on the selected index and manually unselect the “disabled” tab if it should be inactive.

Watch looks like: $scope.$watch(‘ctrl.$ionicTabsDelegate.selectedIndex()’, this.onTabSelected);