mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
init title classes w/ ng-enter and ng-leave
This commit is contained in:
5
dist/js/ionic-angular.js
vendored
5
dist/js/ionic-angular.js
vendored
@@ -1534,10 +1534,11 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
|
||||
}
|
||||
|
||||
// Clone the old title and add a new one so we can show two animating in and out
|
||||
// add ng-leave and ng-enter during creation to prevent flickering when they are swapped during animation
|
||||
title = angular.element(titles[0]);
|
||||
oTitle = $compile('<h1 class="title" ng-bind="oldTitle"></h1>')($scope);
|
||||
oTitle = $compile('<h1 class="title ng-leave" ng-bind="oldTitle"></h1>')($scope);
|
||||
title.replaceWith(oTitle);
|
||||
nTitle = $compile('<h1 class="title" ng-bind="currentTitle"></h1>')($scope);
|
||||
nTitle = $compile('<h1 class="title ng-enter" ng-bind="currentTitle"></h1>')($scope);
|
||||
|
||||
var insert = $element[0].firstElementChild || null;
|
||||
|
||||
|
||||
@@ -159,10 +159,11 @@ angular.module('ionic.ui.navRouter', ['ionic.service.gesture'])
|
||||
}
|
||||
|
||||
// Clone the old title and add a new one so we can show two animating in and out
|
||||
// add ng-leave and ng-enter during creation to prevent flickering when they are swapped during animation
|
||||
title = angular.element(titles[0]);
|
||||
oTitle = $compile('<h1 class="title" ng-bind="oldTitle"></h1>')($scope);
|
||||
oTitle = $compile('<h1 class="title ng-leave" ng-bind="oldTitle"></h1>')($scope);
|
||||
title.replaceWith(oTitle);
|
||||
nTitle = $compile('<h1 class="title" ng-bind="currentTitle"></h1>')($scope);
|
||||
nTitle = $compile('<h1 class="title ng-enter" ng-bind="currentTitle"></h1>')($scope);
|
||||
|
||||
var insert = $element[0].firstElementChild || null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user