From 9fd3dfe49d283c136e29bf60c0da6d4fe2aaed3d Mon Sep 17 00:00:00 2001 From: Igor Minar Date: Tue, 1 Feb 2011 07:43:09 -0800 Subject: add support for $route.reload() Closes 254 --- src/services.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src') diff --git a/src/services.js b/src/services.js index b549292f..68860e22 100644 --- a/src/services.js +++ b/src/services.js @@ -747,6 +747,20 @@ angularServiceInject('$route', function(location) { */ otherwise: function(params) { $route.when(null, params); + }, + + /** + * @workInProgress + * @ngdoc method + * @name angular.service.$route#reload + * @methodOf angular.service.$route + * + * @description + * Causes `$route` service to reload (and recreate the `$route.current` scope) upon the next + * eval even if {@link angular.service.$location $location} hasn't changed. + */ + reload: function() { + dirty++; } }; function updateRoute(){ -- cgit v1.2.3