refactor(scope.$watch): rearrange arguments passed into watcher (newValue, oldValue, scope)

As scopes are injected into controllers now, you have the reference anyway, so having scope as first argument makes no sense…

Breaks $watcher gets arguments in different order (newValue, oldValue, scope)
This commit is contained in:
Vojta Jina
2011-11-30 12:23:58 -08:00
parent 992c790f07
commit 0196411dbe
14 changed files with 61 additions and 47 deletions

View File

@@ -187,7 +187,7 @@ within the unit-tests.
// example of a test
it('should trigger a watcher', inject(function($rootScope) {
var scope = $rootScope;
scope.$watch('name', function(scope, name){
scope.$watch('name', function(name) {
scope.greeting = 'Hello ' + name + '!';
});