import { Platform } from 'ionic-angular' ; import { Injectable } from '@angular/core' ; declare var window ; class @ Injectable ( ) export class Toast { public static SHORT : string = 'short' ; public static LONG : string = 'long' ; public constructor ( private platform ) { } param { string } text param { string } duration return { void } public show ( text , duration ) { this . platform . ready ( ) . then ( ( ) => window . plugins . toast . show ( text , duration , 'bottom' ) ) ; } }