Skip to content

Instantly share code, notes, and snippets.

@steinbring
Created August 10, 2014 16:42
Show Gist options
  • Save steinbring/dbf042cebbec9a8ab06f to your computer and use it in GitHub Desktop.
Save steinbring/dbf042cebbec9a8ab06f to your computer and use it in GitHub Desktop.
Loop over an array, inside of another array using ng-repeat; limit output using ng-show
<ul>
<li ng-repeat="marketCity in marketCities">
<h2>{{marketCity.label}}</h2>
<ul>
<li ng-repeat="station in marketCity.stations">
<div class="StationInfo">
<div class="label">
{{station.orgDisplayName}}
</div>
<div class="logo" ng-show="station.image.content">
<!-- Remember to use ng-src instead of src for images -->
<img ng-src="{{station.image.content}}" alt="{{station.orgDisplayName}}">
</div>
<div class="player">
<a href="{{station.url.content}}">Listen Live</a>
</div>
<div style="clear:both;"> </div>
</div>
</li>
</ul>
</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment