Currently working on a dynamic angular js application, aiming to integrate a textbox as a search filter for a table. Here's an overview of the progress so far:
Here is my current code snippet
<table>
<thead>
<tr class="filterrow">
<td data-ng-repeat="col in items.Properties">
<input id="{{col.DatabaseColumnName}}" type="text"
data-ng-model="search_{{col.DatabaseColumnName}}"/>
<!-- My goal here is to assign ng-model dynamically based on Databasecolumnname property-->
</td>
</tr>
<tr>
<th data-ng-repeat="col in items.Properties">{{col.ColumnTitle}}</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="content in items2.Contents | filter: search_{{col.DatabaseColumnName}}: search_{{col.DatabaseColumnName}}">
<td data-ng-repeat="col in items.Properties">
<a href="#">{{content[col.Databasecolumnname ]}}</a>
</td>
</tr>
</tbody>
</table>
I attempted using $compile but faced challenges with its implementation. Any insights on a different approach would be greatly appreciated. Thank you!
EDIT: Plnkr - plnkr.co/edit/5LaRYE?p=preview