Hi!, I’m using Framework7 version: 5.4.1
In index.html (’/’) I have a login button, that open a login.html (/login/) page. This page send a request, and if it’s logged correctly, I save de ID of user in localstorage and redirect to index.html (’/’).
In index, I modify the login button if the user are logged, hiding the button, and showing a message:
if(localStorage.getItem(‘idCliente’) == ‘’){
$(’#login’).html(‘Login’)
}else{
$(’#login’).html(‘Welcome’ + localStorage.getItem(‘nombreCliente’)+’ Salir’ )
}
Redirection works, but not reload a Dom. Does not show the button or text. If I reload page (F5), show the wellcome + user message.
I try clear history, and other route options, but does not work.
app.views.main.router.clearPreviousHistory()
app.views.main.router.navigate(’/’, {
reloadCurrent: true,
ignoreCache: true,
});