aboutsummaryrefslogtreecommitdiffstats
path: root/src/services.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/services.js')
-rw-r--r--src/services.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/services.js b/src/services.js
index b7e7c02f..eb0a473f 100644
--- a/src/services.js
+++ b/src/services.js
@@ -709,11 +709,15 @@ angularServiceInject('$route', function(location) {
* @methodOf angular.service.$route
*
* @param {function()} fn Function that will be called when `$route.current` changes.
+ * @returns {function()} The registered function.
*
* @description
* Register a handler function that will be called when route changes
*/
- onChange: bind(onChange, onChange.push),
+ onChange: function(fn) {
+ onChange.push(fn);
+ return fn;
+ },
/**
* @workInProgress