私は現在、ホームページがユーザーが選択しなければならない一連のオプションで構成されるアプリを開発しています.オプションは、それぞれに異なるデータを持つ3つのドロップダウンリストと1つのテキストフィールドです.ページの下部にあるI'ボタンをクリックすると次のページに移動しますが、ユーザーが 4 つの利用可能なフィールドのうち 2 つから何かを入力/選択した場合にのみ、ナビゲーションを実行したいと考えています。
ボタンの[無効]機能について読みましたが、私の場合、ボタンのみを有効にしたいのですが、ナビゲーションは機能しません。
これを参照しました 1つ以上のチェックボックスがチェックされている場合、送信ボタンを有効にするにはどうすればよいですか? しかし、私にとっては、フィールドは ngFor を使用せずに個別に作成されます。そして、送信ボタンを常に有効にしたいです。
現在、これは制限のない私の HTML ページです。
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
</ion-navbar>
</ion-header>
<ion-content>
<br>
<ion-item>
<ion-input type="text" value="" placeholder="Enter Keyword" [(ngModel)]="textype"> </ion-input>
</ion-item>
<ion-item>
<ion-label>Country</ion-label>
<ion-select (ionChange)="onSelect(selectid)" [(ngModel)]="selectid">
<ion-option *ngFor="let selectid of countryData" [value]="selectid">
{{selectid.name}}
</ion-option>
</ion-select>
</ion-item>
<!--<ion-item *ngIf="compData">-->
<ion-item>
<ion-label>State</ion-label>
<ion-select [(ngModel)]="catid">
<ion-option *ngFor="let catid of stateData" [value]=catid>
{{catid.name}}
</ion-option>
</ion-select>
</ion-item>
<ion-item>
<ion-label>
Type of Vehicle
</ion-label>
<ion-select [(ngModel)]="typeid">
<ion-option *ngFor="let typeid of vehicles">
{{typeid}}
</ion-option>
</ion-select>
</ion-item>
<br>
<button type="submit" (Click)= "searchform" ion-button full > Search </button>
</ion-content>