This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Documentation on directives no longer shows attribute types #11415
Closed
Description
The Usage section of all directives isn't displaying attribute types anymore. For instance:
<input
ng-model=""
[name=""]
[required=""]
[ng-required=""]
[ng-minlength=""]
[ng-maxlength=""]
[ng-pattern=""]
[ng-change=""]
[ng-trim=""]>
...
</input>
This used to be like the following:
<input
ng-model="{string}"
[name="{string}"]
[required="{string}"]
[ng-required="{boolean} "]
[ng-minlength="{number}"]
[ng-maxlength="{number}"]
[ng-pattern="{string}"]
[ng-change="{expression}"]
[ng-trim="{boolean}"]>
...
</input>
The "culprit" here is Dgeni's directiveParam
macro which uses type.description
instead of type.name
:
{%- macro directiveParam(name, type, join, sep) %}
{%- if type.optional %}[{% endif -%}
{$ name | dashCase $}{$ join $}{$ type.description $}{$ sep $}
{%- if type.optional %}]{% endif -%}
{% endmacro -%}
I happen to know this because I'm using Dgeni for generating my own documentation and I noticed it wouldn't render the type name.
Now, I don't know if this is by design and is expected. It doesn't seem correct to me, though.