How to detect login and then not show slide templates when you start the app


#1

I’m starting an app which contains a template of aid before the user logs in, as I do to detect this logeo not show template to help start the app.


#2

You could create a variable and store it in the local storage.

Example:
intro-controller:

// Called to navigate to the main app
  $scope.startApp = function() {
    $state.go('app.home');
    localStorage.seenIntro = true;
  };

main-controller:

//If user hasn't seen the introduction to the app
  if(!localStorage.seenIntro){
    $state.go('intro');
    //console.log('Here');
  }

#3

worked for me, thanks!