Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Iterating over a member object #436

Closed
bitpshr opened this issue Mar 5, 2014 · 3 comments
Closed

Iterating over a member object #436

bitpshr opened this issue Mar 5, 2014 · 3 comments

Comments

@bitpshr
Copy link

bitpshr commented Mar 5, 2014

According to the polymer docs, the expression iterated over when using the repeat statement in a <template> can be a "a simple identifier, a path or a full expression (including Object and Array literals)."

After testing, however, it seems as though the repeat statement only works with arrays, and not with objects.

Example

@sjmiles
Copy link
Contributor

sjmiles commented Mar 5, 2014

The docs there are imprecise. The general nature of expressions is explicated but I don't believe it intends to say you can iterate over objects with repeat.

I believe only Arrays are support for iteration at this time, although there is talk of possibly supporting NodeLists also.

@arv
Copy link
Contributor

arv commented Mar 6, 2014

That is correct, repeat only works with Arrays at this point.

@bitpshr
Copy link
Author

bitpshr commented Mar 12, 2014

Thanks.

@bitpshr bitpshr closed this as completed Mar 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants