Creating an image grid view gallery using ng-repeat and CSS is proving to be a challenge. Here is the code I am currently working with:
<div class="grid-container" style="display:block;">
<ul class="rig columns-3" ng-repeat="element in elementsList track by $index">
<li>
<img ng-src='{{src_url}}' ng-click="routeTo('/')"/>
</li>
</ul>
</div>
The issue arises when trying to display 3 images per row using CSS. While hardcoding three <li>
tags works perfectly, dynamically loading through ng-repeat results in only one image per row. It seems that the CSS styles are applied before the ng-repeat list, preventing the grid layout from forming as desired.
Any suggestions on how to correct this problem?