1
我建立動態下拉引導部件,如:獲取引導下拉列表中選擇的項目與Angular4
<div class="dropdown" >
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
Selectionner un filtre...<span class="caret"></span>
</button>
<ul class="dropdown-menu" >
<li *ngFor="let v of items" (click) = "onSelect($event);"> <-- ??????
<a class="dropdown-item" href="#">{{ v.val }}</a>
</li>
</ul>
</div>
我怎樣才能獲得所選項目的索引與我ONSELECT()函數? ($事件是的MouseEvent結構)