@@ -159,22 +159,18 @@ export function AnimateQueueProvider($animateProvider) {
159159 $t . $rootScope ,
160160 $t . $injector ,
161161 $t . $$animation ,
162- $t . $templateRequest ,
163162 /**
164163 *
165164 * @param {ng.RootScopeService } $rootScope
166165 * @param {ng.InjectorService } $injector
167166 * @param {* } $$animation
168- * @param {ng.TemplateRequestService } $templateRequest
169167 * @returns {import("../queue/interface.ts").AnimateQueueService }
170168 */
171- function ( $rootScope , $injector , $$animation , $templateRequest ) {
169+ function ( $rootScope , $injector , $$animation ) {
172170 const activeAnimationsLookup = new Map ( ) ;
173171
174172 const disabledElementsLookup = new Map ( ) ;
175173
176- let animationsEnabled = null ;
177-
178174 function postDigestTaskFactory ( ) {
179175 let postDigestCalled = false ;
180176
@@ -194,38 +190,6 @@ export function AnimateQueueProvider($animateProvider) {
194190 } ;
195191 }
196192
197- // Wait until all directive and route-related templates are downloaded and
198- // compiled. The $templateRequest.totalPendingRequests variable keeps track of
199- // all of the remote templates being currently downloaded. If there are no
200- // templates currently downloading then the watcher will still fire anyway.
201- $rootScope . templateRequest = $templateRequest ;
202- const deregisterWatch = $rootScope . $watch (
203- "$templateRequest.totalPendingRequests" ,
204- ( val ) => {
205- if ( val === 0 ) {
206- deregisterWatch ( ) ;
207- $rootScope . $templateRequest = undefined ;
208- // Now that all templates have been downloaded, $animate will wait until
209- // the post digest queue is empty before enabling animations. By having two
210- // calls to $postDigest calls we can ensure that the flag is enabled at the
211- // very end of the post digest queue. Since all of the animations in $animate
212- // use $postDigest, it's important that the code below executes at the end.
213- // This basically means that the page is fully downloaded and compiled before
214- // any animations are triggered.
215- $rootScope . $postUpdate ( ( ) => {
216- $rootScope . $postUpdate ( ( ) => {
217- // we check for null directly in the event that the application already called
218- // .enabled() with whatever arguments that it provided it with
219- if ( animationsEnabled === null ) {
220- animationsEnabled = true ;
221- }
222- } ) ;
223- } ) ;
224- }
225- } ,
226- true ,
227- ) ;
228-
229193 const callbackRegistry = Object . create ( null ) ;
230194
231195 // remember that the `customFilter`/`classNameFilter` are set during the
0 commit comments