Polymer: dom-repeat items - Is it possible to shuffle repeating items.? -


in polymer template: dom-repeat items - possible shuffle repeating items.?

please possible solution..

yes, use sort function randomly assign item position rather sorting it.

  <template is="dom-repeat" items="[[items]]" sort="_sortitems" initial-count="1">     <a href$="#[[section]]/[[item.id]]" class="item" aria-label$="more information [[item.title]]">       <shrine-item item="[[item]]"></shrine-item>     </a>   </template>  _sortitems: function() {   return math.round(math.random()*3) - 1; } 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -