Ng-repeat two col table


#1

Hi Guys,

I am attempting to create a two col table using the row and col classes provided by ionic and looping through a set of results using ng-repeat. For example i have the following array defined

.controller(‘CustomCtrl’,function($scope){
$scope.items = [
{ id: 0, name: ‘John’ },
{ id: 1, name: ‘Miller’ },
{ id: 2, name: ‘Sarah’ },
{ id: 3, name: ‘Greeting’ }
];;
})

<div class="row" ng-repeat="item in items">
		<div class="col">{{item.name}}</div>
		<div class="col">{{item.name}}</div>
</div>

CURRENT OUTPUT

‘John’ 'John’
Miller Miller
Sarah Sarah
Greeting Greeting

THE DESIRE OUTPUT
John Miller
Sarah Greeting

How would i go about achieving the above out.


#2

controller(‘CustomCtrl’,function($scope){
$scope.items = [
{ id: 0, firstname: ‘John’ , lastname: ‘Miller’ },
{ id: 1, firstname: ‘Sarah’, lastname: ‘Greeting’ }
];
})


#3

This isn’t still right I am trying to create two row table with two names per row
john | miller
Sarah | greeting
Micheal | Richards etc