Route page from login screen to first page not working


#1

I’m using version 3 and don’t really know what I’m doing, but I can’t seem to get the login screen route to go to the first page of my app. I want the action to happen after I click the login button - any help would be greatly appreciated!

JS FILE
var app = new Framework7({
// App root element
root: “#app”,
// App Name
name: “My App”,
// App id
id: “com.myapp.test”,
// Enable swipe panel
panel: {
swipe: “left”,
swipeNoFollow: true
},
routes: [
{ path: “/first_page/”,
url: “pages/first_page”}
{ path: “/second_page/”,
url: “pages/second_page”}
var $$ = Dom7;

$$(".login__row").on(“click”, ‘.page[data-name=“home”]’, function(e) {
app.home.to(“daily_summary.html”);
});

HTML FILE

Sign in

#2

Hi, i think you should read the docs.

https://framework7.io/docs/view.html#router-api-methods-properties.

But you need to do something like.

eg:
app.router.navigate('/home/')