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

Clear cached pages inside IonRouterOutlet programmatically

$
0
0

Hi! I need to clear cached pages inside IonRouterOutlet programmatically on logout.
Without clearing the cache, the behavior of the application looks strange.
For example:

  • I launch the application and navigate through several pages changing something on them
  • I log out and go to Login page
  • I log in and navigate through the previous pages again. Changes on the pages remain, as they were taken from the cache.

How can I remove pages from the DOM after logout?

This is the structure of my application:

<IonApp>
  <IonReactRouter>
    <IonTabs>
      <IonRouterOutlet>
        <Route path="/page-1" component={Page1} />
        <Route path="/page-2" component={Page2} />
        ...
      </IonRouterOutlet>

      <IonTabBar slot="bottom">
         ...
      </IonTabBar>
    </IonTabs>
  </IonReactRouter>
</IonApp>

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48980

Trending Articles



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