Created
October 22, 2014 20:57
-
-
Save perrygovier/a944dd5be9ddefddc9df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('todoApp', [])... | |
.controller.... | |
.filter('searchFilter', function() { | |
return function(input, searchText) { | |
if(typeof searchText === 'undefined' || searchText == '')return input; | |
var output = []; | |
for(var i=0;i<input.length;i++){ | |
if(input[i].text.indexOf(searchText) > -1){ | |
output.push(input[i]); | |
} | |
} | |
return output; | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment