Kendo 模板 - 将布尔值转换为是或否

Kendo Template - Convert boolean value into yes or no

我有这个 kendo 模板,我正在尝试将 isDiscount 布尔值转换为 yes/no。请建议我如何执行此转换。

 <script type="text/x-kendo-template" id="template">
            <div id="details-container">
                <h2>#= Name # </h2>
                <em>#= Description #</em>
                <dl>
                  <dt>Price: #= kendo.toString(Price, "c")#</dt>                
                  <dt>Discount available: #= isDiscount #</dt>
                </dl>
            </div>
      </script>

您可以像这样使用内联条件转换:

<dt>Discount available: #if(isDiscount){# Yes#} else {# No#}#</dt>

还有一个演示here