Closed kirills98 closed 3 years ago
I'm not sure what you're trying to solve. Please add specs.
I'm not sure what you're trying to solve. Please add specs.
I make small demo for this case.
My real case: i have several reusable components that uses inside SvgIconsModule.forChild()
. If this components used together, then icon registering incorectly.
forChild is meant to be used only in lazy load modules.
In your example, they are eager. Do you want to use it in eager modules just to make it more organized?
@NetanelBasal yes. Because one of case using icons in external angular package (bundled by ng-packagr).
Of course we can make some our module for this or we can register icons manually. But i think it will good "out of box" :)
Please update the docs
@NetanelBasal i'm fixed docs, additionaly add @Self
decorator for injecting icons in module, for improve re-register icons, provided in parent modules
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
If has two modules (A and B) that use
SvgIconsModule.forChild()
and this modules imports to module C then will be provided only icons from last imported module (for example B) and icons from other modules ( for example A) will be ignored.Issue Number: N/A
What is the new behavior?
Now icons provider with
multi: true
parameter. It's mean that all provided icons will accessible as array by same token.Does this PR introduce a breaking change?
Other information