I'm having an issue with my dropdown select function.
<select name="name" [(ngModel)]="name">
<option value="ACTIVE" [selected]="name.status=='ACTIVE' || name.status==null">Active</option>
<option value="INACTIVE" [selected]="name.status=='INACTIVE'">Inactive</option>
</select>
However, I want to set the default selection to ACTIVE
if name.status
is null.
Unfortunately, this approach is not working for me. Can anyone provide a solution? Thank you!