Is there a way to disable all the buttons when selectedplace is null in the Dialog, as it currently works when the Dialog first starts but remains activated all the time when the option is changed?
I have attempted the following:
Customized HTML:
<label for="place">Einheit</label>
<div class="input-group mb-3">
<div class="input-group-prepend">
<button class="btn btn-outline-secondary" [disabled]="!selectedplace" type="button">Change</button>
</div>
<select id="place" name="place" #place="ngModel" required class="form-control" [(ngModel)]="selectedplace" (change)="onDropdownChangeplace()">
<option value=""></option>
<option *ngFor="let i of UI_places" [ngValue]="i">{{i.name}}</option>
</select>
<div class="alert alert-danger" *ngIf="place.touched && !place.valid">Bitte eine Eingeben eingeben!</div>
<div class="input-group-append">
<button class="btn btn-outline-secondary" [disabled]="!selectedplace" type="button">Add</button>
<button class="btn btn-outline-secondary" [disabled]="!selectedplace" type="button">Delete(red)</button>
</div>
</div>
TypeScript(declared):
public selectedplace: Place;
Any suggestions on what action I should take next?