@for (item of items; track item.id) {
{{ item.name }}
}
`,
styles: [`
.qr-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: 20px;
}
.qr-item {
text-align: center;
}
`]
})
export class QRGridComponent {
items = [
{ id: 1, name: 'Product A', url: 'https://shop.com/a' },
{ id: 2, name: 'Product B', url: 'https://shop.com/b' },
{ id: 3, name: 'Product C', url: 'https://shop.com/c' }
]
}
```
--------------------------------
### QRCodeComponent API
Source: https://github.com/cordobo/angularx-qrcode/blob/main/_autodocs/MANIFEST.txt
This section details the complete API for the QRCodeComponent, including all input properties, output events, and public methods. It serves as a comprehensive guide for integrating and using the QR code generation component in Angular applications.
```APIDOC
## QRCodeComponent API
### Description
Provides a comprehensive API for generating QR codes within an Angular application. It exposes numerous input properties for customization, an output event for tracking URL changes, and public methods for programmatic control.
### Input Properties
- **data** (string) - Required - The data to be encoded in the QR code.
- **version** (number | '1' | '2' | ... | '40') - Optional - The QR code version (1-40).
- **errorCorrectionLevel** ('L' | 'M' | 'Q' | 'H') - Optional - The error correction level.
- **elementType** ('canvas' | 'svg' | 'url') - Optional - The rendering element type.
- **scale** (number) - Optional - The scale factor for the QR code.
- **width** (number) - Optional - The desired width of the QR code.
- **margin** (number) - Optional - The margin around the QR code.
- **colorDark** (string) - Optional - The color of the dark modules (e.g., '#000000').
- **colorLight** (string) - Optional - The color of the light modules (e.g., '#ffffff').
- **cssClass** (string) - Optional - CSS class to apply to the QR code element.
- **imageSrc** (string) - Optional - URL of an image to overlay on the QR code.
- **imageWidth** (number) - Optional - Width of the overlay image.
- **imageHeight** (number) - Optional - Height of the overlay image.
- **alt** (string) - Optional - Alt text for accessibility.
- **ariaLabel** (string) - Optional - ARIA label for accessibility.
- **title** (string) - Optional - Title attribute for accessibility.
- **allowEmptyString** (boolean) - Optional - Allows empty string as valid data.
- **qrdata** (string) - Alias for 'data'.
- **includeMargin** (boolean) - Optional - Whether to include the margin.
- **includeImage** (boolean) - Optional - Whether to include the overlay image.
### Output Events
- **qrCodeURL** (EventEmitter