Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tap(() => {
ons.notification.toast({
message: 'Failed to delete',
timeout: 2000
});
})
);
showAlert2() {
ons.notification.alert({
message: 'You pressed "ok"'
});
}
handleClick() {
ons.notification.confirm('Do you really want to go back?')
.then(
(response) => {
if (response === 1) {
this.props.navigator.popPage();
}
}
);
}
Show dialog ({this.state.dialogOpen ? 'open' : 'closed'})
,
Popovers
]}
renderHeader={() => Dialogs}
renderRow={(row) => row}
/>
Alert dialog
,
Confirmation dialog
,
handleClick () {
ons.notification.alert('Hello World');
}
import * as ons from 'onsenui';
/**
* @object onsNotification
*/
export const onsNotification = ons.notification;
tap(() => {
ons.notification.toast({
message: 'Failed to save',
timeout: 2000
});
})
);
onClick={ons.notification.alert.bind(null, 'Hello, world!')}>
Alert dialog
,
Confirmation dialog
,
Prompt dialog
]}
renderHeader={() => Notifications}
renderRow={(row) => row}
/>
<dialog>
<p style="{{textAlign:">I am a dialog!</p>
<p style="{{textAlign:">
<button disabled="{!this.state.dialogOpen}">Close me!</button></p></dialog>