Android : Ionic how to hide ionicActionSheet menu after tap on hardware back button on device?

on Monday, October 6, 2014


in my Ionic app after tap on list item displaying Action sheet menu:


http://ionicframework.com/docs/api/service/$ionicActionSheet/


I would like to hide displayed action sheet menu after tap on hardware back button on Android device. Is it possible? And if yes and how can i do it please?


Thanks for any help.


Code which displaying action sheet menu:



$scope.showActionMenu = function(number,id,itemIndex) {
// Show the action sheet
var hideSheet = $ionicActionSheet.show({
titleText: 'Select action',
buttons: [
{ text: 'Call' }
],
destructiveText: 'Delete',
cancelText: 'Cancel',
cancel: function() {
hideSheet();
},
destructiveButtonClicked: function() {
console.log(id);
console.log(itemIndex);
$scope.deletePlannedCall(id,itemIndex);
return true;
},
buttonClicked: function(index) {
console.log(number);
$scope.callTo(number);
return true;
}
});

};

0 comments:

Post a Comment