Skip to content

feat(MatIconRegistry): reactive signatures #29437

Open

Description

Feature Description

When I use MatIconRegistry, and I add an "iconSet" using "addSvgIconSet", I don't see any way of subscribing to what's internally doing: loading file -> generating an html/svg representation -> etc

And I don't know when all that computation has finished.

I'm using a little "hack" to subscribe to that workflow using:

matIconRegistry.getNamedSvgIcon(<name of icon I know it's in the iconSet>).subscribe(...)`

But that's kinda weak since I have to know the contents (what SVGs are included) in the iconSet.

I would like to have a robust API so that I can subscribe to that internal workflow and know when it has finished its calculations, something like:

matIconRegistry.addSvgIconSet(<icon_set_file>).subscribe(...)

Even more interesting, allow this registry to load multiple files at once:

matIconRegistry.addSvgIconSet([<icon_set_file_1>, <icon_set_file_2>...]).subscribe(...)

Use Case

Synchronize APP Icons configuration at bootstrap.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    P4A relatively minor issue that is not relevant to core functionsA relatively minor issue that is not relevant to core functionsarea: material/iconfeatureThis issue represents a new feature or feature request rather than a bug or bug fixThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions