title: Pass variable to factory angularjs
body: <p>I would like te pass a variable to a factory of mine, but im not quite sure how to do it, here is my code:</p>
  
  <pre><code>var app = angular.module('docFinder', []);
  
  app.factory('docFactory', function($http) {
    var url = 'http://test.example.com?queryString=searchv2&amp;page='; 
    url=url+page;
    var docFactory = {
      async: function() {
        var promise = $http.get(url).then(function (response) {
          return response.data;
        });
        return promise;
      }
    };
    return docFactory;
  });
  
  app.controller('docTable', function(docFactory, $scope, $filter) {
  
      docFactory.async().then(function(d) {   
          $scope.providers = d;       
          init();
      });
  </code></pre>
  
  <p>}</p>
  
  <p>i would like to send the page from my controller to my factory so it can return my new query</p>
  
  <p>thanks</p>