Angular 13:ngClass 在 ng 构建后不起作用
我对垫子桌有一点问题,尤其是垫子排。 我想要做什么:如果该行有日期,则添加“is-marked”类。
<mat-row [class.is-marked]="row.date && row.date.length > 5" class="{{row.date}}" *matRowDef="let row; columns: displayedColumns;" (click)="changeLocation('/foo/bar/'+row.object_id+'/1')"></mat-row>
在我的本地主机上一切正常。但是,如果我构建项目并将其部署在我的服务器上,则行不会得到任何类,尽管它们有日期。
作为测试,我还将日期添加为一个类,以检查该日期是否可以到达。 是的...构建后没有日期或其他行信息。
怎么会这样,我做错了什么?
不幸的是,我对 ngClass 的几个版本都没有成功。
I have a little problem with the mat table especially with the mat row.
What i want to do: Add class "is-marked" if the row has an date.
<mat-row [class.is-marked]="row.date && row.date.length > 5" class="{{row.date}}" *matRowDef="let row; columns: displayedColumns;" (click)="changeLocation('/foo/bar/'+row.object_id+'/1')"></mat-row>
All is working fine on my local host. But if i build the project and deploy it on my server the rows get no class although they have a date.
As a test i have also added the date as a class to check if the date is reachable at that point.
And yes... there are no date or other row information after build.
How can that be and what im doing wrong?
Unfortunately, I have had no success with several versions of ngClass.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论