I need to give a class to a Here\'s the code
There is a little problem with that. Take as an example, that I want to stop showing the date to the user which is equal to 0000.00.00, so, by taking the inline expression binding I can find it right to: Its a bad practice to use Move the The tr will be something like, if a property of item has the same value as a property from an object in an array.
{{(appointment_date === "0000.00.00") ? ' ' : appointment_date}}
expressions
in angular bindings
class
expression into controller.export class AppComponent {
title = 'Groups';
getClass(item): void {
// add filter logic here
return this.definitionDetails.Groups.filter(i => i.AbsenceReservationGroupID === item.ID).length > 0
}
}
<tr *ngFor="let item of closingDayGroupsList" [class.inactive]="getClass(item)">