Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordiosmosis <benaka@piwik.pro>2015-05-12 06:59:30 +0300
committerdiosmosis <benaka@piwik.pro>2015-05-13 08:23:42 +0300
commit3e3dba32f4e2c52c99068951e75d96020cc21d4b (patch)
treecb37535137662126c09db2d4958cefda4f9ae6e8 /plugins/CoreHome/angularjs/history
parent982275422bc76992e9498ce4c9fd4499dae840c9 (diff)
Fill out docs for angular history service and use setTimeout when creating new digest cycle to avoid digest already in progress error.
Diffstat (limited to 'plugins/CoreHome/angularjs/history')
-rw-r--r--plugins/CoreHome/angularjs/history/history.service.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/CoreHome/angularjs/history/history.service.js b/plugins/CoreHome/angularjs/history/history.service.js
index fdace2980e..85f65fded7 100644
--- a/plugins/CoreHome/angularjs/history/history.service.js
+++ b/plugins/CoreHome/angularjs/history/history.service.js
@@ -6,7 +6,12 @@
*/
/**
- * TODO
+ * History service. Provides the ability to change the window hash, and makes sure broadcast.pageload
+ * is called on every change.
+ *
+ * This service replaces the previously used jQuery history extension.
+ *
+ * Should only be used by the broadcast object.
*/
(function (window, $, broadcast) {
angular.module('piwikApp').service('historyService', historyService);
@@ -41,6 +46,8 @@
});
$location.path(hash);
+
+ setTimeout(function () { $rootScope.$apply(); }, 1);
}
}
})(window, jQuery, broadcast); \ No newline at end of file