本文整理匯總了TypeScript中ionic-angular.Toast.create方法的典型用法代碼示例。如果您正苦於以下問題:TypeScript Toast.create方法的具體用法?TypeScript Toast.create怎麽用?TypeScript Toast.create使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ionic-angular.Toast
的用法示例。
在下文中一共展示了Toast.create方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: showToastMsgWithCloseButton
showToastMsgWithCloseButton(msg) {
const toast = Toast.create({
message: msg,
showCloseButton: true,
closeButtonText: 'Ok'
});
return toast;
}
示例2:
self.loading.dismiss().then(function(){
self.toast = Toast.create({
message: "Create product failed!",
duration: 1000,
position: 'bottom'
});
self.nav.present(self.toast);
});
示例3: bottomPosition
bottomPosition(){
let toast = Toast.create({
message:'take me to the temple you shall',
duration:2000,
position:'bottom'
});
this.nav.present(toast);
}
示例4:
.then(() => {
let successToast = Toast.create({
message: 'Inventory cleared successfully',
cssClass: 'fzToast-success',
duration: 1000
});
this._nav.present(successToast);
this._events.publish('fzInventoryUpdated', null);
})
示例5: closeToast
closeToast(){
let toast = Toast.create({
message:'Will you join the Sith?',
showCloseButton: true,
closeButtonText: 'Ok'
});
this.nav.present(toast);
}
示例6: checkWeb
checkWeb(nav: Nav) {
if (Network.connection == 'none') {
let toast = Toast.create({
message: 'No connection.',
//duration: 10000,
});
nav.present(toast);
}
}
示例7: presentPriceAlerts
presentPriceAlerts() {
let toastMessage = this.priceAlertMessages.join(' -- ');
let toast = Toast.create({
message: toastMessage,
showCloseButton: true,
closeButtonText: 'Ok'
});
this.nav.present(toast);
}
示例8: addCart
// add to card
addCart(item) {
let toast = Toast.create({
message: 'Item added to card',
duration: 500,
position: 'middle'
});
this.nav.present(toast);
}
示例9: showSchdError
showSchdError(theError: any, nav: Nav) {
let toast = Toast.create({
message: JSON.stringify(theError),
duration: 3000,
});
nav.present(toast);
}
示例10: middlePosition
middlePosition(){
let toast = Toast.create({
message:'Execute Order 66',
duration:2000,
position:'middle'
});
this.nav.present(toast);
}