Upon examination of my $scope
parameter, I have come across the following structure:
$scope.filters = [{name: "Brands", brands: ['Brand1', 'Brand2', 'Brand3']},
{name: "Catalogs", brands: ['Cat1', 'Cat2', 'Cat3']}];
When attempting to display this data as a list in the HTML file, I utilized the following code snippet:
<div ng-repeat="filter in filters"><h3>{{filter.name}}</h3>
<input type="checkbox" ng-repeat="brand in filter.brands"> {{brand}}<br>
</div>
The filter.name
displays correctly with values like "Brands"
and "Catalogs"
, yet the checkboxes remain empty below them.
The only workaround that works is removing the ng-repeat
from the input tag and placing it outside using a label or similar element.
Is there something crucial that I am overlooking here?