Created
August 10, 2014 16:42
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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