I am writing functionality for to show hide loader gif and the data accordingly, in angular, plain javascript setInterval code doesn't work for $scope.showLoader=true and $scope.showResult = true; The last statement console.log('found the ...') works but first 2 statements (show hide) doesn't. the loader keep rotating and the data doesn't display. Is angular $setTimeout would work? I am writing functionality for to show hide loa