diff options
| author | Misko Hevery | 2011-09-08 13:56:29 -0700 | 
|---|---|---|
| committer | Igor Minar | 2011-10-11 11:01:45 -0700 | 
| commit | 4f78fd692c0ec51241476e6be9a4df06cd62fdd6 (patch) | |
| tree | 91f70bb89b9c095126fbc093f51cedbac5cb0c78 /src/service/route.js | |
| parent | df6d2ba3266de405ad6c2f270f24569355706e76 (diff) | |
| download | angular.js-4f78fd692c0ec51241476e6be9a4df06cd62fdd6.tar.bz2 | |
feat(forms): new and improved forms
Diffstat (limited to 'src/service/route.js')
| -rw-r--r-- | src/service/route.js | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/src/service/route.js b/src/service/route.js index 73c73b04..b78cca91 100644 --- a/src/service/route.js +++ b/src/service/route.js @@ -260,7 +260,8 @@ angularServiceInject('$route', function($location, $routeParams) {    function updateRoute() {      var next = parseRoute(), -        last = $route.current; +        last = $route.current, +        Controller;      if (next && last && next.$route === last.$route          && equals(next.pathParams, last.pathParams) && !next.reloadOnSearch && !forceReload) { @@ -283,7 +284,8 @@ angularServiceInject('$route', function($location, $routeParams) {            }          } else {            copy(next.params, $routeParams); -          next.scope = parentScope.$new(next.controller); +          (Controller = next.controller) && inferInjectionArgs(Controller); +          next.scope = parentScope.$new(Controller);          }        }        rootScope.$broadcast('$afterRouteChange', next, last);  | 
