【发布时间】:2020-05-04 01:25:46
【问题描述】:
我正在尝试使用带有一堆不同字段的提交页面来提交有关单个蜂箱的详细信息(名称、位置、cmets 等)。我打算使用离子存储,如果这是最好的方法,则将数据放入数组中,然后使用列表显示所有项目,然后您可以单击以转到有关蜂巢的特定详细信息.
到目前为止,我正在尝试做这样的事情,但不确定这是否在正确的轨道上:
submitHive() {
this.navCtrl.push(ViewHivePage)
let data={'name': this.name, 'location': this.location, 'address': this.address, 'date': this.date, 'weight': this.weight, 'comments': this.comments}
console.log(data)
this.hiveData={
name:this.name,
location:this.location,
address:this.address,
date:this.date,
weight:this.weight,
comments:this.comments
}
从输入字段推送数据,然后转到新页面以显示详细信息。我正在使用[(ngModel)] 推送数据,这是在正确的轨道上吗?
谢谢!
【问题讨论】:
-
你的问题不清楚。请描述更多