I am trying to use nested ng-repeat. However, the values in the upper ng-repeat will be passed as a parameter in the inner ng-repeat. I am trying to create a function that returns an array So that I can use it in the inner ng-repeat. but it seems not working. how can I achieve this? this is my html
<table class="table table-condensed" id="paytable" ng-repeat="row in employeeInfo">
    <thead>
        <tr>
            <td class="col-sm-3">Employee Info</td>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>{{employeeInfo.name}}</td>
            <td>
                <ul ng-repeat="row in employeeLoans(employeeInfo)">
                    <li></li>
                </ul>
            </td>
        </tr>
    </tbody>
</table>
this is the angularJS
// this 
$http.get('/api/PreviewEmployee').success(function (data)
{
    $scope.employee = data;
    $scope.Allowances = Allowance(data);
});
$scope.Allowance = function (data)
{
    var result = [];
    for(var i = 0 ; i < data.length ; i++)
    {
            result.push(data[i]);                 
    }
    console.log(result)
    return result;
}
    
thanks in advance!!!