Money formatting directive in Angular

前端 未结 3 1479
孤独总比滥情好
孤独总比滥情好 2020-12-29 11:09

I need a directive for filtering a field for currency, so a user just needs to type and the decimal is implied.

Needs:

  1. Format decimal field as user typ
3条回答
  •  伪装坚强ぢ
    2020-12-29 12:01

    Angular Numeric

    Angular Numeric is a sophisticated directive that implements a complete numeric input field.

    Very simple to use - yet powerful.

    
    

    There are checks on min and max values. When the value falls below the minumum the value is set to the minumum value. When the value exceeds the maxiumum, the value is set to the maximum.

    Formatting is done on the blur event; thousand separator and decimal are based on the current Angular locale.

    The number of decimals can be set.

    https://www.npmjs.com/package/angular-numeric-directive

提交回复
热议问题