Ngif doesnt update the view of page after calling through Events

Ionic emitting an event gets registered by a subscription if you’re subscribing to Events, but that isn’t something Angular listens to for change detection. You might want to read up on exactly what triggers change detection. It’s very specific things, like a button click (which you already noticed).

Solution: inside your subscription, after you update the value of the variable, call ChangeDetectorRef.detectChanges(). You’;ll need to inject ChangeDetectorRef in your constructor. That will manually fire Angular’s change detection.

1 Like