@mineminemine/currency-mask-ionic
v0.0.11
Published
Ionic currency mask for input
Downloads
5
Maintainers
Readme
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>