Stop calling a method on click of a button

15 views
Skip to first unread message

Anshul Ghorawat

unread,
Oct 14, 2017, 11:07:56 AM10/14/17
to Angular and AngularJS discussion
I've a div on click of which I'm calling a method.

Now, there's another button on click of which, I need to stop the execution of 1st method.

Here's my code : JSFiddle


Sander Elias

unread,
Oct 15, 2017, 2:57:32 AM10/15/17
to Angular and AngularJS discussion
Hi Anshul,

Your use of `alert` is what is blocking your idea. It does block. That means, as long as the alert is active, nothing else in your code/app can run(be clicked).

Regards
Sander
Reply all
Reply to author
Forward
0 new messages