我将以下代码用于使用 $ionicPopup 和 Firebase 的一些验证内容:
onTap: function(e) {
firebase.auth().applyActionCode($scope.data.emailcnfrm)
.then(function() {
return $scope.data.emailcnfrm;
},
function(error) {
alert("wrong code");
e.preventDefault();
});
}
但是在出现错误的情况下,并且在我收到“错误代码”警报后,弹出窗口将被关闭,因为e.preventDefault();
已被忽略。
那么我的代码到底有什么问题?我该如何解决这个问题?