0

I am very new to polymer I am trying to use this on polymer2.0

but not able to integrate properly the script given on the demo

document.addEventListener('WebComponentsReady', function() {
Polymer({
  is: 'custom-expansion',
  ready: function() {
    var table = Polymer.dom(this).querySelector('iron-data-table');
    var expandedItem;
    table.addEventListener('expanding-item', function(e) {
      if (expandedItem) {
        table.collapseItem(expandedItem);
      }
      expandedItem = e.detail.item;
    });
  }
});   });

my code structure is like this

class AllCourses extends Polymer.Element {
static get is() { return 'all-course'; }
static get properties() {} }

Thank You.

Vishal Chhodwani
  • 2,567
  • 5
  • 27
  • 40
surendra
  • 45
  • 1
  • 8

0 Answers0