Question: I have following details in my test file.

```
HEADER
A12345678|PROCESS
B12345678|PROCESS
C12345678|GOOD
D12345678|GOOD
E123456789|PROCESS
F123456|GOOD
G12345678|PROCESS
8|TRAILER

```

What I want is to check if the first column is having length of 9. If it is we will proceed with those records, and if not we will discard the records.

Can anyone please help with this?

Answer: 
There is an error in the `CollabService`. Here you pass the whole `$scope.q` object:

```
CollabService.getCollabs($scope.q, {collabId: $scope.q.collabId},
    function(col) { //Print result
       console.log(col);
});

```

It should be changed to:

```
CollabService.getCollabs({collabId: $scope.q.collabId}, // <--
    function(col) { //Print result
       console.log(col);
});

```
This one works well, you should try :

**// Service**

```
angular.module('app')
.factory('CollabService', function($resource) {
    return $resource('/collabs/:collabId', {collabId:'@collabId'});
});

```

**// Controller**

```
scope.q = {};
$scope.q.collabId = 30;
$scope.q.firstWeek = 1;
$scope.q.nbWeeks = 4;
$scope.q.year = 2015;
CollabService.get($scope.q,
    function(col) { //Print result
       console.log(col);
});

```