Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 71531

Problem with storage provider and lifecycle event

$
0
0

@coffeeee wrote:

Hey,

I have a massive issue with lifecycle events and my storage provider.

Main Page: loads my provider data inside the ionViewDidLoad (should happen at the very beginning).
Sub Page: stores my provider data inside the ionViewWillUnload (should happen at the very end when leaving the sub page).

So when I switch from the Sub Page to the Main Page, I would always load the old data as the storage.set function within the ionViewWillUnload would run AFTER the ionViewDidLoad of my main page.

How can I make sure that whenever I go back from my Sub Page to my Main Page, that the data will be stored BEFORE the main page would get the data within ionViewDidLoad ?

No idea to solve this to be honest.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 71531

Trending Articles



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