In My piece of code , I want to show a certain modal pop up only after a few seconds(5 seconds) of delay once the progress bar shows.
myApp.showPleaseWait(); //Shows the progress bar
TransactionApiServices.postUnmergeTransactionResearchDetails(researchParams).success(function (results) {
console.log("User have access");
$timeout(myApp.hidePleaseWait(),5000); //Show the bar for 5 seconds and then close it
getUnmergeResearchPopup($scope, $uibModal, $scope.detailData, $rootScope); //Open the pop up
}).error(function (result) {
but the timeout is not working properly . It closes before 5 seconds and shows the pop up. What am I doing wrong ?
I have injected $timeout already though.
Thanks in advance.