My structure looks like this:
var app = angular.module('MainApp',[
'ngRoute',
'mainAppControllers'
]);
app.config(['$routeProvider',
function($routeProvider){
$routeProvider.
when('/tutorial', {
templateUrl: 'partials/tutorial.html',
controller: 'TutorialCtrl'
}).
when('/menu', {
templateUrl: 'partials/menu.html',
controller: 'MenuCtrl'
}).
when('/termo', {
templateUrl: 'partials/termo_de_uso.html',
controller: 'TermoCtrl'
}).
otherwise({
redirectTo : '/tutorial'
});
}
]);
However I want it when it first opens the app it directs to a page and if it is the second time it opens it directs to another page.
How can I do this?