问题
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?
回答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”
来源:https://stackoverflow.com/questions/30970922/what-are-the-advantages-of-using-controller-as-syntax-instead-of-scope