{"id":13729546,"url":"https://github.com/armanfatahi/ngx-qr","last_synced_at":"2025-05-08T02:30:29.343Z","repository":{"id":36610820,"uuid":"231360762","full_name":"armanfatahi/ngx-qr","owner":"armanfatahi","description":"Angular 8 qr scanner","archived":false,"fork":false,"pushed_at":"2023-01-07T13:21:08.000Z","size":1579,"stargazers_count":1,"open_issues_count":27,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-13T00:11:46.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armanfatahi.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":"2020-01-02T10:40:56.000Z","updated_at":"2021-05-28T10:51:51.000Z","dependencies_parsed_at":"2023-01-17T03:06:06.343Z","dependency_job_id":null,"html_url":"https://github.com/armanfatahi/ngx-qr","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanfatahi%2Fngx-qr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanfatahi%2Fngx-qr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanfatahi%2Fngx-qr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armanfatahi%2Fngx-qr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armanfatahi","download_url":"https://codeload.github.com/armanfatahi/ngx-qr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224689032,"owners_count":17353314,"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":[],"created_at":"2024-08-03T02:01:02.051Z","updated_at":"2024-11-14T20:30:57.473Z","avatar_url":"https://github.com/armanfatahi.png","language":"TypeScript","funding_links":[],"categories":["UI Components"],"sub_categories":["QR Code"],"readme":"# ngx-qr\nQrScanner will scan for a QRCode from your Web-cam and return its string.\n\n### usage\n```bash\n$ npm install --save ngx-qr\n```\n\n```typescript\n// app.module.ts\nimport { NgQrScannerModule } from 'ngx-qr';\n@NgModule({\n  // ...\n  imports: [\n    // ...\n    NgQrScannerModule,\n  ],\n  // ...\n})\nexport class AppModule { }\n```\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner (capturedQr)=\"capturedQr($event)\"\u003e\u003c/qr-scanner\u003e\n\n```\n\n```typescript\n// app.component.ts\nimport { Component, OnInit, AfterViewInit } from '@angular/core';\n@Component({\n    selector: 'app-root',\n    templateUrl: './app.component.html',\n    styleUrls: ['./app.component.scss'],\n})\nexport class AppComponent implements OnInit, AfterViewInit {\n\n    ngOnInit() {\n    }\n\n    capturedQr(result: string) {\n        console.log(result);\n    }\n\n    ngAfterViewInit() {\n    }\n}\n\n```\n\n#### Translation\n\nProvide the following texts:\n\n```ts\nexport interface QrScannerTexts {\n  NotSupportedHTML: string;\n  DeviceDefaultPrefix: string;\n  StopCameraText: string;\n  OpenButtonText: string;\n}\n```\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner \n    (capturedQr)=\"capturedQr($event)\"\n    [texts]=\"{\n        NotSupportedHTML: `You are using an \u003cstrong\u003eoutdated\u003c/strong\u003e browser.`,\n        DeviceDefaultPrefix: `Camera`,\n        StopCameraText: `Stop Camera`,\n        OpenButtonText: `Open QR Code File...` }\"\u003e\n\u003c/qr-scanner\u003e\n\n```\n\n#### Styling\n\nButton styles can be changed:\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner \n    (capturedQr)=\"capturedQr($event)\"\n    [buttonClass]=\"'ngClassForButtons'\"\u003e\n\u003c/qr-scanner\u003e\n\n```\n#### Upload QR Feature\n\nYou can let users upload a QR code using:\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner \n    (capturedQr)=\"capturedQr($event)\"\n    [allowUpload]=\"true\"\u003e\n\u003c/qr-scanner\u003e\n\n```\nIf you only need upload QR feature, you can use the following:\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner \n    (capturedQr)=\"capturedQr($event)\"\n    [allowUpload]=\"true\"\n    [disableScan]=\"true\"\u003e\n\u003c/qr-scanner\u003e\n\n```\n\n#### Error handling\n\nErrors are shown on the error output:\n\n```html\n\u003c!-- app.component.html --\u003e\n\u003cqr-scanner \n    (error)=\"onError($event)\"\n    (capturedQr)=\"capturedQr($event)\"\u003e\n\u003c/qr-scanner\u003e\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanfatahi%2Fngx-qr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmanfatahi%2Fngx-qr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmanfatahi%2Fngx-qr/lists"}