Search code examples
angularjstransitionionic-framework

Ionic Framework page transition direction


I'm using Ionic Framework with Angularjs for my app, but I'm getting stuck on the page transitions.

The app is for iOS and the back button gives the direction as forward. Is it possible to set the direction with javascript / Angularjs?

Here is part of my page config.

.config(function ($stateProvider, $urlRouterProvider) {
    $stateProvider

        .state('app', {
            url: "/app",
            abstract: true,
            templateUrl: "templates/menu.html",
            controller: 'AppCtrl'
        })
        .state('app.dashboard', {
            url: "/dashboard",
            views: {
                'menuContent': {
                    templateUrl: "templates/dashboard/dashboard.html"
                }
            }
        })
        .state('app.DLRlogin', {
            url: "/DLR_login",
            views: {
                'menuContent': {
                    templateUrl: "templates/dlr/dlr_login.html"
                }
            }
        })
        .state('app.search_phone', {
            url: "/search_phone",
            views: {
                'menuContent': {
                    templateUrl: "templates/search_phone/search_phone.html"
                }
            }
        })

When the user goes from Dashboard to a page the transition goed forward, which is good, but the back button also gives a forward transition.


Solution

  • You can define view transitions in $ionicConfigProvider, but you should update to Beta 14.