Meteor JS Jade模板无法按预期工作

Meteor JS Jade template does not work as expected

本文关键字:工作 JS Jade Meteor      更新时间:2023-09-26

我试过这个包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>

并将其转换为翡翠

template(name="searchBox")
  +esInput index="players" placeholder="Search..." 
  ul
    esEach index="players"
      li Name of the player: {{name}}

如果我使用html格式,搜索可以工作,但当我使用jade格式时没有错误,但搜索不会显示。我是否正确地将html转换为jade?你知道为什么玉不起作用吗?

esEach应为+esEach。现在至少有30个字符。