Background
angular's $http
service is triggering a $digest
on every get
(if no $digest
is already running):
if (!$rootScope.$$phase) $rootScope.$apply();
Ia addition to fetching objects from our API, our app has many directives with templateUrl
- which are fetched by angular using $http
. This causes hundreds of $digest
loops on cold start.
Commenting out the above line, reduces the number of $digest
loops to about 3, and the app runs MUCH faster, with no bindings broken (at least due to $http
not triggering a $digest
).
Question
Is there a way to disable $http triggering the $digest?