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

SVG flags can't be retrieved #76

Open
wadie opened this issue Jul 20, 2021 · 7 comments
Open

SVG flags can't be retrieved #76

wadie opened this issue Jul 20, 2021 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@wadie
Copy link

wadie commented Jul 20, 2021

Describe the bug
Created a fresh Angular 9 project with material, getting following error for all flags
Error: Error retrieving icon :bl! <svg> tag not found

To Reproduce
Steps to reproduce the behavior:
Go to https://stackblitz.com/edit/angular-9-material-starter-4fd9kj?file=angular.json
I created a stackblitz where you can reproduce the issue. it's a clean Angular 9 installation with material

Expected behavior
For the flags to load

@morrowyn
Copy link

morrowyn commented Jul 24, 2021

Experiencing the same with angular 12 and
@angular-material-extensions/select-country": "^5.0.1"
"svg-country-flags": "^1.2.10"
The assets are not copied to the src/assets directory, they remain inside the node_modules directory.

@AnthonyNahas AnthonyNahas self-assigned this Jul 24, 2021
@AnthonyNahas AnthonyNahas added the bug Something isn't working label Jul 24, 2021
@waelbenmustapha
Copy link

still not fixed i had to copy paste them manually so they work

@leibovitzgil
Copy link

the problem is with the output path when the svg resources are being copied from the node_modules to the local assets.
try changing it to the following setup (in angular.json under assets section):

{
                "glob": "**/*",
                "input": "./node_modules/svg-country-flags/svg/",
                "output": "./assets/svg-country-flags/svg/"
              }

that should solve your problem.

@AnthonyNahas - what's the procedure to contribute to this project, I can open PR

@TonyGolem
Copy link

the problem is with the output path when the svg resources are being copied from the node_modules to the local assets. try changing it to the following setup (in angular.json under assets section):

{
                "glob": "**/*",
                "input": "./node_modules/svg-country-flags/svg/",
                "output": "./assets/svg-country-flags/svg/"
              }

that should solve your problem.

@AnthonyNahas - what's the procedure to contribute to this project, I can open PR

Great Solution, 17/06/22 works

@AnthonyNahas
Copy link
Member

a PR would be appreciated 🙏

@mindarchitect
Copy link

In my case the problem was with base URL interceptor. So, gentle hint: if svg images are available under assets, check if some interceptor does not modify assets folder URL while loading them. Good luck!

@salmankhaled-egabi
Copy link

Describe the bug
Created an Angular 14 project with material, getting following error for all flags
handleError Error: Error retrieving icon :af! this.tokenGetter is not a function
and no flag loaded for any country.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants