Karina
Karina

Reputation: 195

How to access image file in assets folder? [angular 7]

I created an angular app with 'ng new my-app', folder structure is like so:

my-app
  |- e2e
  |- node_modules
  |- src
     |- assets
         |- images
             |- smile.jpg

How can I reach my image through the client with http://localhost:4200/images/smile.jpg?

Upvotes: 0

Views: 2271

Answers (1)

Sachin Shah
Sachin Shah

Reputation: 4533

Try this way

If you want to open image from browser url then use this

http://localhost:4200/assets/images/smile.jpg

Image

Upvotes: 4

Related Questions