Is it possible to achieve something similar using Angular?
Unfortunately, it seems that achieving this is not straightforward, as Angular doesn't handle certain tags or elements properly.
{{ 10000 | currency:"<span>$</span>" }}
Even separating decimal numbers proves to be challenging.
The desired output would look like this:
1 000 000<span class="dec">,00</span><span class="cur">€</span>
It appears that achieving this through filter settings alone may not be possible..?
I could potentially customize Angular's currency filter and the formatNumber
function, but it may still treat it as text rather than a span element.
// edit There seems to be a way to accomplish this: http://example.com/updated-sample
<p ng-bind-html-unsafe="10000 | currency:'<span>$</span>'"></p>
However, dealing with decimals remains an unresolved issue.