Get button below each image in Angular *ngFor

I tried lots of methods to get the button below each image from ngFor loop in angular 10 but it populates the button next to the image not in each image it's showing as a list I attached the image output also. This is the code that I tried.

Preview of ngFor

CSS

.container {
  position: relative;
  text-align: center;
}

.original {
  width: 250px;
  height: 250px;
  float: left;
  margin: 1.66%;
  transition-duration: 0.3s;
  border-radius: 15px;
} 

Html

<ng-container *ngFor="let img of imageData">
        <div class="container">
          <img class="original" [alt]="img.Name"
               src="https://localhost:44349/"
               width="350" height="350"/>
        </div>
        <button type="submit" (click)="deleteImage(img.Id)" class="btn btn-danger"><i
          class="far fa-trash-alt"></i>
          Remove
        </button>
</ng-container>


from Recent Questions - Stack Overflow https://ift.tt/3zzPh4m
https://ift.tt/2VbVZP7

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Object oriented programming concepts (OOPs)

Spring Webflux : How to return HTTP 200 response with body when the called service returns HTTP 201 without body with WebClient?