Readdy Write  
0,00 €
Your View Money
Views: Count
Self 20% 0
Your Content 60% 0

Users by Links 0
u1*(Content+Views) 10% 0
Follow-Follower 0
s2*(Income) 5% 0

Count
Followers 0
Login Register as User

Angular Text ausgeben abhängig von einer Variable if ngif

09.02.2021 (šŸ‘1949)

Angular if in der Ausgabe von Text

 

Wie kann man Text in Angular ausgeben, abhƤngig von einer Variable

ngIf in Brakets?

 

In Angular.component.ts

  public isNew:boolean;

 

In Angular.component.html

<div class="form-group">

        <button class="btn mat-raised-button btn-primary" [disabled]="!f.valid" >{{ isNew ? "New":"Save" }}</button>        

    </div>