Old control flow is supported in latest angular version 18?

Discussão em 'Angular' iniciado por Rehan Shah, Novembro 5, 2024.

  1. Rehan Shah

    Rehan Shah Guest

    This is the latest control flow in angular 18.

    @if(condition) {
    <button>If Condition</button>
    }
    @else {
    <button>Else Condition</button>
    }


    And This is the old way.

    <ng-container *ngIf="state1; else default">State 1 selected</ng-container>

    <ng-template #default> No state is selected. </ng-template>


    Does this old way is still valid in angular 18 or not?

    Continue reading...

Compartilhe esta Página