What about a directive for a button that disables the button when it's clicked?
Cheers,
Martin
I have an issue with multiple ajax requests. For example I have form with submit button. When I hit the submit button multiple times I there is multiple ajax requests. How can I prevent ajax requests while there is still no callback from first one? The temporary solution is to disable the submit button till callback. But this solution is against DRY principle because I have to write nearly same code for every form/button in multiple controllers. Does anyone knows another solution?
--
I would keep a cache of the $http promise, and clear it when the promise resolves.
That way you can reuse the cache if it's available, or watch it to run your `ngDisabled` directives.
--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/79UiXuRKuIU/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.