aboutsummaryrefslogtreecommitdiffstats
path: root/src/Browser.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/Browser.js')
-rw-r--r--src/Browser.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Browser.js b/src/Browser.js
index eb6afb3c..671ec1cc 100644
--- a/src/Browser.js
+++ b/src/Browser.js
@@ -232,6 +232,7 @@ function Browser(window, document, body, XHR, $log) {
* {@link angular.service.$location $location service} to monitor hash changes in angular apps.
*
* @param {function(event)} listener Listener function to be called when url hash changes.
+ * @return {function()} Returns the registered listener fn - handy if the fn is anonymous.
*/
self.onHashChange = function(listener) {
if ('onhashchange' in window) {
@@ -245,6 +246,7 @@ function Browser(window, document, body, XHR, $log) {
}
});
}
+ return listener;
}
//////////////////////////////////////////////////////////////