- Yes, this is common knowledge. This
value
can be interpreted asinput
that goes from the right side if the angularjs expression ({{p.category |...
) - As mentioned in the first question, the
value
is the input to the filter. Every additional value seperated by the:
will be added to the filter callback as parameter. - This is a problem you'r always facing, when developing with libraries. APIs and interfaces do change. I guess they won't change something there in the future but you never know. That's why migration is required sometimes.
{{p.category | customFilter:secondParam:thirdParam: .... }}
angular.module("exampleApp")
.filter("labelCase", function() {
return function (input, someSecondParam, someThirdParam) {
if (angular.isString(input)) {
....
}
};
});