I have been attempting to utilize the "ng-bind-html
" directive within the "title
" tag in order to display a currency value with its corresponding currency symbol, but unfortunately the expression is not being evaluated.
This is the approach I'm taking:
$scope.salary = 10000;
$scope.currencySymbol = '€';//€
<div title="{{ng-bind-html= 'salary |currency:(currencySymbol+' '): 0'}}"> //This is not working
<span ng-bind-html="salary |currency:(currencySymbol+' '): 0"> </span> //working fine and renders €10000
It works perfectly when displayed within a <span>
tag, however I would like to also present the same formatted value within a <title>
tag.
As a result, I'm left wondering how I can implement the use of the "ng-bind-html
" directive within the "title
" tag to achieve the same output as seen in the <span>
tag?