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

v-link-active in a scope of parent component #620

Closed
cybertino opened this issue Aug 25, 2016 · 4 comments
Closed

v-link-active in a scope of parent component #620

cybertino opened this issue Aug 25, 2016 · 4 comments

Comments

@cybertino
Copy link

cybertino commented Aug 25, 2016

Vue.js & vue-router.js version

1.0.26, 0.7.13

Expected

https://jsfiddle.net/93v8pffd/

This example does not work correctly due to #583. There is a workaround:

https://jsfiddle.net/east1987/90Lpnbgj/4/

What is actually happening?

v-link-active is not applied if v-link is actually in nested component though it is applied when components are not used. Check out the examples.

Reproduction Link

https://jsfiddle.net/90Lpnbgj/1/

Bug?

This might not be a bug but it would be a good feature which possibly covers a common case.

Other notes

This duplicates issue #596 which was closed unresolved and was not reopened.

@fnlctrl
Copy link
Member

fnlctrl commented Aug 25, 2016

In my opinion this usage case of v-link-active is just too complex and hard to reason with. So I'd suggest writing your own active link check method, or use vue-router 2.0 and its component, which was designed to solve this problem.

@cybertino
Copy link
Author

cybertino commented Aug 26, 2016

@fnlctrl I agree that it might be not that simple but I believe that it could be commonly used at least because it reduces redundant code. I haven't tried vue-router 2.0 though - it could be a solution.

@fnlctrl
Copy link
Member

fnlctrl commented Aug 26, 2016

You can add your commonly used methods to Vue.prototype if you'd like, but I don't think there will be any more new features for vue-router 0.7.

@fnlctrl
Copy link
Member

fnlctrl commented Aug 28, 2016

@softomatix Closing now as it's solved in 2.0, and will be a won't fix for 0.7

@fnlctrl fnlctrl closed this as completed Aug 28, 2016
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