generator-gulp-angular
generator-gulp-angular copied to clipboard
json file not found
I am unable to find data.json when I do a 'gulp serve'. I get a '404 not found ' error. That mainly happens as I try to do the following in my factory: $http.get('data.json') .success(function(data){ defer.resolve(data); }).error(function(err){ defer.reject(err); }) return defer.promise; }
Any solution?
Where is your data.json file? You have to provide the path relative from your src/ folder.
.success and .error are deprecated. Use .then and .catch instead.