![](/img/trans.png)
[英]How to replace next button with mat-chip in Angular Material stepper?
[英]Angular Material, make <mat-chip> clickable
我正在使用來自material.angular.io的墊片
<mat-chip-list class="categories">
<mat-chip><a href="/publication/category/{{category.id}}">
{{category.name}}</a></mat-chip>
</mat-chip-list>
如果單擊鼠標的中心按鈕,則該鏈接有效並打開另一個選項卡,但是單擊鼠標左鍵將無法打開該鏈接。
我嘗試了class =“ link-overlapping”,但仍然無法正常工作。
您完全不需要錨,您可以直接在mat-chip
上使用routerLink
:
<mat-chip-list class="categories">
<mat-chip [routerLink]="['publication/category', category.id]">
{{category.name}}
</mat-chip>
</mat-chip-list>
您嘗試使用routerLink嗎? 這個對我有用。
<mat-chip-list class="categories">
<mat-chip><a [routerLink]="['/your_path']">{{ data }} </a></mat-chip>
</mat-chip-list>
</div>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.