UNPKG

ionic-cordova-gulp-seed

Version:

Ionic & Cordova & Gulp seed with organized code, tests, bower support and some other stuff. Originated from ionic-angular-cordova-seed.

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); }); } }; }]);