I know I can filter like this:
<input type="search" ng-model="searchTable">
<table>
<thead>
<tr>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="row in $ctrl.rows | filter: searchTable">
<td>{{ row.firstName }}</td>
<td>{{ row.lastName }}</td>
</tr>
</tbody>
</table>
How do I filter if the <input type="search" ng-model="searchTable"> and <tr ng-repeat="row in $ctrl.rows | filter: searchTable"> are in separate components?
Here's a simple fiddle.
From what I understand I'll need to add an $onChanges() and expression binding bindings: { onChange: '&' } to the searchComponent, but don't fully understand how to implement it.
Thanks