title: AngularJS - add data to an existing model
body: <p>I built a <code>service</code>
  </p>
  
  <pre><code>.factory('Plot', ['$resource',
      function($resource){
          return $resource(path, {}, {
              get: {
                  method: 'GET'
                  params: { myparams: params }
              }
          });
      }]);
  </code></pre>
  
  <p>Now in a <code>controller</code> I <code>inject</code> this <code>service</code> and request it like:
  </p>
  
  <pre><code>$scope.data = Plot.get(params}
  </code></pre>
  
  <p>Since I have to get new data from server, and <code>append</code> it in the <code>view</code> I need to add new data to <code>$scope.data</code>. I tried with <code>push</code> or <code>concat</code> but the <code>object</code> does not seems to be an <code>array</code> (is in fact a <code>$resource</code> <code>object</code>, I guess).
  I'm new to <code>AngularJS</code> and trying to get into several mechanism, I searched for a solution but did not find anything that was my case. </p>
  
  <p>I tried this: <a href="https://stackoverflow.com/questions/13282819/angularjs-append-to-a-model-with-a-resource">AngularJS - Append to a model with a $resource</a> but it does not seem to work</p>
  
  <p>Thanks in advance.</p>