Skip to content

Instantly share code, notes, and snippets.

@LarsBergqvist
Created September 7, 2016 07:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LarsBergqvist/2496726865380d844de15ef729751fe2 to your computer and use it in GitHub Desktop.
Save LarsBergqvist/2496726865380d844de15ef729751fe2 to your computer and use it in GitHub Desktop.
View for the SRChannelsController
<!DOCTYPE html>
<html ng-app="myApp">
<head>
<script data-require="angular.js@1.4.8" data-semver="1.4.8" src="https://code.angularjs.org/1.4.8/angular.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.css" />
<script src="SRController.js"></script>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div ng-controller="SRChannelsController">
<h1>{{ header }}</h1>
</div>
<div>
<form name="myForm" ng-controller="SRChannelsController">
<label>
<input type="radio" ng-model="filter" value="Riks" ng-change="filterChanged()"> National
</label>
<label>
<input type="radio" ng-model="filter" value="Lokal" ng-change="filterChanged()"> Local
</label>
<label>
<input type="radio" ng-model="filter" value="Fler" ng-change="filterChanged()"> More
</label>
</form>
</div>
<div ng-controller="SRChannelsController">
<table class="table table-striped">
<thead>
<tr>
<th>Icon</th>
<th>Name</th>
<th>Live broadcast link</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in channels">
<td class="vert-align">
<img ng-src={{item.image}} height="70" width="70">
</td>
<td class="vert-align">
<b>{{item.name}} - {{item.channeltype}}</b>
</td>
<td class="vert-align">
<a href={{item.liveaudio.url}} type="audio/mpeg" class="playbutton">Play {{item.name}}</a>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment