diff --git a/docs/app/src/docs.js b/docs/app/src/docs.js index 3593009b653b..287e5bfd7200 100644 --- a/docs/app/src/docs.js +++ b/docs/app/src/docs.js @@ -23,6 +23,11 @@ angular.module('DocsController', []) $scope.$on('$includeContentLoaded', function() { var pagePath = $scope.currentPage ? $scope.currentPage.path : $location.path(); $window._gaq.push(['_trackPageview', pagePath]); + $scope.loading = false; + }); + + $scope.$on('$includeContentError', function() { + $scope.loading = false; }); $scope.$watch(function docsPathWatch() {return $location.path(); }, function docsPathWatchAction(path) { @@ -31,6 +36,8 @@ angular.module('DocsController', []) var currentPage = $scope.currentPage = NG_PAGES[path]; + $scope.loading = true; + if (currentPage) { $scope.partialPath = 'partials/' + path + '.html'; $scope.currentArea = NG_NAVIGATION[currentPage.area];