Hi Yogesh,

You are aware that String.include() is ES6, and is not available by default 
in most browsers?
Also, a filter like this is also available as filter.filter, just pass an 
object to it in stead of a string.

But if you want to make it yourself, you can try something like this:
    angular
        .module('filterModule', [])
        .filter("partyFilter", function() {


        return function(partyList, query) {
            if (!angular.isArray(partList)) {
                return partyList;
            }
            query = query.toLowerCase();
            return partyList.filter(includes);


            function includes(item,query) {
                return item.fullName.toLowerCase().indexOf(query)>-1
            }
        };
    });


Regards
Sander


-- 
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 angular+unsubscr...@googlegroups.com.
To post to this group, send email to angular@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to