title: Ember.js - How can I use a service in another service?
body: <p>I have setup two services as shown in the below initializer:</p>
  
  <pre><code>/* Service Initaializers */
  var Initaializer = {
      name: 'Services',
      initialize: function(Container, App) {
          /* Inject Session Service In To All Routes And Controllers */
          App.inject('route', 'Session', 'service:session');
          App.inject('controller', 'Session', 'service:session');
          /* Inject Debug Service In To All Routes And Controllers */
          App.inject('route', 'Debug', 'service:debug');
          App.inject('controller', 'Debug', 'service:debug');
      }
  };
  
  /* Export */
  export default Initaializer;
  </code></pre>
  
  <p>I can access both the session service and debug session from my routes/controllers user <code>this.Session</code> and <code>this.Debug</code>.</p>
  
  <p>What I am having trouble doing is accessing any of the functions in the Debug service from the session service.</p>
  
  <p><strong>app/services/debug.js</strong></p>
  
  <pre><code>/* Debug Service */
  var Service = Ember.Object.extend({
      /* Start Debug */
      init: function() {
          console.log('Debug Started!'); // This does appear in the console.  
      },  
      logSomething: function(i) {
          console.log(i);  // This does work from all routes/controllers. 
      }
  });
  
  /* Export */
  export default Service;
  </code></pre>
  
  <p><strong>app/services/sessions.js</strong></p>
  
  <pre><code>/* Session Service */
  var Service = Ember.Object.extend({
      /* Start Session */
      init: function() {  
          console.log('Session Started!'); // This does appear in the console.
          this.Debug.logSomething('Test'); // This gives an error.
      },
      sayHi: function() {
          console.log('Hello From The Session Service'); // I does work from all routes/controllers.
      }
  });
  
  /* Export */
  export default Service;
  </code></pre>
  
  <p>The line that gives a console error is <code>this.Debug.logSomething('Test');</code>.</p>
  
  <p>The error is: <code>Uncaught TypeError: Cannot read property 'logSomething' of undefined</code></p>
  
  <p>What do I need to do in order to access a function in another service FROM a service?</p>