It appears to be replicating the col-3 div element
you need to move the for loop to ng-container
like this:
<div class="container">
<div class="row">
<div class="col-3">
<ul class="list-group">
<ng-container *ngFor="let t of arrayT">
<li class="list-group-item">{{t.key}} {{t.value}}</li>
</ng-container>
</ul>
</div>
</div>
</div>
You have to put it as mfort suggested and replace the list-groupe-item
with
list-group-item
:
<div class="container">
<div class="row">
<div class="col-3">
<ul class="list-group">
<ng-container *ngFor="let t of arrayT">
<li class="list-group-item">{{t.key}}</li>
<li class="list-group-item">{{t.value}}</li>
</ng-container>
</ul>
</div>
</div>
</div>
https://getbootstrap.com/docs/4.0/components/list-group/
I’m trying to have a card with a title and several lines with my data for I’m using Bootstrap, but instead of putting the items on the line they are all on the same line how to do for who goes on the line at each item.
expected
title
item 1
item 2
item 3
result
title
item 1 item 2 item 3
html
<div class="container">
<div class="row">
<div class="col-3" *ngFor="let t of arrayT | keyvalue">
<ul class="list-group">
<li class="list-groupe-item">{{t.key}}</li>
<li class="list-groupe-item">{{t.value}}</li>
</ul>
</div>
</div>
</div>