html - ng-repeat horizontal images -
i trying make list of images horizontal. keep displaying vertical. idea doing wrong?
<div ng-repeat="i in product.images"> <ul id="navlist"> <li> <img class="thumbnail" ng-src="{{i.image}}"> </img> </li> </ul> </div> #navlist li { display: inline; list-style-type: none; padding-right: 20px; }
you need put 'ng-repeat' in li tag (not div), otherwise repeating entire div, not inline. here's link codepen code http://codepen.io/jwncoexists/pen/xbdovy
<body ng-app="imagedemo"> <div ng-controller="demo.controller"> <div> <ul id="navlist"> <li ng-repeat="i in product.images"> <img class="thumbnail" ng-src="{{i.image}}"> </li> </ul> </div> </div> </body>
Comments
Post a Comment