You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
Use case (sorry using ng-classy controller if it looks weird I can translate:
init: function(){varself=this;this.$scope.resource=this.widget;this.base_route='widgets.resource.form';this.$scope.tabs=[{heading: "<i class='fa fa-info-circle fa-fw'></i> First Tab",route: "first",visible: true},{heading: "<i class='fa fa-question-circle fa-fw'></i> Second Tab",route: "second",visible: (!this.$scope.resource.isNew())},{heading: "<i class='fa fa-envelope fa-fw'></i> Third Tab",route: "third",visible: (!this.$scope.resource.isNew())}];},currentRouteName: function(){returnthis.$state.current.name.split(".").pop();},tabSelected: function(tab){this.go(tab.route);},selectedIndex: function(){varself=this;return_.findIndex(self.$scope.tabs,function(scope_tab){return(scope_tab.route==self.currentRouteName());});},
Its actually working for me currently, but its still trying to assign selectedIndex which is obviously in my case a function, so throwing the error. It looks as if the directive overall was not built to support this, yet I could have sworn I had it working flawlessly in (much) earlier versions. -- Anyways it would be nice to have an interface that would allow for the above, whether assigning directly to selectedIndex or a new selectedTab argument, which is expected to be a function which returns the selected tab index. Particularly helpful for use w UI router
The text was updated successfully, but these errors were encountered:
@jasonayre - As you have discovered, Tabs uses a two-way databinding to the the md-selected expression. Here is a CodePen Demo that shows the usage of Tabs, selectedIndex, and ngRoute:
Closes#1044.
By default, now tab content will animate in from whichever direction the
ink-bar is moving. These animations can be overridden through the
following classes:
When a tab is selected, the following classes are added in order:
1. `md-transition-rtl`: flags the animation as right-to-left
2. `ng-animate`: added at the start of all animations
3. `ng-hide-remove`
4. `ng-hide-remove-active`
When a tab is deselected, the following classes are added in order:
1. `md-transition-rtl`: flags the animation as right-to-left
2. `ng-animate`: added at the start of all animations
3. `ng-hide-add`
4. `ng-hide-add-active`
Closes#717.
Closes#811.
refactor(tabs): removes unnecessary check
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Right now if I want to use a function for selectedIndex, it throws the following error
Use case (sorry using ng-classy controller if it looks weird I can translate:
Its actually working for me currently, but its still trying to assign selectedIndex which is obviously in my case a function, so throwing the error. It looks as if the directive overall was not built to support this, yet I could have sworn I had it working flawlessly in (much) earlier versions. -- Anyways it would be nice to have an interface that would allow for the above, whether assigning directly to selectedIndex or a new selectedTab argument, which is expected to be a function which returns the selected tab index. Particularly helpful for use w UI router
The text was updated successfully, but these errors were encountered: