javascript - show customize message when no record match with angular filter -
i have added basic functionality user can enter student name filter out records table. it works fine.
however, need enhance functionality "show message no record found when no record found"
<input type="text" ng-model="searchkeyword"> <tr ng-repeat="student in students |filter: searchkeyword"> <td style="text-align: left;" width="296;">{{student.firstname}} {{student .lastname}}</td> any hint please?
something following no ?
<div ng-show="!(students.length > 0)">no students found! call cops!</div> this conditional view. can see, display id results count not greater 0! :)
or better :
<div ng-show="!(students| filter:searchkeyword).length">no students found</div>
Comments
Post a Comment