I am trying to add png files to my applications. However, keep getting 404 error content not found. By this time, I have tried many ways but none successful;
If I use the following, I only get “?” mark instead of an image and 404 error.
<img [src]="'assets/img/measure-img/' +'question.image'"/>
They have to be inserted dynamically, therefore, in html and not scss file.
Anyone having the same issue?
vikneke
January 22, 2017, 10:11pm
3
Many thanks! Made it work.
Any more examples somewhere? Having a similar issue :). Thanks
@kierandes Updated links below
formatPI(pi: number, metrics: Metrics): string {
if (!pi) {
return null;
}
if (metrics.length === MetricLength.CM) {
pi = pi * 25.4;
}
return _.round(pi, 5) + ' mm/h';
}
getWeatherIcon(icon: string): string {
if (icon) {
return 'assets/img/' + icon + '.png';
} else {
return 'assets/img/default.png';
}
}
degToCard(deg: number): string {
if (deg > 11.25 && deg < 33.75) {
return 'NNE';
and images in assets folder