aztack / AngularJS-translation

Chinese translation of book AngularJS by Brad Green & Shyam Sesbadri
49 stars 15 forks source link

HowTo - define custom filters? #2

Open aztack opened 11 years ago

aztack commented 11 years ago

不知道内置的currency是否支持多国货币符号。不支持的话如何增加自定义filter以增加人民币符号¥?

aztack commented 11 years ago

I18n and L10n in AngularJS

aztack commented 11 years ago
angular.module('app'),[])
  .filter('RMB',function(input){
    return "¥" + input;
  });