我有彈出演示工作簡單,但現在已經調用彈出窗口中按鈕的onclick上的api。如何使用IONIC和AngularJs在POPUP中的onclick上調用api?
此代碼採用兩個按鈕與默認名稱,我想更改按鈕的名稱。
$scope.OnAppointment = function() {
var confirmPopup = $ionicPopup.confirm({
title: 'My Appointment',
});
confirmPopup.then(function(res) {
if(res) {
console.log('You are sure');
} else {
var alertPopup = $ionicPopup.alert({
title: 'Cancle Appointment',
template: 'Are you sure you want to cancle the appointment?'
});
alertPopup.then(function(res) {
console.log('Sucessfully Cancel');
});
}
請告訴我如何能彈出式按鈕調用API上的onclick並更改按鈕的名稱....