https://opensource.addepar.com/ember-table/docs/quickstart
Make sure after installing ember-table, restart the ember server
ember s
Then it shows.
work-order-table.hbs
{{this.isLarge}}
{{columns.firstObject.name}}
<EmberTable as |t|>
<t.head @columns={{columns}} />
<t.body @rows={{rows}} />
</EmberTable>
work-order-table.js
import Component from '@glimmer/component';
export default class WorkOrderTableComponent extends Component {
constructor(...args) {
super(...args);
this.isLarge = true;
this.columns = [
{
name: `First Name`,
valuePath: `firstName`
},
{
name: `Last Name`,
valuePath: `lastName`
}
];
this.rows = [
{
firstName: 'Tony',
lastName: 'Stark',
},
{
firstName: 'Tom',
lastName: 'Dale',
}
];
}
}
No comments:
Post a Comment