VOOZH about

URL: https://www.geeksforgeeks.org/angular-js/how-to-fetch-the-details-using-ng-repeat-in-angularjs/

⇱ How to fetch the details using ng-repeat in AngularJS ? - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

How to fetch the details using ng-repeat in AngularJS ?

Last Updated : 12 Jul, 2025

In this article, we will see how to fetch the details with the help of the ng-repeat directive in Angular, along with understanding its implementation through the illustrations. AngularJS contains various types of pre-defined Directives, where most of the directives start with ng which denotes Angular. The ng-repeat directive is used to iterate over an object for its properties. A template is instantiated once an item is from a collection. Every template has its own scope where the loop variable is set to the current collection item and the $index is set to a key or the index of the item. 

Syntax:

<element ng-repeat="(key, value) in Obj"></element>

Parameter values:

  • key: It is a user-defined identifier in an expression that denotes the index of the item.
  • value: It is also a user-defined identifier that denotes the value assigned to the specific key in an expression.

Example 1: This example shows the basic usage of the ng-repeat directive to fetch the data in a tabular format.

Output:

👁 Image
 

Example 2: This is another example illustrating the fetching of data using the ng-repeat directive in AngularJS.

Output:

👁 Image
 
Comment

Explore