I need help, I do not know English I use the google translator and I’m learning ionic so if I have everything wrong, please tell me xd, I have two classes, the first sends a number to a method of the second and this method should update the view so that the quantity of images does not appear, what happens is that the value does arrive but the view is not updated
home.ts
realizarPedido(){
var pedido = this.sumar;
let distribucion = new DistribucionPage(null,null,null);
distribucion.quitarProductosDis(pedido);
}
distribucion.html
<div class="box green">
<img *ngIf="!mostrarr[0]" class="zana-1" src="../assets/zanahoria.png" alt="">
</div>
<img *ngIf="!mostrarr[1]" class="zana-2" src="../assets/zanahoria.png" alt="">
<img *ngIf="!mostrarr[2]" class="zana-2" src="../assets/zanahoria.png" alt="">
<div class="box yellow">
<img *ngIf="!mostrarr[3]" class="zana-3" src="../assets/zanahoria.png" alt="">
</div>
distribucion.ts
quitarProductosDis(cantidad){
for (let index = 0; index < cantidad; index++) {
this.mostrarr[index] = true;
}
}