<li ngbDropdown="" class="nav-item dropdown">
<a ngbDropdownToggle="" class="nav-link dropdown-toggle" href="javascript:;" id="bydate" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false">
<i class="icofont icofont-bank-alt"></i> All</a>
<div ngbDropdownMenu class="dropdown-menu" aria-labelledby="bydate">
<a class="dropdown-item" value="all" (click)="setCategory('all')">All</a>
<div *ngFor="let category of categories">
<a class="dropdown-item" [ngClass]="category.selected" value="category" (click)="setCategory(catergory);">{{category}}</a>
</div>
</div>
</li>
我正在尝试发送一个类别的值,将下拉值更改为setCategory()函数,但我得到的值为undefined。