Angular Js service returns function/object?
<p>As per the angular js <a href="https://docs.angularjs.org/api/auto/service/$provide#service" rel="nofollow">docs</a></p>

<p>service(name, constructor);
name : name
constructor : An injectable class (constructor function) that will be   instantiated.</p>

<pre><code>Internally :
{
  $get: function() {
    return $injector.instantiate(constructor);
  }
}
</code></pre>

<blockquote>
  <p>It could be concluded from the angular docs that service treats the
  2nd argument passed as a constructor and provider creates an instance
  through $injector and returns through $get. So whenever we will inject
  the service in any of our module functions(controllers , directives
  etc) it should return the newly created object which is Singleton
  offcourse.</p>
</blockquote>

<p>Now the problem comes here if I define my service like these ways.</p>

<pre><code>1. _app_user_content.service("MyService" , function(){
        this.Message = "Greetings!";
    });  //returns object when injected.
2. _app_user_content.service("MyService" , function(){
        this.Message = "Greetings!";
        return "123"
    }); // returns object  when injected.
3. _app_user_content.service("MyService" , function(){
        this.Message = "Greetings!";
        return function(){}
    }); //returns function(){}  when injected. Doesnot return object
</code></pre>

<p>Why does the third case return a function?</p>