select-country icon indicating copy to clipboard operation
select-country copied to clipboard

Error: Error retrieving icon :al! Http failure response for http://localhost:4200/assets/svg-country-flags/svg/al.svg: 404 Not Found

Open apangr opened this issue 2 years ago • 6 comments

Describe the bug When initializing the component the flags do not load. I followed the steps in the documentation

imports:[
...
 MatSelectCountryModule.forRoot('en'),
...
]
 ..."assets": [
              "src/favicon.ico",
              "src/assets",
              "src/manifest.webmanifest",
              {
                "glob": "**/*",
                "input": "node_modules/svg-country-flags/svg",
                "output": "src/assets/svg-country-flags/svg"
              }
            ],...

Screenshots Screenshot from 2023-11-24 11-08-43

apangr avatar Nov 24 '23 16:11 apangr

@apangr having the same issue, I ended up manually copied the svg-country-flags/svg from node_modules to my assets folder.

jezmaghuyop avatar Dec 17 '23 03:12 jezmaghuyop

@jezmaghuyop Thanks for the workaround it works on angular 14

sudarshansb143 avatar Jan 04 '24 14:01 sudarshansb143

In angular 17 (maybe other versions), you just have to put ./assets/svg-country-flags/svg, instead of src/assets/svg-country-flags/svg, like this:

..."assets": [
              "src/favicon.ico",
              "src/assets",
              {
                "glob": "**/*",
                "input": "./node_modules/svg-country-flags/svg",
                "output": "./assets/svg-country-flags/svg"
              }
            ],...

Then It will work without copying the module.

serox-rr avatar Apr 17 '24 08:04 serox-rr