1.带取消、确定按钮
var confirmPopup = $ionicPopup.confirm({
title: "标题",
subTitle: '子标题',
cancelText:'取消',
okText:'确定'
});
confirmPopup.then(function(res) {
if(res) {
console.log('You are sure');
} else {
console.log('You are not sure');
}
});
2.确定按钮提示框
var alertPopup = $ionicPopup.alert({
title: '标题'
});
alertPopup.then(function(res) {
console.log('点击了确定按钮');
});
$timeout(function () {
alertPopup.close(); //由于某种原因10秒后关闭弹出
}, 10000);