Angular JS Ng-repeat directive


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

Comments

Popular posts from this blog

CAML Query in SharePoint 2010

Calling REST APi from server side code - C#

All about SharePoint 2010 Content Type Hub

SharePoint Interview Questions and Answers

Calling ASP.Net WebMethod using jQuery AJAX