We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f7bbfc4 commit e73af37Copy full SHA for e73af37
app/scripts/app.js
@@ -37,13 +37,22 @@ angular.module('abstackVarLib', ['zeroclipboard'])
37
};
38
})
39
.filter('keywords', function(){
40
+ function compare(origin, target){
41
+ origin = origin.join('');
42
+ for(var i = 0;i<target.length;i++){
43
+ if(origin.indexOf(target[i]) != -1)
44
+ return true;
45
+ }
46
+ return false;
47
48
+
49
return function(input, type){
50
if(!type)
51
return input;
52
53
var temp = [];
54
for(var i = 0;i<input.length;i++){
- if(input[i].tags.join().indexOf(type) != -1)
55
+ if(compare(input[i].tags, type.split(' ')))
56
temp.push(input[i]);
57
}
58
0 commit comments