*ngIf is not hiding the div in Angular 17

Discussão em 'Angular' iniciado por Elaine Byene, Dezembro 30, 2024.

  1. Elaine Byene

    Elaine Byene Guest

    I'm trying to show a div if the conditions for *ngIf are met. I'm just not able to get it done. I have been trying this for hours.

    <div *ngIf="item.billingItem=='Staff'">This is NOT showing. I don't know why</div>


    However, the same condition is working:

    <div>{{item.billingItem=='Staff'?'This is working':''}}</div>


    What am I doing wrong? I feel like it's a silly mistake.

    Continue reading...

Compartilhe esta Página