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

@@ -19,7 +19,7 @@ function DocsController(scope, $location, $window, $cookies, $filter) {
$location.path('/api').replace();
}
scope.$watch('$location.path()', function(scope, path) {
scope.$watch('$location.path()', function(path) {
// ignore non-doc links which are used in examples
if (DOCS_PATH.test(path)) {
var parts = path.split('/');