Programming Code Center(PCC)
[ANGULARJS]

(PCC)::[How-to-use-The-ng-repeat-Directive-(with-Arrays)-in-AngularJS]::[angularjs]

File Name : index.html

<!DOCTYPE html>
<html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js"></script>
<body>

<div ng-app="" ng-init="names=['Jani','Hege','Kai']">
  <p>Looping with ng-repeat:</p>
  <ul>
    <li ng-repeat="x in names">
      {{ x }}
    </li>
  </ul>
</div>

</body>
</html>

Output :

Looping with ng-repeat:

  • {{ x }}