Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/armanfatahi/ngx-qr
Angular 8 qr scanner
https://github.com/armanfatahi/ngx-qr
Last synced: 3 months ago
JSON representation
Angular 8 qr scanner
- Host: GitHub
- URL: https://github.com/armanfatahi/ngx-qr
- Owner: armanfatahi
- License: gpl-3.0
- Created: 2020-01-02T10:40:56.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T13:21:08.000Z (almost 2 years ago)
- Last Synced: 2024-07-11T16:07:45.969Z (4 months ago)
- Language: TypeScript
- Size: 1.51 MB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-angular-components - armanfatahi/ngx-qr - Angular 8 qr scanner (UI Components / QR Code)
README
# ngx-qr
QrScanner will scan for a QRCode from your Web-cam and return its string.### usage
```bash
$ npm install --save ngx-qr
``````typescript
// app.module.ts
import { NgQrScannerModule } from 'ngx-qr';
@NgModule({
// ...
imports: [
// ...
NgQrScannerModule,
],
// ...
})
export class AppModule { }
``````html
```
```typescript
// app.component.ts
import { Component, OnInit, AfterViewInit } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.scss'],
})
export class AppComponent implements OnInit, AfterViewInit {ngOnInit() {
}capturedQr(result: string) {
console.log(result);
}ngAfterViewInit() {
}
}```
#### Translation
Provide the following texts:
```ts
export interface QrScannerTexts {
NotSupportedHTML: string;
DeviceDefaultPrefix: string;
StopCameraText: string;
OpenButtonText: string;
}
``````html
outdated browser.`,
DeviceDefaultPrefix: `Camera`,
StopCameraText: `Stop Camera`,
OpenButtonText: `Open QR Code File...` }">```
#### Styling
Button styles can be changed:
```html
```
#### Upload QR FeatureYou can let users upload a QR code using:
```html
```
If you only need upload QR feature, you can use the following:```html
```
#### Error handling
Errors are shown on the error output:
```html
```