Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript AngularJS Basics (1.x) Using Angular's Built In Directives Review: ng-repeat, ng-class, and ng-blur

Anthony Davis
Anthony Davis
699 Points

todo in todos, how is todos not an array?

todo in todos, how is todos not an array? The question says my answer is wrong. (I am guessing they want 'iterable')

in App.js file:

$scope.todos = [
    {"name": "test02"},
    {"name": "test01"}
];

in index.html file:

ng-repeat="todo in todos"

1 Answer

I checked the question, which is "In the following directive, <div ng-repeat='foo in foobar"> , foobar is ________."

Without other information, foobar is an iterable because it can be either an array or an object.

Hope this helps :)