How to set the animation when back to a tab page from a certain page?

Hey,I‘m from China,this is my first post:).
I google this case for many solutions but no one can solve my problem.
Here is my problem:

abstract: true,
templateUrl: “templates/tabs.html”,
.state(‘tabs.home’, {
url: “/home”,
views: {
‘home-tab’: {
templateUrl: “templates/home.html”,
templateUrl: “templates/detail.html”,

When I navigate to my detail page from home page, ionic don’t display the back button on detail page and there is no animation,so I found this solution from,and add nav-direction in home page :

<a ng-bind-html="item.text | linkformat" ui-sref="detail({msgId:'{{}}'})" class="text" ​nav-transition="ios" nav-direction="forward"></a>

.controller(‘yourCtrl’, function($scope) {

$scope.$on(’$ionicView.beforeEnter’, function (event, viewData) {
viewData.enableBack = true;


so the back button display again,but when I click it and back to home page, the animation disappear again.I change the ion-nav-view like this,but it does not help.

<ion-nav-view animation="slide-left-right">

anybody can help me?:joy: