Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个包含 if 但它不会评估 if 的 jquery 模板 - 它只是按原样输出值。我发现了几个示例和文档表明这应该有效。
我究竟做错了什么?
http://jsfiddle.net/G4J5u/
您在模板标签中有额外的空间:
你的:
{{ if disabled}}disabled{{ /if }}
正确的:
{{if disabled}}disabled{{/if}}
在 JSFiddle 上对其进行了测试。