I’m trying to update my app from Framework7 v4 to v5.
I have a route like this:
{
name: 'setup',
path: '/setup/:jsonConfig?',
component: SetupPage
},
I navigate to it like this:
this.$f7router.navigate({
name: 'setup',
params: {
jsonConfig: JSON.stringify({
exitPath: '/choose-signin-method'
})
}
})
It worked fine in v4, but in v5, this error occurs:
bugsnag-vue.js?3181:30 Error: Framework7: error constructing route URL from passed params:
Route: /setup/:jsonConfig?
TypeError: Expected "jsonConfig" to match "[^\/#\?]+?", but got "{"exitPath":"/choose-signin-method"}"
at Router.constructRouteUrl (router-class.js?7408:489)
at Router.navigate (navigate.js?6acf:690)
at VueComponent.goToAdminSignIn (ChooseSignInMethodPage.vue?0671:30)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at VueComponent.invoker (vue.runtime.esm.js?2b0e:2179)
at invokeWithErrorHandling (vue.runtime.esm.js?2b0e:1854)
at VueComponent.Vue.$emit (vue.runtime.esm.js?2b0e:3888)
at eval (vue-component-dispatch-event.js?56bc:4)
at Array.forEach (<anonymous>)
at eval (vue-component-dispatch-event.js?56bc:3)
I’m not sure if it’s caused by one of these changes to path-to-regexp
:
Do you have any ideas?