npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@pluritech/ion-currencymask

v1.0.4

Published

<p align="center"> <img src="./ion-currencymask.gif"> </p>

Downloads

8

Readme

Ionic CurrencyMask

Installation

To install ,ion-currencymask run:

$ npm install @pluritech/ion-currencymask --save

Consuming your library

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';

import { HomePage } from '../pages/home/home';

// Import the library
import { IonCurrencyMaskModule } from '@pluritech/ion-currencymask';

@NgModule({
  declarations: [
    HomePage
  ],
  imports: [
    BrowserModule,
    IonicModule,
    // Import the module
    IonCurrencyMaskModule
  ],
  providers: [],
  bootstrap: [IonicApp]
})
export class AppModule { }

Once your library is imported, you can use its components in your Ionic application: This exemple used on code of showed in demo above

<!-- You can now use your library component in home.html -->
<ion-content padding>
  <p>
    The demo of the ion-currency-mask working in Reactive Forms
  </p>
  <form [formGroup]="formTest" (ngSubmit)="onSubmit()" >
    <ion-list>
      <!--the selector ion-currency-mask already has an ion-item themselves-->
      <ion-currency-mask
        placeholder="Insira o valor aqui"
        label="Valor R$"
        formControlName="maskMoney">
      </ion-currency-mask>
      <ion-item>
        <p>{{formTest.value | json}}</p>
      </ion-item>
    </ion-list>
  </form>
</ion-content>

In controller page

// ... Hidden unnecessary code
export class HomePage {

  public formTest: FormGroup;

  constructor(public navCtrl: NavController, private formBuilder: FormBuilder) {
    this.formTest = formBuilder.group({
      maskMoney: ['', Validators.required]
    });
  }
  // ... Hidden unnecessary code
}

Parameters to selector ion-currency-mask

| Parameter | Type | Description | | ------------- |:-------------:| :-------------:| | placeholder | string | a value to placeholder of ion-input | | label | string | a value to ion-label | | typeLabel | string | a type to ion-label. Values: stacked - fixed - floating . More info: Ionic Doc - Label | | clearInput | boolean | true to add clearInput on ion-input. Default: false without clearInput . More info: Ionic Doc - Input | | lastChild | boolean | if the ion-currency-mask is the last of ion-list send true, Default: false | | disabled | boolean | true to disabled the input. Default: false |

To do?

Feel free to make your pull request, chip in to suggestion or report issues.

Thanks

We used the core code made by Marlos Irapuan inspired on http://jsbin.com/heqeduyi/1/edit?html,output and we maked improvement to separate into pieces of thousands. More info see: MaskMoney no Ionic 2

License

MIT © Lucas Correa