Skip to content

Cannot load svg files using angular-cli #9156

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

Closed
bsakweson opened this issue Jan 10, 2018 · 2 comments
Closed

Cannot load svg files using angular-cli #9156

bsakweson opened this issue Jan 10, 2018 · 2 comments

Comments

@bsakweson
Copy link

bsakweson commented Jan 10, 2018

Versions

angular-cli: 1.6.3
angular: 5.0.0
angular material: 5.0.4

Repro steps

  • Setup a project
  • Added flag-icon-css uing npm
  • Step import flag-icon-css in styles.scss
  • Add an icon from the flag-icon-css
$flag-icon-css-path: '~flag-icon-css/flags' !default;
@import '../node_modules/flag-icon-css/sass/flag-icon';

Observed behavior

<!-- Normally this includes a stack trace and some more information. -->
All icons return 404 error though path is correct


ConnectedPositionStrategy.apply @ overlay.es5.js:1146
OverlayRef.updatePosition @ overlay.es5.js:792
(anonymous) @ overlay.es5.js:625
SafeSubscriber.__tryOrUnsub @ Subscriber.js:240
SafeSubscriber.next @ Subscriber.js:187
Subscriber._next @ Subscriber.js:128
Subscriber.next @ Subscriber.js:92
TakeSubscriber._next @ take.js:83
Subscriber.next @ Subscriber.js:92
schedulerFn @ core.js:4339
SafeSubscriber.__tryOrUnsub @ Subscriber.js:240
SafeSubscriber.next @ Subscriber.js:187
Subscriber._next @ Subscriber.js:128
Subscriber.next @ Subscriber.js:92
Subject.next @ Subject.js:56
EventEmitter.emit @ core.js:4319
(anonymous) @ core.js:4724
ZoneDelegate.invoke @ zone.js:388
Zone.run @ zone.js:138
NgZone.runOutsideAngular @ core.js:4701
checkStable @ core.js:4724
onLeave @ core.js:4797
onInvokeTask @ core.js:4747
ZoneDelegate.invokeTask @ zone.js:420
Zone.runTask @ zone.js:188
ZoneTask.invokeTask @ zone.js:495
invokeTask @ zone.js:1536
globalZoneAwareCallback @ zone.js:1562
overlay.es5.js:1146 GET http://localhost:4200/...../node_modules/flag-icon-css/flags/1x1/vu.svg 404 (Not Found)

Desired behavior

Icon paths should be resolved correctly

@clydin
Copy link
Member

clydin commented Jan 10, 2018

Thanks for reporting this issue. However, this issue is a duplicate of an existing issue #9154.

@clydin clydin closed this as completed Jan 10, 2018
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants