angular-cn/aio/tools/transforms/templates/api
Pete Bacon Darwin a4f3f3f81d build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673)
Now, one can add an `@alias` tag to API docs, which tells dgeni that this
API element (usually a `const`) is really just an alias for some API element
defined elsewhere.

Dgeni will then look up this API element and copy over the properties from
the alias to the current doc.

For example, we would like to privately export an Enum from `@angular/core`
but then publicly export this from `@angular/common`:

**packages/core/private_exports.ts**

```ts
/**
 * Description of this document.
 */
export enum ɵSomeEnum { ... }
```

**packages/common/public_api.ts**

```ts
import {ɵSomeEnum} from '@angular/core';

 /**
 * @alias core/ɵSomeEnum
 */
export const SomeEnum = ɵSomeEnum;
```

In the generated docs there will be a page for `common/SomeEnum`, which
will be rendered as an enum, rather than a const, showing the description
extracted from the `core/ɵSomeEnum`.

---

The implementation of this feature required some refactoring of the other
processing:

1. Previously `ɵ` prefixed exports were not even considered.
2. Due to 1. some processors needed to have guards added to ignore such
   private exports (`addMetadataAliases` and `checkContentRules`).
3. The processing of package pages had to be reworked (and split) so that
   it picked up the aliased export docs after their alias proeprties had
   been copied.

See FW-1207, FW-632, #29249

PR Close #29673
2019-04-04 10:52:36 -07:00
..
includes build(docs-infra): pluralize NgModule(s) heading as appropriate (#25768) 2018-10-01 09:36:34 -07:00
lib build(docs-infra): support doc aliases via `@alias` dgeni tag (#29673) 2019-04-04 10:52:36 -07:00
base.template.html build(docs-infra): improve API overload templates (#24976) 2018-11-01 14:17:10 -07:00
class.template.html build(docs-infra): improve directive API doc templates (#25768) 2018-10-01 09:36:32 -07:00
const.template.html build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00
decorator.template.html fix(docs-infra): fix table header layout in API pages (#24919) 2018-07-20 10:48:42 -07:00
directive.template.html build(docs-infra): move directive macros into memberHelpers.html (#25768) 2018-10-01 09:36:33 -07:00
enum.template.html build(docs-infra): remove unused property table heading (#25768) 2018-10-01 09:36:34 -07:00
export-base.template.html build(docs-infra): add short description "See more" link (#25768) 2018-10-01 09:36:34 -07:00
function.template.html build(aio): render param descriptions for function exports (#22534) 2018-03-05 10:12:55 -08:00
interface.template.html build(aio): add github links to API doc members (#24000) 2018-06-13 16:47:40 -07:00
let.template.html build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00
ngmodule.template.html build(docs-infra): expose deprecated status on items more clearly (#25750) 2018-09-21 10:26:48 -07:00
package.template.html build(docs-infra): fix formatting of entry point export table (#25768) 2018-10-01 09:36:34 -07:00
pipe.template.html build(aio): improve the API Pipe pages (#22702) 2018-03-14 14:21:11 -07:00
type-alias.template.html build(aio): fix various API rendering issues 2017-10-03 08:15:02 -07:00
value-module.template.html build(aio): refactor API templates for clean start 2017-05-03 13:30:11 -07:00
var.template.html build(aio): display types of API const docs correctly (#23850) 2018-05-11 16:44:50 -04:00