Created
March 14, 2014 13:10
-
-
Save Fintan/9547377 to your computer and use it in GitHub Desktop.
Looping thourgh Angular arrays using ng-repeat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <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