mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
34 lines
702 B
JavaScript
34 lines
702 B
JavaScript
angular.module('ionicApp', ['ionic'])
|
|
|
|
.controller('AppCtrl', function ($scope, $ionicActionSheet) {
|
|
|
|
$scope.showActionsheet = function () {
|
|
|
|
$ionicActionSheet.show({
|
|
titleText: 'ActionSheet Example',
|
|
buttons: [
|
|
{
|
|
text: 'Share'
|
|
},
|
|
{
|
|
text: 'Move'
|
|
},
|
|
],
|
|
destructiveText: 'Delete',
|
|
cancelText: 'Cancel',
|
|
cancel: function () {
|
|
console.log('CANCELLED');
|
|
},
|
|
buttonClicked: function (index) {
|
|
console.log('BUTTON CLICKED', index);
|
|
return true;
|
|
},
|
|
destructiveButtonClicked: function () {
|
|
console.log('DESTRUCT');
|
|
return true;
|
|
}
|
|
});
|
|
};
|
|
|
|
|
|
}); |