JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app="euro">
<p>
{{ -2 | euro }}
</p>
</div>
JavaScript
var app = angular.module("euro", []);
app.filter("euro", function(){
return function (number) {
if (isNaN(number)){
return "WRONG NUMBER!";
}
if(number<0){
number=number*-1;
}
return "€ " + parseInt (number);
};
});