我有一个车把的视图,我想在其中检查变量 IF js == 'foo'
<div class="title"><label for="inputSearch">{{#if variable == 'foo'}} AAA {{else}} BB {{/if}}</label></div>
<ul class="top-buttons">
<li class="back"><a href="#" id="priev_es">Wstecz</a></li>
<li class="more"></li>
</ul>
</div>
但是我在控制台中有这个错误:
handlebars.js:286Error: Parse error on line 2:
{{#if variable == 'foo'}} AAA {{else
----------------^
Expecting 'DATA', 'STRING', 'INTEGER', 'BOOLEAN', 'ID', got 'EQUALS'