I tried ngOnIt and IonViedDidEnter to show text of the button in the beginning (atm there is only a small button without any text) But Both didn’t work and change anything. Do I have to add something so it works?
<ion-item *ngFor="let friend of friendsList">
<ion-avatar item-start>
<img src={{friend.img}}>
</ion-avatar>
<button ion-button color="rank" class="avat"> </button>
<h2>{{friend.name}}</h2>
<p>{{friend.status}}</p>
<button (click)="toggleNamedColor(friend)" (click)="changeText(friend)" ion-button round [color]="friend.ionicNamedColor" item-end >{{friend.text}}</button>
</ion-item>
public text: string = '+ADD';
IonViewDidEnter(){
this.text = "+ADD";
}
public changeText(friend): void {
if(friend.text === '✓ADDED') {
friend.text = '+ADD'
} else {
friend.text = '✓ADDED'
}
}