var myAppControllers = angular.module('myAppControllers', []);
myAppControllers.controller('ToolsCtrl', ['$scope', '$http', '$routeParams', '$cookies', '$location',
function ($scope, $http, $routeParams, $cookies, $location) {
$scope.tag = function(messageTags) {
console.log(messageTags);
if ($scope.tags) {
return $scope.tags.replace(/\s*,\s*/g, ',').split(',').every(function(tag) {
return messageTags.tags.some(function(objTag){
return objTag.indexOf(tag) !== -1;
});
});
}
else {
return true;
}
};
...
<div ng-controller="ToolsCtrl" class="voffset2">
<div class="input-group input-group-lg">
<span class="input-group-addon">?</span><input type="text" ng-model="tags" name="search" class="form-control">
</div>
<div ng-repeat="tool in filtered = (tools | filter:tag)" class="span4 tags-wrapper">
<span ng-repeat="tagWithMeta in tool.tagsWithMeta" class="tag-box">{{tagWithMeta.tag}}</span>
</div>
</div>
The error seems to be here: return messageTags.tags.some(function(objTag){
I don't quite remember if it ever worked since I really integrated my app into wordpress. Another posts mentions s.th. about a jquery no conflcit mode: TypeError: 'undefined' is not a function (evaluating '$(document)')
I don't think a plunkr will be helpful, but here is a wordpress demo site: http://360-disrupt.de/test-2/