ng-repeat does not display empty values

Asked

Viewed 31 times

0

I have the following code:

 <input type="search" class="form-control" placeholder="Busca por motivo" ng-model="search.motivo" >

<tr ng-repeat="item in vm.listaDesbloqueio | filter:search">
                        <td><input type="checkbox" ng-model="item.checkbox" /></td>
                        <td>{{item.data | date: "dd/MM/yyyy"}}</td>
                        <td>{{item.hora | formatTime}}</td>
                        <td>{{item.motivo}}</td>
                    </tr>     

but when I delete all letters in the search box, no blank or null reason records are displayed, someone would know how to display blank or null records in the reason?

1 answer

0

This requires a button to reset your search object to null, since filling it gains a value:

<button data-ng-click="search = null">Limpar</button>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.