AnguHashBlog / analog-material

🅰 AnalogJS Blog Integration Template including Angular Material: Seamlessly connects to Hashnode's APIs, effortlessly fetching and integrating your blog data. Compatible with any Hashnode blog.
MIT License
0 stars 0 forks source link

Bug: ERROR Error: Error retrieving icon :github! Http failure response for /icons/github.svg: 0 undefined #4

Closed monacodelisa closed 5 months ago

monacodelisa commented 5 months ago

Describe the bug

In the blog social icons partial component, adding custom mat icons using path icons/github.svg in the constructor like so:

        this.iconRegistry.addSvgIcon("github",
            this.sanitizer.bypassSecurityTrustResourceUrl("/icons/github.svg")
        );

resulted in getting this error:

image

Steps to resolve

to avoid it, absolute file path must be used since sources suggested that is a solution for SSR rendered sites

        this.iconRegistry.addSvgIcon("github",
            this.sanitizer.bypassSecurityTrustResourceUrl(`${deployedUrl}icons/github.svg`)
        );

Browsers

No response

Additional context (Is this in dev or production?)

No response

I would be willing to submit a PR to fix this issue

github-actions[bot] commented 5 months ago

Thanks for the issue, our team will look into it as soon as possible! If you would like to work on this issue, please wait for us to decide if it's ready. The issue will be ready to work on once we remove the "needs triage" label.

To claim an issue that does not have the "needs triage" label, please leave a comment that says ".take". If you have any questions, please reach out to us on Discord or follow up on the issue itself.

For full info on how to contribute, please check out our contributors guide.