Angular: Empty Fiddle
http://angularjs.org/
by user1572526
HTML
<script src="http://code.angularjs.org/angular-1.0.1.js"></script>
<div ng-controller="MyCtrl">
<p ng-repeat="person in sources">{{person.id}}</p>
<ul>
<li ng-repeat="person in sources">
{{person.name}}
</li>
</ul>
CSS
.active{
background:grey;
}
JavaScript
var myApp = angular.module('myApp',[]);
angular.module('myApp')
.controller('MyCtrl', function ($scope){
$scope.sources = [{
id: 1,
name: "per",
last: "strom"
},
{
id: 2,
name: "asd",
last: "andersson"
}];
// $scope.source = findById($scope.sources, $stateParams.sourceID);
});