In my Angular directive, I'm trying to get the path to another folder outside of the project, that contains a bunch of files. The idea is to join that path with the list of files existent and draw them using the omnivorelibrary (It is not important here, but I'll leave the code for some context):
var folderPath = "../../../traceMySteps-backend/MyTracks/ProcessedTracks/";
return {
restrict: 'E',
scope: true,
link: function($scope, $elem, $attr, $http) {
for (var i = 0; i < jsonRes.length; i += 1) {
console.log(folderPath + jsonRes[i])
omnivore.gpx(folderPath + jsonRes[i]).addTo(trackmaps[trackmapCount]);
}
...
The problem is that Angular thinks the folder is on the localhost: http://localhost:8000/traceMySteps-backend/MyTracks/ProcessedTracks/2016-05-04-part1.gpx when the folder is outside this Angular project
The folder structure is:
Backend_folder/MyTracks/ProcessedTracks/
Angular_Project/app/js/directives/file
Backend_folder and Angular_Project are at the same level (both inside one folder). And in that file is where that directive code is. I need to access ProcessedTracks/ from it. Is there any way? This relative path does not work and I've also tried the absolute path, but the error is the same.