What is ng-repeat directive in AngularJs?

Answer: It renders or iterates over a collection of items and creates DOM elements. It regularly monitors the source of data to re-render a template in response to a change.

Syntax:

<table class="table table-bordered"> 
      <tr ng-repeat="student stuDetails"> 
            <td>{{stu.name}} </td> 
           <td> {{stu. grade}} </td> 
     </tr> 
</table>

 

Leave a Reply

Your email address will not be published. Required fields are marked *