Ich habe eine Komponente mit einer Dropdown-Liste gibt derzeit mehrere Optionen zurück. Ich möchte die Funktionalität hinzufügen, dass, wenn die Option "andere" gewählt wird, ein div wird zeigen. Ich bin mir nicht sicher, wie ich den Scheck für den Fall "Andere" schreiben soll. HierZeige div basierend auf Drop-Down-Option
sind der Code so weit:
<div class="p-2 col">
<select class="form-control w-100" type="checkbox" formControlName="paidToId">
<option *ngFor="let lookupItem of leHudItemInfo.availablePaidTos" [ngValue]="lookupItem.id">
{{lookupItem.name}}
//this returns the options, but how can I add a flag for only the string of "other"
</option>
</select>
</div>
<div class="showOther" ng-show="paidToOptions=='other'">
</div>
HTML: <div class="" ng-show="selection=='other'"> </div>
Vielen Dank! Und danke für den Kommentar zu angular2 :) Ich bin noch neu dazu! – cdb