@mineminemine/currency-mask-ionic
TypeScript icon, indicating that this package has built-in type declarations

0.0.11 • Public • Published

Ionic Currency Mask Directive

This library currently supports only the following formatting for input: 0.000,00 (decimal ","; thousand ".").

Install

npm i @mineminemine/ionic-currency-mask

Usage

Import into your component's module and add the "currencyMask" property to ion-input:

my-component.module.ts

import {IonicCurrencyMaskModule} from "@mineminemine/ionic-currency-mask";

@NgModule({
    ...
    imports: [
        ...,
        IonicCurrencyMaskModule
    ],
    ...
})
export class MyComponent {}

my-component.html

<ion-content>
    ...
    <ion-item>
      <ion-label>Price Attribute</ion-label>
      <ion-input class="ion-text-right" [(ngModel)]="advert.price_kg" maxlength="255" type="tel" placeholder="R$ 0,00" currencyMask></ion-input>
    </ion-item>
    ...
</ion-content>

Package Sidebar

Install

npm i @mineminemine/currency-mask-ionic

Weekly Downloads

6

Version

0.0.11

License

MIT

Unpacked Size

29 kB

Total Files

15

Last publish

Collaborators

  • mineminemine