如何在Ionic 3中进行表格搜索

时间:2019-05-16 04:08:35

标签: angular ionic3

我从Ionic 3开始

我可以按表格搜索并显示结果吗?

赞者: 表单(日期-名称文件-类别)=>搜索=>和结果(在另一页中)

enter image description here enter image description here

我的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;
  });
}

请帮助我。。谢谢您

0 个答案:

没有答案