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

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

javascript - Confirm a form & display message if form is valid with JQuery -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -