Socket
Socket
Sign inDemoInstall

angular-imask

Package Overview
Dependencies
5
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    angular-imask

Angular IMask Plugin


Version published
Weekly downloads
47K
increased by4.67%
Maintainers
1
Install size
2.84 MB
Created
Weekly downloads
 

Readme

Source

Angular IMask Plugin

angular-imask

npm version License: MIT

Install

npm install angular-imask

Setup

import { IMaskModule } from 'angular-imask';

@NgModule({
  imports: [
    IMaskModule,
    ...
  ],
  ...
}) {...}

Usage

<!-- directive -->
<input
  [imask]="{mask: '+{7}(000)000-00-00'}"  <!--see more mask props in a guide-->
  [unmask]="true"  <!--true|false|'typed'-->
  (accept)="onAccept"  <!--depending on prop above first argument is
    `value` if `unmask=false`,
    `unmaskedValue` if `unmask=true`,
    `typedValue` if `unmask='typed'`-->
  (complete)="onComplete"
  <!-- OPTIONAL: provide custom element getter -->
  [imaskElement]="(elementRef, directiveRef) => maskElement" <!-- default = elementRef.nativeElement -->
/>

<!-- pipe -->
<p>{{ value | imask:mask }}</p>

More options see in a guide.

Development

As to make changes to this package follow the steps:

  1. Build imask
  npm run make
  1. Go to angular-imask directory
  cd packages/angular-imask
  1. Launch dev command
  npm run dev
  1. (Optional) Launch example app
  npm run example

Keywords

FAQs

Last updated on 09 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc