Skip to content

Instantly share code, notes, and snippets.

@NandoKstroNet
Created August 7, 2018 14:56
Show Gist options
  • Save NandoKstroNet/cc70ae7cfcb99ce91431872eb43f3e82 to your computer and use it in GitHub Desktop.
Save NandoKstroNet/cc70ae7cfcb99ce91431872eb43f3e82 to your computer and use it in GitHub Desktop.
Serviço para uso do Toastr em nosso projeto Ionic com Firebase do site ionichero.com
import { Injectable } from '@angular/core';
import { ToastController } from 'ionic-angular';
/*
Generated class for the ToastrServiceProvider provider.
See https://angular.io/guide/dependency-injection for more info on providers
and Angular DI.
*/
@Injectable()
export class ToastrServiceProvider {
constructor(public toastCtrl: ToastController) {
}
show(msg, duration) {
const toast = this.toastCtrl.create({
message: msg,
duration: duration
});
return toast;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment