我需要帮助使响应弹出消息,而不是让它显示在提交按钮之下。
template.html
<div class="item item-text-wrap">
Response: <b ng-bind="response"></b>
</div>
app.js
$http.post(link, {
inputName : $scope.data.inputName
}).then(function (res){
$scope.response = res.data;
});
将此弹出对话框添加到响应消息的app.js i wan
// An alert dialog
$scope.showAlert = function() {
var alertPopup = $ionicPopup.alert({
title: 'Don\'t eat that!',
template: 'It might taste good'
});
alertPopup.then(function(res) {
console.log('Thank you for not eating my delicious ice cream cone');
});
};
发布于 2016-08-04 19:30:08
app.js
$http.post(link, {
inputName : $scope.data.inputName
}).then(function (res){
// $scope.response = res.data;
$ionicPopup.alert({
title: 'Success!',
template: res.data
});
});
https://stackoverflow.com/questions/38780243
复制相似问题