Combining AngularJS, ng-table, and coffeescript has been quite a task for me. I've been trying to create a multiple template filter within coffeescript and pass it into my angularjs template.
One of the challenges I'm facing is with a combined 'name & surname' column where I need two separate filters for 'name' and 'surname'.
Currently, I have managed to make it work like this;
<td data-title="'Customer'" sortable="'fullname'"
filter="{'name_cont': 'text', 'surname_cont':'text'}" >
However, I would prefer defining this filter in my AngularJS controller like this;
$scope.nameFilterDef = {
name: {
id: "text",
placeholder: "Name"
},
surname: {
id: "text",
placeholder: "Surname"
}
}
Then, using this filter definition in my template like this;
<td data-title="'Customer'" sortable="'fullname'"
filter="nameFilterDef" >
Unfortunately, when I try to apply the filter this way, no filter boxes appear.
Update
I noticed that if I output {{nameFilterDef}} on the page, I can see my filter hash being passed in successfully.