Skip to content
Permalink
Browse files

chore(docs-app): show loader when loading view / partial

Closes #14385
PR (#15280)
  • Loading branch information
Narretz committed Oct 17, 2016
1 parent db02008 commit 19973609f43af781b1c4467f3acbc42b3a8f791e
Showing with 7 additions and 0 deletions.
  1. +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];

0 comments on commit 1997360

Please sign in to comment.
You can’t perform that action at this time.