javascript - Angularjs $http.get returning JSON data as a string with escaped quotes instead of json -
Interesting problem here. I have the comfort backend that gives JSON when I use the API through the browser, it returns a valid JSON array with a JSON object.
[{"GUID_Auth": null, "Email_Address": "abc @ aol," Measure_Id ": 1," title ":" prop 41 "}]
But when I make a $ http.get request through the helpers, I get a string back with quoted citations instead.
Success: [{\ "GUID_Auth \": null, \ "email_directory \": \ "abc @ aol \", \ "Measure_Id \": 1, \ "title \": \ "proposal 41 \"}] "
Here is a snippet of my angle control code
.controller ('MainCtrl', function ($ radius, $ http) {$ Sc Ope.GetData = function () {var response light = $ http.get ('http: //backend.api'); responsePromise.success (function (data, position, header, config) {console.log ('found (data) , Status, header, config) {Warning ('Ajax Fail');}); ';},
It is very upset that any help would be greatly appreciated.
$ http is serialing data, so before returning it, it will be sent to
JSON.parse ( Data)
Comments
Post a Comment