I'm attempting to use ng-show to display a loading bar while any async calls are done in the background. Simplified code example below but I find that both divs are displayed and the loading div is not hidden after $scope.page_loaded becomes true.
I'm fairly new to Angular so this may be a rookie error.
EDIT: Even in the simplistic example below, without any async calls, I get both divs displayed.
controllers.js
controllers.controller('AuthController', ['$scope', '$window', function($scope, $window) {
$scope.page_loaded = false;
// DO SOME LOGIC HERE
$scope.page_loaded = true;
}]);
index.html
<div class="page-content" layout="row" flex layout-align="center center" ng-show="!page_loaded">
<div class="loading">
<p class="loading-text">Loading...</p>
<md-progress-linear md-mode="indeterminate"></md-progress-linear>
</div>
</div>
<div ng-view class="page-content" layout="row" flex ng-show="page_loaded"></div>