Update `DeprecatedLabel` to check `entry.deprecated` instead of the stale `entry.isDeprecated` property, and preserve string deprecation messages on CLI options during rendering. Also adjust CLI reference card styles so the `@deprecated` badge and deprecation message render properly in CLI option sections.
Adjust tutorial workspace config to ensure that `ng generate component`
creates an accompanying .css file, to match what is expected in the
first-app tutorial. Adjust components in the tutorial to use `styleUrl`,
to match what is generated by `ng generate component`.
Every `[attr]` in a directive selector is recorded as an alias, including
the ones inside `:not(...)`, and the last directive in the manifest won
the alias. `ngModel`, `formControl` and `formControlName` linked to
`SelectMultipleControlValueAccessor`, `routerLink` to the deprecated
`RouterLinkWithHref` and `formGroup` to `NgForm`. An alias could also
delete a real entry of the same name, so `email()` never linked.
Collect the claimants of each alias instead. When several directives
claim one, link the one named after it, otherwise leave the alias
unlinked. An alias no longer replaces a real entry. `email` joins the
names that are not linked on their own, so it does not link in code
samples.
Render a Builders list with anchor links and separate option cards for each builder when a CLI command entry defines a builders array. Also ensure default values are displayed in builder option cards.
The image renderer wrote alt and title into the HTML unescaped, so a double quote ended the attribute early and the rest of the text became stray attributes. Escape double quotes in both attributes.
Updates Jasmine dependencies across the workspace to v7, retaining Jasmine 6
in packages/zone.js for its internal tests.
To support Jasmine 7 without relying on zone.js/plugins/jasmine-patch (which
cannot patch Jasmine 7 due to frozen environment properties and internal API
changes), unit tests across packages have been migrated off fakeAsync and
waitForAsync to standard asynchronous APIs (whenStable, useAutoTick, timeout,
and jasmine.clock).
The list renderer dropped the start number, so a numbered list resumed after a code block or paragraph restarted at 1. Emit the start attribute on the ol when the list does not begin at 1.
The search dialog highlights a result both when it is the keyboard-active
item and on CSS hover, with the same style. With the pointer resting on one
row and the keyboard moving the selection, two rows look selected, and
Enter opens the keyboard row instead of the one under the pointer.
Moving the pointer over a result now makes it the active item in the
existing key manager, so there is a single highlight and Enter acts on it.
The separate :hover rule is removed, along with an .active background rule
that a later rule always overrode.
When `{@link Foo}` does not resolve, the renderer falls back to
`CurrentSymbol.Foo` without checking that `Foo` is a member of the symbol being
rendered, so it emits a URL to an anchor that does not exist. `DefaultExport` is
rendered in both core and router while `injectAsync` is only in core's entries,
so /api/router/DefaultExport links `injectAsync` to
/api/router/DefaultExport#injectAsync.
Resolve the symbol first, and only fall back to the member form when the symbol
really is a member. A property on a function entry, and an initializer API
function, no longer take a fragment at all. Make the `@see` on `DefaultExport`
an absolute link so it resolves from every package that renders it.
Two consequences worth calling out. A `{@link}` that resolves to nothing now
fails the docs build where it used to emit a broken anchor, including a
core-only symbol referenced from a type another package re-exports. And an
explicit `{@link}` no longer consults the auto-linking exemption list, which is
what lets `{@link Event}` on `RouterEvent` reach /api/router/Event instead of a
fragment on itself.
`SectionDescription` writes a bare `<h2>Exported by</h2>` instead of using
`SectionHeading`, so it is the only heading the API templates emit without an
id. Across the built API pages there are 1023 `<h2 id="api">`, 336
`<h2 id="description">`, 225 `<h2 id="usage-notes">`, 13 `<h2 id="pipe-usage">`
and 61 bare `<h2>`, all of them this one.
API detail pages render a table of contents, and the loader selects `h2[id]`,
so the section is missing from the ToC on all 61 pages, including every pipe
and every `@ngModule`-tagged directive. It also has no anchor, so it cannot be
linked to.
Using `SectionHeading` gives it the `exported-by` id, the anchor link and the
section margin the other headings get. The `<hr>` above it is dropped: it was
the only rule in the API templates and stood in for the margin this heading
never had, so keeping both left a rule and a 3rem gap doing the same job.
`exported-by` is added to `KNOWN_API_SECTION_ANCHORS`, which the file asks to
be kept in sync with the `SectionHeading` usages, so a JSDoc link to that
fragment validates.
Follow-up to 3a85031dc0. Replace the last `fixture.detectChanges()` calls in
the shared-docs specs with `await fixture.whenStable()`, matching the
zoneless "act, wait, assert" pattern used by the rest of adev's tests.
The API reference code block built every class member signature with a
return type, so constructors were rendered as invalid TypeScript:
class ActivationStart {
constructor(snapshot: ActivatedRouteSnapshot): ActivationStart;
}
Constructors are extracted as regular method entries whose return type is
the class itself, so `getMethodCodeLine` now omits the return type when
the member is a constructor, for both the single signature and the
overloaded cases:
class ActivationStart {
constructor(snapshot: ActivatedRouteSnapshot);
}
`docs-card` interpolated `token.title` straight into the `<h3>`, so markdown
in a card title was emitted as literal text. On angular.dev the migrations
overview renders:
<h3>New `input()` API</h3>
<h3>New `output()` function</h3>
Lex the title into `titleTokens` while tokenizing and run them through
`parser.parseInline` when rendering, with `disableAutoLinking` set for the
duration so `input()` becomes inline code rather than an API link, matching
what #66582 does for headings.
Two cards in reference/migrations/overview.md are affected. One other title
containing `&` is now escaped to `&`, which renders the same and is the
correct HTML.
The `entry.deprecated` branch of `statusTag` emits `type-stable`, copied from
the `entry.stable` branch below it, so a deprecated symbol renders its header
badge in the default purple and looks identical to a stable one.
`_api-item-label.scss` already styles `.type-deprecated` red, alongside
`.type-developer_preview`, but no template ever emits that class. Across the
built API pages `type-deprecated` appears 0 times, while 97 pages pair
`type-stable` with the label text "deprecated". There is no `.type-stable`
rule at all.
Every other branch in `statusTag` uses the class matching its own status.
`docs-alert` is an inline token, so marked's default paragraph renderer
wraps it, emitting a block element inside a `<p>`:
<p><div class="docs-alert docs-alert-note">...</div></p>
The HTML parser closes the paragraph when it reaches the `<div>`, and the
orphaned `</p>` becomes a second, empty paragraph after the alert. Every
alert on the site therefore renders with an extra empty paragraph and
whatever margin the stylesheet gives it. On guide/http/making-requests all
22 alerts are affected.
Override the paragraph renderer to split a paragraph's tokens at any
`docs-alert`, emitting the surrounding text as paragraphs and letting the
alert out at block level. Paragraphs that would be empty are dropped rather
than emitted as `<p></p>`.
A bare url in a `@see` tag (e.g. `@see https://...`) matches neither the markdown nor the `{@link}` format, so it was silently dropped from the rendered docs. Now that the extractor recovers the `http(s)` prefix stripped by TypeScript, throw an error asking for a labeled markdown link instead.
Also convert the only bare `@see` url in the public API (`Location.historyGo`) to a markdown link.
Method overloads are emitted as one member card per declaration, so an API
page repeats the same member several times and every copy carries the same
id. `TestBedStatic` lists `inject` three times and `NgElement` lists
`querySelector` five times; the in-page anchor and the jump links all resolve
to the first copy, so the rest cannot be linked to.
Merge same-name methods into a single card that holds their signatures,
dropping duplicate signatures. Across the prerendered site this removes the
duplicate cards and leaves the set of documented members unchanged.