<polymer-element name="card-board"><template> <template repeat="{{card, cardIndex in cardArr}}"> test {{cardIndex}}, <!-- output: test 1, test 2, --> <card-item index="{{cardIndex}}" indexedName="{{getCardIndexedName(card,cardIndex)}}"></card-item> </template></template><script> (function () {
Polymer("card-board", { cardArr: [ card: { name: "test" }, card: { name: "test" } ],
getCardIndexedName: function (card,index) { //index is undefined.. return card.name + index; }
});
})(); </script></polymer-element>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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/0b3942c3-14b5-46c4-aa6a-74b7af738b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
hello Arthur,first, thanks alot for answring.sorry for the syntax error, i wrote it fast and didn't notice.let me clear my question.i've edited the jsbinlets say we have another javascript file.and that getCardIndexedName calls app.getCardIndexedName with the card item and the index.app.getCardIndexedName returns a string.the thing is when i call app.getCardIndexedName the index is undefined for the first 2 times. (there are 4 calls for some reason)i think it happens because the index is not yet defined because the polymer isn't yet ready.but still the thing is that there are 4 calls(2 before polymer ready, and 2 after). my question is why? and how can i fix this issue.thanks again.
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 polymer-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/polymer-dev/CABtuYwceOVAb8a5q6-XWHSeFut%2ByiHE%3DxOe1S405rnn1hNwr7w%40mail.gmail.com.