I'm having a question about apps architecture.
I have an IONIC project where the app saves some basic data in the local storage so you do not have to ask for the user's login every time it is opened.
But this data is essential for the rest of the application.
I currently have the following input routes:
- 'app.home' - > when data already exists in localstorage
- 'app.login' - > when the data does not exist and you need to log in.
The business is that it is in the route 'app.home' that I do the verification of the localstorage and from there I decide if I stay in the route or I direct to 'app.login'. But in the 'app.home' I already need data that should be in the localstorage, and when it redirects to login and then back home, that view has already been uploaded and data saved after login does not update this view. / p>
So I thought, 'What would be the best way to do, then, does this preloader of the data and direct to login or home conform the need?'.
That's the question.