From 63690d189214135f22171ad8795ccfe15103a8e6 Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Wed, 19 Jan 2011 00:04:05 -0800 Subject: angular internals should not call methods via angular namespace --- src/services.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/services.js b/src/services.js index 573eca21..0801ee9c 100644 --- a/src/services.js +++ b/src/services.js @@ -693,10 +693,10 @@ angularServiceInject('$route', function(location) { * Add new route */ when:function (path, params) { - if (angular.isUndefined(path)) return routes; + if (isUndefined(path)) return routes; var route = routes[path]; if (!route) route = routes[path] = {}; - if (params) angular.extend(route, params); + if (params) extend(route, params); dirty++; return route; } @@ -704,19 +704,19 @@ angularServiceInject('$route', function(location) { function updateRoute(){ var childScope; $route.current = _null; - angular.forEach(routes, function(routeParams, route) { + forEach(routes, function(routeParams, route) { if (!childScope) { var pathParams = matcher(location.hashPath, route); if (pathParams) { - childScope = angular.scope(parentScope); - $route.current = angular.extend({}, routeParams, { + childScope = createScope(parentScope); + $route.current = extend({}, routeParams, { scope: childScope, - params: angular.extend({}, location.hashSearch, pathParams) + params: extend({}, location.hashSearch, pathParams) }); } } }); - angular.forEach(onChange, parentScope.$tryEval); + forEach(onChange, parentScope.$tryEval); if (childScope) { childScope.$become($route.current.controller); } -- cgit v1.2.3