I have the following scenario:
I have a list of addresses that comes dynamically from the database, according to what is registered by the user.
I need to enable only one address, so when one button is activated all other ones are disabled.
changeAddress(data) {
if (data.status_info_end === 0) {
data.status_info_end = 1;
} else {
data.status_info_end = 0;
}
}
<div class="wrap-end" *ngFor="let data of totalend">
<div class="wrap-inner-end-one">
<div class="inner-header-end"> {{data.bairro_user}} - {{data.cidade_user}} - {{data.estado_user}}</div>
<div class="central">{{data.cep_user}}</div>
</div>
<div class="wrap-inner-end-two">
<span class="bt-change" [ngClass]="{'bt-changed' : data.status_info_end}" (click)="changeAddress(data)">
<span class="round-bt" [ngClass]="{'rounded-bt' : data.status_info_end}"></span>
</span>
</div>
</div>