aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIgor Minar2011-02-01 07:43:09 -0800
committerIgor Minar2011-02-01 09:35:19 -0800
commit9fd3dfe49d283c136e29bf60c0da6d4fe2aaed3d (patch)
treed605c609e64df5ba8b0bd337f434994fa6d4fc76 /src
parentd7686a429c43fd031a0d39788973f726d74bdb33 (diff)
downloadangular.js-9fd3dfe49d283c136e29bf60c0da6d4fe2aaed3d.tar.bz2
add support for $route.reload()
Closes 254
Diffstat (limited to 'src')
-rw-r--r--src/services.js14
1 files changed, 14 insertions, 0 deletions
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(){