0
在我的代码中,通过循环,将创建两组单选按钮。 例如,动态更改单选按钮的名称
RadioButton1: a.Yes b.no
RadioButton2: a.Yes b.no
的问题是,我无法改变单选按钮dynamically.So的名字,当我在一个单选按钮检查组,另一组的元素被选中。
我的代码是 -
<div ng-repeat="t in getTimes(2) track by $index">
<div>
<div>
<div ng-repeat="radioButton in
selection.head.avarageOrBestCount">s
<input type="radio" name="
{{"avarageOrBestCount"+$parent.$index}}"
value="{{radioButton}}" ng-model="ss"> {{radioButton}}<br>
</div>
</div>
</div>
</div>
我需要工作名称= “{{” avarageOrBestCount “+ $父。$指数}}”。我如何动态更改单选按钮的名称?
尝试应用父命令/范围中的名称索引以及 –
$ parent。$ index ... yah ..我尝试过了....但它不工作 –
尝试此变种: name =“ avarageOrBestCount {{$ parent。$ index}}“ – Natiq