Skip to content
Discussion options

You must be logged in to vote

However, what I want is to load svg.

Actually, I don't understand, what you want. You say, that you want to load the SVG, but in your code example, you try to import it. Importing from static does not make sense, since importings are resolved on compile-time. So if you want to import the SVG, then you should place it in the $lib folder.

If you place the SVG in the static folder, you can load it from the browser with an img-Tag:

<img src="/cat.svg" alt="Cat" />

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@ramadhanafif
Comment options

@vekunz
Comment options

Answer selected by ramadhanafif
@ramadhanafif
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants