在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"进入变量?