I am building a input application for subdivision data. each subdivision can have 1 to n of sections. my goal is to dynamically populate the ui with the needed inputs, textboxes, radios, checkboxes, etc.. I am combining the data from multiple sources into a single array. since this is dynamic i have created services to change the models to unique names. a screen shot of what it looks like right now
the issue i need help with is the checkboxes. I cannot access them from the html. here is a example of how i am accessing a nested array. this works fine.
<tbody>
<tr ng-repeat="item in section.sectionBuilderDeveloper">
<td class="bd-td">{{item.type}}</td>
<td>{{item.name}}</td>
<td class="radio-td">
<div class="radio radio-info radio-inline">
<input type="radio" id="{{item.idStatus1}}" value="{{item.value1}}" ng-model="model[item.status]">
<label for="{{item.forStatus1}}"> Y </label>
</div>
<div class="radio radio-inline">
<input type="radio" id="{{item.idStatus2}}" value="{{item.value2}}" ng-model="model[item.status]">
<label for="{{item.forStatus2}}"> N </label>
</div>
</td>
<td class="radio-td">
<div class="radio radio-info radio-inline">
<input type="radio" id="{{item.idPriceList1}}" value="{{item.value1}}" ng-model="model[item.priceList]">
<label for="{{item.forPriceList1}}"> Y </label>
</div>
<div class="radio radio-inline">
<input type="radio" id="{{item.idPriceList2}}" value="{{item.value2}}" ng-model="model[item.priceList]">
<label for="{{item.forPriceList2}}"> N </label>
</div>
</td>
<td class="radio-td">
<div class="radio radio-info radio-inline">
<input type="radio" id="{{item.idInvSheet1}}" value="{{item.value1}}" ng-model="model[item.invSheet]">
<label for="{{item.forInvSheet1}}"> Y </label>
</div>
<div class="radio radio-inline">
<input type="radio" id="{{item.idInvSheet2}}" value="{{item.value2}}" ng-model="model[item.invSheet]">
<label for="{{forInvSheet2}}"> N </label>
</div>
</td>
</tr>
</tbody>
I need to do the same thing with the checkboxes. this does not work.
<tbody>
<tr>
<td style="border-top:none" nowrap align="center" ng-repeat="checkbox in section.sectionFutureCheckboxes">
<div class="checkbox checkbox-primary">
<input id="{{checkbox.id}}" type="checkbox" ng-model="model[checkbox.model]">
<label for="{{checkbox.for}}"><b>{{checkbox.label}}</b></label>
</div>
</td>
</tr>
</tbody>
So the question is how do i do this? so i flatten the array after i create it or do i change the way I create the checkboxes array in the service?
different plunker with html included new plunker with html
<div class="hpanel" ng-repeat="section in formB6VM.sections">
<div class="panel-body">
<div class="row">
<div class="col-xs-12">
<ul class="list-inline">
<li><h5><b>SecID</b></h5><span>{{section.section_name}}</span></li>
<li><h5><b>Section Name</b></h5><span>{{section.section_id}}</span></li>
<li><h5><b>Active</b></h5><span>{{section.date_active}}</span></li>
</ul>
</div>
</div>
<div class="row">
<div ng-include="'modules/survey-input/fb6/views/includes/fb6_input_table.html'"></div>
</div>
<div class="row">
<div ng-include="'modules/survey-input/fb6/views/includes/fb6_builder_developer_table.html'"></div>
<div ng-include="'modules/survey-input/fb6/views/includes/fb6_future_table.html'"></div>
</div>
</div>
</div>

object.checkboxes = object.sectionFutureCheckboxes[0].checkboxes; delete object.sectionFutureCheckboxes[0].checkboxes;, but Im not sure why you would need this. You can just access them viaobject.sectionFutureCheckboxes.checkboxeswhere they are nowdelete object.sectionFutureCheckboxes.checkboxes;object.sectionFutureCheckboxes[0].checkboxes