Skip to content

Problem with loading icon when showing same icon and change detection triggered NG@18 #169

Description

@RdN

I have a problem when showing the icon from the registry when change detection is triggered.

It worked fine with NG@17, but after upgrading to NG18, a problem appeared. In my app, this is the case when notifications are shown one after another with the same icon.

This lib loads the icon, meanwhile, change detection is triggered, so the request is cancelled (the icon is not loaded, but finally is triggered and the icon observable is removed from the registry). When trying to show the same icon immediately I get the:

ERROR No svg with name 'eyesvg' has been loaded

Please check:
NG@17
https://stackblitz.com/edit/playground-angular-17-material-nsu3nd-kdxjhgnc

NG@18
https://stackblitz.com/edit/stackblitz-starters-tw3swz1w?file=src%2Fapp%2Fapp.component.ts

Thank you for your great work and help.

Ps. After upgrading to NG@19 works fine - but unfortunately, I can't update my app to 19 for now because of other dependencies.
https://stackblitz.com/edit/stackblitz-starters-gy9qqzf2?file=src%2Fapp%2Fapp.component.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions