<div class="col-xl-8"> <select id="region" name="region" class="form-control" [(ngModel)]="player.region"> <option class="dropdown-item" [ngValue]="null"><Empty></option> <option class="dropdown-item" *ngFor="let region of regions" id="region" [ngValue]="region">{{region.regionName}} ({{region.regionCode}})</option> </select> </div>
<div class="col-xl-8"> <ng-container *ngIf="region.length; then regionList; else freeText"> </ng-container> <ng-template #regionList> <select id="region" name="region" class="form-control" [(ngModel)]="player.region"> <option class="dropdown-item" [ngValue]="null"><Empty></option> <option class="dropdown-item" *ngFor="let region of regions" id="region" [ngValue]="region">{{region.regionName}} ({{region.regionCode}})</option> </select> </ng-template> <ng-template #freeText> <input type="text" class="form-control" [(ngModel)]="player.region" id="region" name="region" placeholder="Region"> </ng-template> </div>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)