Detail Routes's pushstate link won't work if master route has params?

Hi,

from https://framework7.io/docs/routes.html#detail-routes

routes = [
  {
    path: '/blog/:someParam/', // << a param here 
    async function( routeTo, ... ){
       // routeTo.params.someParam is fine when **not browsing the page from the pushstate url directly.**
    }
    master: true,
    detailRoutes: [
      {
        path: '/blog/:someParam/:postId/',
      },
    ],
  },
]

A “pushstate url” like “localhost/#!/blog/cat/123/”, will trigger the async func above. however, the param is not resolved, it is something like:

routeTo{
   params:{ 
      someParam: ":someParam",
   },
   path: '/blog/:someParam/',
}

How to solve the problem?

Thanks.

Seems like a bug in Framework7, will be fixed in upcoming update

1 Like