title: Javascript code for currency filter in AngularJS not working with custom symbols
body: <p>I have the following custom filter which either returns a "Not Available" string if the input is equal to zero or returns the input after applying a custom currency symbol on it (In this case, the rupee symbol). Here is the code:</p>
  
  <pre><code>(function(){
  
     angular.module('TestApp')
     .filter('availability', function($filter){
          return function(input){
              if(input == null){
                return "Not Available";
              }
              var test = $filter('currency')(input,"&amp;#8377",0);
              return test;
          }
     });
  
  })();
  </code></pre>
  
  <p>However, the desired result is not achieved. Instead the raw string for the currency symbol is being printed in front of the input. I have used the same currency symbol in my HTML code as shown below and it works:</p>
  
  <pre><code>{{value.Charge | currency:"&amp;#8377;":0}}
  </code></pre>
  
  <p>Am I missing something obvious? If not, is there a workaround to this?</p>