How I can to send array.length to another controller?
First controller: Code below
function uploader_OnAfterAddingFile(item) {
    var doc = {item: {file: item.file}};
    if (doc.item.file.size > 10240) {
        doc.item.file.sizeShort = (Math.round((doc.item.file.size / 1024 / 1024) * 100) / 100) + 'MB';
    } else {
        doc.item.file.sizeShort = (Math.round((doc.item.file.size / 1024) * 100) / 100) + 'KB';
    }
    doc.item.showCancel = true;
    if ($scope.documentStatus) {
        item.formData.push({status: $scope.documentStatus});
    }
    if ($scope.tenderDraftId) {
        item.formData.push({tenderDraftId: $scope.tenderDraftId});
    }
    item.getDoc = function () { return doc; };
    doc.item.getUploadItem = function () { return item; };
    $scope.documents.push(doc);
    //I need send $scope.documents.length
}
send to this function on other controller Second Controller:
They are in one page.
First Controller it is a component which release upload files.
Second controller it is a modal window where we have 2 input of text and element with first controller.
All I need it to now array.length of files which were upload in submit function on modal window. I tried with $rootScope but it didn`t help me.

 
     
     
     
    