We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm using mquandalle:jade package to have '.jade' templates in my projects.
When I'm trying to bind events within template, as you recommend to do, it fails.
For example:
component.jade:
template(name="MyComponent") button(onClick=clickHappened)
component.coffee
class MyComponent extends BlazeComponent clickHappened: -> 1
When component renders, I get an error:
Error: Event handler not a function: 1
What happens, as far as I understand is that jade compiler executes 'clickHappened' method instead of passing it as an argument.
Is there any way (syntax?) to use Jade with BlazeComponents?
The text was updated successfully, but these errors were encountered:
Yes, this is something @mquandalle should add to his compiler. Here is code for HTML files.
Sorry, something went wrong.
As far as it needs a function, have you tried clickHappened: -> -> 1? It may be a little bit ugly workaround, but it should work.
clickHappened: -> -> 1
Hmm, blaze-magic-events works fine.
Because magic events seems to renders event handlers to DOM to define events. This is much uglier approach.
No branches or pull requests
I'm using mquandalle:jade package to have '.jade' templates in my projects.
When I'm trying to bind events within template, as you recommend to do, it fails.
For example:
component.jade:
component.coffee
When component renders, I get an error:
Error: Event handler not a function: 1
What happens, as far as I understand is that jade compiler executes 'clickHappened' method instead of passing it as an argument.
Is there any way (syntax?) to use Jade with BlazeComponents?
The text was updated successfully, but these errors were encountered: