Created
August 7, 2018 14:56
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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