I have a component that shows a list of accounts. I would like to show not only the account number but also the currency with an icon or image of country flag.
This is my component:
<select name="drpAccounts" class="form-control"[(ngModel)]="accountSelected" (change)="handleChangedDrpAccount($event)">
<option *ngFor="let account of accounts" [ngValue]="account">
{{ account.formattedNumber }}
</option>
</select>
I found many projects of libraries on github but I want something simple. Thanks in advance.
EDIT:
After some proofs with this code
<select name="drpAccounts" class="form-control" [(ngModel)]="accountSelected" (change)="handleChangedDrpAccount($event)">
<option style="background-image:url(assets/img/country-flag.png);" *ngFor="let account of accounts" [ngValue]="account">
{{ account.formattedNumber }}
</option>
</select>
I realized that it works when I put the style in the select tag
<select style="background-image:url(assets/img/country-flag.png);" ... >
and that it's I don't want