-
-
Notifications
You must be signed in to change notification settings - Fork 5k
About http://router.vuejs.org #1334
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
Comments
Of course that is valid.
That's probably because we already explain that all components in vue-router are normal Vue components, so everything works the same. Personally, I understand that very broad and well explained documentation is very helpul for beginners, but at the same time, documentation should be limited to the topic of the lib it is describing, or else the same things are repeated in multiple places and will create more work or possibilities for future mismatches when things change.
For the above reason, I don't think that we should explain in detail how Vue components work the same in the vue-router docs. But we could add a small mentioning here:
|
@LinusBorg Thank for your very detail explanation, and I agree with your opinion. |
Did you miss the fact that you can access the router from any component through |
This should be more clear with #1304 Basically, you can do |
What problem does this feature solve?
I am learning router, I want to programmatic navigation from a path(components) to other path.
Because call router.push() in components isn't valid. I must emit a event to parent.
I just add @jump="myjump" at router-view tag, everything is OK.
But I can't find any description about it in http://router.vuejs.org.
What does the proposed API look like?
The vue's document is simple, clear, effective for me. I hope it would be better, so I suggest to add a little description about how to emit a event from components to parent, and how to capture components' event.
Just a little.
Thanks.
The text was updated successfully, but these errors were encountered: