Reputation: 449
I upload my angular2 project to my webhost, but for some reason i can't see images on my website. Rest of the website works fine. The dist folder that comes after using ng build --prod does not contain my image folder that was in src/app/images location.
Upvotes: 0
Views: 1099
Reputation: 12596
copy images
folder to assets
, or link as asset in .angular-cli.json
file.
If you copy to assets
your path will be <img src="assets/images/path-to-abc.png">
For 2nd option, you can refer this document: https://github.com/angular/angular-cli/wiki/stories-asset-configuration
Upvotes: 3