Router-Link doesn't support v-on:click
See original GitHub issueThis doesn’t fire the click event:
<router-link v-on:click="doSomethingCool" to="/">Home</router-link>
Is this intentional? If yes, what is the recommended approach to have Vue click bindings in Router Links?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:13 (4 by maintainers)
Top Results From Across the Web
How to use onClick event on react Link component?
I have a callback url in my current component which I am saving in cookie in onClick before transitioning to new route. I...
Read more >Set an onClick listener on a Link in React | bobbyhadz
To set an `onClick` listener on a Link in React, set the `onClick` prop on the link. The function you pass to the...
Read more >DataGrid - Unable to call router.navigate in button's onClick
In a module I have inserted an <dx-data-grid> which should become in the last column three buttons which have to navigate to another...
Read more >React Navigation - Ionic Framework
React Router requires full paths, and relative paths are not supported. ... uses IonItem 's routerLink prop to specify the route to go...
Read more ><Link> · React Router
The primary way to allow users to navigate around your application. will render a ... path to link to, e.g. /users/123 (relative paths...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
http://vuejs.org/guide/components.html#Using-v-on-with-Custom-Events
For future reference, if you really need to use it as a Vue-event (not using the
.native
-approach), then you can do this instead: