For example i have such list (which i use with ng-repeat):
var myList = [
{id: 1, name: 'Peter Ollison', type: 'Driver', status: 'Working'},
{id: 2, name: 'Maya Nameson', type: 'Manager', status: 'Not'},
{id: 3, name: 'Iki Jonny', type: 'Driver', status: 'Paused'},
{id: 4, name: 'Nikolay Ivanov', type: 'Manager', status: 'Working'},
{id: 5, name: 'Nikolay Ivanov', type: 'Sales manager', status: 'Not'},
{id: 6, name: 'Scotty Deperson', type: 'Boss', status: 'Working'},
]
and i have filter arrays:
nameFilter: ['Peter Ollison', 'Nikolay Ivanov']
typeFilter: ['Manager', 'Driver']
statusFilter: ['Working']
how is it possible in filter function to combain all this filters? And to return only such items from the list, which are equal to filter arrays? BUT!!! I can have:
filter only by name, or only by type, or 2 fields, or all of them
how is it possible to filter my list?
for example if i filter by 3 filter arrays in one time i should get as result:
[{id: 1, name: 'Peter Ollison', type: 'Driver', status: 'Working'},
{id: 4, name: 'Nikolay Ivanov', type: 'Manager', status: 'Working'}]
now i can filter only by one value in controller, and i got stucked with multiple fields filters((