I am trying to show confirm box, which is working fine. But it showing default text, ok and cancel .
i want to show different text. Also Can we show three buttons as well.
$cordovaDialogs.confirm('message', 'title', ['button 1','button 2'])
.then(function(buttonIndex) {
// no button = 0, 'OK' = 1, 'Cancel' = 2
var btnIndex = buttonIndex;
});
Any idea ?
Thanks
I recommend using ionicPopup is comfortable and easy to edit. Visited ionicPopup
$ionicPopup.show({
title: 'Test title',
subTitle: '',
content: 'test content on pop up',
buttons: [
{ text: 'No', //Cancel button
onTap: function(e){
//function negative
}
},
{
text: 'Yes', //Ok button
type: 'button-positive',
onTap: function(e) {
//function positive
}
},
]
})
Same code works for me on Device and Simulator, it is not working on browser.