Reputation: 1525
I'm trying to use an *ngIf conditional on a button in order to disable it if a text input area is empty, but there doesn't seem to be a straightforward way to access that input value.
<ion-item>
<ion-label fixed>Venue</ion-label>
<ion-input type="text" id="venue" [(ngModel)]="event.venue" class="form-control" maxlength="22" required></ion-input>
</ion-item>
<button ion-button block id="addEventButton" *ngIf="//not sure what to do here// " (click)="addEvent();">Add Event</button>
Upvotes: 1
Views: 276
Reputation: 117
Yeah this will work
<button ion-button block id="addEventButton" [disabled]="!event.venue"></button>
Upvotes: 1