UNPKG

ionic-angular

Version:

[![Circle CI](https://circleci.com/gh/driftyco/ionic.svg?style=svg)](https://circleci.com/gh/driftyco/ionic)

29 lines (28 loc) 640 B
/** * @ngdoc directive * @name navDirection * @module ionic * @restrict A * * @description * The direction which the nav view transition should animate. Available options * are: `forward`, `back`, `enter`, `exit`, `swap`. * * @usage * * ```html * <a nav-direction="forward" href="#/home">Home</a> * ``` */ IonicModule .directive('navDirection', ['$ionicViewSwitcher', function($ionicViewSwitcher) { return { restrict: 'A', priority: 1000, link: function($scope, $element, $attr) { $element.bind('click', function() { $ionicViewSwitcher.nextDirection($attr.navDirection); }); } }; }]);