The Pull menu (Actionsheet) lets the user select an option by using the box that pops up.
Very dangerous options will be highlighted in red to give people the first time to identify. You can make it disappear by clicking the Cancel button or by clicking on a blank space.
Instance
HTML Code
<body ng-app= "starter" ng-controller= "Actionsheetctl" >
<ion-pane>
<ion-content >
JavaScript Code
Triggers the pull up menu in your code, and you need to use $ionicActionSheet service in your angular controller:
Angular.module (' starter ', [' Ionic '])
. Run (function ($ionicPlatform) {
$ionicPlatform. Ready (function () {
//Hide the accessory bar by default (remove the accessory bar above the keyboard
//For form inputs )
if (Window.cordova && window.cordova.plugins.Keyboard) {
Cordova.plugins.Keyboard.hideKeyboardAccessoryBar (true);
if (window. StatusBar) {
statusbar.styledefault ();}})
. Controller (' Actionsheetctl ', [' $scope ', ' $ionicActionSheet ', ' $timeout ', function ($scope, $ionicActionSheet, $ Timeout {
$scope. Show = function () {
var hidesheet = $ionicActionSheet. Show {
buttons: [
{text: ' & Lt;b>share</b> This "},
{text: ' Move '}
],
destructivetext: ' Delete ',
titletext: ' Modify your album ',
canceltext: ' Cancel ',
cancel:function () {
//Add Cancel code ...
},
Buttonclicked:function (index) {return
true;
}
});
$timeout (function () {
hidesheet ();
}, \ n;
};
}])
The results of the operation are shown below:
Full Source:
The above is a small set up to introduce the Ionic menu (Actionsheet) example code related knowledge, I hope to help!