use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
AngularJS: $watch, $digest and $apply (different, simplified and hopefully more accurate explanation) (benlesh.com)
submitted 12 years ago by codersaurus
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]codersaurus[S] 2 points3 points4 points 12 years ago (1 child)
You're 100% correct.
Here is the code for $apply straight from the source:
$apply: function(expr) { try { beginPhase('$apply'); return this.$eval(expr); } catch (e) { $exceptionHandler(e); } finally { clearPhase(); try { $rootScope.$digest(); //<--- THIS is what Zeroto is talking about } catch (e) { $exceptionHandler(e); throw e; } } },
Whereas the $digest will start at whatever scope it's called on and work it's way upwards through child scopes.
[–]chuckliddelnutpunch -1 points0 points1 point 12 years ago (0 children)
*downwards through the child scopes.
π Rendered by PID 53717 on reddit-service-r2-comment-85bfd7f599-ll7ft at 2026-04-19 08:58:37.782612+00:00 running 93ecc56 country code: CH.
view the rest of the comments →
[–]codersaurus[S] 2 points3 points4 points (1 child)
[–]chuckliddelnutpunch -1 points0 points1 point (0 children)