What are the disadvantages of $ http.useApplyAsync?

I am currently learning $ http in angularjs, and I have seen this awesome method: useApplyAsyncwhich will synchronize my $ http requests and make my application faster.

All is well, but why does angularjs default to false? Are there any disadvantages to using it?

EDIT:

I also compared usage useApplyAsyncand did not use it.

Here I used it: http://jsfiddle.net/vwnLz344/17/ Here I did not use it: http://jsfiddle.net/vwnLz344/18/

I do not see the benefits of this ...

I am looking for: Advantages and disadvantages: useApplyAsync

+4
source share
1 answer

, - useApplyAsync ~ 10ms, , , .

( , ), , , , , , , , , .

, useApplyAsync, , , , , , .

, , , , AJAX , , API (.. ).

useApplyAsync

,

useApplyAsync

~ 10 ,

?

AJAX ~ 10 , , , .

https://docs.angularjs.org/api/ng/provider/$httpProvider#useApplyAsync

useApplyAsync ([]);

" $http http , $rootScope. $applyAsync. , HTTP- ( )."

https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$applyAsync

$applyAsync ([]);

$apply, . , ~ 10 .

https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$apply

$ ([]);

$apply() angular angular. (, DOM, setTimeout, XHR ). angular, , .

+3

Source: https://habr.com/ru/post/1665692/


All Articles