diff options
| author | Vojta Jina | 2011-11-30 12:23:58 -0800 | 
|---|---|---|
| committer | Vojta Jina | 2012-01-23 11:11:27 -0800 | 
| commit | 0196411dbe179afe24f4faa6d6503ff3f69472da (patch) | |
| tree | 8c79c809b884af8385ad2695c4885b18a5efa369 /docs/content/guide/dev_guide.services.$location.ngdoc | |
| parent | 992c790f0786fa45c1cc3710f29bf49c7c322ba7 (diff) | |
| download | angular.js-0196411dbe179afe24f4faa6d6503ff3f69472da.tar.bz2 | |
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)
Diffstat (limited to 'docs/content/guide/dev_guide.services.$location.ngdoc')
| -rw-r--r-- | docs/content/guide/dev_guide.services.$location.ngdoc | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/docs/content/guide/dev_guide.services.$location.ngdoc b/docs/content/guide/dev_guide.services.$location.ngdoc index 57c39191..2afbf1d2 100644 --- a/docs/content/guide/dev_guide.services.$location.ngdoc +++ b/docs/content/guide/dev_guide.services.$location.ngdoc @@ -618,11 +618,11 @@ you will need to specify an extra property that has two watchers. For example:  </pre>  <pre>  // js - controller -this.$watch('locationPath', function(scope, path) { +this.$watch('locationPath', function(path) {    $location.path(path);  }); -this.$watch('$location.path()', function(scope, path) { +this.$watch('$location.path()', function(path) {    scope.locationPath = path;  });  </pre> | 
