$scope.getTypeaheadValues is not returning any array. It returns null, because
your return statement is in the callback function "success", which is called asynchrony.

Maybe this will work:

$scope.getTypeaheadValues = function($viewValue)
{    
    var output = [];
    $http({
        method: 'GET',
        url: 'api/v1/person?name__icontains=' + $viewValue
    }).error(function ($data) {
        console.log("failed to fetch typeahead data");
    }).success(function ($data) {            
        $data.objects.forEach(function (person)
        {
            output.push(person.name);
        });
        console.log(output);        
    });
    return output;
}


AngularUI-Bootstrap's Typeahead Can't Read `length` Property of `undefined`
How to change port number in vino ubuntu 11.10?

Cannot find option to change from port 5900 on vino vnc 'remote desktop' window, nor can I find it via gconf-editor as was available in previous ubuntu version.

Please help
