Cameron Johnston
Posts: 0
Joined: Mon Jun 17, 2013 3:47 pm

How to Navigate To Page Based on a Local Storage Variable's Value?

Hello,

I'm working on a mobile app that starts at a login screen. What I want to do is navigate to the next page only when the login requirements have been met. I am able to correctly track the login result as a local storage variable, setting its value to either 'true' or 'false'. Now that I have this local storage variable (T or F), how can I:

  1. Navigate to another page if its value is 'true'

  2. Stay on the login page if its value is 'false'

    Any help is appreciated, thanks.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

How to Navigate To Page Based on a Local Storage Variable's Value?

Hi Cameron,

Run the appropriate JavaScript code on Login service Success event.

Cameron Johnston
Posts: 0
Joined: Mon Jun 17, 2013 3:47 pm

How to Navigate To Page Based on a Local Storage Variable's Value?

Oh okay- I didn't realize there's an Appery JS function for this. Thank you!

Cameron Johnston
Posts: 0
Joined: Mon Jun 17, 2013 3:47 pm

How to Navigate To Page Based on a Local Storage Variable's Value?

Yeah, found it. Thanks again Katya!

Return to “Issues”