ng-repeat is a built in directive in Angular which lets you iterate an array or an object and gives you the ability to repeat an element once for each item in the collection.
ng-repeat an array
item = individual item in the collection
itemCollection = The array you are iterating
ng-repeat an object
key = the property name
value = the value of the property
myObject = the object you are iterating
filter your ng-repeat by user input
searchText = the text that the user wants to filter the list by
stringArray = an array of strings, e.g. ['string', 'array']
You can also display or reference the filtered items elsewhere by assigning the filter output an alias with as aliasName, like so:
ng-repeat-start and ng-repeat-end
To repeat multiple DOM elements by defining a start and an end point you can use the ng-repeat-start and ngrepeat-end directives.
It is important to always close ng-repeat-start with ng-repeat-end.
Rendering ngRepeat can become slow, especially when using large collections .If the objects in the collection have an identifier property, you should always track by the identifier instead of the whole object, which is the default functionality. If no identifier is present, you can always use the built-in $index.
Scope of ngRepeat
ngRepeat will always create an isolated child scope so care must be taken if the parent scope needs to be accessed inside the repeat.
Here is a simple example showing how you can set a value in your parent scope from a click event inside of ngRepeat.
If there was only val = item.value at ng-click it won't update the val in the parent scope because of the isolated scope. That's why the parent scope is accessed with $parent reference or with the controllerAs syntax (e.g. ngcontroller="mainController as ctrl").
You can also use nested ng-repeat.