Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

change regex pattern for dynamic routes to accept hyphens / underscores #17

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

alexrdz
Copy link

@alexrdz alexrdz commented Nov 29, 2018

No description provided.

@alexrdz
Copy link
Author

alexrdz commented Nov 30, 2018

Sorry I didn't leave much of a message! Anyhow, I just updated the regex pattern to allow dynamic routes like /about/about-us which would look like this in the router config:

const router = new SvelteRouter({
  routes: {
    '/about/:subpage': {
      Component: SubComponent,
      props: {store}
    }
  }
}

Thanks for your consideration! If this isn't within your guidelines, it would be a great feature to have. Thanks again.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant