This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix($animator): remove dependency on window.setTimeout.
- Loading branch information
Showing
3 changed files
with
20 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -975,12 +975,13 @@ function bootstrap(element, modules) { | |
}]); | ||
modules.unshift('ng'); | ||
var injector = createInjector(modules); | ||
injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', | ||
function(scope, element, compile, injector) { | ||
injector.invoke(['$rootScope', '$rootElement', '$compile', '$injector', '$animator', | ||
function(scope, element, compile, injector, animator) { | ||
scope.$apply(function() { | ||
element.data('$injector', injector); | ||
compile(element)(scope); | ||
}); | ||
animator.enabled(true); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
damrbaby
Contributor
|
||
}] | ||
); | ||
return injector; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When setting
$animator.enabled(false)
in a run block for an application that was bootstrapped withng-app
, animations will become enabled anyway due to this line of code.