I am trying to construct a select using mustache.js
here's the code: template:
<select id="hostTechCd" ref="techCd">
{{#techCd}}
<option value={{value}}> {{text}}</option>
{{/techCd}}
</select>
data:
{
techCd:[{
value:"JAVA",
text:"java"
},
{
value:"JAVA SCRIPT",
text:"java script"
},
{
value:"HADOOP",
text:"hadoop"
},
{
value:"PERL SCRIPT",
text:"perl script"
}]
}
everything seems fine but the rendered select box is not proper. The value attributes of options for "Java Script" and "Perl Script" are broken.
here is the output html of the above code:
<select id="hostTechCd" ref="techCd">
<option value="JAVA"> java</option>
<option value="JAVA" script=""> java script</option>
<option value="HADOOP"> hadoop</option>
<option value="PERL" script=""> perl script</option>
</select>
any help guys ???