vendredi 30 janvier 2015


I have developed a polymer element. In this element I receive some parameters. When I pass [value array] parameter to element does not work. But if I put the values manually, it works.


This is the polymer element head:



<polymer-element name="nick-viewer-card" attributes="program details link chart">


This is the code problem:



<div class="heading" on-click="{{ toggle }}">{{ program }}</div>
<core-collapse id="collapse">
<div class="content">
<div>{{ details }}</div>
<div><a href="{{ link }}"> more details</a></div>
<div>{{ chart }}</div>
<chart-pie
width="150"
height="150"
values="[30, 50, 100, 40, 120]"> <!-- {{ chart }} -->
</chart-pie>
</div>
</core-collapse>


And this is the invocation:



<nick-viewer-card program="{{gsx$program.$t}}" details="{{gsx$details.$t}}"
link="{{gsx$link.$t}}" chart="{{gsx$chart.$t}}"></nick-viewer-card>


I included #mudasobwa suggestiong:



<div>{{ chart }}</div>
<div><a href="{{ link }}"> more details</a></div>
<chart-pie
width="150"
height="150"
values="{{ chart }}">
</chart-pie>


This is the output:


enter image description here


and the console error is related the type: enter image description here





Aucun commentaire:

Enregistrer un commentaire