2.0.0 • Published 1 year ago
@linch90/digit-only-directive v2.0.0
DigitOnlyDirective
A angular directive to allow digit only input.
Module
import { DigitOnlyDirectiveModule } from "@linch90/digit-only-directive";
Example
<input
type="text"
class="form-control"
id="digitOnlyInput"
digitOnly
[decimal]="true"
/>
API
Selector
inputdigitOnly,textareadigitOnly
Name | Description |
---|---|
decimal | default: false , if support decimal |
decimalSeparator | '.' , the separator of decimal |
min | -Infinity , the min value that allowed |
max | Infinity , the max value that allowed |
pattern | string \| RegExp \| undefined , the digit pattern that allowed |