AngularJS Tutorial 13: ng-repeat directive example with simple object

ng-repeat directive example with simple object

Program

<!DOCTYPE html>
<html>
<head>
    <script src="angular.min.js"></script>
</head>

<body ng-app>
    <div ng-init="MyFamily=[{name:'ranga',age:32},{name:'swapna',age:31},{name:'Sabarish',age:1},{name:'chinmayi',age:4}]">

        <ul>
            <li ng-repeat="value in MyFamily">
                {{value.name}} age is {{value.age}}
            </li>
        </ul>
    </div>
</body>
</html>

Output:

  • ranga age is 32
  • swapna age is 31
  • Sabarish age is 1
  • chinmayi age is 4

If you have any queries or suggestions, please feel free to ask in comments section.
Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

 
Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar