How to use a function to evaluate ngClass conditional statement in Angular 2

Discussão em 'Angular' iniciado por user3057416, Novembro 6, 2024.

  1. user3057416

    user3057416 Guest

    So within my *ngfFor loop I have this

    [ngClass]="{'first':isStartDate(event,day)}"


    where isStartDate is a function in my component.

    error thrown is


    "Unexpected token : "
    ​

    Is it possible to to use a function here?

    Continue reading...

Compartilhe esta Página