Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Looping over list in template using ng-repeat (angularJS)

    • 0
    • 0
    • 0
    • 1
    • 0
    • 0
    • 0
    • 0
    • 289
    Comment on it

    The ngRepeat directive instantiates a template once per item from a collection. Each template instance gets its own scope, where the given loop variable is set to the current collection item, and $index is set to the item index or key. - angularJS


    <html ng-app="nameApp">
        <meta charset="utf-8">
        <title>Angular.js Example</title>
        <script src="//"></script>
          var nameApp = angular.module('nameApp', []);
          nameApp.controller('NameCtrl', function ($scope){
            $scope.names = ['Larry', 'Curly', 'Moe'];
      <body ng-controller="NameCtrl">
          <li ng-repeat="name in names">{{name}}</li>

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: