0.0.13 • Published 3 years ago

@thiagoprz/ionic-currency-mask v0.0.13

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Ionic Currency Mask Directive

Install

npm i @thiagoprz/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 "@thiagoprz/ionic-currency-mask";

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

my-component.html

<ion-content>
    ...
    <!-- Sample for BRL currency R$ 1.000,00  -->
    <ion-item>
      <ion-label>Price Attribute</ion-label>
      <ion-input class="ion-text-right" [(ngModel)]="price" maxlength="15" type="tel" placeholder="R$ 0,00" currencyMask decimal="," thousand="."></ion-input>
    </ion-item>
    ...
    <!-- Sample for USD currency US$ 1,000.00  -->
    <ion-item>
      <ion-label>Price Attribute</ion-label>
      <ion-input class="ion-text-right" [(ngModel)]="price" maxlength="15" type="tel" placeholder="$0.00" currencyMask decimal="." thousand=","></ion-input>
    </ion-item>
    ...
</ion-content>
0.0.12

3 years ago

0.0.13

3 years ago

0.0.11

3 years ago

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago