GridIconRegistry
Injectable service for managing grid icons.
Use provideGridIcons() in your app config to set up icons,
or inject this service for dynamic registration.
Example
Section titled “Example”// App-level setup (app.config.ts)export const appConfig: ApplicationConfig = { providers: [ provideGridIcons({ expand: '➕', collapse: '➖', sortAsc: '↑', sortDesc: '↓', }) ]};
// Dynamic registration@Component({ ... })export class AppComponent { private registry = inject(GridIconRegistry);
ngOnInit() { this.registry.set('filter', '<svg>...</svg>'); }}Methods
Section titled “Methods”Set an icon override.
set(name: K, value: GridIcons[K]): voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | K | The icon name (e.g., ‘expand’, ‘collapse’, ‘filter’) |
value | GridIcons[K] | The icon value (string text or SVG markup) |
Get an icon value.
get(name: K): GridIcons[K] | undefinedParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | K |
remove()
Section titled “remove()”Remove an icon override.
remove(name: keyof GridIcons): voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | keyof GridIcons |
Check if an icon has an override.
has(name: keyof GridIcons): booleanParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | keyof GridIcons |
getRegisteredIcons()
Section titled “getRegisteredIcons()”Get all registered icon names.
getRegisteredIcons(): keyof GridIcons[]
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