Read static json file


#1

I’m trying to read a json file stored in www folder.
I added this file https://raw.githubusercontent.com/driftyco/ng-cordova/master/src/plugins/file.js and registered the module.
After, in my controller, I used this code:

$cordovaFile.readAsText(“www/db.json”) .then(function (success) {
console.log(success);
}, function (error) {
console.log(error);
});

I get always error.
:s help please?