Reputation: 1
Removing AngularJS currency filter "," and replace with a space my data base doesnt allow special characters I get this R68,993.85 I want this R68 993.85
Upvotes: 0
Views: 112
Reputation: 3802
your requirement is little weird .if you are using currency filter thern , should be there. but still if you have limitation that you cant change you database structure. then you can try this.
var str = "R12,234.60"; var res = str.replace(","," ");
Upvotes: 1
Reputation: 380
You don't need to replace it. currency
is a filter, it just changes how the given value look. It won't modify your model value so you won't save the formatted number in your database. If you do, then you should check how you use this filter.
Upvotes: 1