Skip to content

Instantly share code, notes, and snippets.

@Fintan
Created March 14, 2014 13:10
Show Gist options
  • Save Fintan/9547377 to your computer and use it in GitHub Desktop.
Save Fintan/9547377 to your computer and use it in GitHub Desktop.
Looping thourgh Angular arrays using ng-repeat
<div data-ng-init="places=['Newry', 'Dundalk', 'Belfast']"></div>
<div data-ng-repeat="value in places track by $index">Been to {{places[$index]}}?</div>
<div data-ng-repeat="value in ['Derry', 'Dublin', 'Drogheda'] track by $index">Been to {{value}}?</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment