フォームの更新をしようとしていますが、すべて正常に機能していますが、更新が完了した時点でモーダルが正しく閉じられません。私はモーダルが消えたことを意味しますが、モーダルがまだそこに残っているように画面が暗く、何もクリックできません。ページを更新してモーダルを適切に閉じるにはどうすればよいですか?示すようにはanglejsで投稿した後モーダルを閉じることができません
私のコードは次のとおりです。
$scope.updateStudentParticulars = function(item) {
var currentDate = $filter('date')(new Date(), 'dd/MM/yyyy'); //for lastchangepassword field
$scope.EditStudentForm = false;
//alert(item.User_Key + " USER KEY")
const rootRef = firebase.database().ref();
//zoom in to users table
const ref = rootRef.child('Users');
ref.child(item.User_Key).update({
name: item.Student_Name,
email: item.Student_Email,
role: "student",
accountStatus: "Activated",
yearJoined: item.Year_Joined,
password: item.Password,
passwordChangedDate: currentDate,
gpa: 0.00,
profile: {
address: item.Address,
citizenship: item.Citizenship,
gender: item.Gender,
nok: item.Nok,
nokPhone: item.Nok_Phone,
phone: item.Phone
}
});
alert("Update Successful !")
$route.reload();
}
モーダルコードは、HTMLファイルで宣言されています
<div id="editModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Edit Student Particulars</h4>
</div>
<div class="modal-body">
<div ng-include src="'templates/editStudentForm.html'"></div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
を参照してくださいしかし...どこモーダルコードはありますか? – trichetriche
その別のhtmlファイルで、私は質問を編集してコードに追加しました – purplewind
それは素晴らしいですが、今、あなたはJSモーダルコードはどこですか? – trichetriche