You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
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 say See {@link ComponentAnnotation} but that would break the Dart documentation, since Dart does not have decorators only components.
Two solutions:
Have a list of annotations which the dgeni would automatically append Annotation too. So ``See {@link Component}becomes: Component`
Have the source always say Annotation suffix and then have dgeni auto remove it in Dart and in the link. So See {@link ComponentAnnotation} becomes: <a href='/angular2/angular2.api/ComponentAnnotation'><code>Component</code> (note that we want to keep the text as Component in both cases)
Solution no. 1: (Preffered)
Algorithm
Detect if a symbol is in a set of annotations: Component, View, Directive, Query, Attribute, Injectable
If it is annotation, then generate URL to: <a href='/angular2/angular2.api/FooAnnotation'><code>Foo</code>
Solution no. 2 is simpler to implement, but requires both ts2dart and dgeni collaboration, so I don't think we should do it.
Algorithm
Docs always say: {@link FooAnnotation}
Dgeni generates: <a href='/angular2/angular2.api/FooAnnotation'><code>Foo</code> where
it always strips out Annotation suffix in the title.
strips out Annotation suffix in the URL only for Dart generation
The text was updated successfully, but these errors were encountered:
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.
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:
Component
`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 generationThe text was updated successfully, but these errors were encountered: