1 year ago
#329690
Manuel K.
Angular 13: ngClass not working after ng build
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.
angular
ng-class
angular-material-table
0 Answers
Your Answer