IONIC 4: *ngIf directive is not working in IOS

I am developing an application in ionic and I have the following problem in IOS. In android it does not happen to me.

I have this line:

<ion-badge color="success" *ngIf="banderaflag"  style="position:absolute; left:50%; top:-75%" routerLink="/notificaciones">{{numeronotificaciones}}</ion-badge>

This banderaflag I declared like this.

banderaflag= false;

And here is the function I used for changing the banderaflag’s value:


   if( this.numeronotificaciones > 0){
this.banderaflag= true;

     this.banderaflag= false;

} }

In android, when banderaflag change from false to true, the ion-bagde tag appears perfectly. But in IOS dont.


enter image description here

In Android:

enter image description here

What Can i do?

Not a lot to go off of from that. Can you replicate this in a demo that people could inspect?

Testing it out locally, (just a ngIf test case) and it works fine.
I dont think the issue would exist in ngIf, but probably else where in your code.

So, a demo would help a lot here.

1 Like