AngularJS Example:
HTML
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
<div ng-app ng-controller="StocksController">
<table class="table">
<tr>
<th>
Symbol
</th>
<th></th>
</tr>
<tr ng-repeat="x in myData">
<td>
{{ x.Ticker }}
</td>
<td>
<a href="#" ng-click='EditTicker(x.Ticker)'>Edit</a> |
<a href="#" ng-click='DetailsTicker(x.Ticker)'>Details</a> |
<a href="#" ng-click='DeleteTicker(x.Ticker)'>Delete</a>
</td>
</tr>
</table>
<hr />
<div>
<div ng-controller="StocksController">
<button ng-click="SendData()">Submit</button>
<pre>{{myData | json}}</pre>
<hr />
</div>
</div>
</div>
CSS
.done-true {
text-decoration: line-through;
color: grey;
}
JavaScript
function StocksController($scope, $http, $timeout) {
// When the page loads...
// Load myData with REST GET
$scope.myData = [{
Ticker: 1
}, {
Ticker: 2
}, {
Ticker: 3
}, {
Ticker: 4
}];
// Update the array
$scope.SendData = function() {
$scope.myData.splice(0, 2);
};
}