import { Component } from '@angular/core'; @Component({ selector: 'cell-selection-demo', template: `

Cell Selection Source

` }) export class CellSelectionComponent { rows: any[] = []; selected: any[] = []; columns: any[] = [ { prop: 'name'} , { name: 'Company' }, { name: 'Gender' } ]; constructor() { this.fetch((data) => { this.rows = data; }); } fetch(cb) { const req = new XMLHttpRequest(); req.open('GET', `assets/data/company.json`); req.onload = () => { cb(JSON.parse(req.response)); }; req.send(); } onSelect(event) { console.log('Event: select', event, this.selected); } onActivate(event) { console.log('Event: activate', event); } }