AngularJS $resource error - TypeError: Object # has no method 'push'

前端 未结 4 970
名媛妹妹
名媛妹妹 2020-12-15 05:20

I have the following in my controller file:

var Subject = $resource(\'/api/TestAccounts/:action\', { applicationId: 3 }, {
   \'getSelect\': { method: \'GET\         


        
4条回答
  •  清歌不尽
    2020-12-15 06:21

    I know this post is a bit stale but I found a solution when I ran into this problem today. Following the post below, I implemented joelwreed's solution (half way down the thread). It does a check that the destination is an array before trying to push, which fixes the issue.

    Link to issue filed on github

提交回复
热议问题