Nuxt.js: <nuxt-link /> doesn't support click events

Created on 19 Sep 2017  路  2Comments  路  Source: nuxt/nuxt.js

I discovered that <nuxt-link /> doesn't delegate click events to an anchor like one would expect. I wrote this fully expecting it to work:

<nuxt-link @click="closeMenu" to="/register">Register</nuxt-link>

However, no click event is fired when clicking the link. Normally what I do with components that essentially shadow an element like <a /> is capture and raise events to the parent component. Vue.js makes this fairly straightforward.

This question is available on Nuxt.js community (#c1509)

Most helpful comment

just use @click.native

All 2 comments

just use @click.native

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattdharmon picture mattdharmon  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

o-alexandrov picture o-alexandrov  路  3Comments

VincentLoy picture VincentLoy  路  3Comments

vadimsg picture vadimsg  路  3Comments