changhuixu / ngx-digit-only

An Angular directive to only allow [0-9] in the input box when typing, pasting or drag/dropping.
https://changhuixu.github.io/ngx-digit-only/
MIT License
161 stars 70 forks source link

add a new input parameter to control the decimal precision #29

Closed changhuixu closed 4 years ago

changhuixu commented 4 years ago

Propose:

This directive will accept an optional input parameter: decimalPrecision.

changhuixu commented 4 years ago

in the end, this is done by checking the pattern attribute. See demo page for examples.