2

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?

zcserei
  • 577
  • 7
  • 30
  • 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
  • 1
    see 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