aboutsummaryrefslogtreecommitdiffstats
path: root/docs/src/templates/docs.js
diff options
context:
space:
mode:
authorIgor Minar2011-10-21 21:48:13 -0700
committerIgor Minar2011-10-22 21:32:47 -0700
commitce73ed091b13aeef03b2061623512b87307cd251 (patch)
tree0664231a22d5432c3ad783253e0aeba745e192c0 /docs/src/templates/docs.js
parent90ac8d57b0d5ef68cb70486edf0590fff225a284 (diff)
downloadangular.js-ce73ed091b13aeef03b2061623512b87307cd251.tar.bz2
feat(docs): add "Loading..." notification
Diffstat (limited to 'docs/src/templates/docs.js')
-rw-r--r--docs/src/templates/docs.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js
index 40e05586..e91ef5c6 100644
--- a/docs/src/templates/docs.js
+++ b/docs/src/templates/docs.js
@@ -13,6 +13,7 @@ function DocsController($location, $browser, $window, $cookies) {
scope.subpage = false;
scope.offlineEnabled = ($cookies[OFFLINE_COOKIE_NAME] == angular.version.full);
scope.futurePartialTitle = null;
+ scope.loading = 0;
if (!$location.path() || INDEX_PATH.test($location.path())) {
$location.path('/api').replace();
@@ -25,6 +26,7 @@ function DocsController($location, $browser, $window, $cookies) {
scope.sectionId = parts[1];
scope.partialId = parts[2] || 'index';
scope.pages = angular.Array.filter(NG_PAGES, {section: scope.sectionId});
+ scope.loading++;
var i = scope.pages.length;
while (i--) {
@@ -69,6 +71,7 @@ function DocsController($location, $browser, $window, $cookies) {
};
scope.afterPartialLoaded = function() {
+ scope.loading--;
scope.partialTitle = scope.futurePartialTitle;
SyntaxHighlighter.highlight();
$window.scrollTo(0,0);