Image does not appear in the table

Asked

Viewed 96 times

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. inserir a descrição da imagem aqui

  • 1

    the image has to exist in the folder where the code is published

  • @Jorgecosta, I didn’t understand what you said. How so. It exists in the images folder and what else should I do?

  • 1

    https://stackoverflow.com/questions/40230473/how-to-serve-up-images-in-angular2

  • @Jorgecosta, solved the problem.

  • You can do this via bootstrap without the need to import images?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.