Woppi
Woppi

Reputation: 5451

How to rewrite URL in Framework7?

I noticed that Framework7's url is like this

https://domain.com/signup.html#!/#geolocation

Is there any way to make the urls cleaner if I'm looking at it as webapp and mobile app.

I can't see any documentation how to handle urls for webapps. I might have missed it or it's not documented.

Thanks!

Upvotes: 0

Views: 926

Answers (1)

Federico Massi
Federico Massi

Reputation: 361

in order to have a cleaner look and depending by your needs you can:

  1. choose an appropriate pushStateSeparator during app initialization.

    var myApp = new Framework7({
    pushState: true,
    pushStateSeparator: '#page/',
    // ... other parameters
    });
    
  2. disable router and manage this by your own.

    var myApp = new Framework7({
    router: false,
    // ... other parameters
    });
    

More on this in each parameter description on F7 Documentation.

Upvotes: 2

Related Questions