angular/dgeni-packages

Documentation of property of property of service doesn't render

csaftoiu opened this issue · 4 comments

(Redirected from angular.js #13178.)

Given this code:

var zomg = angular.module('zomg', []);

/**
 * @ngdoc object
 * @name zomg.Foo
 * @description
 * # Foo
 */
zomg.factory('Foo', [function () {
  return {
    /**
     * @ngdoc object
     * @name zomg.Foo.bar
     * @propertyOf zomg.Foo
     * @description
     * A property of Foo
     */
    bar: {
      /**
       * @ngdoc object
       * @name zomg.Foo.bar.baz
       * @propertyOf zomg.Foo.bar
       * @description
       * A property of Foo.bar
       */
      baz: 100
    }
  };
}]);

I get this documentation:

image

That is, the Foo.bar.baz property doesn't show up in the documentation. It is parsed properly - since if I change @propertyOf from zomg.Foo.bar to something like zomg.Foo.doesnotexist, I get an error when compiling the documentation. But the results don't show up in the resulting HTML.

How should I document nested objects? The actual use case is that I have a service which contains $resources, and I want to document the special methods on the $resource. I'd rather do it in a standard jsdoc way (@ngdoc function with @methodOf of the special function itself) rather than including it in the @description of the $resource in a non-standard way.

This is not currently supported in the ngdoc package right now.

the property name can not have children, right ? ex. "abc" is ok, but not "abc.def".

Duplicate of #126