How do I set a value as the default selected value in the dropdown? I am using angular 8. I have the following html
<div class="form-group">
<label class="form-control-label col-form-label-sm">Content Type</label>
<select class="form-control form-control-sm" [(ngModel)]="item.contentType" formControlName="contentType" name="contentType">
<option *ngFor="let contentType of contentTypes" [value]="contentType.name" >{{contentType.displayName}}</option>
</select>
</div>
I have tried using [selected]="contentType.name=='TEXT'"
but the dropdown still does not show the default selected value as "Text Only".
<div class="form-group">
<label class="form-control-label col-form-label-sm">Content Type</label>
<select class="form-control form-control-sm" [(ngModel)]="item.contentType" formControlName="contentType" name="contentType">
<option *ngFor="let contentType of contentTypes" [value]="contentType.name" [selected]="contentType.name=='TEXT'">{{contentType.displayName}}</option>
</select>
</div>
contentTypes is an array of [{"name":"TEXT","displayName":"Text Only"},{"name":"AUDIO","displayName":"Audio"},{"name":"VIDEO","displayName":"Video"}]