Hide Instructions Screen after first launch of the app

Hi,

How does one go about caching whether the user has gone through the app tutorial and hiding it on subsequent app launches?

Thanks

Hi there,

You can use localStorage to save whether a user has completed the tutorial :

    if(localStorage.getItem("hasViewedTutorial")){
      $state.go('app.home');
    }else{
      $state.go('app.tutorial');
    }

And on the last page of the tutorial:

localStorage.setItem("hasViewedTutorial","true");
1 Like