<div data-ng-repeat="credentialsdata in credentialsdatas">
<div data-inline-validate data-error="{{ credentialsdata.key }}">
<label>{{ credentialsdata.key }}<i class="text-error">*</i></label>
<input type="text" data-ng-model="datasource.{{ credentialsdata.key }}" placeholder="{{ credentialsdata.key }}" />
</div>
</div>
但是在这里抛出错误
data-ng-model="datasource.{{ credentialsdata.key }}"
答案 0 :(得分:1)
在这种情况下,您不需要使用绑定,只需尝试javascript括号表示法语法:
data-ng-model="datasource[credentialsdata.key]"