DEV Community

scascalesp
scascalesp

Posted on

Custom html using angular

Hello
I want to use this html an loop for angular
<div >
<select class="selectpicker" data-live-search="true">
<option data-tokens="ketchup mustard1">Hot Dog, Fries and a Soda</option>
<option data-tokens="mustard2">Burger, Shake and a Smile</option>
<option data-tokens="frosting3">Sugar, Spice and all things nice</option>
</select>
</div>

When use
<select class="/*form-control*/ selectpicker" data-live-search="true" name="{{'idCoin'+i}}" [(value)]="customer.idCoin" required>
<option *ngFor="let item of idCoinlist" [value]="item.id" data-tokens="{{item.id}}">{{item.name}}</option>
</select>

Show error:
Can't bind to 'tokens' since it isn't a known property of 'option'.ng

HOw i can use loop with custom html? Thanks!

Top comments (0)