ng-repeat Directive is used to repeat an HTML element for each item in the collection.
Below is a sample code for ng-repeat directive. I have used Visual Studio to write this code.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"></script>
<title>ng-repeat Directive</title>
</head>
<body ng-app="">
<div ng-init="contacts=[{name: 'William', phone:'9876543210'},{name:'John', phone:'7777666543'},{name:'Mike',phone:'7778456734'}]">
<p>Below are the list of Contacts:</p>
<ol>
<li ng-repeat="contact in contacts">
{{'Name: ' + contact.name + ', Phone: ' + contact.phone}}
</li>
</ol>
</div>
</body>
</html>
