gpt4 book ai didi

angular - 无法绑定(bind)到 'routerLink',因为它不是 'a' 的已知属性

转载 作者:太空狗 更新时间:2023-10-29 16:55:01 30 4
gpt4 key购买 nike

<分区>

我正在将我们的一个应用程序从 rc4 更新到 angular2.0.0,我在运行时收到模板解析错误。这是我的 View 模板:

<div *ngFor="let widget of widgets" class="col-xs-3 quick-link">
<a [routerLink]="['/Tile', widget.WidgetRoute.Feature, widget.WidgetRoute.SubFeature]">
<div class="tile-icon">
<span [className]="widget.IconCssClass"></span>
<span *ngIf="widget.BadgeNumber > 0" class="badge">{{widget.BadgeNumber}}</span>
</div>
<h4>{{widget.Text}}</h4>
</a>
</div>

错误是在routerlink上。这是错误:

Can't bind to 'routerLink' since it isn't a known property of 'a'. ("

<div *ngFor="let widget of widgets" class="col-xs-3 quick-link">
<a [ERROR ->][routerLink]="['/Tile', widget.WidgetRoute.Feature, widget.WidgetRoute.SubFeature]">
<di"): LdrComponent@4:19
Can't bind to 'ngIf' since it isn't a known property of 'span'. ("tile-icon">
<span [className]="widget.IconCssClass"></span>
<span [ERROR ->]*ngIf="widget.BadgeNumber > 0" class="badge">{{widget.BadgeNumber}}</span>
</div>
"): LdrComponent@7:22

routerLink 对我来说似乎没有畸形...我做错了什么?

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com