AngularJS number input formatted view

后端 未结 5 1907
一整个雨季
一整个雨季 2020-12-05 17:18

I want to use a formatted number input to show thousand seperator dots to user when he types big numbers. Here is the directive code that I used: http://jsfiddle.net/LCZfd/3

5条回答
  •  离开以前
    2020-12-05 18:18

    You cannot use values with , because type=number only takes numbers, adding a comma makes it a string.

    See http://jsfiddle.net/LCZfd/5

    You're better off making your own controls if you want commas. One with a true value (the number) and a display value (the string).

提交回复
热议问题