Commit graph

36863 commits

Author SHA1 Message Date
arturovt
a93b6e8931 refactor(router): remove Compiler injectee from RouterPreloader (#60945)
This commit removes the `Compiler` injectee from the `RouterPreloader` constructor. It's unused but was still being referenced in the factory definition: `static ɵfac = ɵɵngDeclareFactory(...)`.

PR Close #60945
2025-04-23 15:18:22 +02:00
arturovt
0ac949c266 fix(core): do not run change detection on global error events (#60944)
This commit wraps the `error` and `unhandledrejection` event listeners so they are installed outside of the Angular zone, because otherwise they trigger change detection whenever the event callbacks are invoked.

PR Close #60944
2025-04-23 15:17:28 +02:00
Angular Robot
e3d45a4a90 build: update cross-repo angular dependencies (#60972)
See associated pull request for more information.

PR Close #60972
2025-04-23 15:15:46 +02:00
MeddahAbdellah
62de7d930a feat(router): add asynchronous redirects (#60863)
Adds support for asynchronous redirects in the router, allowing redirect logic to be resolved dynamically (e.g., via API or async function). This enhances routing flexibility and supports more complex navigation scenarios.

BREAKING CHANGE: The `RedirectFn` can now return `Observable` or
`Promise`. Any code that directly calls functions returning this type
may need to be adjusted to account for this.

PR Close #60863
2025-04-23 13:38:49 +02:00
Alan Agius
907f9bd3b8 refactor(router): produce error message when canMatch is used with redirectTo (#60958)
Redirects in the router are handled before `canMatch` guards are evaluated. As a result, `canMatch` will not run for routes that include a redirect. Instead of silently ignoring this misconfiguration, developers should be alerted to help them understand why it doesn't behave as expected.

Closes: #60957

PR Close #60958
2025-04-23 13:38:01 +02:00
Andrew Scott
953c4b2580 feat(core): Move zoneless change detection to dev preview (#60748)
This commit moves zoneless from experimental to developer preview.

* Update tag on provider API
* Remove "experimental" from provider name
* Move documentation from "experimental features" to "Best practives ->
  Performance" (at least temporarily until there is a better place)

BREAKING CHANGE: `provideExperimentalZonelessChangeDetection` is
renamed to `provideZonelessChangeDetection` as it is now "Developer
Preview" rather than "Experimental".

PR Close #60748
2025-04-23 11:47:56 +02:00
Angular Robot
550a63bde6 build: update all non-major dependencies (#60969)
See associated pull request for more information.

PR Close #60969
2025-04-23 10:58:16 +02:00
Pawel Kozlowski
5efc6927c5 refactor(core): alias afterRender to afterEveryRender (#60951)
Introduce an alias from afterRender to afterEveryRender in preparations for the
the internal rename.

PR Close #60951
2025-04-23 10:07:52 +02:00
Matthieu Riegler
1323ab1ce5 refactor(compiler-cli): Extract type predicates from type guards. (#60934)
Previously they were extracted as `boolean`.

PR Close #60934
2025-04-23 09:56:44 +02:00
Kristiyan Kostadinov
3d86b3ade7 refactor(compiler): account for selectorless in template binder (#60952)
Updates the template binder to account for the new selectorless AST nodes. This is a prerequisite to supporting template type checking of the new syntax.

PR Close #60952
2025-04-23 09:55:54 +02:00
Kristiyan Kostadinov
3719752cef refactor(compiler): validate references in selectorless (#60952)
Adds the follow validations to the selectorless template parsing:
* Local references with values are not allowed (e.g. `#foo="bar"`).
* Multiple local references with the same on a component or directive are not allowed.

PR Close #60952
2025-04-23 09:55:54 +02:00
Kristiyan Kostadinov
08512ee285 refactor(compiler): add flag to enable selectorless parsing (#60952)
Adds a flag to `parseTemplate` to enable selectorless.

PR Close #60952
2025-04-23 09:55:54 +02:00
Kristiyan Kostadinov
6cce056d41 refactor(compiler): allow different kinds of directive matchers to be passed to binder (#60952)
Updates the target binder to allow either a selector-based or selectorless matcher to be passed in. This will allow us to skip some of the overhead when matching directives to nodes.

PR Close #60952
2025-04-23 09:55:54 +02:00
Pawel Kozlowski
0859a99e89 refactor(core): replace TestBed.flushEffects with tick (#60959)
Instead of stabilizing the TestBed.flushEffects() API we intend to
replace it with the tick() method (equivalent of ApplicationRef.tick().
The reasoning here is that we prefer tests running the entire
synchronization process (as in production apps) instead of invoking
parts of the synchronization process in a way that would naver happen
in a running application.

PR Close #60959
2025-04-23 09:54:30 +02:00
Matthieu Riegler
c990265473 docs(docs-infra): Improve doc support for pipes. (#60926)
This commits adds the pipe usage and the impure pipe mention.

PR Close #60926
2025-04-23 08:46:11 +02:00
Doug Parker
1983a5cbe9 release: bump Angular DevTools version to 1.0.29 (#60963)
PR Close #60963
2025-04-23 08:44:16 +02:00
Matthieu Riegler
1b8e7ab9fe feat(compiler): support the in keyword in Binary expression (#58432)
This commit adds the support for the `in` keyword as a relational operator, with the same precedence as the other relational operators (<,>, <=, >=)

BREAKING CHANGE: 'in' in an expression now refers to the operator

PR Close #58432
2025-04-22 21:44:12 +02:00
Jeevan Mahesha
9deaa674e6 docs: replace EventEmitter with output and self-closing tags in templates (#60910)
Replaced all instances of EventEmitter with the new output() utility.
Updated templates to use self-closing tags for cleaner markup.

PR Close #60910
2025-04-22 21:42:18 +02:00
hawkgs
cebb9d2c1e refactor(devtools): disable unsupported features (#60585)
Prepare the app for Wiz & ACX and handle unsupported features by disabling their respective UI.

PR Close #60585
2025-04-22 21:29:04 +02:00
Doug Parker
8aaefa7b63 docs: expand Angular's browser policy by adopting the "widely available" Baseline (#60754)
This effectively expands Angular's existing browser support policy to be defined as browsers covered by the "widely available" Baseline (effectively browsers released <30 months ago). Each major version will choose a date shortly before release and pin its version support to the "widely available" Baseline of that date.

For now, I'm arbitrarily picking March 31st as I try to land the general infra and policy change, but we'll likely update the exact date a little closer to the v20 RC.

PR Close #60754
2025-04-22 21:25:03 +02:00
Angular Robot
61012cb239 build: update cross-repo angular dependencies (#60960)
See associated pull request for more information.

PR Close #60960
2025-04-22 21:23:37 +02:00
Matthieu Riegler
6c2fbad8a2 refactor(core): Improve NG0600 error message. (#60418)
This commit adds the mention of templates as illegal context to write signals.

fixes #60143

PR Close #60418
2025-04-22 16:35:38 +02:00
Matthieu Riegler
00dff8bfd6 refactor(core): mark makeEnvironmentProviders as public. (#60956)
`makeEnvironmentProviders` was already exported but didn't have the `@publicApi` tag.

PR Close #60956
2025-04-22 16:27:22 +02:00
Angular Robot
2c463a4f16 build: lock file maintenance (#60942)
See associated pull request for more information.

PR Close #60942
2025-04-22 13:37:30 +02:00
Gabriel Bergoc
be995623cd fix(forms): make NgForm emit FormSubmittedEvent and FormResetEvent (#60887)
Currently, only forms created with `FormGroupDirective` emit events on
form submission and resetting. This commit extends this behavior to
Template-driven forms also.

Related to #58894

PR Close #60887
2025-04-22 13:04:40 +02:00
Matthieu Riegler
e1b0e94d77 docs(docs-infra): remove style guide examples (#60929)
PR Close #60929
2025-04-22 12:55:40 +02:00
Matthieu Riegler
e53a37496f docs: format RouterUpgradeInitializer usage notes (#60930)
This commit also adds a standalone example

PR Close #60930
2025-04-22 12:00:59 +02:00
Matthieu Riegler
f88c747e29 refactor(compiler-cli): Don't extract constructors with no parameters (#60928)
This will prevent usesless paramters in the docs, ex: https://angular.dev/api/core/ApplicationInitStatus#constructor

This improves #60302

PR Close #60928
2025-04-22 11:59:44 +02:00
Matthieu Riegler
0be5412ea0 docs: Update creating libraries to the current recommendations (#60931)
PR Close #60931
2025-04-22 11:57:51 +02:00
Matthieu Riegler
975a69cc8a docs: fix NG2800 rendering (#60932)
PR Close #60932
2025-04-22 11:57:00 +02:00
Jeremy Elbourn
e96a0c1fc7 docs: replace style guide with 2025 revision (#60809)
See RFC https://github.com/angular/angular/discussions/58412 for
background.

PR Close #60809
2025-04-22 11:56:12 +02:00
Matthieu Riegler
b43fe29ca7 docs: update examples for i18n tokens (#60938)
PR Close #60938
2025-04-22 11:14:13 +02:00
Matthieu Riegler
8d31b0065e docs: update docs centered on NgModules (#60933)
PR Close #60933
2025-04-22 11:08:54 +02:00
Jan Martin
2240a21c97 refactor(platform-server): deprecate the testing entry point (#60915)
DEPRECATED: `@angular/platform-server/testing`

Use e2e tests to verify SSR behavior instead.

PR Close #60915
2025-04-22 11:02:26 +02:00
Angular Robot
619291b924 build: update cross-repo angular dependencies (#60914)
See associated pull request for more information.

PR Close #60914
2025-04-22 10:56:53 +02:00
Ryan Russell
0162ceb427 fix(core): inject migration should treat @Attribute as optional (#60916)
The @Attribute decorator will inject null if a host attribute
is missing, but `inject(new HostAttributeToken(...))` will throw
a no provider error. We should set {optional: true} when migrating
an @Attribute decorator. Also allow nonNullableOptional to add
`!` to those declarations.

PR Close #60916
2025-04-22 10:42:58 +02:00
hawkgs
037dede0a0 refactor(devtools): improve components tab side pane UI (#60901)
Improve the overall UI/UX. Drop the expandable containers shadows in favor of solid borders.

PR Close #60901
2025-04-18 21:14:15 +02:00
Ben Hong
3a6121fb86 docs: add new routing in-depth guide (#60006)
docs: update code snippet

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: update link

Co-authored-by: Matthieu Riegler <kyro38@gmail.com>

docs: update syntax highlighting

Co-authored-by: Andrew Scott <atscott01@gmail.com>

docs: correct example links

docs: update load component with more concise syntax

docs: fix link text

docs: fix api docs link formatting

docs: fix callout box types and rendering

docs: truncate properties table

docs: swap constructor routes to use inject instead

docs: add other routing tasks info in subnav and remove duplicate info

docs: fix type conversion param

PR Close #60006
2025-04-18 15:35:58 +02:00
Angular Robot
1694739a7d build: update cross-repo angular dependencies (#60897)
See associated pull request for more information.

PR Close #60897
2025-04-18 15:15:19 +02:00
Matthieu Riegler
2f3f8d6d3b refactor(core): promote pendingUntilEvent to developerPreview (#60904)
`pendingUntilEvent` is now in developerPreview in v20.

PR Close #60904
2025-04-18 12:32:59 +02:00
hawkgs
f838726afb refactor(devtools): typography (#60531)
Introduce typography placeholder classes and employ them across the app where applicable.

PR Close #60531
2025-04-18 08:35:59 +02:00
hawkgs
2e87130b1f refactor(devtools): fix build warnings (#60902)
Fixes two build warnings related to one of the templates and a SCSS partial file.

PR Close #60902
2025-04-18 08:27:10 +02:00
Philipp Burgmer
2419060fef fix(router): relax required types on router commands to readonly array (#60345)
Only require a readonly array as input for router commands instead of a writable array. Router itself does not need writable access to the array of commands. If router requires a writable array somebody on the outside would have to spread a readonly array to a new writable array. We can avoid this by just require what route actually needs.

Fixes #60269

BREAKING CHANGE: Several methods in the public API of the Router which
required writable arrays have now been updated to accept readonly
arrays when no mutations are done.

PR Close #60345
2025-04-17 16:21:57 +02:00
Doug Parker
5d9a678cc0 release: bump Angular DevTools version to 1.0.28 (#60893)
PR Close #60893
2025-04-17 11:24:59 +02:00
Angular Robot
104ad0a351 build: update cross-repo angular dependencies to v20.0.0-next.7 (#60891)
See associated pull request for more information.

PR Close #60891
2025-04-16 17:08:40 -04:00
kirjs
c7e9cb9b36 release: cut the v20.0.0-next.7 release 2025-04-16 17:03:08 -04:00
kirjs
58728c792a docs: release notes for the v19.2.7 release 2025-04-16 16:44:45 -04:00
Jessica Janiuk
567522398f feat(core): stabilize incremental hydration api (#60888)
This removes the developer preview label for incremental hydration APIs.

PR Close #60888
2025-04-16 13:00:44 -04:00
Jessica Janiuk
bf8492b871 feat(core): stabilize withI18nSupport() api (#60889)
This stabilizes the `withI18nSupport()` feature of hydration.

PR Close #60889
2025-04-16 12:47:26 -04:00
Alan Agius
f2b22b01cc refactor(common): eliminate redundant iterator-to-array conversion (#60884)
Simplifies code by removing unnecessary `Array.from` usage.

PR Close #60884
2025-04-16 12:44:35 -04:00