1
サーバーの応答がエラーの場合は開いたままにする方法は? 送信をクリックしてAPIにデータを送信すると、フォームが自動的に閉じますが、サーバーの応答が成功すれば編集モードを終了し、エラーの場合は応答が開いたままにします。ありがとうございます角度xeditable - サーバーが400を返した場合に編集モードを開いたままにする方法
<form editable-form name="tableform" onaftersave="saveTableConfig()" oncancel="cancel()">
<span editable-textarea="currentKlupa.description" e-name="description" e-
rows="3">Text</span>
</form>
$scope.saveTableConfig = function() {
var config = {
headers: {
'Content-Type': 'application/xml',
'X-HTTP-Method-Override': 'PUT'
}
};
var configCopy = angular.copy($scope.currentConfig);
$http.post(serviceBase + 'cd/saa/' + $stateParams.aaaID + '/config', configCopy, config)
.success(function (data, status, headers, config) {
Notification.success({message: $filter('translate')('BENCH_EDITED_SUCCESSFULLY'), delay: 3000, positionY: 'bottom', positionX: 'right'});
})
.error(function (data, status, header, config) {
Notification.error({message: $filter('translate')('BENCH_EDITED_ERROR'), positionY: 'bottom', positionX: 'right'});
});
};
こんにちは、私を助けることができる人は誰ですか? – Arter