title: how can i extend a service
body: <p>I am fairly new to <a href="http://angularjs.org/" rel="noreferrer"><code>angularjs</code></a> and am not able to find any documentation or examples for this. What I am looking to do is to extend a basic service so that i can use the methods defined under the basic service from other services. So for example say i have a basic service as follows.</p>
  
  <pre><code>angular.module('myServices', []).
  
      factory('BasicService', function($http){
          var some_arg = 'abcd'
          var BasicService = {
              method_one: function(arg=some_arg){ /*code for method one*/},
              method_two: function(arg=some_arg){ /*code for method two*/},
              method_three: function(arg=some_arg){ /*code for method three*/},
          });
          return BasicService;
      }   
  );
  </code></pre>
  
  <p>Now i want to define an Extended service that extends from the above <code>BasicService</code> so that i can use methods defined under the BasicService from my extended service. Maybe something like:</p>
  
  <pre><code>    factory('ExtendedService', function($http){
          var ExtendedService = BasicService();
          ExtendedService['method_four'] = function(){/* code for method four */}
          return ExtendedService;
      }
  </code></pre>