0

I need to filter results by check box weather ng-repeat contains simillar text values. Here is code snippet http://jsfiddle.net/65Pyj/

$.inArray(names.slotschedule, $scope.colourIncludes) 

is there any function similar to contains of array

$scope.colourFilter = function(fruit) {
if ($scope.colourIncludes.length > 0) {
    if ($.inArray(fruit.colour, $scope.colourIncludes) < 0)
        return;
}

In this i need to filter by array contains text which i pass in ng-click example if i pass 're' in ng-click include parameter red color should be filtered.

PRK449
  • 113
  • 3
  • 11
  • 1
    First, never user jquery with angular.. angular already has a jqLite version. You should filter this using the filter service: http://stackoverflow.com/questions/17945861/how-do-i-filter-an-array-with-angularjs-and-use-a-property-of-the-filtered-objec – Fals Mar 16 '15 at 13:43
  • thanks for suggestion @Fals here i need to check with sequence of letter contains or not.but not complete word.any suggestions for check box filtration. – PRK449 Mar 16 '15 at 13:51

0 Answers0