【发布时间】:2019-11-06 09:20:10
【问题描述】:
我有一个接受输入参数的组件:
export class MapComponent implements OnInit {
@Input() options: MapOptions<any>;
}
使用 ionic ModalController 打开此模式的页面:
async pickLocationModal() {
const modal = await this.modalController.create({
component: MapComponent
});
return await modal.present();
}
另外,我在页面中存储了 mapOptions,我想传递它。
我可以将我的 mapOptions 传递给 Modal,以便组件将其作为输入吗?
【问题讨论】:
-
你的问题根本不清楚。
modalController是什么?是你的模态实现吗? -
抱歉,我使用的是 ionic,我的印象是它是内置于 Angular 中的,它让我忘记了
标签: javascript angular typescript ionic4