GridResponsiveCard
Directive for providing custom Angular templates for responsive card layout.
Use this directive to define how each row should render when the grid is in responsive/mobile mode. The template receives the row data and index.
<tbw-grid [rows]="employees"> <tbw-grid-responsive-card> <ng-template let-employee let-idx="index"> <div class="employee-card"> <img [src]="employee.avatar" alt=""> <div class="info"> <strong>{{ employee.name }}</strong> <span>{{ employee.department }}</span> </div> </div> </ng-template> </tbw-grid-responsive-card></tbw-grid>Important Notes
Section titled “Important Notes”- The ResponsivePlugin must be added to your grid config
- The Grid directive will automatically configure the plugin’s cardRenderer
- Template context provides
$implicit(row),row, andindex
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
template | Signal<TemplateRef<any> | undefined> | The ng-template containing the card content. |
Methods
Section titled “Methods”ngTemplateContextGuard()
Section titled “ngTemplateContextGuard()”Type guard for template context inference.
ngTemplateContextGuard(_directive: GridResponsiveCard<T>, context: unknown): contextParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
_directive | GridResponsiveCard<T> | |
context | unknown |
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt