Skip to content
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
mbenford opened this issue Mar 24, 2015 · 2 comments
Closed

Documentation on directives no longer shows attribute types #11415

mbenford opened this issue Mar 24, 2015 · 2 comments
Assignees
Milestone

Comments

@mbenford
Copy link
Contributor

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.

@lgalfaso
Copy link
Contributor

@petebacondarwin Do you want to look into this?

@petebacondarwin
Copy link
Contributor

Will do. Easy fix?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants