The following HTML, Javascript and JSON render correctly, but the filter does not work at all. What are we doing wrong?
As Narretz already mentioned, Angular filters cannot handle an object of objects as input. But you can write your own simple filter converting the object of objects into an array of objects. You can use the angular filters behind your array filter by chaining.
<ul data-ng-repeat="catalog in catalogs | array | filter:catalog_filter">
Your array filter could be as simple as this:
app.filter('array', function() {
return function(items) {
var filtered = [];
angular.forEach(items, function(item) {
filtered.push(item);
});
return filtered;
};
});