14660 Commits

Author SHA1 Message Date
Angular Robot 290b2814e1 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-28 19:28:34 +00:00
Leon Senft 9f99b14882 fix(forms): only touch visible, interactive fields on submit
Don't touch hidden, disabled, or readonly fields on submit, since they
don't contribute to form validity. This also prevents errors from
appearing immediately if they're later made interactive.

Fix #66344

(cherry picked from commit e682e53113)
2026-01-28 18:56:06 +00:00
Matthieu Riegler 7242da24fb docs: reword docs on standalone.
fixes #66773

(cherry picked from commit 611f6a49d1)
2026-01-28 18:16:58 +00:00
Leon Senft 31e6f0d7dc test(forms): submit behavior while validation is pending
Ensure `submit()` behaves as expected while a form is pending.

- Submission is not blocked by pending validation.
- Submission errors prevent pending validation errors from appearing
  after they resolve on the same field.
- Submission errors don't prevent pending validation errors from
  appearing after they resolve on subfields.

(cherry picked from commit 01bfb83fc9)
2026-01-28 00:15:33 +00:00
Jaime Burgos 6601f06e44 test(common): enables zoneless change detection in tests
Adds `provideZonelessChangeDetection` to TestBed configurations in  `ngComponentOutlet` , `ngOptimizedImage` , `ngTemplateOutlet` and `ngPlural`.

(cherry picked from commit 4448356313)
2026-01-28 00:08:50 +00:00
Andrew Scott c57b0355b5 fix(language-service): Detect local project version on creation
This updates the language service to use the detected version of angular
core in the given project on load rather than the minimum detected
version in the workspace

(cherry picked from commit 8a7cbd4668)
2026-01-26 23:51:34 +00:00
Matthieu Riegler 06952b4f0f docs(docs-infra): remove unused examples
(cherry picked from commit 899df39c7c)
2026-01-26 23:19:39 +00:00
Matthieu Riegler 89525ec6b7 docs: add mentions of the global target syntax.
(cherry picked from commit 87a72f3dd0)
2026-01-26 22:31:14 +00:00
SkyZeroZx 359470979b refactor(core): remove index from text node creation
Removes unnecessary `index` parameter from `_locateOrCreateTextNode`
and `locateOrCreateTextNodeImpl` functions.

(cherry picked from commit 1df564b9f9)
2026-01-26 22:22:59 +00:00
SkyZeroZx 051ba061a0 refactor(core): improve tree-shaking
Refactors getNodeInjectable to avoid pulling in stringifyForError production builds, reducing unnecessary symbols in production bundles

(cherry picked from commit 8feb541060)
2026-01-26 22:19:00 +00:00
Andrew Scott 21ecdc036a fix(router): Do not intercept reload events with Navigation integration
This commit prevents the Router from intercepting reload navigations
in the navigate event listener. This would convert hard page reloads
to SPA navigations.

fixes #66746
2026-01-26 20:58:49 +00:00
SkyZeroZx e6ea328cf4 docs: update bootstrapApplication docs
(cherry picked from commit 85122cb12d)
2026-01-23 11:45:20 -08:00
Kristiyan Kostadinov c9043fb876 refactor(compiler-cli): remove deprecated signature usage
The signature for `createImportClause` was deprecated in TS 5.9. These changes switch to the non-deprecated one.

(cherry picked from commit dbc1452de3)
2026-01-22 21:02:42 +00:00
Angular Robot 643f0f4b22 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-21 12:43:47 -08:00
Matthieu Riegler 18842266de docs(docs-infra): Handle additional description format
Ex: https://angular.dev/api/router/withExperimentalPlatformNavigation
(cherry picked from commit f0b1061791)
2026-01-21 19:37:11 +00:00
Matthieu Riegler 223ff74891 build: don't substitute binary files
Previously, ng_package applied version stamping to all source files, which corrupted binary files like SQLite databases.

This change ignores text substitution for files passed to the `data` attribute, ensuring binary assets are preserved intact in the final package.

fixes #66637

(cherry picked from commit b885851cbe)
2026-01-21 18:35:08 +00:00
JoostK 0e1f1ed573 fix(compiler-cli): drop .tsx extension for generated relative imports
When synthesizing an import corresponding with a .tsx file, the extension
would not be removed unlike regular .ts files. Adjust the import generators
to also drop any .tsx extension from module specifiers.

Closes #66262

(cherry picked from commit d94b19a92f)
2026-01-21 18:33:17 +00:00
Shuaib Hasan Akib 62d847325d refactor(common): cleanup unused code in doc regions
Cleans unused imports and code
that is not referenced within the associated docregion blocks.

(cherry picked from commit 6284126da5)
2026-01-21 00:31:13 +00:00
Kristiyan Kostadinov ea70b003b0 refactor(compiler): remove unused symbols
Removes symbols that aren't used anymore from the identifiers map.

(cherry picked from commit e4c09776b0)
2026-01-21 00:14:19 +00:00
Leon Senft 26c2fe6db2 refactor(forms): remove unused API
Remove `SubmittedStatus` which is no longer used.

(cherry picked from commit d0ba332292)
2026-01-20 18:20:01 +00:00
Shuaib Hasan Akib 58720dbc56 refactor(forms): update Reactive Forms guide URL
Updates the Reactive Forms documentation link to the new `guide/forms/reactive-forms` path after the recent docs restructure.

(cherry picked from commit 4adbc4fa19)
2026-01-20 18:11:51 +00:00
Kristiyan Kostadinov 32ad1e09b4 build: move zone.js build off deprecated flag
The Zone.js build was depending on the `--outFile` flag from TypeScript which is deprecated. These changes switch to using `--outDir` and copying the files out of the directory instead.

(cherry picked from commit 52bc0208f9)
2026-01-16 17:28:50 +00:00
Miles Malerba cb75f9ce85 fix(forms): fix control value syncing on touch
Previously we were unconditionally setting the control value back into
the value, regardless of if it had actually been changed. This PR
changes the logic to flush the pending sync on touch if there is one, or
just skip it if there isn't.

(cherry picked from commit e7b2dde6d1)
2026-01-16 17:25:31 +00:00
Kristiyan Kostadinov ded654dc6b build: initial test of TypeScript 6
Resolves some initial test failures after updating to TypeScript 6.

(cherry picked from commit d9c980a958)
2026-01-15 21:41:05 +00:00
Kristiyan Kostadinov 05adfcf8f2 fix(core): handle Set in class bindings
Currently migrating from `[ngClass]` to `[class]` isn't entirely supported, because `[ngClass]` supports `Set` values while `[class]` ignores them.

These changes add a bit of logic to bring them closer together and make the migration easier.

(cherry picked from commit 4831a9f676)
2026-01-15 21:40:02 +00:00
Miles Malerba d89a80a970 feat(forms): Ability to manually register a form field binding in signal forms
This PR adds the ability to manually register a binding with the
`FormField` directive. This is useful for a lower-level implementation
that takes the field tree as an `input()` rather than relying on the
automatic binding from `FormUiControl`.

(cherry picked from commit 5974cd0afc)
2026-01-15 19:03:32 +00:00
Angular Robot ae4e2e02d0 build: update cross-repo angular dependencies to v21.1.0
See associated pull request for more information.
2026-01-14 15:05:15 -08:00
Matthieu Riegler 1ea5c97703 feat(forms): allow focusing bound control from field state
Allows focusing the assocated bound control from the `FieldState`.
2026-01-14 08:26:54 -08:00
Jessica Janiuk 134742fb7b Revert "refactor(core): remove ng when invoking enableProdMode"
This reverts commit cb5879f566.

(cherry picked from commit e673eb6df2)
2026-01-14 16:09:02 +00:00
Matthieu Riegler 9a764e0f5f refactor(core): remove ng when invoking enableProdMode
This was caught while investigating a leak.

(cherry picked from commit cb5879f566)
2026-01-13 19:39:53 +00:00
Jeremy Elbourn 114d03f6a6 docs: update OnChanges API reference w/ signal input
We had some reports of LLMs claiming that `ngOnChanges` does not include
changes for signal-based inputs. This is wrong (and the LLMs just made
it up), but we can update the docs at least to demonstrate `ngOnChanges`
with signal-based inputs.

Previously, the API reference used a real test as a code example, but
updating the test to a signal-based input is more involved than this
change needs to call for.

(cherry picked from commit 871fa1b2dd)
2026-01-13 17:04:28 +00:00
SkyZeroZx b1c68e66a7 docs: update examples to use isActive instead of deprecated Router.isActive (#66430)
PR Close #66430
2026-01-12 22:42:33 +00:00
Matthieu Riegler 532633301b fix(forms): Ensure the control instruction comes after the other bindings
Prior to this change, binding to radio value was sensitive to the order in which `value` & `formField` where binding in the template.
The compiler change makes that order non-important.

fixes #66402

(cherry picked from commit 65fa5b5439)
2026-01-12 21:49:23 +00:00
cexbrayat 8474277b49 test(forms): improve test coverage for multiple pattern validators
Add comprehensive test cases to validate behavior when multiple
pattern validators are applied to the same field.

These tests clarify that multiple patterns operate with AND logic,
where each pattern is validated independently and produces its own
error when it doesn't match.

(cherry picked from commit 7fd076bdd3)
2026-01-12 21:48:20 +00:00
Shuaib Hasan Akib 5ad2e1bae0 docs: replace old https://angular.io/license with https://angular.dev/license
(cherry picked from commit 1b4dcc01ff)
2026-01-12 21:41:34 +00:00
SkyZeroZx 3954dc278b refactor(http): remove redundant providedIn: 'root' in XSRF_HEADER_NAME
Removes unnecessary `providedIn: 'root'` declarations from injection token

(cherry picked from commit e38c1bf743)
2026-01-12 18:00:30 +00:00
SkyZeroZx 8cf3a72d57 refactor(core): Add missing OnDestroy to zone and zoneless change detection schedulers
Implements the OnDestroy interface in NgZoneChangeDetectionScheduler and ChangeDetectionSchedulerImpl

(cherry picked from commit fa6e82b569)
2026-01-12 18:00:29 +00:00
SkyZeroZx c7d6053797 refactor(compiler-cli): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:53 +00:00
SkyZeroZx 03e2b36826 refactor(core): update error message links to versioned docs (#66374)
Error message links now point to the archived documentation site (v*.angular.dev)
so that referenced content matches the framework version in use.

See angular#44650

PR Close #66374
2026-01-09 22:33:52 +00:00
Miles Malerba 29f074a93f fix(forms): Rename signal form [field] to [formField]
This completes the rename started in #66136. `[field]` is too generic of
a selector for the forms system to own, and likely to cause naming
collisions with existing components. Therefore it is being renamed to
`[formField]`

(cherry picked from commit 5671f2cc07)
2026-01-09 22:33:13 +00:00
tomer953 62d7533ca6 fix(migrations): prevent duplicate imports in common-to-standalone migration
The common-to-standalone migration did not check for existing imports
when adding needed imports after removing CommonModule. This change adds deduplication
logic to filter out imports that already exist in the imports array
before adding them, ensuring each import appears only once.

(cherry picked from commit 008e20ca56)
2026-01-09 22:30:52 +00:00
fisker 0875deab8d refactor(compiler): switch Binary.isAssignmentOperation to type guard function
Improve `Binary.isAssignmentOperation` types

(cherry picked from commit 4fb24cadee)
2026-01-09 17:59:33 +00:00
kirjs 0c23d02944 docs(forms): Clarify returning errors from submit functions
Update outdate comment, and add a section to the docs

(cherry picked from commit 7d985ce08e)
2026-01-09 16:47:46 +00:00
fisker 83bac5adc9 refactor(compiler): tighten Unary.operator type
Improve `Unary.operator` type

(cherry picked from commit a7e470a1b3)
2026-01-09 16:47:05 +00:00
fisker e01dcae4c5 refactor: _ParseAST.isAssignmentOperator to type guard
Update `_ParseAST.isAssignmentOperator` to type guard

(cherry picked from commit 4d19408e9b)
2026-01-09 16:45:40 +00:00
fisker 4cdf4d5760 refactor(compiler): tighten Binary.operation type
Improve `Binary.operation` types

(cherry picked from commit 07a08ab9f8)
2026-01-09 16:45:39 +00:00
Angular Robot 2c3a067bb6 build: update cross-repo angular dependencies
See associated pull request for more information.
2026-01-08 14:42:26 -08:00
Andrew Scott 74af7d85e5 refactor(core): Use the provided Document value rather than global in FakeNavigation
This commit ensures the Document used by `FakeNavigation` is the one
passed in the constructor rather than the global `document`, which may
be different.

(cherry picked from commit 49295778bc)
2026-01-08 21:28:23 +00:00
Jessica Janiuk a2b9429992 Revert "feat(router): add trailingSlash config option"
This reverts commit 12fccc5e99.
2026-01-08 12:20:03 -08:00
Andrew Scott 86dc1283e8 fix(core): handle cancelled traversals in fake navigation
Update fake navigation implementation to correctly handle traversals that are cancelled (e.g. by a precommit handler).
Ensure prospective index is calculated correctly so that subsequent traversals target the correct entry.
Add regression test for cancelled traversals.
2026-01-08 11:27:37 -08:00