mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-19 23:11:21 +08:00
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:
@@ -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('/');
|
||||
|
||||
Reference in New Issue
Block a user