how to fix Expected response to contain an array but got an object ANgular js

前端 未结 5 2215
再見小時候
再見小時候 2021-02-19 21:29

i am new one so difficult to getting this error using resource module after calling service. can any one modify my mistake in code where i am getting wrong or just modified that

5条回答
  •  广开言路
    2021-02-19 22:20

    In my case, the API server was returning an HTML page (an error page) that is treated as a string, instead of the correct JSON response which would be a javascript object.

    As a sidenote, javascript errors and stacktraces are really something.

提交回复
热议问题