DarioN1
DarioN1

Reputation: 2552

AngularCli not loads image

Just a simple question:

I have an Angular2 application, I serve it using ng serve and the application are properly rendered.

The problem is this:

The css are loaded properly but the image no.

For example, if I put a css file and an image file in the same folder and I try to access them by direct link like these:

css

http://localhost:4200/assets/distAdminLte2/css/AdminLTE.min.css

image

http://localhost:4200/assets/distAdminLte2/css/mosconi.jpg

The css is rendered but the image is not rendered...

How to solve this problem?

Thanks

Upvotes: 0

Views: 75

Answers (1)

Praneeth Reddy
Praneeth Reddy

Reputation: 424

You need to add your image path in .angular-cli.json.

"assets":[
   "img/img.png"]

Upvotes: 1

Related Questions