cordova-shims_services_dialogs Module
Service that allows for displaying native dialogs for user interaction.
Configuration and setup of the service is done in an initializer:
import DialogsService from 'cordova-shims/services/dialogs';
export function initialize(container, application) {
application.register('service:dialogs', DialogsService);
application.inject('route', 'dialogs', 'service:dialogs');
}
export default {
name: 'dialogs-service',
initialize: initialize
};
The service has an interface for defining custom fallback methods for each dialog type.
- alertFallback
- confirmFallback
- promptFallback
If your app targets both browser and native platforms, you should provide your own implementation of these fallbacks methods. There are simple default methods defined to get you started quickly.
This module provides the following classes: