title: How to document a factory that returns a class in angular with ngdoc?
body: <p>Given an angular app with a factory that returns a class, as such:</p>
  
  <pre><code>angular.module('fooApp').factory('User', function(){
      function User(name){
          this.name = name;
      }
  
      User.prototype.greet = function(){
          return "Howdy, " + this.name;
      }
  
      return User;
  });
  </code></pre>
  
  <p><strong>Using <code>ngdoc</code> (the special flavor of <code>jsdoc</code> angular uses), how do I document the initializer without defining it as a method?</strong></p>
  
  <p>Right now, this is what I've tried:</p>
  
  <pre><code>/**
   * @ngdoc service
   * @name fooApp.User
   * @description User factory.
   */
  
  angular.module('fooApp').factory('User', function(){
  
      /**
       * @ngdoc method
       * @methodOf fooApp.User
       * @name Initializer
       * @description Initializes a new User object with a name
       */
      function User(name){
          this.name = name;
      }
  
      User.prototype.greet = function(){
          return "Howdy, " + this.name;
      }
  
      return User;
  });
  </code></pre>
  
  <p>But this results in the <code>User</code> initializer (the <code>User</code> function that accepts the parameter <code>name</code>) being treated like a method with the name <code>Initializer</code>, which is confusing to people trying to use this code.</p>
  
  <p>I've tried adding the <code>@constructor</code> flag, but this has no effect of the html <strike><code>dgeni</code> ends up generating</strike>.</p>
  
  <p>Thank you.</p>
  
  <hr>
  
  <p><strong>UPDATE</strong>: Removed references to <code>dgeni</code>. I was under the impression that the plugin I was using (<a href="https://www.npmjs.com/package/grunt-ngdocs">grunt-ngdocs</a>) uses <code>dgeni</code> behind the scenes, but this is not the case.</p>