本文整理匯總了TypeScript中angular2-materialize.toast函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript toast函數的具體用法?TypeScript toast怎麽用?TypeScript toast使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了toast函數的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: function
navigator.geolocation.getCurrentPosition( function (position) {
var lat = position.coords.latitude;
var lng = position.coords.longitude;
let file = this.selectFiles.item(0);
this.currentUpload = new Upload(file);
this.mascotasService.agregarMascota(lat,lng,this.descripcion, this.recompensa, this.telefono, this.currentUpload, this.userId);
toast("Datos guardados.", 4000);
this.procesando = false;
this.router.navigateByUrl("/inicio");
}.bind(this));
示例2: runTest
runTest() {
console.log('runtest');
let flag = (localStorage.getItem('testInfo') ? 1 : -1);
console.log(flag);
console.log(this.status);
console.log('blabla');
if (this.status === 'run' && flag === 1) {
this.router.navigate(['/runTest', 'user']);
} else if (this.status === 'available' && flag === -1) {
this.router.navigate(['/runTest', 'user']);
} else {
toast('Sorry, you did something wrong', 5000, 'orange');
}
}
示例3: handleError
handleError(error) {
toast('Failed to add questions', 3000, 'red darken-2');
}
示例4: toast
res => {
toast('All questions were successfully added', 3000, 'green');
this.questionsList = [];
},