Currently circular references in user code manifest themselves with an error like `Cannot read properties of undefined (reading 'ɵcmp')`. This is a bit cryptic so these changes add an assertion mentioning circular references.
Relates to #65917.
(cherry picked from commit 7be4ddef1c)
Removed redundant `src/app/` prefixes from <docs-code> headers to make
examples cleaner and easier to read. The full path remains available via
the `path` attribute, so the shortened headers improve clarity without
losing context.
(cherry picked from commit 63538524bc)
As written, the example rewrote the input value as the user edited it,
causing all kinds of confusing behavior which rendered the input nearly
unusable. While such implementations are possible, they require great
care to manage the cursor position while editing. For the sake of
brevity, this example now only updates the model on `blur` events; once
the user is done editing.
(cherry picked from commit f0ad30cce6)
This commit introduces a series of improvements to the unit testing overview guide to enhance clarity, organization, and accuracy.
(cherry picked from commit 97c7025d7d)
Prevents the deprecation warning that was incorrectly triggered when
defining an InjectionToken with only a `factory`, which correctly
defaults to the `root` scope.
(cherry picked from commit 4f6014a756)
Fixes the visibility of the copy link button in API documentation headings.
The button now appears on hover, improving the user experience.
(cherry picked from commit 15e3407dab)
Add aria-hidden="true" to decorative icon elements in the ARIA menu documentation
example to prevent screen readers from announcing both icon names and labels.
This improves the accessibility experience by ensuring only meaningful text
is announced to screen reader users.
Fixes: #65768
(cherry picked from commit 1c6049584e)
Replaces custom docs-code blocks with fenced Markdown code blocks and reformats examples to improve readability, consistency, and copy-paste behavior.
(cherry picked from commit d0a34a6ca5)
The triple backtick code block parser now extracts the linenums attribute
from metadata and applies it to enable line number display in code examples
(cherry picked from commit 1f29577077)
We recently allowed users to have a dynamic input `type` with signal forms, but the logic that infers the value type falls back to `string` even though in theory it can be any of the other types.
These changes expand the inferred type to `string | number | boolean | Date | null` if we detect a dynamic `type` binding.
(cherry picked from commit 8a3f3a91cf)
Wrap operationsCounter method calls (recordCreate, recordDestroy, reset)
with ngDevMode guards to ensure they are tree-shaken in production builds.
This aligns with the existing pattern where operationsCounter is only
initialized in development mode, and eliminates unnecessary method call
overhead in production.
The optional chaining (?.) is retained as TypeScript doesn't narrow types
based on ngDevMode checks, but the entire expression will be removed during
production builds.
(cherry picked from commit 80dbd74ae8)
Ideally this tutorial would have used signals but didn't. That's a bigger change than
we are able to make right now and there are other things we would like
to update at the same time. This fix is a temporary patch to the
existing content until there is time to redo the tutorial and videos
entirely.
fixes#65863
(cherry picked from commit 200d923436)
Updates the `ng-container` documentation page to use the correct `angular-html` code format and removes an unused CLI documentation file.
(cherry picked from commit 9a6b8e0315)