AngularJS, $http and transformResponse

前端 未结 3 1321
無奈伤痛
無奈伤痛 2020-12-08 23:36

I\'m getting a strange behaviour with AngularJS\'s $http and not really understanding how transformResponse works (the docs are a bit light on this one).

            


        
3条回答
  •  遥遥无期
    2020-12-09 00:10

    Resource 0: "f" 1: "a" 2: "l" 3: "s" 4: "e" This finally worked for me:

       transformResponse: function (data, headersGetter) {
        return { isCorrect: angular.fromJson(data) }
        }
    

提交回复
热议问题