diff options
| author | Misko Hevery | 2012-06-01 11:31:10 -0700 |
|---|---|---|
| committer | Misko Hevery | 2012-06-01 16:57:49 -0700 |
| commit | 7c2428218893f59c6a4499667488009ca67f3385 (patch) | |
| tree | c78a773e07580423d7c3675ddd5853eb381a4c2b /src/ng | |
| parent | 885fb0dd0743859a8985c23e4d0c1855a2be711e (diff) | |
| download | angular.js-7c2428218893f59c6a4499667488009ca67f3385.tar.bz2 | |
chore($route): rename events
BREAKING CHANGE
rename $beforeRouteChange to $routeChangeStart
rename $afterRouteChange to $routeChangeSuccess
Diffstat (limited to 'src/ng')
| -rw-r--r-- | src/ng/directive/ngView.js | 2 | ||||
| -rw-r--r-- | src/ng/route.js | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ng/directive/ngView.js b/src/ng/directive/ngView.js index 4924ed1a..1d2a5d29 100644 --- a/src/ng/directive/ngView.js +++ b/src/ng/directive/ngView.js @@ -115,7 +115,7 @@ var ngViewDirective = ['$http', '$templateCache', '$route', '$anchorScroll', '$c var lastScope, onloadExp = attr.onload || ''; - scope.$on('$afterRouteChange', update); + scope.$on('$routeChangeSuccess', update); update(); diff --git a/src/ng/route.js b/src/ng/route.js index 5386e12a..ab198188 100644 --- a/src/ng/route.js +++ b/src/ng/route.js @@ -230,7 +230,7 @@ function $RouteProvider(){ /** * @ngdoc event - * @name angular.module.ng.$route#$beforeRouteChange + * @name angular.module.ng.$route#$routeChangeStart * @eventOf angular.module.ng.$route * @eventType broadcast on root scope * @description @@ -238,7 +238,7 @@ function $RouteProvider(){ * resolving all of the dependencies needed for the route change to occurs. * Typically this involves fetching the view template as well as any dependencies * defined in `resolve` route property. Once all of the dependencies are resolved - * `$afterRouteChange` is fired. + * `$routeChangeSuccess` is fired. * * @param {Route} next Future route information. * @param {Route} current Current route information. @@ -246,7 +246,7 @@ function $RouteProvider(){ /** * @ngdoc event - * @name angular.module.ng.$route#$afterRouteChange + * @name angular.module.ng.$route#$routeChangeSuccess * @eventOf angular.module.ng.$route * @eventType broadcast on root scope * @description @@ -347,7 +347,7 @@ function $RouteProvider(){ $rootScope.$broadcast('$routeUpdate', last); } else if (next || last) { forceReload = false; - $rootScope.$broadcast('$beforeRouteChange', next, last); + $rootScope.$broadcast('$routeChangeStart', next, last); $route.current = next; if (next) { if (next.redirectTo) { @@ -393,7 +393,7 @@ function $RouteProvider(){ next.locals = locals; copy(next.params, $routeParams); } - $rootScope.$broadcast('$afterRouteChange', next, last); + $rootScope.$broadcast('$routeChangeSuccess', next, last); } }, function(error) { if (next == $route.current) { |
