ng-repeat
The ng-repeat directive repeats HTML once per each item in the specified array collection.
In following example, we've iterated over array of countries.
<div ng-app = "">
...
<p>List of Countries with locale:</p>
<ol>
<li ng-repeat = "country in countries">
{{ 'Country: ' + country.name + ', Locale: ' + country.locale }}
</li>
</ol>
Example:
ng-repeat.
Add list and dive in ng-repeate.
<html>
<head>
<script src="angular.min.js"></script>
<style>
div {
border: 1px solid green;
width: 100%;
height: 50px;
display: block;
margin-bottom: 10px;
text-align:center;
background-color:yellow;
}
</style>
</head>
<body ng-app="" ng-init="subjects=['Html','Php','Java']">
<ol>
<li ng-repeat="name in subjects">
{{name}}
</li>
</ol>
<div ng-repeat="name in subjects">
{{name}}
</div>
</body>
</html>
For
More Explanation
&
Online Classes
More Explanation
&
Online Classes
Contact Us:
+919885348743
+919885348743