我从Ionic 3开始
我可以按表格搜索并显示结果吗?
赞者: 表单(日期-名称文件-类别)=>搜索=>和结果(在另一页中)
我的HTML:
<ion-content>
<ion-item>
<ion-label stacked>Date:</ion-label>
<ion-datetime displayFormat="YYYY-MM-DD" [(ngModel)]="date"></ion-datetime>
</ion-item>
<ion-item>
<ion-label stacked>File Name:</ion-label>
<ion-input type="text" [(ngModel)]="name"></ion-input>
</ion-item>
<ion-item>
<ion-label stacked >Categories :</ion-label>
<ion-select [(ngModel)]="categories">
<ion-option value="A">A</ion-option>
<ion-option value="B">B</ion-option>
</ion-select>
</ion-item>
<ion-row>
<ion-col >
<button ion-button (click)="search()">Search</button>
</ion-col>
</ion-row>
<ion-content>
我的TS:
search() {
let data = {
date: this.date,
name: this.name,
categories: this.categories
};
this.navCtrl.push(TransactionaccPage, data);
}
getData() {
this.http.get('http://xxxx.com/xxx.php')
.map(res => res.json()).subscribe(data => {
this.dat = data;
});
}
请帮助我。。谢谢您