Ionic Starter Sidemenu

Hello All,

I’m using the Ionic Starter ( Sidemenu ) app as a template to develop my project.

When I start the app, I want it to immediately (without button click, but on load) check if there is a user profile stored in LocalStorage. If there is, show the CreateProfile modal. If there isn’t, display different views depending on time of day e.g. if 10am, display view x, if 2pm, display view y.

My questions are as follows:

  • I’m using the ‘appCtrl’ controller to check for user existence. How do I display the CreateProfile modal on startup? The current template displays a login form only on click.

  • Once I submit the CreateProfile modal OR if there is a user in the system already on startup, how do I display different views / pages based on the conditions mentioned previously? I find that if I try to use different views, I lose the Side Menu.

Apologies if these are newb questions. I really appreciate any help.

Hi all. Any thoughts on above post? Many thanks