title: How to get a $scope object to an angular service
body: <p>I have an object that I am modifying on <code>$rootScope</code> where I am "storing" my last search parameters. Currently I have the values <code>returnType</code>, rows, and query hard coded.  I would like to those just be references to the object on <code>$rootScope</code>.</p>
  
  <p>How can I reference an object on <code>$rootScope</code> in a service?</p>
  
  <pre><code>angular.module('myApp.services').factory("SearchService", function ($resource) {
      return $resource("/do/search", {}, {
          query: {method: "GET", isArray: false, params: {
              returnType: 'json',
              rows: 25,
              query:'bob*'
          }}
      })
  </code></pre>