Commit graph

14425 commits

Author SHA1 Message Date
SkyZeroZx
2ac826867b docs: Update router docs to add references and components input fixed syntaxis 2025-11-24 13:18:28 -05:00
Alessio Pelliccione
7d20f2071c docs(docs-infra): fix missing syntax highlighting
closed angular#65565
2025-11-24 13:13:22 -05:00
Kristiyan Kostadinov
6b8720de91 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.
2025-11-24 13:08:42 -05:00
Kristiyan Kostadinov
5cfdd7897b refactor(compiler-cli): track public methods during analysis
Updates the directive analysis to track the public methods of the class.
2025-11-24 13:08:42 -05:00
Tomer953
a4f50bdd54 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.
2025-11-24 12:40:57 -05:00
hawkgs
0f4b11c293 refactor(compiler-cli): add a resource debugName transform (#64172)
Add a TS transform for `resource` (and `httpResource`) `debugName`. Test the transformations.

PR Close #64172
2025-11-24 11:30:12 -05:00
hawkgs
3ae452e64f refactor(core): add debug name to resource (#64172)
Decorate `resource` (and `httpResource`) with `debugName`, along with all of its internal signals.

PR Close #64172
2025-11-24 11:30:12 -05:00
Kristiyan Kostadinov
26e2092dd1 test: remove unnecessary test calls
Removes calls to `TestBed.configureTestingModule` since they aren't necessary.
2025-11-24 10:18:18 -05:00
SkyZeroZx
38a354ffa2 docs: Adds signal type checking documentation 2025-11-21 16:31:13 -05:00
Matthieu Riegler
b6fee3f107 fix(core): apply bootstrap-options migration to platformBrowserDynamic
The migration wasn't applied to projects relying on `platformBrowserDynamic()` prior to this fix.
2025-11-21 16:28:20 -05:00
Syam Gadde
1628125bcb fix(compiler-cli): ignore non-existent files
Ignore files that fail fs.exists() rather than throw ENOENT.  Some applications deliberately create "broken" symbolic links that are not relevant to compilation (e.g. emacs lock files that link to owner "user@host").
2025-11-21 11:38:57 -05:00
Andrew Scott
1ab461c846 refactor(router): Store route injector on ActivatedRoute instance
This eliminates the need to pass around the EnvironmentInjector
everywhere we need the injection context for a route.
2025-11-20 17:05:10 -05:00
Andrew Scott
c25d749d85 feat(router): Execute RunGuardsAndResolvers function in injection context
Allows more sophisticated checks based on information available in DI
(e.g. the router state). Use-cases have been described in #53944 / https://github.com/angular/angular/issues/31843#issuecomment-1890955590

resolves #53944
2025-11-20 17:05:10 -05:00
Johannes Hoppe
11da7a65c0 docs(core): remove outdated regex template restriction in best-practices.md
Regular expressions in templates are now supported as of Angular 21.
2025-11-20 16:42:52 -05:00
JoostK
913cde8ab4 refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.
2025-11-20 12:29:59 -05:00
JoostK
3760045e3e fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947
2025-11-20 12:29:59 -05:00
David Kingma
0812ac3bec refactor(core): add debugName option to rxjs-interop toSignal
toSignal predates the debugName option for signals to name the signals in the Angular dev-tools This adds the debugName option to toSignal.
2025-11-20 10:49:50 -05:00
tsc036
34e1fe235f
refactor(core): export profile event as enum and move profile_types.ts and framework to shared devtools folder
move framework enum and profile_types to a shared folder so it can be used by wiz
2025-11-19 15:22:49 -08:00
Angular Robot
4c31f8ebf4 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-19 15:00:49 -08:00
SkyZeroZx
e9ba63a4c1 docs: Adds documentation for generic type argument to SimpleChanges 2025-11-19 14:31:53 -08:00
Shuaib Hasan Akib
c7affdfbc9 refactor(common): update examples to align with Angular best practices
Updated examples to use the standalone component approach and the latest
2025-11-19 14:29:49 -08:00
Kristiyan Kostadinov
5e6d8573f4 perf(core): avoid repeat searches for field directive
The `getControlDirective` is called multiple times, both at init and during each update run. Under the hood it performs a linear search for the `Field` directive.

We can speed this up by finding its index once and reusing it since the array of directive matches is static.
2025-11-19 14:28:56 -08:00
Kristiyan Kostadinov
81ce1ba1d9 refactor(compiler): remove interpolation-related symbols
We removed the ability to customize the interpolation some time ago. These changes remove the remaining code related to them.
2025-11-19 14:28:20 -08:00
Kristiyan Kostadinov
b6c141bf8b refactor(compiler): remove container blocks config
Removes the ability to specify container blocks when creating an i18n parser. We were only passing in `switch` and it likely won't change.
2025-11-19 14:28:20 -08:00
Miles Malerba
7ddf4a6b07 fix(forms): run reset as untracked
Run the signal forms `reset()` as untracked so it does not trigger
`effect` to rerun when the model changes

Fixes https://github.com/angular/angular/issues/65322
2025-11-19 14:27:52 -08:00
Jessica Janiuk
11ea1a01ff build: bump core zone.js version
this bumps the core dep on zone.js to 0.16.0.
2025-11-19 13:22:14 -08:00
Jessica Janiuk
58014cb01a release: cut the zone.js-0.16.0 release 2025-11-19 12:38:52 -08:00
Joey Perrott
9a663a28f9 release: bump version of in memory web api 2025-11-19 12:05:51 -08:00
Angular Robot
7e9f1cc8d8 build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-18 15:28:38 -08:00
Angular Robot
6178e3ebfb build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-17 16:34:41 -08:00
Jessica Janiuk
88dfd96ec9 Revert "refactor(core): let the profiler handle asymmetric events leniently"
This reverts commit da9911f2b4.
2025-11-17 10:10:36 -08:00
Jessica Janiuk
adc2a57be0 Revert "fix(core): notify profiler events in case of errors"
This reverts commit af1ba52587.
2025-11-17 10:10:36 -08:00
Matthew Beck
9e7ddcaa10 fix(compiler): don't choke on unbalanced parens in declaration block
Following https://github.com/angular/angular/pull/64509 we started
choking on unbalanced closing parentheses in declaration blocks,
specifically in quoted background-image urls. This was reported in
https://github.com/angular/angular/issues/65137.

This occured because we previously (and now again) traverse the entire
declaration block when selecting for :host-context() selectors to shim.
This is an oddity of how we parse styles today, and is likely something
we'd want to remove if we parsed selectors properly.

This change adds a new flag to _splitOnTopLevelCommas which allows it to
continue past unbalanced closing parentheses in the declaration block,
returning _convertColonHostContext to its previous behavior while
keeping support for the extra nesting in :host-context().
2025-11-17 09:46:01 -08:00
Matthieu Riegler
c15836c8c7 refactor(core): promote the custom track profiler to stable.
We didn't get much report on the feature itself so we feel confident about promoting it to stable. In parallel we'll also land #62959 but one is not blocking the other.

fixes #64996
2025-11-17 09:42:32 -08:00
Matthieu Riegler
b41a94bc85 fix(forms): Set error message of a schema error.
Use the error message of the issue as the error message of the error itself.

fixes #65247
2025-11-17 09:41:54 -08:00
Miles Malerba
f47637426f refactor(forms): avoid console warnings when setting NaN
It can be useful for a developer to set `NaN` as the value for a number
input, as a way to say "clear the input". However, directly setting this
value to the `.valueAsNumber` causes a console warning. This PR fixes
the console warning by just doing `.value = ''` when we would otherwise
to `.valueAsNumber = NaN`
2025-11-17 09:41:29 -08:00
Leon Senft
c727df5d38
refactor(forms): reduce boilerplate needed to define custom controls
An early piece of feedback received regarding custom controls hosted on
native inputs was that they required a lot of boilerplate to bind
`FieldState` properties. Each property required an input to accept the
property, and a host binding to forward it to the native control.
2025-11-17 09:40:58 -08:00
JoostK
da9911f2b4 refactor(core): let the profiler handle asymmetric events leniently
Although the prior commit has made more profiler events guaranteed symmetric
through the use of finally-blocks, there continue to be some situations
that could potentially result in asymmetric events, e.g. application
bootstrap doesn't guarantee symmetric events. This commit makes the profiler
lenient to these situations by unrolling the stack past the asymmetric event
data, eventually reaching the expected start event.
2025-11-17 09:40:04 -08:00
JoostK
af1ba52587 fix(core): notify profiler events in case of errors
Profiler events are expected to be symmetric, yet in the case of errors this symmetry may break
if events aren't always kept in sync with their corresponding start event. This commit moves
various end events to be run from a finally-block, allowing them to notify the profiler even
when an error has occurred.

Fixes #62947
2025-11-17 09:40:04 -08:00
SkyZeroZx
0432e76171 docs: Adds links to relevant guides for APIs in core package 2025-11-17 08:47:35 -08:00
SkyZeroZx
d70310896c docs: add documentation for HostAttributeToken 2025-11-17 08:46:59 -08:00
SkyZeroZx
24243e34d9 refactor(common): removes unused NgModuleFactory config in NgComponentOutlet
Removes the `ngComponentOutletNgModuleFactory`  in `_needToReCreateNgModuleInstance`
2025-11-17 08:46:08 -08:00
Leon Senft
b1037ec2f0 fix(forms): debounce updates from interop controls
* Apply any debounce rules to updates from interop controls (if configured).
* Add tests to ensure debouncing works for all control types (native, custom,
  and interop).
2025-11-17 08:37:26 -08:00
SkyZeroZx
846d50ab23 docs: add documentation for DOCUMENT injection token usage in SSR 2025-11-17 08:28:00 -08:00
Angular Robot
d99b7437d1 build: update all non-major dependencies
See associated pull request for more information.
2025-11-17 08:04:29 -08:00
Angular Robot
cc0753411f build: update cross-repo angular dependencies
See associated pull request for more information.
2025-11-14 15:30:18 -08:00
Miles Malerba
722292f215 refactor(forms): improve typing on min & max (#65212)
If we're calling `min` on a path that's guaranteed to be `number` we
don't want to make the users validator function handle the `null` or
`string` cases.

This uncovered an issue in the `SchemaTreePath` type which needed to be
fixed by preventing the model type from being distributed over.

PR Close #65212
2025-11-14 21:56:58 +00:00
Miles Malerba
4f8ab4fa3c refactor(forms): allow passing number|string|null paths to min & max (#65212)
Relaxes the constraints on which paths can be used with the `min` &
`max` validation rules, since people may want to validate a
potentially-null number, or a numeric value represented as a string

PR Close #65212
2025-11-14 21:56:58 +00:00
Miles Malerba
fc1ef79ad4 build(forms): expose signal forms compat package
Hooks up @angular/forms/signals/compat to be released and have its docs
published
2025-11-14 09:23:36 -08:00
cexbrayat
c137f1fe91 docs: ExperimentalIsolatedShadowDom mentions 2025-11-14 08:41:13 -08:00