Framework7 switch view in views?

Seniors.

I have a question about Framework7.

The question is how to switch the view in the views.

For example, I have ...

# view1 main-view

# view2

# view3

# view4

so I use myApp.addView (view1),

myApp.addView (view2),

myApp.addView (View3),

myApp.addView (view4)

There was an example application "Tab Bar Application".

I found that it uses the <a> tab and href = '# view2', '# view3', '# view4',

then it can easily change appearance.

In short, how can I change the view using code, not just a href link?

Thanks guys.

+4
source share
3 answers
+2

framework7 v2:

<div id="view-settings" class="view tab">
<!-- Settings page will be loaded here dynamically from /settings/ route -->
</div>

, framework7 v2,

app.tab.show( "# -" )

0

javascript:

function myFunction() {
    location.href = "#view2";
}

...

-1

Source: https://habr.com/ru/post/1623402/


All Articles