title: AngularJS Cannot call method 'getValue' of undefined
body: <p>I got a problem with angularJS , I got two factories and when I want to call a methode of one factory in the other I get this error : 
  TypeError: Cannot call method 'getValue' of undefined</p>
  
  <p>my two factories : </p>
  
  <pre><code>technoServices.factory('Shared',
      function(){
          var Shared={};
          Shared.setValue=function(header){
                  Shared.header = header;
              }
          Shared.getValue=function(){
  
                  return Shared.header;
              }
          return Shared;
          });
  
  technoServices.factory('Config',['$resource','Shared',
    function($rootScope,$resource,token,Shared){
  
  return $resource('../../rest/config',null,{
      get: {
          method:'GET',
          headers:{'X-Token':''+Shared.getValue()},
          isArray:false}
  });
  }]);
  </code></pre>
  
  <p>The error is when i do : Shared.getValue()</p>