I cannot figure out why my simple AngularJS app not working as intended. \"Loading...\" is supposed to be hidden, and \"Done!\" should be shown after 1 second.
html:
You want to use apply() function to stop loading message.
Check this Demo jsFiddle**.
JavaScript:
function TestCtrl($scope) { $scope.loading = true; setTimeout(function () { $scope.$apply(function(){ $scope.loading = false; }); }, 1000); }
Hope this would be help you!