我试过这个包 https://github.com/matteodem/meteor-easy-search/使用此示例代码轻松搜索
<template name="searchBox">
{{> esInput index="players" placeholder="Search..." }}
<ul>
{{#esEach index="players"}}
<li>Name of the player: {{name}}</li>
{{/esEach}}
</ul>
</template>
并将其转化为 Jade
template(name="searchBox")
+esInput index="players" placeholder="Search..."
ul
esEach index="players"
li Name of the player: {{name}}
如果我使用 html 格式搜索有效,但当我使用 jade 格式时没有错误,但搜索不会显示。我是否正确地将 html 转换为 jade?知道为什么 jade 不起作用吗?
最佳答案
esEach
应该是 +esEach
。现在至少有 30 个字符。
关于javascript - Meteor JS Jade 模板无法按预期工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28897839/