Within my angular.js table, data is being received and stored in a variable called dataArr.
var dataArr = [
0: "aaa",
1: "bbb"
]
I have a condition that if the length of the data is greater than 0, it must be displayed twice in the table structure. For instance:
var user1 = {name: "george", field: [0: "aaa"]}
<<< This user should appear once in the table.
var user2 = {name: "Fred", field: [0: "aaa", 1: "bbb"]}
<<< This user should appear twice in the table, and so on...
Using ng-repeat, I iterate over the data to display it in the table:
<div ng-repeat="item in data">
<div>{{item.name}}</div>
<div>{{item.field}}</div>