I am trying to showcase my array in my application.
Here is what I have:
JavaScript
$scope.array1 = [' ',' ',1,2,3,4,5];
$scope.array2 = [6,7,8,9,10,' ',' '];
$scope.array3 = [12,13,14,15,16,17];
HTML
<div ng-repeat="a1 in array1">
{{a1}}
</div>
<div ng-repeat="a2 in array2">
{{a2}}
</div>
<div ng-repeat="a3 in array1">
{{a3}}
</div>
I had hoped to display empty divs using ng-repeat. However, an error occurred:
Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: a1 in array1, Duplicate key: string: , Duplicate value: " "
Is there any way for me to show empty divs in this scenario? Thank you!