2.0.0-rc.5 & 2.0.0-rc.4
https://jsfiddle.net/oldpig/qos7px6j/1/
click /parent link
parentClicked handler should be invoked and "parentClicked" message should be logged in console
no log
This looks similar to #390
You need to add the .native modifier.
Next time provide a more concise repro please. It's easier for us to help 😉
https://jsfiddle.net/posva/gh7mzwe7/
@posva thanks for the tip. I really feel this should be in the router-link documentation though. Cheers. 🙂
<router-link> is just a Vue component. to listen for native events on components, you need that modifier - and that is explained in the Vue docs.
It is, but it's still easy to miss and although I do spend a lot of time in the docs, this didn't occur to me at first. Beginners won't think about using modifiers, if they even know about the feature at all.
Adding to docs is a quick thing that will make a lot of us save a lot of time. 👍
@LinusBorg I come from the Django (Python) world, which is well known for having some of the best and most extensive documentation for an OSS project. One of the things the Django documentation does is include relevant notes and disclaimers regarding common mistakes, misunderstandings, or things that are easily overlooked. So overtime, the documentation attains a "collective wisdom."
I've been working with Vue for a little while now, and I think the documentation is great, and has always been improving, but I agree with @plauclair for these types of cases, where a small note in the documentation can save a lot of human time. Just my two cents!
Thanks for The input, I think we really can improve that situation.
you can use watcher to listen router change event
Most helpful comment
@LinusBorg I come from the Django (Python) world, which is well known for having some of the best and most extensive documentation for an OSS project. One of the things the Django documentation does is include relevant notes and disclaimers regarding common mistakes, misunderstandings, or things that are easily overlooked. So overtime, the documentation attains a "collective wisdom."
I've been working with Vue for a little while now, and I think the documentation is great, and has always been improving, but I agree with @plauclair for these types of cases, where a small note in the documentation can save a lot of human time. Just my two cents!