angularjs - ng-repeat showing custom message for the 1st iteration only -


i have below code following sample data

$scope.studentpermissions  = [  {entities[{studentname: 'tester', entitystudents[{firstname: 'test0', lastname: 'test0', userpermissions[{prop 1, prop2, prop3}]}]}]}, {entities[{studentname: 'tester', entitystudents[{firstname: 'test1', lastname: 'test2', userpermissions[{prop 1, prop2, prop3}]}]}]}, {entities[{studentname: 'tester', entitystudents[{firstname: 'test3', lastname: 'test4', userpermissions[{prop 1, prop2, prop3}]}]}]}, ] 

code:

<div>      <input type="text" ng-model="searchstudent">     <div>         <div ng-repeat="studentpermissions in studentpermissions">             <div ng-repeat="student in studentpermissions.entities">                 <table>                     <thead>                         <tr>                             <td >student</td>                             <td>{{student.studentname}}</td>                         </tr>                         <tr>                             <th></th>                             <th ng-repeat="permission in student.entitystudents[0].userpermissions"><div><span>{{permission.name}}</span></div></th>                         </tr>                     </thead>                     <tbody>                         <tr ng-repeat="student in filtereddata =(student.entitystudents | filter:searchstudent)">                             <td>{{student.firstname}} {{student.lastname}}</td>                             <td ng-repeat="permission in student.userpermissions">                                 <input ng-model="permission.checked" type="checkbox">                             </td>                         </tr>                     </tbody>                 </table>                 <div ng-show="!filtereddata.length">no matching student found</div>             </div>         </div>     </div> 

currently, if student not found system shows no data found message 3 times. in fact message no matching student found showing each <div ng-repeat="student in studentpermissions.entities">..

i want show one.. e.g. if message showing 1st iteration don't show 2nd iteration.

any please.


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -