yeoman / generator-angular

Yeoman generator for AngularJS
http://yeoman.io
5.73k stars 1.44k forks source link

Erro accessing local JSON #1334

Closed yogieputra8 closed 8 years ago

yogieputra8 commented 8 years ago

So, here is my app structure using yeoman:

screen shot 2016-06-20 at 4 18 23 pm

I have cred.json inside app/json folder. In my scripts/controller/about.js, I want to access those local json. My code to access it:

$http.get('cred.json').success(function(data){
        console.log(data);
});

But I've got the error message:

screen shot 2016-06-20 at 4 23 23 pm

How to solve this issue?

eddiemonge commented 8 years ago

'json/cred.json'