I'm starting with the sideMenu template with the ionic framework, but instead of having the navigation bar in the header, I'd like to have it in the footer. What's the best way to do this?
Currently, I've added my own ionNavBar directive that optionally sets the appropriate class:
angular.module('myApp')
.directive('ionNavBar', [
function() {
return {
restrict: 'E',
compile: function(tElement, tAttr) {
if(tAttr.isFooter !== undefined) {
tElement.removeClass('bar-header').addClass('bar-footer');
}
}
};
}
]);
This moves the nav bar to where I'd like, but my content has the has-header
class which leaves space on the top of the screen.
It looks like there's a .watch() in the ionContent directive to check its parentScope for $hasHeader and $hasFooter to set has-header
and has-footer
classes automagically.
How (and where) do I set $hasHeader = false
and $hasFooter = true
to make this work?
Thanks!
It was recommended by @ionicframework not to try to move the header to be a footer b/c Apple might reject it for not following the Apple Design Guidelines.