question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken v-on inside component

See original GitHub issue

This used to work but after upgrading a few versions it doesn’t work anymore and i cant figure out why.

<div v-component="card">
    <button v-on="click:clicked($event)">Click me 1</button>
    <button v-on="click:clicked">Click me 2</button>
</div>

My code generates 2 errors depending on how i call the function inside v-on.

v-on="click:clicked($event)" generates Uncaught TypeError: scope.clicked is not a function and v-on="click:clicked" generates [Vue warn]: Directive "v-on:clicked" expects a function value.

I would like to pass the event object to the method.

Heres the fiddle: http://jsfiddle.net/ypsscvy5/

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

7reactions
azamat-sharapovcommented, May 5, 2016

because it was just a syntax error of me

Oh, you probably posted it intentionally for newbies, sorry.

6reactions
gocantocommented, Apr 19, 2016

Hello @yyx990803

I am using vue 1.0.20 and just came across this issue. Is there something else related to this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Natbib 'numbers' option breaks capitalization of "von ...
The \Citet command, however, seems to be broken when the numbers option is used. In this case, the "von" component is left uncapitalized....
Read more >
Broken and Dirty Development Components (SAP-Bibliothek ...
Sometimes the Component Build Service (CBS) reports about broken development components (DCs). This topic explains what exactly a broken DC is in CBS...
Read more >
Bug: React 18 types broken since the type release a ... - GitHub
A few hours ago, a major version of React types for Typescript was released. I have tried to test this right away to...
Read more >
Broken Vow - Mike & Ginger React to Lara Fabian - YouTube
playitagain #mikeandginger #musicreactions #reaction #reactionchannel #music #larafabian #larafabianreaction #brokenvow ...
Read more >
Von Willebrand Disease: What It Is, Types, Symptoms ...
Von Willebrand disease is a common blood disorder that keeps your blood from clotting.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found