DEV Community

Discussion on: Angular: Using custom made SVG icons through Angular Material

Collapse
 
florianleitgeb profile image
Florian Leitgeb

What side effects does the registration have?
I am concerned about loading times and registration should not have a lot of impact to it. It feels somewhat wrong to register them globally and not only per lazy loaded module.

Thread Thread
 
elasticrash profile image
Stefanos Kouroupis

I don't think there is match of an impact since the only thing that addSvgIcon does is add an entry on a Map Object.

github.com/angular/components/blob...

You can always create a method that registers icons on demand. Personally, I don't think you will gain much by doing that, apart from over complicating your solution.