I installed the x-toaster plugin in my ionic2 project with:
cordova plugin add cordova-plugin-x-toast --save
In Code I try:
window['plugins'].toast.show(message, "short", position);
Above does not seem to get hold of the plugin.
My Component:
constructor(
public navController: NavController,
private formBuilder: FormBuilder,
private goalService: GoalService,
private authService: AuthService,
private navService: NavService,
public platform: Platform
) {
super()
this.contractForm = formBuilder.group({
termsAccepted: [false, Validators.required],
})
}
showToast(message, position) {
this.platform.ready().then(() => {
window['plugins'].toast.show(message, "short", position);
});
}
