remove flicker before back view transition

This commit is contained in:
Adam Bradley
2014-01-13 22:53:51 -06:00
parent 27311d5d18
commit 41a7b45f0e
8 changed files with 18 additions and 9 deletions

View File

@@ -51,7 +51,7 @@ angular.module('ionic.service.view', ['ui.router'])
}])
.factory('$ionicViewService', ['$rootScope', '$state', '$location', '$window', '$injector',
function( $rootScope, $state, $location, $window, $injector) {
function( $rootScope, $state, $location, $window, $injector) {
var $animate = $injector.has('$animate') ? $injector.get('$animate') : false;
var View = function(){};
@@ -343,6 +343,7 @@ angular.module('ionic.service.view', ['ui.router'])
if($animate && animationClass && opts.doAnimation !== false && opts.navDirection) {
// set the animation we're gonna use
this.setAnimationClass(opts.parentElement, animationClass, opts.navDirection);
opts.enteringElement.addClass('ng-enter');
// start the animations
if(opts.leavingElement) {