我有以下循环,我试图在每次循环中根据数组索引增加几个字段。
<div class="individualwrapper" ng-repeat="n in [] | range:4">
<div class="iconimage"></div>
<div class="icontext">
<p>Imagine that you are in a health care facility.</p>
<p>Exactly what do you think this symbol means?</p>
<textarea type="text" name="interpretation_1" ng-model="interpretation_1" ng-required="true"></textarea>
<p>What action you would take in response to this symbol?</p>
<textarea type="text" name="action_1" ng-model="action_1" ng-required="true"></textarea>
</div>
</div>
我想做类似的事情”
ng-model="interpretation_{{$index + 1}}"
Angular 没有呈现该值吗?在 mg-model 字段中添加这种逻辑的最佳方法是什么?