How to avoid AngularJS to parse string which is not JSON? -
i using angularjs
, working static text files data. used factory
return $resource
as,
app.factory('timeseriesdata', function ($resource) { return $resource('data/timeseriesdata.txt'); });
i tried $http
angularjs
trying parse json using function in angular.js
function fromjson(json) { return isstring(json) ? json.parse(json) : json; }
i have plain text data in text file not in json format. parsing causing error in console. how avoid angularjs
stop parsing json ?
Comments
Post a Comment