How do you change from view to view programatically?

I have a multi-view app using a toolbar in Framework7 v2 (loving v2 - well done!).

Is there a way of changing the user’s display from one view to another programatically, through Javascript?

I can see how to do it with an Do it tag, but I need it to happen in Javascript after I have been to the server with an XHR request, and in a few other circumstances.

When the view is changed, I’d also obviously like the highlight on the toolbar to change to the destination view.

Many thanks for any tips,
Andy

Multiple Views is Tabs: http://framework7.io/docs/tabs.html#tabs-app-methods

Great, thank you. I’ve tried…

app.tab.show(tabEl, animate)

… and that switches between views, which is exactly what I wanted.

The only problem is the tab-link-active class on the toolbar doesn’t change, so the previous view’s toolbar tab remains highlighted. Is the expected behaviour that it should change, in which case I must be doing something wrong, or should I try something else to change that highlight?

Thanks again.

Just add info about second extended method http://framework7.io/docs/tabs.html#tabs-app-methods You may pass second tabLinkEl argument with the tab link element that must be activated

Amazing! Perfect. All set. Thank you.