An open API service indexing awesome lists of open source software.

https://github.com/normandy72/digest-and-apply

$digest and $apply functions in AngularJS. Coursera course "Single Page Web Applications with AngularJS" by Yaakov Chaikin.
https://github.com/normandy72/digest-and-apply

angular angularjs html html5 javascript js

Last synced: about 1 month ago
JSON representation

$digest and $apply functions in AngularJS. Coursera course "Single Page Web Applications with AngularJS" by Yaakov Chaikin.

Awesome Lists containing this project

README

          

* setTimeout function lives separate from digest, so digest can be installed manually: `$scope.$digest();`. But that is a __wrong way__, because exceptions and errors in this code (code before `$scope.$digest();`) become invisible for Angular.
* __correct way__ is using `$apply` instead of `$digest`.
* `$apply` accept function where our code can be moved to.
* in native Angular there is a `$timeout` function and there is no reason to use `setTimeout()`, `$digest` or `$apply`.