0
I’m using routes from angularjs 1.6
and I’m having problems with the java connection filter part.
When I log into my system and access a page of my system, the filter works normally, but when I open another page without refreshing the page, the filter is ignored.
I think it’s because of the url that the Angularjs routes are mounting or something like that.
Giving a more explanatory example:
I log in to the system and access /users
in the URL, the filter works correctly. Without refreshing the screen, I access /appointments
and the filter is ignored, does not fall into the debug of the filter class.
I set the routes this way:
/* Configuração de rotas */
app.config(function($routeProvider) {
$routeProvider.when('/', {
templateUrl : 'home.html',
})
$routeProvider.when('/appointments', {
templateUrl : 'views/appointment/appointment.html',
controller : 'AppointmentController'
})
$routeProvider.when('/patients', {
templateUrl : 'views/patient/patient.html',
controller : 'PatientController'
})
$routeProvider.when('/users', {
templateUrl : 'views/user/user.html',
controller : 'UserController'
})
$routeProvider.when('/services', {
templateUrl : 'views/service/service.html',
controller : 'ServiceController'
})
});
The filter is ignored in the sense that it does not go pro
appointments
or he goes without showing thelogin
?– Leonardo Pessoa
In the sense of not respecting the filter... I need the filter to be applied to every page access. I need to perform the connection filter, when the user tries to access /appointments, understood?
– Guilherme Nass
Think of the following scenario... the user logged on to the system, accessed /users and was a while without interaction with the system and the session expired. When it accesses /appointments, the session will not be active and it should be redirected to the login page.
– Guilherme Nass