Hide nav bar if you like.

This commit is contained in:
Max Lynch
2013-10-01 23:41:57 -05:00
parent 9c5f78b9f3
commit fb85b7e91c
7 changed files with 51 additions and 24 deletions

View File

@ -53,7 +53,8 @@ angular.module('ionic.ui.nav', [])
require: '^navController',
transclude: true,
replace: true,
template: '<header class="bar bar-header bar-dark nav-bar">' +
scope: true,
template: '<header class="bar bar-header bar-dark nav-bar" ng-class="{hidden: isHidden}">' +
'<a href="#" ng-click="goBack()" class="button" ng-if="controllers.length > 1">Back</a>' +
'<h1 class="title">{{getTopController().title}}</h1>' +
'</header>',

View File

@ -5,9 +5,19 @@
this.el = opts.el;
this._titleEl = this.el.querySelector('.title');
if(opts.hidden) {
this.hide();
}
};
ionic.views.NavBar.prototype = {
hide: function() {
this.el.classList.add('hidden');
},
show: function() {
this.el.classList.remove('hidden');
},
shouldGoBack: function() {},
setTitle: function(title) {