我有一个样品
code here
我想继续或使用添加新值的位置
isConfirm
带着甜蜜的警觉。
swal({
title: "Are you sure?",
text: "Save the name",
type: "warning",
showCancelButton: true,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Save and Add Another",
cancelButtonText: "New",
closeOnConfirm: true,
closeOnCancel: true
}, function(isConfirm) {
if (isConfirm) {
// saves the input values & selected values using ajax call
$scope.test = '';
} else {
// reset input values & selected values and fresh input again
$scope.test = '';
$scope.mysel = '-1';
}
});
但在单击保存并添加另一个按钮后,模型值第一次没有清除。此外,它在单击时没有重置
New
.代码有什么问题?