【发布时间】:2019-05-28 14:55:53
【问题描述】:
我尝试过的:
<mat-step *ngFor="let name of names" [label]="name" [completed]="name + 'IsCompleted'">
<button mat-button (click)="redirectToNameUrl(name)" mat-raised-button color="primary">
{{ (inProgress ? 'In progress...' : "'Sign in with ' + name + 'details!'" )}}
</button>
</mat-step>
注意:嵌套把手似乎也不起作用。
结果:
一个显示'Sign in with ' + name + 'details!'的按钮
我希望它会说:
Sign in with james details!
谢谢
【问题讨论】:
-
去掉
'Sign in with ' + name + 'details!'周围的双引号。 -
是的,就在我之前到达那里 - 哎呀!谢谢@TimKlein
-
语法错误不在此处讨论。
-
@Reactgular 我要删除这个问题吗?
-
这取决于你。您可以改进问题,使其成为主题或等待查看它是否关闭。如果你得到很多反对票,那么我会删除它。
标签: angular interpolation ngfor