bminer / node-blade

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

Support for variable interpolation within tag properties #105

Closed jdgomeza closed 11 years ago

jdgomeza commented 11 years ago

if we pass an object

    {id: "1", value: "testing"}

It would be nice to be able to use the variable interpolation like Jade does:

    button.btn(onclick="save(#{id})")

instead of having to concatenate strings and variables like:

    button.btn(onclick="save("+id+")")

to get:

    <button class="btn" onclick="save(1)">'

By the way, Blade really rocks!

bminer commented 11 years ago

variable interpolation is overrated ;) No, seriously, I've had people request this feature before, so it must be somewhat worthwhile. I'll take pull requests for this; otherwise, it might be a few more days before this gets implemented.

bminer commented 11 years ago

This will be added in 3.0.0alpha7