1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

How to assign result of async pipe to variable without *ngIf in Angular 6

Discussão em 'Angular' iniciado por DiPix, Novembro 7, 2024 às 12:42.

  1. DiPix

    DiPix Guest

    Is it possible to assign (areShipsExpanded$ | async) to variable without *ngIf? Because in case that this is flag true/false when I have: *ngIf="(areShipsExpanded$ | async) as flag" then button is not displaying in case of false.

    And I would like something like this:

    <button *let="(areShipsExpanded$ | async) as flag"
    (click)="expandAllShips(flag)">{{(flag ? "Collapse" : "Expand"}}
    </button>

    Continue reading...

Compartilhe esta Página