【发布时间】:2013-04-04 20:06:38
【问题描述】:
我有一个资源中继器,该资源包含一个内部带有角度指令的属性,并与文本混合。我想要完成的是根据对象的属性动态显示表单输入。
<ul>
<li ng-repeat="action in actions">
{{action.form_layout}}
</li>
</ul>
在这种情况下,action.form_layout 可能包含一些带有指令的文本,这些文本也需要编译。
Open the <door></door> with this <key></key>
// <door> and <key> are directives that would return different inputs
// so this should be compiled to Open the <input type="text" name="door"></input> with this <input type="text" name="key"></input>
我怎样才能做到这一点?现在,属性值正在模板中以纯文本形式打印。
谢谢
【问题讨论】:
-
为演示提供示例数据以及您到目前为止所尝试的内容
标签: javascript angularjs angularjs-directive