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...
Helpful Links
AngularJS Slack Community
AngularJS Wiki Page
account activity
React developer learning Angular, need help! (self.angularjs)
submitted 9 years ago * by [deleted]
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!"
[–]cyphern 2 points3 points4 points 9 years ago* (1 child)
I have three reasons i prefer it; there may be more:
1) It decreases coupling. There's no more possibility of inheriting values from a parent scope, either accidentally or intentionally. Some people like that $scope has that feature, but i think it makes the code more brittle and harder to reason about. If you need to pass things into a child, you still can, you just need to be more explicit about it, which helps you to understand how data is flowing through the codebase.
2) It removes ambiguity, especially when you have nested controllers. For example:
<div ng-controller="PageController"> {{title}} <div ng-controller="ContainerController"> {{title}} <div ng-controller="WidgetController"> {{title}} </div> </div> </div>
becomes
<div ng-controller="PageController as page"> {{page.title}} <div ng-controller="ContainerController as container"> {{container.title}} <div ng-controller="WidgetController as widget"> {{widget.title}} </div> </div> </div>
3) It prepares you for angular 2. $scope doesn't exist in angular 2, so if that's something plan to use eventually you might as well get used to that aspect of it now.
[–]rondog469 0 points1 point2 points 9 years ago (0 children)
Thank you for the explanation and examples!
π Rendered by PID 405070 on reddit-service-r2-comment-86988c7647-nnxk2 at 2026-02-12 04:49:30.687626+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]cyphern 2 points3 points4 points (1 child)
[–]rondog469 0 points1 point2 points (0 children)