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

Closed
hyjiacan opened this issue Jan 3, 2020 · 2 comments
Closed

Comments

@hyjiacan
Copy link

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
}])
@posva
Copy link
Member

posva commented May 9, 2020

Hello, it would be better if it could follow this RFC: https://github.com/vuejs/rfcs/blob/master/active-rfcs/0029-router-dynamic-routing.md. Most of it should be straightforward, the only difference is that name cannot be a Symbol on vue router v2

@posva
Copy link
Member

posva commented Jun 12, 2020

Closing for inactivity

@posva posva closed this as completed Jun 12, 2020
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

No branches or pull requests

2 participants