Angular: ng-repeat scope - 14410993
http://angularjs.org/
by Sreekesh S K
HTML
<div ng-controller="MyCtrl">
<div ng-repeat="line in lines">
<div class="preview">{{line.text}} ===>Index = {{$index}}</div>
</div>
</div>
JavaScript
var myApp = angular.module('myApp', []);
function MyCtrl($scope) {
$scope.lines = [
{
text: 'res1'
},
{
text: 'res2'
},
{
text: 'res3'
},];
}