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

I've code api: removeRoute and replaceRoutes, may I make a pull request ? #3087

Open
hyjiacan opened this issue Jan 3, 2020 · 0 comments
Open

Comments

@hyjiacan
Copy link

@hyjiacan hyjiacan commented Jan 3, 2020

What problem does this feature solve?

In order to split large project into modules, I (and someone else: #1234 #298 ) is looking for a method for dynamically routing. And I've code them, may I make a pull request ?

Here is the commit: hyjiacan@e8eef6d

What does the proposed API look like?

They are identified by route path

Remove route

Remove route which matches path /path/to/ and all its children routes:

router.removeRoute('/path/to')

Replace routes

Replace route /path/to and more:

router.replaceRoutes([{
  path: '/path/to',
  component: NewComponent,
  // something else
}, {
  // more replacement
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.