[HELP] Using $cordovaFile.readAsText or alternative to read large files


I have attempted several methods but all return memory errors with large files.

Here is the code i am using:

$cordovaFile.readAsText(cordova.file.externalRootDirectory, path)
.then(function (result) 
	var alertPopup = $ionicPopup.alert({title: 'Don\'t eat that!',template: result});
}, function (error) 
    // error

I have checked and it seems that there is a split function somewhere but not sure on how to use it with a filename instead of a input type=“file”… box

Please help
Thank you