bminer / node-blade

Blade - HTML Template Compiler, inspired by Jade & Haml
Other
320 stars 28 forks source link

blade 3.2.2 Meteor : Inline event handler in foreach doesn't recognize local variables. #167

Closed thusqed closed 11 years ago

thusqed commented 11 years ago

Let 'Articles' be monggodb cursor.

foreach Articles as article
    -var a=3
    span= article.title
    span Click Me
        {click}
            console.log(article)
            console.log(a)

When i clicked on "Click Me" text [results in chrome] Uncaught ReferenceError: article is not defined Uncaught ReferenceError: a is not defined

bminer commented 11 years ago

This is probably a duplicate of #156, but upon fixing that issue, I'll post back here.

bminer commented 11 years ago

Issue #156 has been closed. Please try again now. Has this bug been fixed as of Blade 3.2.6?

Thanks!

bminer commented 11 years ago

@thusqed - Have you had a chance to see if this bug has been fixed? Thanks!

bminer commented 11 years ago

Closing this issue for now. I believe that this should now be fixed. Please write back here if that's not the case.

thusqed commented 11 years ago

Thank you. This operates very well.

bminer commented 11 years ago

No problem. Glad to hear this got fixed! Thanks for the bug report.