I have a ng-repeat
forms.
When the form on submitting, I want disable the submitting form inputs.
My facing problem is when I submit form. It disable all the forms input and never back to enable.
Please check out this fiddle.
or snippet code below. Thanks
In JS
$scope.newDatas = {
a1: 'a',
a2: 'b'
}
$scope.send = function() {
$scope.isDisabled = true;
setTimeout(function() {
alert('done');
$scope.isDisabled = false;
},1000);
}
In HTML
<div ng-repeat="(key, value) in newDatas">
<form name="newData">
<input type="text" ng-model="value" ng-disabled="isDisabled">
{{value}}
<button ng-click="send()" ng-disabled="isDisabled">submit</button>
</form>
</div>