0.0.11 • Published 9 months ago
input-currency-mask v0.0.11
InputCurrencyMask
This library was generated with Angular CLI version 9.0.7.
Import
import in module file
import { InputCurrencyMaskModule } from 'input-currency-mask';
@NgModule({
imports: [
...
InputCurrencyMaskModule
]
});
Directive
<input type="text" currencyMask [currency]="'INR'" [lang]="'en-IN'" [decimal]="true" [pattern]="'.*'" >
lang => string -> 'en-IN' gives INDIAN separation (10,00,000) / 'en-US' gives (1,000,000). (optional)
decimal => boolean -> true to allow decimal values. (optional)
currency => adds Currency symbol. (optional)
pattern => string -> convert RegExp and checks. (optional)
Pipe
{{inputValue | currencyMask : 'en-IN' : 'INR' }}
firstParameter => string -> 'en-IN' gives INDIAN separation (10,00,000) / 'en-US' gives (1,000,000). (optional)
secondParameter => adds Currency symbol.(optional)
Default
lang = 'en-IN'
currency = undefined
Note
Regard less of input type it only accepts numeric input.