visionmedia/jade — Issue #526: add template tag support
Author: guileen
Created: 2012-03-08 18:09:31+00:00
State: open

Now many client side script require template, generally write in script, also the client side script is also html

#template-foo
img(src="/img/{{ client_var }}")

I got what I want

But sadly, the img tag try to load an non-exists image "/img/{{ client_var }}" once the html send to client.

So I have to move it to an textarea or a script tag like this:

But sadly, textarea or script parse this:

script#template-foo(type="text/xxtemplate)
img(src='img/{{ client_var }})

to :

This is not what I want.

We need keep script textarea keep it not parse embed tags, but we also need parse them when using template. So is there any way to provide some kind of controle parameter, or add a special template tag.