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

Pass RouteManager additionally to router to modules #3479

Closed
pkarw opened this issue Sep 4, 2019 · 2 comments
Closed

Pass RouteManager additionally to router to modules #3479

pkarw opened this issue Sep 4, 2019 · 2 comments
Assignees
Labels
1: Easy feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can P2: Important Priority mark - still high ;)
Milestone

Comments

@pkarw
Copy link
Collaborator

pkarw commented Sep 4, 2019

What is the motivation for adding / enhancing this feature?

@filrak currently, because of Multistore and optimizations made in #3443 we don't want users to call router.addRoutes directly; we should then pass RouteManager instead of plain vue-router into module constructors - especially that we have more/less the same interface so it's not a breaking change even

related to #3443
related to #3454

@pkarw pkarw added the feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can label Sep 4, 2019
@pkarw pkarw added this to the 1.11.0-rc.1 milestone Sep 4, 2019
@pkarw pkarw added 1: Easy P2: Important Priority mark - still high ;) labels Sep 4, 2019
@filrak
Copy link
Collaborator

filrak commented Sep 4, 2019

@pkarw then we will loose a lot fo basic APIs from router. We can do this but I think we should make RouterManager a js proxy for router object and just proxy the addRoutes method. Then we can just export this proxy instead of a router everywhere. By doing this we are hiding unnecessary complexity and not confusing ppl that there is a router and RouterManager, wdyt?

@pkarw
Copy link
Collaborator Author

pkarw commented Sep 4, 2019

I like the idea with proxy; can you mock it up please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1: Easy feature request Requests for new features. Please be as specific as possible and provide proposal API if it you can P2: Important Priority mark - still high ;)
Projects
None yet
Development

No branches or pull requests

3 participants