I have a table which can be filtered by several columns. The filter is strict. However, it shows an empty table. How to apply a strict filter only to non-empty values? I need to show all results when a strict filter input is blank.
<table id="searchTextResults">
<tr><th colspan="2">Strict filter</th></tr>
<tr><th>Name</th><th>Phone</th></tr>
<tr ng-repeat="friend in friends | filter:searchText:true">
<td>{{friend.name}}</td>
<td>{{friend.phone}}</td>
</tr>
</table>
array of data,
[
{name:'John', phone:'555-1276'},
{name:'Mary', phone:'800-BIG-MARY'},
{name:'Mike', phone:'555-4321'},
{name:'Adam', phone:'555-5678'},
{name:'Julie', phone:'555-8765'},
{name:'Juliette', phone:'555-5678'}
]