I'm trying to use an array as data source for some of my column in a HandsoneTable created using Angular directives. But when using common array notation (name[0]
) for the data attribute nothing is rendered in that particular table cell. Am I doing something wrong or is this not supposed to work the way I want it to?
My data source:
$scope.data = [
{
'name': ['Bob', 'Bobson'],
'email': 'bob@sample.com'
},
{
'name': ['John', 'Johnson'],
'email': 'john@sample.com'
}
];
And my template:
<div ng-app="Test">
<div ng-controller="tableCtrl">
<hot-table datarows="data">
<hot-column data="name[0]"></hot-column>
<hot-column data="name[1]"></hot-column>
<hot-column data="email"></hot-column>
</hot-table>
</div>
</div>
See simple example here: https://jsfiddle.net/9qzo3wnv/4/