S
S
Sergey Gavrilov2015-04-30 11:37:55
Angular
Sergey Gavrilov, 2015-04-30 11:37:55

How to disable scope and all child scope from $digest check loop?

Is it possible to do this in Angular? this is to improve the performance of the application. Turning on / off remains on the conscience of the programmer.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
M
Mikhail Osher, 2015-04-30
@miraage

No way. If you need to update a specific scope, they usually do this trick

// вместо
$scope.$apply(/* some code */);

// пишут
$scope.$$phase || $scope.$digest();

_
_ _, 2015-04-30
@AMar4enko

Look how it's done in the ionic framework, they have it implemented.

L
lega, 2015-05-01
@lega

You can try Angular Light, you can make independent blocks/subroutines there - it looks like what you want, it also has support for Object.observe if you have a problem with dirty-checking ( benchmark , habr )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question