Created
April 21, 2013 19:30
-
-
Save sunkay/5430754 to your computer and use it in GitHub Desktop.
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
// controllers | |
function deviceListController($scope) | |
{ | |
$scope.devices = [ | |
{name: "iphone", assetTag:"a23456", owner:"dev", desc:"iOS4.2"}, | |
{name: "loaner-laptop-1", assetTag:"a13936", owner:"dev", desc:""}, | |
{name: "loaner-laptop-3", assetTag:"a43056", owner:"qa", desc:""}, | |
{name: "android", assetTag:"a33756", owner:"dev", desc:"android2.4"}, | |
{name: "galaxy tab", assetTag:"a53356", owner:"dev", desc:"android"}, | |
{name: "loaner-laptop-2", assetTag:"a63556", owner:"qa", desc:""}, | |
{name: "iphone", assetTag:"a73856", owner:"dev", desc:"iOS5"} | |
]; | |
} |
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
<html ng-app> | |
<head> | |
<title>Check out your device</title> | |
<link rel="stylesheet" href="../bootstrap/css/bootstrap.css"> | |
</head> | |
<body> | |
<h2>List of Devices</h2> | |
<div ng-controller="deviceListController"> | |
<table class="table"> | |
<thead> | |
<tr> | |
<th>Name</th> | |
<th>Asset Tag</th> | |
<th>Owner</th> | |
<th>Description</th> | |
</tr> | |
</thead> | |
<tbody> | |
<tr ng-repeat="item in devices"> | |
<td>{{item.name}}</td> | |
<td>{{item.assetTag}}</td> | |
<td>{{item.owner}}</td> | |
<td>{{item.desc}}</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script> | |
<script src="cotd.js"></script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment