diff --git a/js/ext/angular/src/directive/ionicNavBar.js b/js/ext/angular/src/directive/ionicNavBar.js index f0a6243ad2..398dd3a55f 100644 --- a/js/ext/angular/src/directive/ionicNavBar.js +++ b/js/ext/angular/src/directive/ionicNavBar.js @@ -270,10 +270,8 @@ function($ionicViewService, $rootScope, $animate, $compile, $parse) { * * Will show up when the user is able to go back in the current navigation stack. * - * By default, will go back when clicked. If you wish to set a custom action on click, - * simply define an `ng-click` attribute and use - * {@link ionic.controller:ionicNavBar#back ionicNavBar controller's .back method} to go back - * when wished. + * By default, will go back when clicked. If you wish for more advanced behavior, see the + * examples below. * * @usage * @@ -287,16 +285,28 @@ function($ionicViewService, $rootScope, $animate, $compile, $parse) { * * ``` * - * With custom click action: + * With custom click action, using {@link ionic.controller:ionicNavBar ionicNavBar controller}: * * ```html - * + * * - * Back! + * Back * * * ``` + * + * Displaying the previous title on the back button, again using + * {@link ionic.controller:ionicNavBar ionicNavBar controller}. + * + * ```html + * + * + * {% raw %}{{navBarController.getPreviousTitle() || 'Back'}}{% endraw %} + * + * + * ``` + * */ .directive('ionNavBackButton', ['$ionicNgClick', function($ionicNgClick) { return {