angular-cn/docs/links-package
Peter Bacon Darwin a8533b2133 chore(doc-gen): add link inline tags
This commit enables links to other docs, such as classes and modules,
via the `{@link CodeIdentifier}` style inline tag.

Dgeni identifies what you are linking to by comparing the identifier to the
aliases for each doc. If no alias matches the identifier then the dgeni
run exits with a missing doc in link error. If more than one alias matches
the identifier then dgeni exits with an ambiguous link error.

In the future we could build in some heuristics for choosing a preferred
doc when the link is ambiguous, such as choosing a public doc over a
non-public doc; and choosing a code component that is in the same module as
the doc where the link is found.

Currently there are two aliases for each API component: its name and its
identier. For example, if the `Directive` class is exported from
`angular2/annotations`, so its aliases are 'Directive' and
`angular2/annotations.Directive`.

There is an issue in the non-public doc generation, which means that it
does not yet have `{@link}` tags implemented. This is that when we re-export
a code component, it gets cloned into another module. This means that a
simple reference to the code component's name will always produce an
ambiguous link. This can be fixed with a heuristic as described above.
Meanwhile you can avoid this by always using the full id of the code
component if it is being re-exported.

Closes #1371
Closes #1421
2015-04-17 14:02:03 +01:00
..
index.js chore(doc-gen): add link inline tags 2015-04-17 14:02:03 +01:00