Taking the standard markup for setting up an Action Sheet, I’m trying to create a function for each of the non-desctuctive buttons. So if my mark up is this:
$scope.show = function() {
// Show the action sheet
$ionicActionSheet.show({
// The various non-destructive button choices
buttons: [
{ text: 'Manual' },
{ text: 'See on Site' },
],
// The text of the cancel button
cancelText: 'Close',
// Called when the sheet is cancelled, either from triggering the
// cancel button, or tapping the backdrop, or using escape on the keyboard
cancel: function() {
},
// Called when one of the non-destructive buttons is clicked, with
// the index of the button that was clicked. Return
// "true" to tell the action sheet to close. Return false to not close.
buttonClicked: function(index) {
return true;
},
// Called when the destructive button is clicked. Return true to close the
// action sheet. False to keep it open
destructiveButtonClicked: function() {
return true;
}
});
};
How do I expose the two buttons I have set up in my buttons array. Will this be similar to how left buttons and right buttons are set up for each controller?