Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use icons loaded via registry - src input is always required #157

Closed
duszek94 opened this issue Jul 4, 2024 · 2 comments · Fixed by #158
Closed

Unable to use icons loaded via registry - src input is always required #157

duszek94 opened this issue Jul 4, 2024 · 2 comments · Fixed by #158
Assignees
Labels

Comments

@duszek94
Copy link

duszek94 commented Jul 4, 2024

Hello,

Affected version: angular-svg-icon@18.0.0

In the newest version the src input is always marked as required in the SvgIconComponent
https://github.com/czeckd/angular-svg-icon/blob/master/projects/angular-svg-icon/src/lib/svg-icon.component.ts#L29

Because of that we're unable to use icons loaded via registry as mentioned in the README.md

If svg was previously loaded via registry with name it can be used like this:

<svg-icon name="eye" [svgStyle]="{ 'width.px':90 }">

When we try to do that, the compiler throws an error and the build fails:

NG8008: Required input 'src' from component SvgIconComponent must be specified.

Is there any workaround for that?

Thank you in advance for your help!

@czeckd
Copy link
Owner

czeckd commented Jul 4, 2024

@duszek94 Thanks for the bug report. I fixed the issue. Please grab version 18.0.1 to resolve it on your end.

@duszek94
Copy link
Author

duszek94 commented Jul 9, 2024

@czeckd I can confirm it works correctly now, thank you for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants