本文整理汇总了TypeScript中@ionic/angular.ModalController类的典型用法代码示例。如果您正苦于以下问题:TypeScript ModalController类的具体用法?TypeScript ModalController怎么用?TypeScript ModalController使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ModalController类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: presentModal
async presentModal() {
const modal = await this.modalController.create({
component: DoacaoaddPage,
componentProps: { value: 123 }
});
return await modal.present();
}
示例2: abrirModal
async abrirModal(){
const modal = await this.modalCtrl.create({
component: ModalInfoPage,
componentProps: {
nombre: 'Jorge',
pais: 'MĂŠxico'
}
});
await modal.present();
const { data } = await modal.onDidDismiss();
console.log('Retorno del Modal: ', data);
}
示例3: sendNodeInfo
sendNodeInfo() {
let addNodeNameMsg = "Please add the name of the node";
if (this.nodeName === undefined || this.nodeName.replace(/\s/g, "") === "") {
this.presentToast(addNodeNameMsg);
} else {
const data = {
id: this.nodeName.replace(/\s/g, ""),
name: this.nodeName.replace(/\s/g, ""),
data: { weight: +this.nodeWeight },
position: { x: 0, y: 0 }
};
this.modalController.dismiss(data);
}
}
示例4: closeModal
async closeModal() {
const onClosedData: string = "Wrapped Up!";
await this.modalController.dismiss(onClosedData);
}
示例5: clickMe
async clickMe() {
const modal = await this.modalController.create({
component: ModalPageToPresent
});
return modal.present();
}
示例6: close
close() {
this.modalController.dismiss(null, undefined);
}