ng-repeat with hardcoded array

Description

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><!--   w w  w .ja v  a2  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>

Click to view the demo





















Home »
  AngularJS »
    AngularJS Example »




Controller
Directives
Expression
Filter
Form
Inject
Scope
Server
Style
Template
Utilities