我正在尝试在另一个重复中创建一个 ng-repeat,如下所示:
模板:
<fieldset ng-repeat="fieldset in fieldsets">
{{fieldset}}
<div class="pair" ng-repeat="field in fields">
{{field}}
</div>
</fieldset>
杰森:
$scope.fieldsets =
[
{
fields: [
'tada',
'tada'
],
},
"fieldset2"];
得到{{fieldset}}
输出,如下所示:
<fieldset>
{"fields":["tada","tada"]}
</fieldset>
<fieldset>
fieldset2
</fieldset>