How to change polymer 1.0 paper-button color dynamically from an array of colors?

106 views
Skip to first unread message

Sai Roshan Chhetri

unread,
Jul 30, 2015, 4:33:47 PM7/30/15
to Polymer


http://stackoverflow.com/q/31732751/4984267?sem=2


I have an array buttonColors, which has set of colors in the hex format. Now I want to display set of paper-button each with the color present in the buttonColors Array. How to achieve it in polymer 1.0?

<template is="dom-repeat" items="{{buttonColors}}">
      <paper-button style="background-color:{{item}}" >
                  <b>click me</b>
      </paper-button>
</template>

The above snippet does not seem to work. Kindly help.
Reply all
Reply to author
Forward
0 new messages