我收到模板解析错误:使用下面的代码,什么是正确的实现?
#cODE
<mat-chip-list #chipList aria-label="Fruit selection">
<mat-chip [routerLink]="['templates/,{{ template.name }} ,/edit']" *ngFor="let template of associated_template;" [selectable]="selectable">
{{ template.name }}
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
</mat-chip>
<input [matChipInputFor]="chipList" [matChipInputSeparatorKeyCodes]="separatorKeysCodes" [matChipInputAddOnBlur]="addOnBlur" (matChipInputTokenEnd)="add($event)">
</mat-chip-list>
答案 0 :(得分:0)
您不能混合使用属性绑定和字符串插值
<mat-chip [routerLink]="['templates/', template.name, '/edit']" *ngFor="let template of associated_template;" [selectable]="selectable">