I’m building an overview-list page which links to a detail page which you can swipe left/right to navigate between detail pages.
Currently this is implemented as a with for the overview and also for the detail pages. To swipe, I created an angular directive embedded in the detail page which captures Gesture.on(‘swipe’, …) and sets window.location appropriately.
(As a side note, even if I inject $location, I’m unable to use $location.path = “/detail/0” for example, which is what Angular suggests.)
While this works for swiping to the right, it’s not clear how to reverse the animation. The navRouter directive exposes $scope.navController, but it’s not clear how to change how animations work. Animations seem implemented within ionicNavRouter.js/directive(‘navRouter’)/link but there doesn’t seem to be a way to easily just add “reverse” to the class for example and get the animation defined in _animations.scss (specifically .slide-left-right .reverse).
Any thoughts? I had originally considered starting with the SlideBox controller but figured I’d try the navRouter for generality and figure out how to slide after the fact.