I am working with an array of 50 squares, each with randomly generated side lengths. My goal is to loop through the array using ng-repeat and style each square uniquely based on its side length. Any suggestions?
<div ng-controller="ShapesController as sc" ng-init="sc.displaySorted()">
<div class="square" ng-repeat="sq in sc.shapesToDisplaySq" style="width:" + sq.sideLength + "px" + ";height:" + sq.sideLength + "px" + ";">
{{sq}}
</div>
</div>
The shapesToDisplay array contains objects with different sideLength values. I just need help translating these values into CSS styles. Thanks!
Console screenshot of square objects DOM screenshot of {{sq}}