javascript - Common way to stop repetitive requests in angularjs -
As it is known, AngularJS does not support synchronous requests; But the question is not about it. I had to face a problem, so getting feedback can take longer than expected person and the person can resubmit the data. I would like to stop it
Are there any common underlying ways to do this?
You force Documentation: Update if you want with any element (like Of course, you want your element to be different in style, when it has the attribute Another way Alternatively you can use a combination of unique unique elements, only one ( ng-disabled to a property on that controller Which you can set before the
true before the excerpt and
false , the exhaor is complete click on the event and therefore the
ng-click one If the button is disabled it will not file.
a ) You can use custom click handler to use
ng-disabled ex:
yourApp.directives.directive ('myClick', ['$ parse ', Function ($ parse): ng.Idirective {return {restrict:' A ', link: (scope, element: JQuery, attrs) => {var fn = $ parse (attrs.picClick); element.on ('Click', function (event) {// core disable logic detection if (attrs.disabled) return) scope. $ Apply (function () {fn (scope, {$ event: event});})}} }}}}}]);
disabled set to true.
ng-show )
Comments
Post a Comment