AngularJS Example:
by dustsnow
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app>
<div ng-controller="TodoCtrl">
<table id="ng-repeat-table-test">
<tr id="title">
<td>Car Types</td>
</tr>
<tr class="row" ng-repeat="car in cars">
<td>{{car.name}}</td>
</tr>
</table>
</div>
</div>
CSS
table {
margin-left: auto;
margin-right: auto;
margin-top: 10px;
}
tr#title {
height: 100px;
background-color: #ccc;
}
tr.row {
padding-top: 10px;
border-top: 1px solid #ccc;
}
tr.row:first-child {
border-top: none;
}
tr.row td {
padding-top: 10px;
height: 56px;
vertical-align: top;
}
JavaScript
function TodoCtrl($scope) {
$scope.cars = [{
name: 'Toyota 2009'
}, {
name: 'BWM 330'
}];
}