One of the things that different Angular learning materials seem to be doing differently is passing variables. What is the difference between using $scope or the "someCtrl as some" syntax? What are the advantages? Should I stick with always using one of them or there are certain scenarios when using one of them is better than the other?
Asked
Active
Viewed 1,911 times
2
-
It makes scoping much more clear, and also if you plan on using angular 2, that is how the syntax is set up so it's not bad to learn. – ajmajmajma Jun 22 '15 at 01:18
-
1see John Papa's style guide, for some more explanation of why controller as: https://github.com/johnpapa/angular-styleguide#controllers – Jimmy Chandra Jun 22 '15 at 01:28
-
Possible duplicate of [What is the advantage of "Controller as" in Angular?](http://stackoverflow.com/questions/32755929/what-is-the-advantage-of-controller-as-in-angular) – LionC Oct 08 '15 at 08:41
1 Answers
1
Todd Motto has some very good articles on this!
Digging into Angular’s “Controller as” syntax A better way to $scope, angular.extend, no more “vm = this”

Carson Drake
- 171
- 1
- 8