Permalink
Browse files
chore(docs-app): show loader when loading view / partial
- Loading branch information
Showing
with
7 additions
and
0 deletions.
-
+7
−0
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]; |
|
|
|