Skip to content

Commit

Permalink
#1
Browse files Browse the repository at this point in the history
  • Loading branch information
zenopopovici committed Apr 6, 2017
1 parent de08387 commit 5342767
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions _posts/en/angular/2016-01-01-angularjs-digest-vs-apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ layout: post

title: AngularJs - `$digest` vs `$apply`
tip-number: 01
tip-username: loverajoel
tip-username: loverajoel
tip-username-profile: https://github.com/loverajoel
tip-tldr: JavaScript modules and build steps are getting more numerous and complicated, but what about boilerplate in new frameworks?
tip-writer-support: https://www.coinbase.com/loverajoel
Expand Down Expand Up @@ -40,4 +40,9 @@ $scope.$apply(() => {

- If you only need to update the current scope or its children, use `$digest`, and prevent a new digest cycle for the whole application. The performance benefit is self-evident.
- `$apply()` is a hard process for the machine and can lead to performance issues when there is a lot of binding.
- If you are using >AngularJS 1.2.X, use `$evalAsync`, which is a core method that will evaluate the expression during the current cycle or the next. This can improve your application's performance
- If you are using >AngularJS 1.2.X, use `$evalAsync`, which is a core method that will evaluate the expression during the current cycle or the next. This can improve your application's performance.

## Playground
<div>
Not available due to the nature of the tip.
</div>

0 comments on commit 5342767

Please sign in to comment.