Charan Cherry Charan Cherry - 4 months ago 7
HTML Question

unable to insert html code inside filter?

Angualr JS code:

$scope.rupee = $filter('currency')($scope.dols * 67.33, 'INR', 3);


I am trying to insert html code inside this filter. That is instead of 'INR', I wish to get ₹ symbol. Please help me to solve this. And the problem is not getting the ₹ through filter. Instead of 'INR', I want to use &#8377 but it's not rendering as I expected.

html code:

<div>{{rupee}}</div>

Answer

Your solution may be here

Your statement is modified to

$scope.rupee = $filter('currency')($scope.dols * 67.33, '\u20B9', 3);
Comments