mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-10 17:15:26 +08:00
chore(ngAnimate): add TODO messages indicating desire to remove hack
This commit is contained in:
@@ -289,6 +289,8 @@ var $AnimateProvider = ['$provide', function($provide) {
|
||||
element = jqLite(element);
|
||||
|
||||
if (runSynchronously) {
|
||||
// TODO(@caitp/@matsko): Remove undocumented `runSynchronously` parameter, and always
|
||||
// perform DOM manipulation asynchronously or in postDigest.
|
||||
self.$$addClassImmediately(element, add);
|
||||
self.$$removeClassImmediately(element, remove);
|
||||
return asyncPromise();
|
||||
|
||||
@@ -979,6 +979,9 @@ angular.module('ngAnimate', ['ng'])
|
||||
element = stripCommentsFromElement(element);
|
||||
|
||||
if (classBasedAnimationsBlocked(element)) {
|
||||
// TODO(@caitp/@matsko): Don't use private/undocumented API here --- we should not be
|
||||
// changing the DOM synchronously in this case. The `true` parameter must eventually be
|
||||
// removed.
|
||||
return $delegate.setClass(element, add, remove, true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user