chore(doc-gen): add ids to members to allow direct linking

You can now write a link to a member of a class by appending the member name
to the class name joined by a hash sign:

```
{@link ControlGroupDirective#addDirective `addDirective`}
```

By default the link will contain the text of the class rather than the member
so you must add it as an inline code text snippet in the link tag.

Closes #1432
This commit is contained in:
Peter Bacon Darwin 2015-04-18 22:06:35 +01:00
parent d6dae0cc85
commit fbd6851860
2 changed files with 3 additions and 3 deletions

View File

@ -47,7 +47,7 @@
<md-content class="md-padding">
<ng-include src="nav.currentPage.partial"></ng-include>
<ng-include autoscroll src="nav.currentPage.partial"></ng-include>
</md-content>
</section>

View File

@ -12,7 +12,7 @@ defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ do
{%- if doc.constructorDoc %}
<section class="member constructor">
<h1 class="name">{$ doc.constructorDoc.name $}{$ paramList(doc.constructorDoc.params) $}</h1>
<h1 id="constructor" class="name">{$ doc.constructorDoc.name $}{$ paramList(doc.constructorDoc.params) $}</h1>
{% marked %}
{$ doc.constructorDoc.description $}
{% endmarked %}
@ -21,7 +21,7 @@ defined in <a href="https://github.com/angular/angular/tree/master/modules/{$ do
{%- for member in doc.members %}{% if not member.private %}
<section class="member">
<h1 class="name">{$ member.name $}{$ paramList(member.params) $}</h1>
<h1 id="{$ member.name $}" class="name">{$ member.name $}{$ paramList(member.params) $}</h1>
{% marked %}
{$ member.description $}
{% endmarked %}