Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48986

IonViewDidEnter not firing on stacked navigation

$
0
0

I’m facing an issue when navigating with ion-item routerLink.

<ion-item lines="none" routerLink="user/orders">
    <ion-label> 📃 My Orders</ion-label>
</ion-item>

As I initially load my Orders page user/orders, and then navigate to other pages, the event ionViewDidEnter() doesn’t run again when I go back to my Orders page. Once my orders are constantly changing, I need the event to run every time the page is shown (whether it was in pages stack or not) in order to load my orders:

== orders.page.ts ==

ionViewDidEnter() {
    this.orderService.fetchOrders().subscribe(result => {
      this.dataLoaded = true;
    });
  }

Is there anything I’ve been missing? ionViewDidEnter() wasn’t supposed to fire every time the view is shown, regardless of previously being on the pages stack? If not, what ionic life cycle event should I use instead?

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48986

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>