I want to display data in ul / li so I am fetching it through loop in my html like :
I have two array where :
$mainarray = [{"Name":"data1","count":9},{"Name":"data2","count":10},
{"Name":"data3","count":4},{"Name":"4","count":20}];
$color = ['red','pink','green','yellow','black'];
$color = ['red','pink','green','yellow','black'];
I am looping through main array like this and its working fine :
<ul style="list-style-type:circle; padding: 0px !important; font-size:22px;">
<li ng-repeat="item in mainarray " style="margin-bottom: 10px;"; >
<span style=" font-size: 16px; ">{{ item.name }}</span>
</li>
</ul>
However, I want to add $color with this like :
for data1 -> red
data2->pink
and so on ....
I have tried with multiple loop but its not working !
Any clues ?