I have a problem understanding how to create a grid component, which has in input of a number of columns, rows and a list of strings for the inside element of grid.
my thumbnails.component.ts
import { Component, Input } from '@angular/core';
@Component({
selector: 'thumbnails',
templateUrl: './thumbnails.component.html',
styleUrls: ['./thumbnails.component.scss']
})
export class ThumbnailsComponent{
public UrlList = ["one","two","three","four","five","six","seven","eight","nine","ten"];
private col: Number = 4;
private row: Number = 4;
}
my thumbnails.component.html
<div id="grid">
<ng-container *ngFor="let x of UrlList; let i = index">
<div class="row">
<div class="col">
{{x}}
</div>
</div>
</ng-container>
</div>
I don't know how to implement it. Can someone help me and explain it to me?