This directive will accept an optional input parameter: decimalPrecision.
The parameter decimalPrecision is a number. Default is 0, which will not take effect. If the value is a number other than 0, then it must be a positive integer. Otherwise, if negative, assign a value of 0; if not integer, assign its floor integer.
The parameter decimalPrecision will take effect only when decimal is true.
If the number of digits equals the decimalPrecision, then prevent typing/pasting/dropping.
Propose:
This directive will accept an optional input parameter:
decimalPrecision
.decimalPrecision
is anumber
. Default is0
, which will not take effect. If the value is a number other than 0, then it must be a positive integer. Otherwise, if negative, assign a value of 0; if not integer, assign its floor integer.decimalPrecision
will take effect only whendecimal
istrue
.decimalPrecision
, then prevent typing/pasting/dropping.