I had to make my own filter, instead of using the normal angular filter, because of a particular situation:
I have a nested object on four levels: Programs - Days - Halls - Presentations.
Each hall is an accordion containing the relative presentations.
Anyway the filter i made is working properly.
Except one thing: right now the filter is letter case.
So if a presentation name is 'Automation' and the user type 'automation' it won't show up in the results.
Right now is looking for a simple indexOf of the string entered by the user inside the presentation name:
angular.forEach(value_halls.presentations, function(presentation_info, key_presentation)
var name = presentation.name;
var index = name.indexOf($rootScope.filter.name);
if (index > -1 )
You can use
toLowerCase on both strings:
var index = name.toLowerCase().indexOf($rootScope.filter.name.toLowerCase());