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!