2
Use Angular 6 and bootstrap. I have a table and did this to display an image:
........
<tbody>
<tr *ngFor="let operator of dataSource">
<td>{{ operator.operatorId }}</td>
<td>{{ operator.name }}</td>
<td><img src="../../images/delete16.png" ng-click="deletar(operator)" /></td>
</tr>
</tbody>
and my sequence of folders: src/app/images and my html is in that sequence src/app/get/Operators/file.html
Soon I’m two levels below the folder images, therefore the ../../. Inside the folder I have delete16.png.
when I rescan the image does not appear. See the screenshot below, which is shown in the browser.
the image has to exist in the folder where the code is published
– Jorge Costa
@Jorgecosta, I didn’t understand what you said. How so. It exists in the images folder and what else should I do?
– pnet
https://stackoverflow.com/questions/40230473/how-to-serve-up-images-in-angular2
– Jorge Costa
@Jorgecosta, solved the problem.
– pnet
You can do this via bootstrap without the need to import images?
– pnet