I have an directive for repeat my products and it's work fine. but i want add some filter add to it.
Here is my directive code:
app.directive('product', ['$compile', function($compile) {
return {
restrict: 'E',
scope: {
products: '='
},
link: function(scope, element, attrs) {
var template =
'<ul>' +
'<li data-ng-repeat="product in products>' +
'{{product.productName}}' +
'</li>' +
'</ul>';
// Render the template.
element.html('').append($compile(template)(scope));
}
}
}]);
When i add directive to my html, show me wired error!
<product products="products | filter:{mainCategoryID : category.categoryID}:true"></product>
error in console:
How i can fix this issue?

weird error!?