0
我想保持我的提交按鈕disabled
直到形式是HTML有效,我已經成功地做到像這樣:AngularJS:提交禁止,直到HTML 5的有效和禁止提交後防止多提交
<button type="submit" class="btn" ng-disabled="mainPaymentForm" ng-click="disableButton()"><%button%></button>
在我控制器我有這樣的:
// Disable form on submit
$scope.disableButton = function(){
$scope.button = "Loading...";
$scope.submit.disable = true; // This doesn't work
};
總的來說,我只是想保持按鈕禁用,直到有效/和防止多重提交點擊一次有效。
感謝