【发布时间】:2013-11-27 17:03:22
【问题描述】:
我正在尝试在 emberjs 应用程序的把手中设置 html 属性。
<input type="{{field.type}}" name="{{field.key}}" id="{{field.name}}" />
是我尝试过的。
它会像这样输出 html:
<input type="<script id='metamorph-13-start' type='text/x-placeholder'></script>text<script id='metamorph-13-end' type='text/x-placeholder'></script>" name="<script id='metamorph-14-start' type='text/x-placeholder'></script>entry.810220554<script id='metamorph-14-end' type='text/x-placeholder'></script>" id="<script id='metamorph-15-start' type='text/x-placeholder'></script>firstname<script id='metamorph-15-end' type='text/x-placeholder'></script>">
所有标签都包裹在 metamorph-tags 中。我希望这不是你应该做的。如何根据我的模型添加属性。
【问题讨论】: