I have incoming dynamic data that I need to display in columns, with 10 records in each row. Currently, I am able to display 10 rows as expected. However, I want the header to repeat each time an additional column is added. How can I achieve this using the Angular framework?
HTML Code
<div class="section3BG" id="section3"
style="margin-top: 24.9px;margin-left: 18px;margin-bottom: 23.9px;margin-right: 27px;">
<div class="row" style="margin-left: 41px;padding-top: 23px;" *ngFor="let fac of facilities11">
<div class="col-md-2 col-lg-2" class="Facility-Name-Heading">
Facility Name
</div>
<div class="col-md-2 col-lg-2" class="Equipment" style="margin-left: 107px;">
Equipment
</div>
</div>
<div *ngFor="let facility of facilities">
<div class="Rectangle-2001">
<div class="row" style="margin-left: 21px;padding-top: 23px;">
<div class="col-md-2 col-lg-2" class="Facility-Name-1">
Facility Name 1
</div>
<div class="col-md-2 col-lg-2" class="number" style="margin-left: 90px;">
10
</div>
</div>
</div>
</div>
</div>
CSS
.section3BG {
width: 1785px;
height: 825.1px;
border-radius: 20px;
box-shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.04);
background-color: #ffffff;
display: flex;
flex-flow: column wrap;
align-content: flex-start;
}
.Facility-Name-Heading {
opacity: 0.5;
font-family: Lato;
font-size: 18px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: 1.22;
letter-spacing: 0.9px;
text-align: left;
color: #0d0d0d;
}
.Equipment {
//width: 94px;
//height: 22px;
opacity: 0.5;
font-family: Lato;
font-size: 18px;
font-weight: bold;
font-stretch: normal;
font-style: normal;
line-height: 1.22;
letter-spacing: 0.9px;
text-align: left;
color: #000000;
}
.Rectangle-2001 {
width: 374px;
height: 57px;
border-radius: 10px;
border: solid 1px #e9e9e9;
background-color: rgba(236, 236, 236, 0.22);
margin-left: 20px;
margin-top: 15px;
}
.Facility-Name-1 {
width: 134px;
height: 22px;
font-family: Lato;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: 1.22;
letter-spacing: 0.9px;
text-align: left;
color: #487217;
}
.number{
width: 22px;
height: 22px;
font-family: Lato;
font-size: 18px;
font-weight: 500;
font-stretch: normal;
font-style: normal;
line-height: 1.22;
letter-spacing: 0.9px;
text-align: left;
color: #487217;
}
Expected Image
https://i.sstatic.net/oVqlO.png
Current Output