Hi,
We are binding list using  nested ng-repeat  for department and employees 
in department using group by. 
List is like-

IT
- employee1
-employee2

Sales
-employee3
-employee4

I am getting the all the data  in single object.
object is like
{
deptId:1,deptname: "IT", employee:{{id:1,name:employee1,address:"abc 
s"},{id:2,name:employee2,address:"abc s"}}
}

And following is ng-repeat code-

  <input type="text" name="vSearch" id="vSearch" placeholder="Search 
department / Employee" ng-model="query">

 <tr ng-repeat-start="department in Department | groupBy:'departmentname' | 
filter:search">
                            <td colspan="3" class="heading collapsed" 
type="button" data-toggle="collapse" data-target="#collapse{{$index}}" 
aria-expanded="false" aria-controls="collapse{{$index}}">
                                {{department.departmentname}}
                                <!--<em class="arrU"></em>-->
                                <em class="arrD"></em>
                            </td>
                        </tr>
                        <tr ng-repeat-end>
                            <td colspan="3">
                                <ul id="collapse{{$index}}" class="collapse 
in listings " aria-expanded="true">
                                    <li data-ng-repeat="employee in 
department.items | orderBy:orderByField:reverseSort | filter:search" 
 ng-class="{'active':{{department.departmentid}}== selectedRow}">
                                        {{employee.employeelName}}
                                      
                                    </li>
                                </ul>
                            </td>
                        </tr>

Now when I try to search department or employee it search in whole object. 
Instead I want to search the departmentname and the employee name.

Please can anyone help.


Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to