minLength not updated by @minlength when isNewSearchNeeded 

when isNewSearchNeeded is created as a standalone function it always contains the value 3 (at least working with remote data source) because $scope.minLength is not yet been modified by this:

$scope.minLength = $scope.minLengthUser;

putting isNewSearchNeeded inside the $scope solve this problem.