/** * @ngdoc directive * @name ionNavBar * @module ionic * @delegate ionic.service:$ionicNavBarDelegate * @restrict E * * @description * If we have an {@link ionic.directive:ionNavView} directive, we can also create an * ``, which will create a topbar that updates as the application state changes. * * We can add a back button by putting an {@link ionic.directive:ionNavBackButton} inside. * * We can add buttons depending on the currently visible view using * {@link ionic.directive:ionNavButtons}. * * Note that the ion-nav-bar element will only work correctly if your content has an * ionView around it. * * @usage * * ```html * * * * * * * * * Hello! * * * * ``` * * @param {string=} delegate-handle The handle used to identify this navBar * with {@link ionic.service:$ionicNavBarDelegate}. * @param align-title {string=} Where to align the title of the navbar. * Available: 'left', 'right', 'center'. Defaults to 'center'. * @param {boolean=} no-tap-scroll By default, the navbar will scroll the content * to the top when tapped. Set no-tap-scroll to true to disable this behavior. * *
* * ### Alternative Usage * * Alternatively, you may put ion-nav-bar inside of each individual view's ion-view element. * This will allow you to have the whole navbar, not just its contents, transition every view change. * * This is similar to using a header bar inside your ion-view, except it will have all the power of a navbar. * * If you do this, simply put nav buttons inside the navbar itself; do not use ``. * * * ```html * * * * *
* *
*
*
* ``` */ IonicModule .directive('ionNavBar', function() { return { restrict: 'E', controller: '$ionicNavBar', scope: true, link: function($scope, $element, $attr, ctrl) { ctrl.init(); } }; });