mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
54 lines
1.4 KiB
HTML
54 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html dir="ltr">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Ionic Slides Basic</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<script src="/dist/ionic.js"></script>
|
|
</head>
|
|
|
|
<body>
|
|
<ion-app>
|
|
|
|
<ion-content>
|
|
<ion-button id="presentActionSheet">Show ActionSheet</ion-button>
|
|
</ion-content>
|
|
</ion-app>
|
|
<script>
|
|
document.getElementById('presentActionSheet')
|
|
.addEventListener('click', function(clickEvt) {
|
|
Ionic.controller('action-sheet', {
|
|
title: "Hello World",
|
|
subTitle: 'Sub Title',
|
|
buttons: [{
|
|
text: 'Destructive',
|
|
role: 'destructive',
|
|
handler: () => {
|
|
console.log('Destructive clicked');
|
|
}
|
|
}, {
|
|
icon: 'trash',
|
|
text: 'Archive',
|
|
handler: () => {
|
|
console.log('Archive clicked');
|
|
return false
|
|
}
|
|
}, {
|
|
icon: 'close',
|
|
text: 'Cancel',
|
|
role: 'cancel',
|
|
handler: () => {
|
|
console.log('Cancel clicked');
|
|
}
|
|
}]
|
|
})
|
|
.then(actionSheet => {
|
|
actionSheet.present()
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|