I have:
- <script id="foo" type="text/x-jquery-tmpl">
- <p>${100 * parseInt(x)}</p>
- </script>
When I do:
- $('#foo').tmpl({'x':5}) // or '5'
I get a TypeError (undefined method).
But if I remove the parseInt or if I move the 100 to come after the parseInt, everything works!
I've been searching and everything I find says that ${} should be able to handle arbitrary expressions, but there seems to be some syntax magic/intolerance going on here.
Any explanations?