In this blog I will explain about ng-repeat directives in Angular JS. ng-repeat repeats set of HTML.
<div ng-app=”” ng-init=”EmpName=
Stu =[{stufname :‘John’,address:‘India’ }
,{stufname :‘Tom’,address:‘USA’ }
,{stufname :‘Sachin’,address:‘India’ },
{stufname :‘Rahul’,address:‘UK’ }
,{stufname :‘Rohan’,address:‘Australia’ }
,{stufname :‘Sunil’,address:‘India’ }
,{stufname :‘Rohit’,address:‘India’ }];”>
<br />
<input type=”text” ng-model=”empd“ />
<ol>
<li ng-repeat=”s in Stu | filter: empd | orderBy :‘stufname’ “>
{{s.stufname }}
</li>
</ol>
</div>
Output –
You may try typing in textbox and you may see the result.
Angular JS ng-repeate directives
Please visit Angular JS tutorial for .Net developer