You’ll notice we’ve attached the array directly to the scope, which, as we know, means we can now access it directly within our view. Using the ng-repeat directive , Let’s Build with angularjs and Bootstrap, we can loop through our array to display the contacts in our table:

<tr ng-repeat="contact in contacts"> <td>{{contact.name}}</td> <td>{{contact.email}}</td> <td>{{contact.phone}}</td> <td><a href="/contact/{{$index}}" class="btn btn-default btn-xs">View</a></td> </tr>

By now, I’m sure that this is looking very familiar to you. We’ve attached our directive to the element we wish to repeat (in this case, our table row), and have used the double curly brace syntax to display our contact data.