我使用angular5,我无法使用* dropdownMenu和* ngFor,我收到此错误:
ng : Can't have multiple template bindings on one element . Use only one attribute named template or prefixed with *
这是代码:
<div class="btn-group" dropdown>
<button dropdownToggle type="button" class="btn btn-primary dropdown-toggle" (click)="ListUsers()">
List of users <span class="caret"></span>
</button>
<ul *dropdownMenu class="dropdown-menu" role="menu" *ngFor="let c of listUsers">
<li role="menuitem"><a class="dropdown-item">{{c.Firstname}} {{c.lastName}}</a></li>
</ul>
</div>
我该如何解决这个问题?