In Angular 2 Material mdTable, how can I load a dynamic number of columns? -
my data structured this, pre-known columns, number of question columns dynamic (but within 1 report have same number of columns). example has 2 question columns, 10:
[ {name: "bob", results: [ {questionnumber: 1, iscorrect: true}, {questionnumber: 2, iscorrect: false}]}, {name: "charlie", results: [ {questionnumber: 1, iscorrect: false}, {questionnumber: 2, iscorrect: false}]}, ]
how define mdtable can handle number of columns?
i tried willshowell's example on page couldn't work. defines interface doesn't work unknown number of columns (i think): https://github.com/angular/material2/issues/5927
Comments
Post a Comment