我想使用我可以使用&attributes
完成的变量来设置对象的属性,但我似乎无法让它工作。
- var attributes = { type: 'text' };
input&attributes
应该产生:
<input type="text" />
但是我收到了这个错误:
unrecognized start character
答案 0 :(得分:0)
您需要将attributes
变量实际传递到&attributes
:
- var attributes = { type: 'text' };
input&attributes(attributes)