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

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -