you have to use
pageAfterIn(e){
mainview.router.refreshPage();
//or
this.myrefreshFunction(); //call the refresh function which actually does the hiding
thing
}
you have to use
pageAfterIn(e){
mainview.router.refreshPage();
//or
this.myrefreshFunction(); //call the refresh function which actually does the hiding
thing
}
Framework7 version: Framework7 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('<a class="col button button-fill menu color-green" href="/login/">Login</a>')
}else{
$$('#login').html('Welcome' + localStorage.getItem('nombreCliente')+'<a href="#" id="salir"> Salir</a>' )
}
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,
});