Good morning,
i have written a XML file and put it into the /www/res/ folder of my ionic project. The app reads the file with $http.get.
Within the browser, this code works fine, but on the android device it seems that the file can't be read. What am i doing wrong?
Thanks in advance, Lukas
Source:
angular.module('topicData.service', []).factory('DataSource', ['$http',
function($http) {
return {
get : function(file, callback, transform) {
$http.get(file, {
transformResponse : transform
}).success(function(data, status) {
console.log("Request succeeded: "+file);
callback(data);
}).error(function(data, status) {
console.log("Request failed " + status);
alert(data);
});
}
};
}]);
Source file path definition:
$scope.TOPIC_FILE = "../res/topic_table.xml";