title: ngResource can't access "@magid" causing "has no method push"
body: <p><code>TypeError: Object #&lt;g&gt; has no method 'push'</code></p>
  
  <p>I found this is the single most annoying debugging information angularJS could ever give to me: you just simple don't know what it is! And based on my research, people encounter them in very different situations!</p>
  
  <p>Basically this is my ngResource factory:</p>
  
  <pre><code>  .factory('Articles', function ($resource) {
  
      return $resource('http://localhost/../api/articles/:id', {
        id : '@magid',  //pass in param (magId) //or get from data object
      });
    })
  </code></pre>
  
  <p>Normally when I call this, I use query method to get all articles: <code>$scope.curMagArticles = Articles.query({id:curMagId});</code> Like this, it's simple and easy (and it works).</p>
  
  <p>Then later on I find out that I need to save them as well. </p>
  
  <p>I tried this:</p>
  
  <pre><code> var magArray = $scope.curMagArticles;
   magArray['id'] = magArray[0].magazineID;
   Articles.save(magArray);
  </code></pre>
  
  <p>Actually I first tried <code>magArray.$save()</code>, theorically shouldn't this work? (Since $scope.curMagArticles is an ngResource object, it should contain <code>$save()</code> method right? But console error tells me it doesn't have <code>$save()</code>f method) By the way, the code above is how I got <code>$curMagArticles</code> (through <code>Articles.query()</code>).</p>
  
  <p>I don't know what's causing my problem and my guess is <code>id:'@magid'</code> can't get data. Btw I also tried <code>magArray['magid']</code>; it didn't work either.</p>
  
  <p>What should I do???</p>
  
  <hr>
  
  <p>Btw this is the <code>magArray</code> in console after I add "id" to it:</p>
  
  <pre><code>Array[4]
  0: g
  1: g
  2: g
  3: g
  $promise: Object
  $resolved: true
  id: "7"
  length: 4
  __proto__: Array[0]
  </code></pre>