AngularJS Tutorial - ng-repeat with hardcoded array








The following code shows how to use ng-repeat with hardcoded array.

Example


<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"></script>
</head><!--from  w  w w. j a  va  2  s  . c o m-->
<body>
  <table ng-app>
    <tr ng-repeat="i in [1, 2, 3, 4]">
        <td>i = {{ m = k; k = j; j = i + 1; i}}</td>
        <td>j = {{j}}</td>
        <td>m = {{m}}</td>
    </tr>
</table>
</body>
</html>

The code above is rendered as follows: