Skip to content

Commit

Permalink
Changed disabled attribute to disable to match field change
Browse files Browse the repository at this point in the history
in Angular UI <tab> directive.
  • Loading branch information
rpocklin committed Oct 8, 2015
1 parent a8ed33e commit 1483d27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/ui-router-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ angular.module('ui.router.tabs').directive(

$scope.go = function(tab) {

if (!currentStateEqualTo(tab) && !tab.disabled) {
if (!currentStateEqualTo(tab) && !tab.disable) {
$state.go(tab.route, tab.params, tab.options);
}
};
Expand Down Expand Up @@ -103,7 +103,7 @@ angular.module('ui.router.tabs').directive(
['$templateCache', function($templateCache) {
var DEFAULT_TEMPLATE = '<div><tabset class="tab-container" type="{{type}}" vertical="{{vertical}}" ' +
'justified="{{justified}}">' + '<tab class="tab" ng-repeat="tab in tabs" heading="{{tab.heading}}" ' +
'active="tab.active" disable="tab.disabled" ng-click="go(tab)">' +
'active="tab.active" disable="tab.disable" ng-click="go(tab)">' +
'</tab></tabset></div>';

$templateCache.put('ui-router-tabs-default-template.html', DEFAULT_TEMPLATE);
Expand Down
2 changes: 1 addition & 1 deletion src/ui-router-tabs.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ describe('Directive : UI Router : Tabs', function() {

var previous_state = get_current_state();

scope.tabConfiguration[0].disabled = true;
scope.tabConfiguration[0].disable = true;
$ngView.find('a').eq(0).click();
scope.$apply();

Expand Down

0 comments on commit 1483d27

Please sign in to comment.