Why does jquery tmpl not parse my {{ if }}?

159 views Asked by At

I have a jquery template containing an if but it won't evaluate the if - it just outputs the value as-is. I have found several examples and documentation showing that this should work.

What am i doing wrong?

http://jsfiddle.net/G4J5u/

1

There are 1 answers

1
aorcsik On BEST ANSWER

You have extra space in the template tags:

Yours:

{{ if disabled}}disabled{{ /if }}

Correct:

{{if disabled}}disabled{{/if}}

Tested it on JSFiddle.