Use $ionicHistory To Stop Slide Animation Issues In Ionic

I’m a beginner with the ionic framework and ran into a stupid problem. In the application himself, there are few window.location.hash Calls to lead the user through different pages (forwards and backward) and after going to a previous page, the slider animation went crazy and quite choppy. The usual animated direction is from right to left, but the direction changed, in that case, few times from left to right and from right to left and back from right to left, etc. if the next page was the latest previous page.

Now the case was clear, and the issue made sense because ionic change the direction of the animation if you visit the last previous page again. Now I needed to deactivate the URL tracking by using the $ionicHistory service which I called in my controller:

.controller('MainCtrl', function($scope, $ionicHistory){
        disableBack: true


With that part, there’s no back history anymore in the global view history, and ionic don’t use the backward animation for a previous page anymore.

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn