相关疑难解决方法(0)

Ionic 4如何接收componentProps?

在Ionic 4中,我尝试使用modalController来打开模式。我可以打开模式并发送componentProps,但是我不确定如何接收这些属性。

这是我打开模态组件的方法:

async showUpsert() {
  this.modal = await this.modalController.create({
    component:UpsertComponent,
    componentProps: {test: "123"}
  });
  return await this.modal.present();
}
Run Code Online (Sandbox Code Playgroud)

我的问题是;在实际的模态中,如何test: "123"进入变量?

ionic-framework ionic4

5
推荐指数
2
解决办法
4257
查看次数

标签 统计

ionic-framework ×1

ionic4 ×1