ekokotov / object-table

Angular directive to easy create dynamic tables from source or URL with sorting, filtering and pagination. Smart templates and good perfomance
BSD 3-Clause "New" or "Revised" License
171 stars 52 forks source link

Dynamic headers and fields from scope variable #46

Closed ahoset closed 5 years ago

ahoset commented 8 years ago
<table object-table 
       data="exportDataVariable" 
       display="2" 
       headers="Name, Age" 
       fields="name, age"
       sorting="false"
       editable="true" 
></table>

How do i pass a variable to headers, and fields like the done for data property ? The normal {{headers}} for $scope.headers does not work.

From the controller

$scope.headers = "Name, Age";

Can you help with this?

Best regards, Alexander Hoset

ekokotov commented 5 years ago

it should work like on your example. sorry for delay.