【发布时间】:2016-08-23 22:03:18
【问题描述】:
我在 Meteor 中使用 Jade,想在 EasySearch.Input 中设置一个占位符,如下所示:
+EasySearch.Input(index=objects_index attributes={placeholder: 'sample'})
至少文档是这样建议的:
属性:包含输入属性的对象(例如 { placeholder: "Search..." })
我以天真的方式尝试了这个,客户端崩溃了:
While processing files with mquandalle:jade (for target web.browser):
client/objlist.jade: Jade syntax error: Expected IDENTIFIER
...ch.Input attributes=('placeholder': 'samp...
^
client/objlist.jade: Jade syntax error: Cannot read property 'head' of undefined
我尝试了来自 github 问题的解决方案:
+EasySearch.Input(attributes="{{{placeholder: 'sample'}}}" index=objects_index)
还是不行。
html.js:232 未捕获错误:非法 HTML 属性名称:0
我应该发布一个变量还是为此创建另一个助手?
【问题讨论】: