.
201 IonicV1 Creator Ionic Native Action Sheet
The Action Sheet plugin shows a native sheet of options the user can choose from.
iOS uses the native UIActionSheet.
Android uses the native AlertDialog.
cordova plugin add https://github.com/EddyVerbruggen/cordova-plugin-actionsheet.git
|
IONIC CREATOR STEPS
1. Create a project.
3. Add Cordova Plugin.
cordova-plugin-actionsheet
4. Add codes to Controller.
function ($scope, $cordovaActionSheet) {
var options = {
title: 'What do you want with this image?',
buttonLabels: ['Share via Facebook', 'Share via Twitter'],
addCancelButtonWithLabel: 'Cancel',
androidEnableCancelButton : true,
winphoneEnableCancelButton : true,
addDestructiveButtonWithLabel : 'Delete it'
};
document.addEventListener("deviceready", function () {
$cordovaActionSheet.show(options)
.then(function(btnIndex) {
var index = btnIndex;
});
}, false);
}
|
REFERENCE:
.
No comments:
Post a Comment