How to stop If statement, keeps on showing


#1

The $ionicpopup keeps on showing because of the if statement , I am confused why does the popup keeps on showing when I already canceled it. I already tried to stop the alarm and the set time but still it’s on loop with true condition. I dont know what I’ve missed,


#2

put clearTimeout(timeoutID); stement in confirmPopup.then function and also declare timeoutID in the controller function


#3

you are using the assignment operator “=” instead of the equality operator “==” in your if(playalarm… expression