diff options
| author | Igor Minar | 2011-01-19 00:04:05 -0800 | 
|---|---|---|
| committer | Misko Hevery | 2011-01-19 15:52:27 -0800 | 
| commit | 63690d189214135f22171ad8795ccfe15103a8e6 (patch) | |
| tree | 9dbb81bf9650848cb070f78126714cdbd4b30d99 /src | |
| parent | 050e5d773fa7eca46d72afd26cbd5d5bf1af3ff6 (diff) | |
| download | angular.js-63690d189214135f22171ad8795ccfe15103a8e6.tar.bz2 | |
angular internals should not call methods via angular namespace
Diffstat (limited to 'src')
| -rw-r--r-- | src/services.js | 14 | 
1 files changed, 7 insertions, 7 deletions
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);      }  | 
