Ravish Kumar Tiwari’s answer to What is ng-repeat in AngularJS?

  • With ng-repeat you can define template for a single item in collection, and ng-repeat would then use this template and repeat it for all the elements in a collection.
  • Let say that you need to display data from a collection to the user.
  • Ravish Kumar Tiwari , studied at Masters in Computer Applications
  • Save your draft before refreshing this page.
  • Submit any pending changes before refreshing this page.

ng-repeat in simplest term is a iterator/repeater, a looping construct. Let say that you need to display data from a collection to the user. For this, Angular gives you ng-repeat(ngRepeat) directive. With ng-repeat you can define template for a single item in collection, and ng-repeat would then use this template and repeat it for all the elements in a collection.

@ravishtiwari: My answer to What is ng-repeat in AngularJS?

This page may be out of date. Save your draft before refreshing this page. Submit any pending changes before refreshing this page.

Thanks for asking.

ng-repeat in simplest term is a iterator/repeater, a looping construct. Let say that you need to display data from a collection to the user. For this, Angular gives you

ng-repeat(ngRepeat)

directive. With

ng-repeat

you can define template for a single item in collection, and

ng-repeat

would then use this template and repeat it for all the elements in a collection.

For example, say you have a product data, some thing like:

and you want to render this data in tabular format, with each item representing a row, you can use ng-repeat to loop over the items:

Have a look at following codepen.

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Ravish Kumar Tiwari’s answer to What is ng-repeat in AngularJS?

You might also like More from author

Comments are closed, but trackbacks and pingbacks are open.