Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1675

Split *ngFor data into 2 columns

$
0
0

I have this html:

<div class="w-full flex justify-center"><div *ngFor="let item of items" class="flex w-1/2"><span>{{item.label}}</span><span>{{item.value}}</span></div></div>

This way, the html in UI is displayed as:

LABEL 1 - VALUE 1 | LABEL 2 - VALUE 2LABEL 3 - VALUE 3 | LABEL 4 - VALUE 4LABEL 5 - VALUE 5 | LABEL 6 - VALUE 6

I need to display data like this:

LABEL 1 - VALUE 1 | LABEL 4 - VALUE 4LABEL 2 - VALUE 2 | LABEL 5 - VALUE 5LABEL 3 - VALUE 3 | LABEL 6 - VALUE 6

I´ve been trying to find working solution, but without luck. Can you suggest working solution?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>