ho can I escape curly braces inside a jade teplate? (I use jade inside node.js)
I want to render jQuery templates to the client. The part I want to escape looks like this:
div(class='clear')
script(id='BoardListTemplate', type='text/x-jQuery-tmpl')
<p>${Title}</p>
<ul id="${Id}" class="IterationBoardList">
<li class="AddNewItem">Add new Item</li>
{{tmpl(Items) "#BoardListItemTemplate"}}
</ul>
script(id='BoardListItemTemplate', type='text/x-jQuery-tmpl')
<li class="Item" id="${{$data.Id}}">
${$data.Description}<br />
Assigned to: ${$data.AssignedTo}<br/>
StoryPoints: ${$data.StoryPoints}</li>
script(src='/javascripts/Scrummr.Engine.js', id='BoardListItemTemplate', type='text/javascript')
many thanks
You have to use the pipe ( | ) sign in front of each line inside the script block.
See https://gist.github.com/2047079 for an example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With