Anchor link to another View

I used CLI to create a tabbed app. I’m trying to create an anchor on the main page that switches to the catalog view as such:

< a href="/catalog/" data-view=".view-catalog" >Click me2 </ a >

But keep getting this error:
clicks.js:65 Uncaught TypeError: Cannot read property ‘f7View’ of undefined
at Framework7.handleClicks (clicks.js:65)
at eval (events-class.js:116)
at Array.forEach ()
at eval (events-class.js:115)
at Array.forEach ()
at Framework7.emit (events-class.js:109)
at emitAppTouchEvent (touch.js:370)
at HTMLDocument.appClick (touch.js:377)

Trying to create:
var catalogView = app.views.create(’.view-catalog’);
also fails.

What I am doing wrong?


You need to create a tab link to switch to views, e.g. if View has id="view-catalog"

<a href="#view-catalog" class="tab-link">Click me2 </a>