-
Notifications
You must be signed in to change notification settings - Fork 27.5k
ngPluralize / ngView Documentation bug #14045
Comments
This is a bug in angular/dgeni-packages. the usage section uses the params, but it can't handle directives whose attribute selector doesn't take a value (ng-pluralize is a void attribute, and it's not listed in the params). I think this should be handled as a special case in |
@Narretz Where is this Usage part even documented as it's not part of the ngDoc? And BTW, you're right about this selector bug as |
The usage template part is defined in this template: https://github.com/angular/dgeni-packages/blob/master/ngdoc/templates/api/directive.template.html and it takes the information from the |
I've opened angular/dgeni-packages#158 to track this on the dgeni-packages site. It's kind of low priority. Do you want to give this a shot? |
@Narretz I don't think I'd be up for it as I don't know anything about how dgeni works nor do I have the time at the moment to learn about it. If you may provide some sort of info how this template is being processed I may see where to look and maybe come up with a solution. |
In the template, there is this block, which renders the usage section.
For elements that can be used as attributes, it renders an element with the directive name and all of its params as attributes. What we should do: when the directive name is not in the params, add it as an attribute |
When a directive doesn't take a value, its name is not included in the parameters, which previously meant that the directive name was missing from the Usage section of the docs. This commit adds the name to the Usage section when it is missing from the parameters. Closes angular#14045
When a directive doesn't take a value, its name is not included in the parameters, which previously meant that the directive name was missing from the Usage section of the docs. This commit adds the name to the Usage section when it is missing from the parameters. Closes angular#14045
When a directive doesn't take a value, its name is not included in the parameters, which previously meant that the directive name was missing from the Attribute / CSS Class usage section of the docs. This commit adds the name to the Usage section when it is missing from the parameters. Closes angular#14045
When a directive can be used as an attribute or CSS class, but doesn't take a value, its name is not included in the parameters, which previously meant that the directive name was missing from the Attribute / CSS Class usage section of the docs. This commit adds the name to the Usage section when it is missing from the parameters. Closes #14045 Closes #16265
On the website if you look at ngPluralize and check usage, you can see that when you use this directive as an attribute it's actually missing the n-pluralize attribute.
This is what is written now
This is what it should be
The text was updated successfully, but these errors were encountered: