How do you switch animations using $location.url?


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?


<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-view animation="slide-left-right">
    <!-- Center content -->