本文整理汇总了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);
}