Skip to content
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

Macro tag doesn't play well with w-bind / widget #158

Open
BryceEWatson opened this issue Oct 3, 2016 · 0 comments
Open

Macro tag doesn't play well with w-bind / widget #158

BryceEWatson opened this issue Oct 3, 2016 · 0 comments

Comments

@BryceEWatson
Copy link

BryceEWatson commented Oct 3, 2016

** Update: Moving the macro inside the w-bind does work. So maybe this is a low-priority feature request instead of a bug 😄

The following case throws an error:

<macro test()>
    <input w-onchange="doSomething" />
</macro>
<div w-bind>
    <test()/>
</div>

Error:

Error: An error occurred while trying to compile template at path "xxxxxx/template.marko". Error(s) in template:
1) [xxxxxx/template.marko:7:8] Unable to handle event ""change"". HTML element is not nested within a widget.

   at Compiler.compile (xxxx/node_modules/marko/compiler/Compiler.js:124:25)
   at Object.compile (xxxx/node_modules/marko/compiler/index.js:116:25)
   at compile (xxxx/node_modules/marko/node-require.js:54:38)
   at Object.markoExtension [as .marko] (xxxx/node_modules/marko/node-require.js:108:27)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant