Toast
This plugin allows you to show a native Toast (a little text popup) on iOS, Android and WP8. It's great for showing a non intrusive native notification which is guaranteed always in the viewport of the browser.
Requires Cordova plugin: cordova-plugin-x-toast
. For more info, please see the Toast plugin docs.
https://github.com/EddyVerbruggen/Toast-PhoneGap-Plugin
Stuck on a Cordova issue?
If you're building a serious project, you can't afford to spend hours troubleshooting. Ionic’s experts offer premium advisory services for both community plugins and premier plugins.
Installation
- Capacitor
- Cordova
- Enterprise
$ npm install cordova-plugin-x-toast
$ npm install @awesome-cordova-plugins/toast
$ ionic cap sync
$ ionic cordova plugin add cordova-plugin-x-toast
$ npm install @awesome-cordova-plugins/toast
Ionic Enterprise comes with fully supported and maintained plugins from the Ionic Team. Learn More or if you're interested in an enterprise version of this plugin Contact Us
Supported Platforms
- Android
- BlackBerry 10
- iOS
- Windows
- Windows Phone 8
Usage
React
Learn more about using Ionic Native components in React
Angular
import { Toast } from '@awesome-cordova-plugins/toast/ngx';
constructor(private toast: Toast) { }
...
this.toast.show(`I'm a toast`, '5000', 'center').subscribe(
toast => {
console.log(toast);
}
);