{"id":15572988,"url":"https://github.com/eisberg-labs/ngx-barcode-scanner","last_synced_at":"2025-03-29T23:32:26.051Z","repository":{"id":37112723,"uuid":"247327829","full_name":"eisberg-labs/ngx-barcode-scanner","owner":"eisberg-labs","description":"Angular Barcode scanner using Quagga","archived":false,"fork":false,"pushed_at":"2024-05-22T22:55:39.000Z","size":1589,"stargazers_count":6,"open_issues_count":9,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T23:46:34.745Z","etag":null,"topics":["angular","barcode","qrcode"],"latest_commit_sha":null,"homepage":"https://ngx-barcode-scanner.amarjanica.com/","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/eisberg-labs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"amarjanica","patreon":"amarjanica"}},"created_at":"2020-03-14T18:04:43.000Z","updated_at":"2024-05-29T21:31:42.463Z","dependencies_parsed_at":"2023-10-12T01:13:50.285Z","dependency_job_id":"e2aa7897-cc7e-49ae-bff3-d91110361a0a","html_url":"https://github.com/eisberg-labs/ngx-barcode-scanner","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":"0.17647058823529416","last_synced_commit":"cbe8b5f89b8875345be2405817b10ee9a404586c"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eisberg-labs%2Fngx-barcode-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eisberg-labs%2Fngx-barcode-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eisberg-labs%2Fngx-barcode-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eisberg-labs%2Fngx-barcode-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eisberg-labs","download_url":"https://codeload.github.com/eisberg-labs/ngx-barcode-scanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246258866,"owners_count":20748573,"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":["angular","barcode","qrcode"],"created_at":"2024-10-02T18:09:36.390Z","updated_at":"2025-03-29T23:32:21.039Z","avatar_url":"https://github.com/eisberg-labs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/amarjanica","https://patreon.com/amarjanica","https://www.patreon.com/amarjanica"],"categories":[],"sub_categories":[],"readme":"[![Continuous Integration](https://github.com/eisberg-labs/ngx-barcode-scanner/actions/workflows/ci.yml/badge.svg)](https://github.com/eisberg-labs/ngx-barcode-scanner/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/eisberg-labs/ngx-barcode-scanner/branch/master/graph/badge.svg?token=GQCS6ZEVU3)](https://codecov.io/gh/eisberg-labs/ngx-barcode-scanner)\n[![npm downloads](https://img.shields.io/npm/dm/@eisberg-labs/ngx-barcode-scanner.svg)](https://www.npmjs.com/package/@eisberg-labs/ngx-barcode-scanner)\n[![npm latest package](https://img.shields.io/npm/v/@eisberg-labs/ngx-barcode-scanner/latest.svg)](https://www.npmjs.com/package/@eisberg-labs/ngx-barcode-scanner)\n[![Average time to resolve an issue](https://isitmaintained.com/badge/resolution/eisberg-labs/ngx-barcode-scanner.svg)](https://isitmaintained.com/project/eisberg-labs/ngx-barcode-scanner 'Average time to resolve an issue')\n[![Follow me](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge\u0026logo=linkedin\u0026logoColor=white)](https://www.linkedin.com/in/anamarjanica/)\n\n## [ngx-barcode-scanner](https://github.com/eisberg-labs/ngx-barcode-scanner)\n\n\u003e Angular 9+ Barcode scanner using [Quagga](https://github.com/ericblade/quagga2).\n\nIf you 👍 or use this project, consider giving it a ★, thanks! 🙌  \n\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Demo](#demo)\n- [API](#api)\n- [Changelog](#changelog)\n- [Code of Conduct](#code-of-conduct)\n- [Contributing](#contributing)\n- [Sponsors](#sponsors)\n- [Contact](#contact)\n- [License](#license)\n\n\n## Installation\n\n```sh\n$ npm install @eisberg-labs/ngx-barcode-scanner --save\n```\n\n## Usage\nFirst import to your module:\n```typescript\n @NgModule({\n   declarations: [\n     AppComponent\n   ],\n   imports: [\n     NgxBarcodeScannerModule\n   ],\n   providers: [],\n   bootstrap: [AppComponent]\n })\n export class AppModule { }\n\n```\nAnd use in your component html\n\n```html\n\u003cngx-barcode-scanner [(value)]=\"value\" [codes]=\"['code_128', 'ean', 'upc', 'upc_e', 'ean_8']\" [errorThreshold]=\"0.1\" (exception)=\"onError($event)\"\u003e\u003c/ngx-barcode-scanner\u003e\n```\n\n### Start/stop scanning\n\n**ngx-barcode-scanner** ties the scanning service `start` `onInit` and `stop` is `onDestroy`. You may want to control when `start` and `stop` scanner occurs with the help of `NgxBarcodeScannerService`:\n\n```typescript\nimport {NgxBarcodeScannerService} from \"@eisberg-labs/ngx-barcode-scanner\";\n\n@Component({\n  selector: 'app-root',\n  template: `\u003cngx-barcode-scanner [(value)]=\"value\"\n                     [codes]=\"['code_128', 'ean', 'upc', 'upc_e', 'ean_8']\" [errorThreshold]=\"0.1\" (exception)=\"onError($event)\"\u003e\u003c/ngx-barcode-scanner\u003e`\n    \u003cdiv style=\"display: flex; justify-content: space-between; margin: 5% auto\"\u003e\n        \u003cbutton (click)=\"onStartButtonPress()\"\u003eStart\u003c/button\u003e\n        \u003cbutton (click)=\"onStopButtonPress()\"\u003eStop\u003c/button\u003e\n    \u003c/div\u003e\n})\n\nconstructor(\n   service: NgxBarcodeScannerService\n) {\n  //Do constructor things...\n}\n\nonStartButtonPress() {\n  this.service.start(this.quaggaConfig, 0.1)\n}\n\nonValueChanges(detectedValue: string) {\n  console.log(\"Found this: \" + detectedValue)\n}\n\nonStopButtonPress() {\n  this.service.stop()\n}\n```\n\n## Demo\n\n[View Demo and Documentation](https://ngx-barcode-scanner.amarjanica.com)\n\n## Api\n---\n### Properties\n\n@Input() | Type | Required|Default|Description\n---------|------|---------|-------|-------\ncodes | string, string[]| required | ['code_128', 'ean', 'ean_8', 'code_39', 'code_39_vin', 'codabar', 'upc', 'upc_e', 'i2of5', '2of5', 'code_93'] | Type of barcode algorithm to detect. Supported are *code_128*,*ean*,*ean_8*,*code_39*,*code_39_vin*,*codabar*,*upc*,*upc_e*,*i2of5*,*2of5*,*code_93*. Be aware that more codes you define, more possible false positives, and it might take longer to detect a barcode.\nconfig | QuaggaJSConfigObject | optional | undefined | Optional [quagga](https://github.com/ericblade/quagga2/blob/253aa01999d0e4a912ca33b119c91fd15cd0294b/type-definitions/quagga.d.ts) config object (Define camera device id, media constraints ...).\nerrorThreshold | number | optional | 0.1 | Defines threshold of scan detect accuracy. Smaller the value, smaller chance of false positives.\nvalue | string | required | undefined | Scan result outputs to value.\n\n### Events\n\n@Output() | Type | EventType | Required | Description\n----------|------|-----------|----------|------------\nvalueChange | EventEmitter | string | required | Scan result updates\nexception | EventEmitter | any | optional | Error events\n\n\n\n## Changelog\n\nAll notable changes to this project will be documented in [this file](./CHANGELOG.md).\nSee [Conventional Commits](https://conventionalcommits.org) for commit guidelines.\n\n## Code of Conduct\n\nI follow the [Rust Code of Conduct](http://www.rust-lang.org/conduct.html).\n\n## Contributing\n\nEveryone is welcome to contribute. You can read more about [contributing here](./CONTRIBUTING.md).\n\n## Sponsors\n\nIf you find this project useful, give it a star. You could also consider supporting us through the following platforms:\n- [Become a GitHub Sponsor](https://github.com/sponsors/amarjanica)\n- [Support me on Patreon](https://www.patreon.com/amarjanica)\n\nAs this project grows, I will showcase sponsors' logos and links in this section. Thank you for your support!\n\n## Contact\n\nFeel free to reach out to me on [LinkedIn](https://www.linkedin.com/in/anamarjanica/).\n\n## License\nMIT © [Eisberg Labs](http://www.eisberg-labs.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feisberg-labs%2Fngx-barcode-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feisberg-labs%2Fngx-barcode-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feisberg-labs%2Fngx-barcode-scanner/lists"}