I am using Jade Template in conjunction with Angular JS and have such repeater processing simple array defined in angular's controller : $scope.ids = ['demo1', 'demo2']
.controls(ng-repeat="controlId in ids")
<div id="{{$index}}">{{$index}}</div>
Whatever i do Jade tries to parse everything passed to the SELECT tag and thus it always removes $index variable from tag's attribute. As result in HTML i always see the following:
<div id="">0</div> // ID attribute is always empty because Jade replaces it
<div id="">1</div> // at the same time HTML of the tag was rendered correctly
Question : how to prevent parsing of this HTML attribute by Jade and print string as is in a result HTML?
P. S. I tried the following syntax and it does not work ... suggestions?
id="|{{$index}}" // id is empty
id!="{{$index}}" // id is empty
id="!{{$index}}" // syntax error
id="!{{controlId}}" // syntax error
{:id => {{$index}}} // does not add ID at all
P. P. S. Just to explain why i am messing up Jade with HTML - i tried to use "jade only" syntax and it also did not work :
.controls(ng-repeat="controlId in ids")
.demo(id="{{$index}}") {{$index}}