Is there any way to cancel all animations in app?
This will turn off all transition animations between views:
angular.module('ionicApp', ['ionic'])
.config(function($stateProvider, $urlRouterProvider, $ionicConfigProvider ) {
$ionicConfigProvider.views.transition('none');
})
Thank you very mutch for replay
I get an error saying:
"Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to:
TypeError: Cannot read property âtransitionâ of undefined "
hm, when i checked documentations, i could not see anyting wrong on my part. Should i include any angularjs modules or something?
Hmm Iâm not sure. Do you have an <ion-nav-view>
tag declared ? It looks like that is what it is trying to attach the transition to:
<ion-nav-view class="view-container" nav-view-transition="none" nav-view-direction="none">
</ion-nav-view>
Cool, i will try this solution
Thank you
Hi brandyshea
i keep getting this error too when i try to disable animations. i am currently not using the âion-nav-viewâ tag, i am only using âion-viewâ for my templates, could this be the problem?
Thanks
Yes, it is setting nav-view-transition
to none
when you use this configuration. You should have (at least) one ion-nav-view
that holds your views. If you arenât using an ion-nav-view
it has nothing to attach it to. What is the structure of your app like?
in our app we have multiple states that have their own template
.state('app.example, {
url: "/example",
views: {
example': {
templateUrl: "templates/example.html",
controller: "ExampleCtrl"
}
}
})
the template for the state looks like
<ion-view> what we want to display </ion-view>
âEDITâ
We have one ion-nav-view tag in out index but still getting this error:
TypeError: Cannot read property âtransitionâ of undefined
Could you throw together a quick codepen with your app structure?
thanks for your help brandyshea, I managed to fix this problem by updating the version of ionic we were using.
cheers