javascript - Syntax error of conditional in JQuery template -


i want kind of data-driven gui using conditional in jquery template, following code part:

<script id="resulttemplate" type="text/x-jquery-tmpl">            <li>                    {{if checkfile(${link})}}                        <p class="buttons"> <a href = ${link}>${type}</a></p>                    {{else}}  ${type}                  {{\if}}             </li>   </script> 

i got error browser javascript console:

uncaught syntaxerror: unexpected token { 

am missing in using conditional in jquery template?? couldn't see wrong according


Comments