Currency format in AngularJS

时间:2016-12-14 11:18:23

标签: javascript angularjs

I want to show the number value as currency. The number value comes from the database through MVC controller to cshtml input object with ng-model. I can show the value as currency but according to my scenario i have to change the value and save it using the same input value. How can I do that? Without the currency filter I can change the value and save it. With currency filter I cannot change the input value to save it. The filter prevents me to change the ng-model value. I can change the ng-model value without currency filter.

Can anyone help me?

The filtered and non-filtered input value picture is in the attachment and the input cshtml code is:

<input type="text" id="GiroFeb" autocomplete="off"
       ng-model="moneyvalue | currency:'&#x20BA;'"
       ng-change="notifyChange(money.AccountNumber)" />

enter image description here

0 个答案:

没有答案