Angular 2 – Bindings cannot contain assignments

Its a bad practice to use expressions in angular bindings

Move the 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

    }
}

The tr will be something like,

<tr *ngFor="let item of closingDayGroupsList" [class.inactive]="getClass(item)">

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)