Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix router-class.js for correct navigate if used route path format like /:optionalParam(any+[regexp]+)? #4179

Merged
merged 1 commit into from
May 23, 2023

Conversation

100100101
Copy link
Contributor

For example:
We have 2 routes

const view: View.Parameters = {
    routes: [
        {
            name: 'home',
            path: '/:anyOptionalParam(any+[regex]+)?',
        },
        {
            name: 'about',
            path: '/about',
        },
    ],
}
  1. If started at 'about' page (http://localhost/about)
  2. Call
currentViewRouter.navigate({
    name: 'home'
})
  1. Have error Uncaught (in promise) Error: Framework7: can't construct URL for route with name "home"

@nolimits4web nolimits4web merged commit 6d40482 into framework7io:master May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants