Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Nov 29, 2013
1 parent a4823f1 commit 6209e4d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion js/ext/angular/src/directive/ionicNavRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
backButtonIcon: '@',
alignTitle: '@'
},
template: '<header class="bar bar-header nav-bar" ng-class="{hidden: !navController.navBar.isVisible}">' +
template: '<header class="bar bar-header nav-bar" ng-class="{invisible: !navController.navBar.isVisible}">' +
'<div class="buttons"> ' +
'<button nav-back class="button" ng-if="enableBackButton && showBackButton" ng-class="backButtonType" ng-bind-html="backButtonContent"></button>' +
'<button ng-click="button.tap($event)" ng-repeat="button in leftButtons" class="button {{button.type}}" ng-bind="button.text"></button>' +
Expand Down Expand Up @@ -319,6 +319,10 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
// Should we hide a back button when this tab is shown
$scope.hideBackButton = $scope.$eval($attr.hideBackButton);

$scope.hideNavBar = $scope.$eval($attr.hideNavBar);

navCtrl.navBar.isVisible = !$scope.hideNavBar;

// Whether we should animate on tab change, also impacts whether we
// tell any parent nav controller to animate
$scope.animate = $scope.$eval($attr.animate);
Expand Down
2 changes: 1 addition & 1 deletion js/ext/angular/test/navRouter.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</pane>

<script id="page1.html" type="text/ng-template">
<nav-page title="'Bears'">
<nav-page title="'Bears'" hide-nav-bar="true">
<h1>Page 1</h1>
<span>{{num}}</span>
<a class="button button-pure" nav-back>Back</a>
Expand Down
3 changes: 3 additions & 0 deletions scss/_util.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
.show {
display: block;
}
.invisible {
visibility: hidden;
}

.inline {
display: inline-block;
Expand Down

0 comments on commit 6209e4d

Please sign in to comment.