<form *ngIf="data" [formGroup]="formGroup" action="javascript: return true;"> <ng-container *ngFor="let item of data.data.formObj" [ngSwitch]="item.type"> <ng-container *ngSwitchCase="'input'"> <ion-item class="post-item"> <ion-label>{{item.label}}</ion-label> <ion-input type="search" [maxlength]="item.maxLength" [attr.placeholder]="item.placeHolder [formControlName]="item.formKey" [(ngModel)]="item.value" (keyup.enter)="search()"> </ion-input> </ion-item> </ng-container> </ng-container> </form>
<ion-searchbar (keyup.enter)="search()" inputmode="" [attr.placeholder]="item?.placeHolder" [(ngModel)]="item.value" [formControlName]="item.formKey"></ion-searchbar>