md-data-table
md-data-table copied to clipboard
Init data-table with marked checkboxes
Hi all,
I'm having trouble initializing the component with marked checkboxes. I couldn't find this kind of option at the documentation. Can anyone help me?
Regards.
Well, you can easily do that.
When you loaded the items, just init selected property with items.
self.$scope.items= reponseItems;
self.$scope.selected.push(self.$scope.items[0]);
And first item in the table will be selected. Also, don't forget to set md-select-id and md-select attributes.
@ielektronick you give me a exemple?