ngx-currency-input-mask
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

NgxCurrencyMask

This library was generated with [Angular CLI] version 8.2.14.

This is useful for currency input masking using the following properties Precision Decimal separator Thousand separator

Installation

install the module

npm i ngx-currency-input-mask

Usage

import the NgxCurrencyMaskModule into app.module.ts

import { NgxCurrencyMaskModule } from 'ngx-currency-input-mask';
<input type="text" ngxMaskCurrencyMask   [(ngModel)]="currency" [precision]="2" decimalSeparator="," thousandSeparator="."/>
 
{{currency}}
 

Input values : -

  • precision (number) : decimal places , you can pass 1,2 etc.

    • if you are passing precision 1 ,value will be 2.0
    • if you are passing precision 2 ,value will be 2.00
  • thousandSeparator (string) : it should be either ' ' or ',' or '.'

  • decimalSeparator (string) : it should be either '.' or ','

    • if you are passing decimalSeparator as '.' ,possible values of thousandSeparator are ',' and ' '
    • if you are passing decimalSeparator as ',' ,possible values of thousandSeparator are '.' , ' ' and ','
  • please note that below combination will not work for this module.

    • decimalSeparator = '.' and thousandSeparator = '.'

Package Sidebar

Install

npm i ngx-currency-input-mask

Weekly Downloads

2

Version

0.0.4

License

none

Unpacked Size

197 kB

Total Files

26

Last publish

Collaborators

  • kpneethooz93