【发布时间】:2018-06-14 08:08:32
【问题描述】:
我正在使用 ngFor 生成一个按钮列表,当我加载网站时,第一个生成的按钮已经聚焦,直到我点击其他任何地方...
<div align="center" class="buttonDiv" *ngFor="let tamplates of caseService.availableTaskTemplates">
<button mat-button class="button" *ngIf="tamplates.contentType == 1" (click)="createTask(tamplates.taskType)">
{{ tamplates.headerText }}
</button>
</div>
这是一张图片: https://ibb.co/imG7sy
我可以做些什么来“取消焦点”按钮?
【问题讨论】: