How to reload a page with now animation?

I reload a page when you select a value in a select.

And I use this but, it is sliding in the page from the right and I just want to reload it as I did with mainView.router.reLoad in v1.

This is what I have now.

mainView.router.navigate({url:"/skapaschemalista1/?kategori_id="+kategori_id, ignoreCache:true,reloadCurrent:true,animate:false});

Any input appreciated, thanks.

And where did you find such syntax? http://framework7.io/docs/view.html#router-api-methods-properties

There is also refreshPage method added in latest version

I found it in the link you provided :slight_smile: at Router Methods - router.navigate(url, options)??
Thats how I load all my pages when I use router.navigate?

I have a select list on the page that I want to reload.
And when you select a value I run a on change to get the value and reload the page with the selected value with below.

$$(document).on(“change”,".skapaschemalista1", function() {

var kategori_id = $$(‘select[name=skapaschemalista1]’).val()

mainView.router.navigate({url:"/skapaschemalista1/?kategori_id="+kategori_id, ignoreCache:true,reloadCurrent:true,animate:false});
});

And in my routes.js I have.

{
name: ‘skapaschemalista1’,
path: ‘/skapaschemalista1/’,
url: ‘https://www.manmade.se/iphone/skolappenv2/narvaro/skapaschemalista1.asp’,
},

So what is wrong with it, since I have looked at the docs and doing it wrong?
Thanks.

mainView.router.navigate('/skapaschemalista1/?kategori_id=' + kategori_id, {
  ignoreCache:true,
  reloadCurrent:true,
})
1 Like

Ok thanks a lot Vladimir. Now it works, great!

Just one more question.

If I are on page1 and link to the same page, just loading a new variable and then set the routes in my js file like below, then it reloads the page with all the right values, but it is not sliding in.

So my question is, can you set so even if it is reloading the current page that it animates in?

So when I load the page the first time I use this and it slides in as it should…

{
name: ‘skapaschema2’,
path: ‘/skapaschema2/’,
url: ‘https://www.manmade.se/iphone/skolappenv2/narvaro/skapaschema2.asp’,
},

And when I want to reload the page with the new variable value I use this.

{
name: ‘skapaschema3’,
path: ‘/skapaschema3/’,
url: ‘https://www.manmade.se/iphone/skolappenv2/narvaro/skapaschema2.asp’,
options: {
animate: true,
ignoreCache:true,
reloadCurrent:true,
},
},

And this is not sliding in the page, is it possible at all?
Thanks a lot !

No, reload is reload, no animation can happen here

Ok thanks.

Then just one more.

So lets say I first have a page with page-name “schemalista” from that list I load the page with page name “skapaschema2” and from that page I navigate to the same page “skapaschema2”.

Then I get 2 pages with the same page-name “skapaschema2”.

One with class page-current and one with page-previous

So can I remove the one with “skapaschema2” class page-previous ?

So that the previous page is “schemalista”.

Check this…reload page

thanks this work, how can reload current page? no navigate