【发布时间】:2018-11-11 06:33:31
【问题描述】:
我使用引导提示框来显示成功消息。提交带有消息的警报框后显示完美,但问题是,在提交空警报框之前存在。谢谢。这是代码
$scope.resetPassword = function () {
var data = {
email: $scope.resetPasswordEmail
};
$http.post(serviceBase + 'aaaaaaaaaaaa', data).then(function (response) {
$scope.successfullyReset = true;
$scope.message = "Email has been send successfully, you will be redicted to login page in 5 seconds.";
startTimer();
}, function (response) {
$scope.successfullyReset = false;
$scope.message = "Failed to send mail. There is no user with requested email";
});
};
这里有html代码
<div data-ng-hide="message == ''" data-ng-class="(successfullyReset) ? 'alert alert-success' : 'alert alert-danger'">
{{message}}
</div><br />
【问题讨论】:
标签: html angularjs twitter-bootstrap