title: Using a factory inside another factory AngularJS
body: <p>I have a module...</p>
  
  <pre><code>angular.module('myModule', []);
  </code></pre>
  
  <p>And then a factory</p>
  
  <pre><code>angular.module('myModule')
  .factory('factory1', [
    function() {
      //some var's and functions
  }
  ]);
  </code></pre>
  
  <p>And then another factory</p>
  
  <pre><code>angular.module('myModule')
  .factory('factory2', [
    function() {
      //some var's and functions BUT I want to use some var's from factory1
  }
  ]);
  </code></pre>
  
  <p>But I want to use some variables from factory1 inside factory2, how can I inject factory1 into factory2?</p>