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: unknown): voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | K | The icon name (e.g., ‘expand’, ‘collapse’, ‘filter’) |
value | unknown | The icon value (string text or SVG markup) |
Get an icon value.
get(name: K): unknown | undefinedParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | K |
remove()
Section titled “remove()”Remove an icon override.
remove(name: unknown): voidParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | unknown |
Check if an icon has an override.
has(name: unknown): booleanParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
name | unknown |
getAll()
Section titled “getAll()”Get all icon overrides as a GridIcons partial. Used internally by the adapter.
getAll(): Partial<GridIcons>getRegisteredIcons()
Section titled “getRegisteredIcons()”Get all registered icon names.
getRegisteredIcons(): 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