0

With reference to ngTable filtering on nested fields the solution works fine however if I add new fields to client

[{
id: 1,
date: "20/03/2014",
no: "1",
client: {
fullname: "ABC Catering",
lastname:"test",
middlename :"test2"
}}]

Could you please let me know how i can add for filters for last name and middlename also?With the below html code if i input a filter in last name the same text appears in last name and middle name and vice versa

<td data-title="'Client'" filter="{ 'client': 'text' }">
        {{ user.client.fullname }}
    </td> 
<td data-title="'Client'" filter="{ 'client': 'text' }">
        {{ user.client.lastname }}
    </td> 
<td data-title="'Client'" filter="{ 'client': 'text' }">
        {{ user.client.middlename }}
    </td> 
Community
  • 1
  • 1

1 Answers1

0
<td data-title="'Client'" filter="{ 'client.fullname': 'text' }">
        {{ user.client.fullname }}
    </td> 
<td data-title="'Client'" filter="{ 'client.lastname': 'text' }">
        {{ user.client.lastname }}
    </td> 
<td data-title="'Client'" filter="{ 'client.middlename': 'text' }">
        {{ user.client.middlename }}
</td> 
Issam Zoli
  • 2,724
  • 1
  • 21
  • 35
  • Hi,Ofcourse I have tried that but then filter doesn't work at all.I have created a plunker here http://plnkr.co/edit/dO5jeYMolNV3u7blDrcz?p=catalogue – anoop srivastava May 23 '14 at 08:51