Open mhevery opened 9 years ago
Docs in dgeni can have aliases that are used in link matching. I think it will be enough to add the name stripped of the Annotation postfix as alias for ea check of those.
E.g.
id: 'ComponentAnnotation',
aliases: ['ComponentAnnotation', 'Component']
In Angular documentation we often write:
See {@link Component}
Which generates a link to:<a href='/angular2/angular2.api/Component'><code>Component</code>
. But this is not quite right. It should generate a link to<a href='/angular2/angular2.api/ComponentAnnotation'><code>Component</code>
. No we could just change the source to saySee {@link ComponentAnnotation}
but that would break the Dart documentation, since Dart does not have decorators only components.Two solutions:
dgeni
would automatically appendAnnotation
too. So`See {@link Component}
becomes:<a href='/angular2/angular2.api/ComponentAnnotation'><code>Component</code>
Annotation
suffix and then havedgeni
auto remove it in Dart and in the link. SoSee {@link ComponentAnnotation}
becomes:<a href='/angular2/angular2.api/ComponentAnnotation'><code>Component</code>
(note that we want to keep the text asComponent
in both cases)Solution no. 1: (Preffered)
Algorithm
Component
,View
,Directive
,Query
,Attribute
,Injectable
<a href='/angular2/angular2.api/FooAnnotation'><code>Foo</code>
Solution no. 2 is simpler to implement, but requires both
ts2dart
anddgeni
collaboration, so I don't think we should do it.Algorithm
{@link FooAnnotation}
<a href='/angular2/angular2.api/FooAnnotation'><code>Foo</code>
whereAnnotation
suffix in the title.Annotation
suffix in the URL only for Dart generation