import { Component } from '@angular/core'; @Component({ selector: 'css-tables', template: `

`, }) export class TablesComponent { snippets = { basicExample: { markup: require('!!prismjs-loader?lang=markup!./basic-example.html') }, tableHeadOptions: { markup: require('!!prismjs-loader?lang=markup!./table-head-options.html') }, borderedTable: { markup: require('!!prismjs-loader?lang=markup!./bordered-table.html') }, strippedRows: { markup: require('!!prismjs-loader?lang=markup!./stripped-rows.html') }, hoverableRows: { markup: require('!!prismjs-loader?lang=markup!./hoverable-rows.html') }, smallTable: { markup: require('!!prismjs-loader?lang=markup!./small-table.html') } }; toggleInverse() { const tables:any = document.querySelectorAll('[component="Table"] .table'); Array.from(tables).forEach((table:any) => { console.log('called : ', table); if (table.classList.contains('table-inverse')) { table.classList.remove('table-inverse'); } else { table.classList.add('table-inverse'); } }); } }