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

Reverse URL resolving should be public method #831

Closed
hogart opened this issue Oct 25, 2016 · 1 comment
Closed

Reverse URL resolving should be public method #831

hogart opened this issue Oct 25, 2016 · 1 comment

Comments

@hogart
Copy link
Contributor

hogart commented Oct 25, 2016

"Reverse URL resolving" means "converting name and params to URL string".

Right now there's only VueRouter#match method, which is great, but it's not documented, doesn't take base and mode into account, and doesn't normalize relative urls, so it's not really an equivalent of what's going inside <router-link> render method.

Rationale for making reverse URL resolving public is following:

  • In isomorphic apps we may need to send some link via email, so we should be able to get this link as text
  • Several kind of apps, (e.g. google drive, bit.ly) require to provide link which can be copied by user
  • Issues like 2.0 doesn't respect target="_blank" attr #827 where <router-link> doesn't support some attribute will have simple work-arounds
yyx990803 pushed a commit that referenced this issue Nov 23, 2016
Necessary docs, tests, typings. Fixes per code review.
@yyx990803
Copy link
Member

resolved via merging #918

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

No branches or pull requests

3 participants