How do you switch animations using $location.url?


#1

I have my index.html page which has the code below and when i call $location.url(“pagename.html”) the transition works perfectly. However sometimes i want to switch the animation from “left to right” to “right to left” so it seems like the user is going back. Anyone know how to do this?

INDEX.html

<body ng-app="m2iAnywhere">
<ion-nav-bar class="nav-title-slide-ios7 bar-positive">
    <ion-nav-back-button class="button-icon ion-arrow-left-c">
    </ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view animation="slide-left-right">
    <!-- Center content -->
</ion-nav-view>
</body>