Skip to content

Commit

Permalink
feat(navBar): allow expression in type. <nav-bar type="{{myType}}">
Browse files Browse the repository at this point in the history
Closes #599
  • Loading branch information
ajoslin committed Feb 13, 2014
1 parent e106457 commit 5470d77
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions js/ext/angular/src/directive/ionicViewState.js
Expand Up @@ -65,9 +65,10 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
backButtonType: '@',
backButtonLabel: '@',
backButtonIcon: '@',
alignTitle: '@'
alignTitle: '@',
barType: '@type'
},
template: '<header class="bar bar-header nav-bar invisible">' +
template: '<header class="bar bar-header nav-bar invisible {{barType}}">' +
'<div class="buttons"> ' +
'<button view-back class="back-button button hide" ng-if="enableBackButton"></button>' +
'<button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button no-animation {{button.type}}" bind-html-unsafe="button.content"></button>' +
Expand All @@ -92,8 +93,6 @@ angular.module('ionic.ui.viewState', ['ionic.service.view', 'ionic.service.gestu
}
}

if(tAttrs.type) tElement.addClass(tAttrs.type);

return function link($scope, $element, $attr) {
var canHaveBackButton = !(!tAttrs.backButtonType && !tAttrs.backButtonLabel && !tAttrs.backButtonIcon);
$scope.enableBackButton = canHaveBackButton;
Expand Down

0 comments on commit 5470d77

Please sign in to comment.