{"id":16443149,"url":"https://github.com/tiaguinho/ionic2-mask-directive","last_synced_at":"2025-03-21T05:30:30.334Z","repository":{"id":57276083,"uuid":"100425408","full_name":"tiaguinho/ionic2-mask-directive","owner":"tiaguinho","description":"directive to mask ion-input","archived":false,"fork":false,"pushed_at":"2018-01-31T07:13:48.000Z","size":40,"stargazers_count":23,"open_issues_count":7,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-17T21:42:36.844Z","etag":null,"topics":["angular4","directive","ion-input","ionic2","ionic3","mask","maskedinput"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tiaguinho.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-15T22:46:48.000Z","updated_at":"2022-12-28T12:35:08.000Z","dependencies_parsed_at":"2022-08-25T01:14:17.128Z","dependency_job_id":null,"html_url":"https://github.com/tiaguinho/ionic2-mask-directive","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaguinho%2Fionic2-mask-directive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaguinho%2Fionic2-mask-directive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaguinho%2Fionic2-mask-directive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tiaguinho%2Fionic2-mask-directive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tiaguinho","download_url":"https://codeload.github.com/tiaguinho/ionic2-mask-directive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244745619,"owners_count":20503042,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular4","directive","ion-input","ionic2","ionic3","mask","maskedinput"],"created_at":"2024-10-11T09:19:34.985Z","updated_at":"2025-03-21T05:30:30.014Z","avatar_url":"https://github.com/tiaguinho.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ionic2-mask-directive\n\nIonic2MaskDirective help you add mask on ion-input with just a directive and a very simple configuration.\n\n## Install\n\n```bash\nnpm i ionic2-mask-directive --save\n```\n\n## Import directive\n\nImport the directive into your app module.\n\n```typescript\nimport {Ionic2MaskDirective} from \"ionic2-mask-directive\";\n\n@NgModule({\n    declarations: [\n        MyApp,\n        Ionic2MaskDirective,\n        HomePage\n    ],\n    imports: [\n        BrowserModule,\n        IonicModule.forRoot(MyApp),\n        HttpModule\n    ],\n    bootstrap: [IonicApp],\n    entryComponents: [\n        MyApp,\n        HomePage\n    ],\n    providers: [\n        StatusBar,\n        SplashScreen,\n        {provide: ErrorHandler, useClass: IonicErrorHandler}        \n    ]\n})\nexport class AppModule {\n}\n```\n\n## Usage\n\nTo configure the mask, you can use 3 types of characters.\n\n* \\# - any type of char;\n* 9 - only numbers;\n* A - only letters;\n\n## Example\n\n```html\n\u003c!-- phone number in Brasil --\u003e\n\u003cion-input type=\"text\" mask=\"(99) 9999-9999\" placeholder=\"Phone\" [(ngModel)]=\"user.phone\" required\u003e\u003c/ion-input\u003e\n\u003c!-- brasilian document --\u003e\n\u003cion-input type=\"text\" mask=\"999.999.999-99\" placeholder=\"CPF\" [(ngModel)]=\"user.document\" required\u003e\u003c/ion-input\u003e\n```\n\n## Contribute\n\nAny pull-request and issue is more than welcome.\n\n## License\n\n[The MIT License (MIT) Copyright (c) 2013](http://opensource.org/licenses/MIT) \n ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaguinho%2Fionic2-mask-directive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftiaguinho%2Fionic2-mask-directive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftiaguinho%2Fionic2-mask-directive/lists"}