Skip to content

Instantly share code, notes, and snippets.

@jakl
Last active December 14, 2015 04:09
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 jakl/5026454 to your computer and use it in GitHub Desktop.
Save jakl/5026454 to your computer and use it in GitHub Desktop.
tigger frontend
function FileCtrl($scope) {
$scope.files = [
{name: 'Elephant Dreams', date: 20070522, size: 2000, torrent: 'piratebay.com', tags: 'a, b, c'},
{name: 'Sauerbraten', date: 20061109, size: 100, torrent: 'mega.co.nz', tags: 'c, d, e'}
];
}
<html ng-app>
<head>
<title>Tigger</title>
<link rel='stylesheet' href='https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css'>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js'></script>
<script src='https://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js'></script>
<script src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular-resource.min.js'></script>
<script src='file.js'></script>
</head>
<body>
<div ng-controller='FileCtrl'>
<table>
<thead>
<tr>
<th>Name</th>
<th>Date</th>
<th>Size</th>
<th>To</th>
<th>Tags</th>
</tr>
</thead>
<tbody>
<tr ng-repeat='file in files'>
<td>{{file.name}}</td>
<td>{{file.date}}</td>
<td>{{file.size}}</td>
<td>{{file.torrent}}</td>
<td>{{file.tags}}</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