As a newcomer to JS, I am seeking guidance on how to enhance my AngularJS app. The app features a page that stores data in-memory and allows users to filter this data, which is then displayed in an ng-grid table. Is there a way to show an image like a spinner while the JavaScript processes the in-memory data? Below is what I have attempted:
The HTML:
<button ng-click="loadingTable()">View</button>
<img ng-show="loading" src="../images/loading.gif" />
<div class="gridStyle" ng-grid="gridOptions"></div>
The JS:
$scope.loadingTable = function() {
$scope.loading = true;
loadTable();
function loadTable() {
};
$scope.loading = false;
};