Error: [$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object?

后端 未结 5 559
遇见更好的自我
遇见更好的自我 2020-11-30 23:37

How fix Error:

[$resource:badcfg] Error in resource configuration. Expected response to contain an array but got an object?

//

5条回答
  •  悲&欢浪女
    2020-11-30 23:51

    Make sure you are sending the proper parameters too. This happened to me after switching to UI-Router.

    To fix it, I changed $routeParams to use $stateParams in my controller. The main issue was that $stateParams was no longer sending a proper parameter to the resource.

提交回复
热议问题