I am calling a polymer element within another element. The inner polymer 
element has a published attribute to which I am binding JSON from the 
parent polymer. However it is not getting reflected.

<polymer-element name="parent-test" attributes="testData">
    <template>

        This is Parent test
        <child-test testdatachild="{{testData}}"></child-test>

    </template>
    <script>
        Polymer('parent-test', {
            testData: [],
            ready: function () {
                debugger;
                this.testData = [1, 2, 3, 4]
            }
        });
    </script></polymer-element>

<polymer-element name="child-test" attributes="testDataChild">
    <template>
        <!--{{testDataChild}}-->
        <template repeat="{{test in testDataChild}}">
            {{test}}
        </template>


    </template>
    <script>
        Polymer('child-test', {
            testDataChild: [],
            ready: function () {
                debugger;
            }
        });
    </script></polymer-element>

I am not sure what could be the problem here.

Seems like I am not having the actual parentContent at the time of 
generating the child-polymer-element. If I assign hardcoded values in ready 
function for this.parentContent, it doesnt work as well. If I assign 
hardcoded values in create function for this parent.Content, it works. So, 
I am not not sure if this is something related to generating the child 
polymer element before the values getting binded to parent.

Also, it works if testDataChild is a string and not an array

Follow Polymer on Google+: plus.google.com/107187849809354688692
--- 
You received this message because you are subscribed to the Google Groups 
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/polymer-dev/19c92ca5-d86f-48a3-9bf0-337173a64d1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to