35853 Commits

Author SHA1 Message Date
Pratyush Swain fe863aad05 docs(docs-infra): update NG0910 documentation with new control flow
(cherry picked from commit 27d1ccb2df)
2025-12-01 18:54:02 +01:00
Shuaib Hasan Akib 7efcd9ad4c docs: link inject function to its API reference
Replaced plain code-form usage of `inject` with a link to the
API docs (`/api/core/inject`) to improve navigation and
help readers access detailed reference information more easily.

(cherry picked from commit 7b33554d24)
2025-12-01 18:53:08 +01:00
aparziale 4d036fcc41 docs(docs-infra): Fix Incorrect indentation
Fix Incorrect indentation in hierarchical dependency injection guide

Fix #65722

(cherry picked from commit a850987519)
2025-12-01 18:52:20 +01:00
Shuaib Hasan Akib 74cbe36fa6 docs: update examples to use self-closing tags for consistency with recommended practices
Updated various template examples to use self-closing component tags
(e.g., `<my-comp />`) instead of the expanded form (`<my-comp></my-comp>`),
improving consistency across the documentation and aligning with current
Angular style recommendations.

(cherry picked from commit a464406ebf)
2025-12-01 18:50:54 +01:00
aparziale ce961fe5c0 docs(docs-infra): Fix Drag handle SVG is not visible
Fix Drag handle SVG is not visible. The css style overrides the default behavior

Fixes #65545

(cherry picked from commit 7a39565916)
2025-12-01 18:49:10 +01:00
SkyZeroZx b7ccb308b8 docs(docs-infra): Improves symbol linking for Angular Aria selectors
Improves the symbol linking logic to handle Angular component selectors (e.g., ngCombobox). It attempts to convert Angular selector patterns to their corresponding class names, improving navigation to Angular API documentation.

(cherry picked from commit 2d854e01bc)
2025-12-01 18:47:23 +01:00
galmi bc6cb6830e docs(forms): fix links in signal forms guides and use docs-pill-row links for next steps
(cherry picked from commit 726dfad9db)
2025-12-01 18:46:22 +01:00
Shuaib Hasan Akib cb2847c8d9 fix(docs-infra): truncate long TOC items and add title tooltips
Long TOC entries now truncate with …, and a title attribute is added to display the full label on hover.

Fixes: #65727
(cherry picked from commit 313454bf17)
2025-12-01 18:43:50 +01:00
Ben Hong 8cfe9d8100 docs: update aria listbox selection mode section
(cherry picked from commit 7ea5b66a70)
2025-12-01 18:41:57 +01:00
Kristiyan Kostadinov c46f65df39 docs: fix up font in drag drop examples
Fixes that the CDK drag&drop examples were using a serif font.

(cherry picked from commit 649e2ec1d4)
2025-12-01 18:40:38 +01:00
aparziale 505e1a1f6b docs(docs-infra): fix content projection documentation
Fixed documentation issues in content projection examples.
- Component decorator without '@'
- Self-closing tag for ng-content

Fix #65675

(cherry picked from commit f18dd5e54c)
2025-12-01 18:38:20 +01:00
kirjs 9aab858871 feat(docs-infra): prevent browser save dialog in adev code editor
Add Cmd+S/Ctrl+S keyboard shortcut to the adev code editor that prevents
the annoying browser save dialog from appearing. The shortcut is a no-op
since the editor already has auto-save functionality that persists changes
after 500ms of inactivity.

(cherry picked from commit cb04cee7b2)
2025-12-01 18:36:06 +01:00
Kristiyan Kostadinov 8c4a1524da release: cut the v21.0.2 release 21.0.2 2025-12-01 12:51:18 +01:00
Alan Agius 78fd159b78 fix(compiler): prevent XSS via SVG animation attributeName and MathML/SVG URLs
This commit implements a security fix to prevent XSS vulnerabilities where SVG animation elements (`<animate>`, `<set>`, etc.) could be used to modify the `href` or `xlink:href` attributes of other elements to `javascript:` URLs.

(cherry picked from commit 1c6b0704fb)
2025-12-01 10:27:00 +01:00
SkyZeroZx fec1f1ae5f docs: update code snippets in reference doocumentation
(cherry picked from commit 8f3fdc3e80)
2025-11-26 16:01:17 -05:00
Matthieu Riegler a4084154f2 refactor(migrations): don't migration the server bootstrapApplicaiton on zoneless apps.
With the change we specifically analyse `boostrapApplication` with a config that uses `mergeApplicationConfig`.

fixes #65408

(cherry picked from commit c1dfd9cde6)
2025-11-26 15:58:57 -05:00
aparziale 99b6341ca5 docs(docs-infra): fix form custom control example uses syntax
Fixed form custom control example uses non-working syntax in template

Fix #65647

(cherry picked from commit a3fb41e797)
2025-11-26 15:48:20 -05:00
Matthieu Riegler 4207d89455 docs(docs-infra): fix visible lines/regions
fixes #65552

(cherry picked from commit 1c3868198e)
2025-11-26 13:43:40 -05:00
Matthieu Riegler 1260d1ac6d refactor(devtools): Use the same error message as the signal custom formatter for signal errors
When signals throw errors on read, the devtools will show the same error message as the signal custom formatter.
We also don't log errors anymore to the console as those might be surprising to see as errors and are buggy behavior of the devtools.

(cherry picked from commit a0930e166c)
2025-11-26 13:11:10 -05:00
Matthieu Riegler 151616dd7c refactor(core): show error message on signal error
When a signal throws an error on read. The formatter will show the error message.

(cherry picked from commit 5b720aa2eb)
2025-11-26 13:11:10 -05:00
Leon Senft 0ae14cb746 test(core): test bundling of dynamic component creation and bindings
Add test coverage for bundling dynamic component creation API like
`createComponent()` and `inputBinding()`. This will be used to test that
Signal Forms related features for #64632 can be tree-shaken when unused.

(cherry picked from commit add8c41e5b)
2025-11-26 11:57:18 -05:00
SkyZeroZx 10201b6873 docs(docs-infra): renders inline code snippets in docs pills
Improves the rendering of `DocsPillRow` to correctly display inline code snippets (using backticks) within the pill labels.

(cherry picked from commit ef034c15c1)
2025-11-25 18:30:09 -05:00
kirjs 47a739611a release: cut the v21.0.1 release 21.0.1 2025-11-25 15:04:58 -05:00
Alan Agius 3240d856d9 fix(http): prevent XSRF token leakage to protocol-relative URLs
The XSRF interceptor previously failed to detect protocol-relative URLs (starting with `//`) as absolute URLs. This allowed requests to such URLs to include the XSRF token, potentially leaking it to external domains.

This change updates the interceptor to correctly identify protocol-relative URLs as absolute and exclude them from receiving the XSRF token.

(cherry picked from commit 40790ef980)
2025-11-25 13:47:29 -05:00
Alan Agius 908b5a41a3 refactor: replace getDocument() with inject(DOCUMENT)
This replaces `getDocument()` with `inject(DOCUMENT)` across hydration and transfer state logic.

(cherry picked from commit 400fc82c43)
2025-11-25 13:05:01 -05:00
Kristiyan Kostadinov 6b20adff62 refactor: add mark for signal forms
Adds a mark for signal forms so we can track adoption. Also moves the call for `@let` into `declareLet` since we don't need it to fire as often as in `storeLet`.

(cherry picked from commit c994267f17)
2025-11-25 13:03:46 -05:00
Alan Agius 49ad7c6508 fix(core): use injected DOCUMENT for CSP_NONCE
This ensures that the right document is used and that `CSP_NONCE` can be used in `provideAppInitializer` and `provideEnvironmentInitializer`.

Closes #65624

(cherry picked from commit 3b1fa8235b)
2025-11-25 11:39:23 -05:00
AntonChesnokov 8d3a89a477 fix(compiler-cli): escape angular control flow in jsdoc
Escape @-prefixed template control flow constructs during doc extraction so JSDoc parsing keeps description text intact. Add regression coverage for @for snippets.

(cherry picked from commit 5bfa027d41)
2025-11-25 11:33:29 -05:00
Angelo Parziale 4634b467c2 docs(docs-infra): Fix anchor link DI
Fix anchor link for Dependency Injection Overview.

(cherry picked from commit 346caefa8d)
2025-11-25 11:05:45 -05:00
kirjs e3f5f34732 refactor(forms): Make reset take value
Now you can do form.reset({name: 'cat', age: 4});

(cherry picked from commit dec222d4d7)
2025-11-25 10:51:38 -05:00
Angular Robot 9aa3e92c82 build: lock file maintenance
See associated pull request for more information.
2025-11-25 10:34:12 -05:00
Miles Malerba 7d5c7cf99a feat(forms): add DI option for classes on Field directive
Adds a DI configuration option for signal forms that allows the
developer to specify CSS classes that should be automatically added
by the `Field` directive based on the field's status.

(cherry picked from commit c70e246c23)
2025-11-25 10:33:41 -05:00
SkyZeroZx 477df38d17 docs: improve core package API documentation with additional reference links
(cherry picked from commit 67d41e9bcc)
2025-11-25 10:19:39 -05:00
Cheng-Hsuan Tsai 69d6f8fe2c docs: replace aria grid overview example
(cherry picked from commit 56e059948f)
2025-11-25 10:17:00 -05:00
Leon Senft 8acf5d2756 fix(forms): allow dynamic type bindings on signal form controls
The type checker will no longer prohibit binding the Signal Forms `[field]`
directive to an input with a dynamic `[attr.type]` or `[type]` binding.

(cherry picked from commit 3a1eb07c46)
2025-11-25 09:16:01 -05:00
Oyama Michinoku c9f50b424b docs: fix typo by correcting W3 to W3C
(cherry picked from commit 2102bfe5aa)
2025-11-25 09:14:03 -05:00
Hussein Mahmoud Kandil d5b339c1a3 docs: fix example imports and missing event URL reference
The analytics tracking example contained unused and missing imports,
and it incorrectly referenced the page's URL.
This update fixes the imports and ensures the handler uses `event.url`,
allowing the example to work correctly.

(cherry picked from commit a294e3b94d)
2025-11-25 07:44:08 -05:00
Andrew Scott 0e458c7e12 refactor(core): Remove toggles used for zoneless by default migration
this migration is complete both internally and externally

(cherry picked from commit 51ebe9a4fc)
2025-11-24 16:57:52 -05:00
Kristiyan Kostadinov 70507b8c1c fix(core): debug data causing memory leak for root effects
We track all effects that are created for debugging purposes in the `resolverToEffects` map. This ends up leaking memory for effects registered on long-living resolvers (e.g. on the root injector), because they stay in the array, even if the effect itself has been destroyed.

These changes add a callback to clean up the references.

Fixes #65265.

(cherry picked from commit ca6ab6c914)
2025-11-24 15:26:12 -05:00
Leon Senft 4845a33018 refactor(forms): support custom control directives
Support binding `[field]` to directives that implement
`FormValueControl` or `FormCheckboxControl`.

The `[field]` binds to whichever directive (or component) matches first in the
event there are multiple implementations. We are considering whether to make
this an error state, which could be reported during type checking.

Closes #63910, Closes #64992

(cherry picked from commit f97a1d4856)
2025-11-24 13:48:20 -05:00
Ben Hong 534cc3dc37 docs: standardize aria code examples to not use component suffix
(cherry picked from commit d442c72f87)
2025-11-24 13:28:36 -05:00
Matthieu Riegler 6cb191bade docs: add callout on zone base testing helpers
With zoneless being the default, we need to make these requirements more explicit.

fixes #65539

(cherry picked from commit b34e48bdff)
2025-11-24 13:27:49 -05:00
Joey Perrott 0424a998c9 refactor(docs-infra): make docs-alert an inline token
Migrate docs-alert to be inline instead of block, this ensures that the content is placed within a <p> tag as expected. This is important
for ensuring that the iconography is placed correctly within the wrapper div generated for the alert. Additionally, we refactor the matcher
code to be more efficient, running with fewer loops.

(cherry picked from commit 046501fd33)
2025-11-24 13:26:03 -05:00
Matthieu Riegler 9b0900f0e9 ci: update pullapprove reviewers
Removing Minko from the pool of automatically picked reviewers

(cherry picked from commit 98ceb0a80d)
2025-11-24 13:25:30 -05:00
SkyZeroZx a62162d2ee docs: Update router docs to add references and components input fixed syntaxis
(cherry picked from commit 2ac826867b)
2025-11-24 13:18:31 -05:00
Alessio Pelliccione 9d6b86958a docs(docs-infra): fix missing syntax highlighting
closed angular#65565

(cherry picked from commit 7d20f2071c)
2025-11-24 13:13:25 -05:00
Shuaib Hasan Akib b513008fc8 refactor(common): remove redundant standalone: true as it is default now
-removing `standalone: true` from integration
- removed whitespace

(cherry picked from commit 93cff501e9)
2025-11-24 13:12:18 -05:00
Kristiyan Kostadinov 39c577bc36 fix(compiler-cli): do not type check native controls with ControlValueAccessor
Currently when we detect a `field` binding on a native element, we treat it as a built-in native control. This might not be the case if it's a pre-existing `ControlValueAccessor` relying on the CVA interop.

These changes try to detect any CVA-like directive on the element and disable the additional type checking if there are any.

Fixes #65468.

(cherry picked from commit 6b8720de91)
2025-11-24 13:08:46 -05:00
Kristiyan Kostadinov f0b34854cc refactor(compiler-cli): track public methods during analysis
Updates the directive analysis to track the public methods of the class.

(cherry picked from commit 5cfdd7897b)
2025-11-24 13:08:46 -05:00
Tomer953 f394215b14 fix(migrations): detect structural ngTemplateOutlet and ngComponentOutlet
the common-to-standalone migration only matched [ngTemplateOutlet] and
[ngComponentOutlet] bindings and missed their structural forms
(*ngTemplateOutlet and *ngComponentOutlet). This caused missing imports
when removing CommonModule. This change adds structural directive
patterns so the migration correctly identifies needed imports.

(cherry picked from commit a4f50bdd54)
2025-11-24 12:41:01 -05:00