android - Ionic how to hide ionicActionSheet menu after tap on hardware back button on device? -
android - Ionic how to hide ionicActionSheet menu after tap on hardware back button on device? -
in ionic app after tap on list item displaying action sheet menu:
http://ionicframework.com/docs/api/service/$ionicactionsheet/
i hide displayed action sheet menu after tap on hardware button on android device. possible? , if yes , how can please?
thanks help.
code displaying action sheet menu:
$scope.showactionmenu = function(number,id,itemindex) { // show 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); homecoming true; }, buttonclicked: function(index) { console.log(number); $scope.callto(number); homecoming true; } }); };
you can use
onhardwarebackbutton(callback)
of $ionicplatform
(docs in http://ionicframework.com/docs/api/service/$ionicplatform/)
using callback hide function.
android angularjs cordova back-button
Comments
Post a Comment