Route - clear history and define back

Hello guys,

I’m trying to clear all previous history from the router and set back route, using:

self.$f7.views.main.router.back('/', {force: true}); 

Is this the right way of doing this? When inspecting the history array before and after the above command I can’t see any difference.

EDIT: No, this will navigate back, right, i.e not just alter the history !?

Required navigation:

page a <=> b => c (c:back => a, not b)
page a <=> c

Thanks guys

You could use the History option

<f7-link icon-f7="chevron_right" href="/page/" history:false></f7-link>

This will cause page not to be added to history

1 Like