Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Looping over objects #17

Closed
David-Mulder opened this issue Nov 4, 2014 · 3 comments
Closed

Looping over objects #17

David-Mulder opened this issue Nov 4, 2014 · 3 comments

Comments

@David-Mulder
Copy link

As far as I can see it's not possible to loop over an object, despite this being extremely logical in certain cases (say we have a dedicated element showing a list of tests, document.getElementById('testList').tests.someTest.correct=0 would be a sensible interface, however this isn't really possible with the NodeBind setup right now (as far as I was able to find out)). Is there any specific reason this is not supported? Especially the in syntax suggests it should work, but at least on the stable version this doesn't seem to be working.

Just to be clear here, I talking about

<template repeat="{{a in b}}">
    c
</template>

where b is {a:'b',c:'d'}.

@jmesserly
Copy link
Contributor

hey, thanks for the report! I think this is a duplicate of googlearchive/polymer-expressions#11, so I'll merge this into that one.

(and there was no way you could've known, given how many repos things are scattered across... I get confused too all the time...)

@David-Mulder
Copy link
Author

Ah, you're indeed right, my bad. Honestly, some documentation would indeed be useful 😇 . This is the second or third time (depending how you count) in the Polymer project I thought I had the right repository but didn't 😅 . Is there any overview at all of how the different repositories tie into eachother? As in, just some treeview or something?

@jmesserly
Copy link
Contributor

No worries! It is confusing :)

For docs, this page is decent:
https://www.polymer-project.org/docs/start/platform.html

Here's a rough outline:

platform.js: (CustomElements + ShadowDOM + HTMLImports) + platform-dev
polymer.js: observe-js + NodeBind + TemplateBinding + PolymerExpressions + polymer-dev

That's the rough order of dependencies too (except CE, SD, HI don't depend on each other). Things on the right depend on things to the left.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants