Keep Variables after a refresh

(Sorry for my bad English) So, i’m pretty new in ionic, and I wanted to know if somehow there is a way to save information from a variable itself, after a refresh, my app has the functionality of after logged in, if the person leaves the app, the app still remains logged in to their account, and I was wondering if you have a way to keep the value of a variable after the user leave the app and returns, thanks.

You need to define “refresh” and “leave the app” in more detail. If it can effectively mean “completely destroy and relaunch the app”, then you should look into Ionic Storage.

Be careful to only use this for communicating across app restarts, not within a running app itself. So, only read from it once at application startup.