Use of first array and ng-repeat directive