33827 Commits

Author SHA1 Message Date
Andrew Kushnir 44784f175d release: cut the v20.1.1 release 20.1.1 2025-07-16 10:58:44 -07:00
Kristiyan Kostadinov 9506cdfaad fix(compiler-cli): infer type of event target for void elements (#62648)
Currently we infer the target of DOM events to be `EventTarget | null` which is consistent with the built-in types for `addEventListener`. This is due to the fact that users can dispatch custom events, or the event might've bubbled. However, this typing is also inconvenient for some other common use cases like `<input (input)="query($event.target.value)">`, because we don't have the ability to type cast in a template.

These changes aim to make some of the cases simpler by inferring the type of `$event.target` if the event is bound on a void element which guarantees that it couldn't have bubbled.

PR Close #62648
2025-07-16 12:40:26 +02:00
Kristiyan Kostadinov 2ab638d514 refactor(core): expose function to assert type of variables (#62648)
Adds the `ɵassertType` function that will be used during type checking to assert the type of a value.

PR Close #62648
2025-07-16 12:40:26 +02:00
Kristiyan Kostadinov 53963e910e refactor(compiler): indicate whether element is void at AST level (#62648)
Updates the HTML AST to indicate whether a specific element is a void element.

PR Close #62648
2025-07-16 12:40:25 +02:00
Kristiyan Kostadinov 70c8780c54 fix(compiler): more permissive parsing of @ characters (#62644)
When we introduced blocks, we made a deliberate decision to treat the `@` character as a reserved character in case we need to use it for other syntax in the future. This meant that some common cases, like writing out an email address in the template, can be broken.

After some recent discussions we decided to relax the requirement and only treat `@` as a reserve character if it's followed by a character sequence that matches a known block.

PR Close #62644
2025-07-15 13:24:47 -07:00
Kristiyan Kostadinov f531370281 test(compiler): remove duplicated lexer tests (#62644)
There were 26 duplicated block tests in `lexer_spec.ts`, likely due to merge conflicts. These changes remove the duplicates while keeping the 6 tests that were different.

PR Close #62644
2025-07-15 13:24:47 -07:00
Angular Robot acf8b742d8 build: update all non-major dependencies (#62643)
See associated pull request for more information.

PR Close #62643
2025-07-15 09:35:03 -07:00
SkyZeroZx 6f5bd5f964 docs: Update documentation httpResource with referrer & integrity options (#62637)
PR Close #62637
2025-07-15 09:33:15 -07:00
muhammadali1658 72605a42c4 docs: fix missing 'of' in Style Guide sentence (#62628)
PR Close #62628
2025-07-15 07:59:20 -07:00
Kristiyan Kostadinov 75d2a349b4 fix(compiler): incorrect spans for left side of binary operation (#62641)
Fixes that the span for the `left` side of a `Binary` AST included the range up to and including the operator.

Fixes #62617.

PR Close #62641
2025-07-15 07:57:32 -07:00
Kristiyan Kostadinov e8234095ca docs: update best practices prompt (#62640)
Updates the `best-practices.md` with results from recent testing.

PR Close #62640
2025-07-15 07:56:05 -07:00
Milo d381e3b05b refactor(devtools): simplify vendored deps to make importing into google3 easier (#62636)
prefer using node_modules/webtreemap, and remove memo-decorator

PR Close #62636
2025-07-15 07:53:51 -07:00
Andrew Scott 26ade4a337 fix(core): Ensure application remains unstable during bootstrap (#62631)
This commit ensures the application remains unstable during the entire
bootstrap process. This ensures all bootstrap listeners and app
initializers observe the application as being unstable until each one
has gotten a chance to execute the synchronous block (potentially adding
more pending tasks).

Prior to this commit, application initializers or bootstrap
listeners may observe the application as being stable, even though other
initializers/listeners had not yet executed. This created an ordering
issue whereby the hydration bootstrap listener would observe the
application as stable prior to the router performing its initial
navigation.

fixes #62592

PR Close #62631
2025-07-15 07:52:36 -07:00
aparziale a81f0faa1a fix(core): InputBinding marks component a dirty. (#62613)
This fix ensures that CD runs on OnPush component when an input binding is set.

PR Close #62613
2025-07-14 15:46:29 -07:00
Joey Perrott 74beeeca3f docs: correctly look for examples in the bin_dir instead of execPath (#62632)
Properly look for the example files for live previews in the bin_dir

PR Close #62632
2025-07-14 14:49:16 -07:00
Ben Hong f202160e6e docs: add dedicated data resolvers router guide (#62250)
PR Close #62250
2025-07-14 14:17:50 -07:00
Matthieu Riegler c526238751 build: set paths for devtools & adev (#62574)
This allows the IDE to find the right imports

PR Close #62574
2025-07-14 14:11:09 -07:00
arturovt 5949373692 fix(router): handle errors from view transition readiness (#62535)
This commit adds a `.catch()` handler to `transition.ready` from `document.startViewTransition` to prevent `AbortError`s in Safari when `startViewTransition` is called synchronously multiple times.

PR Close #62535
2025-07-14 11:39:57 -07:00
Matthieu Riegler 22b56ca66f test(docs-infra): Use the zoneless testing rule (#62596)
This will spare use the warning logs when the tests run.

```
      NG0914: The application is using zoneless change detection, but is still loading Zone.js. Consider removing Zone.js to get the full benefits of zoneless. In applications using the Angular CLI, Zone.js is typically included in the "polyfills" section of the angular.json file.
```

PR Close #62596
2025-07-14 11:36:44 -07:00
Matthieu Riegler 5aa69ff0a2 refactor(devtools): Use OnPush on all components (#62610)
The end goal is to move the devtools app to zoneless.

PR Close #62610
2025-07-14 11:35:48 -07:00
Angular Robot a5b45ca2f6 build: update all non-major dependencies (#62604)
See associated pull request for more information.

PR Close #62604
2025-07-14 11:34:36 -07:00
Emily Marigold Klassen 0ce086e967 docs: update forgotten change to input signals (#62612)
PR Close #62612
2025-07-14 10:03:24 -07:00
Matthieu Riegler c9d7a70fb5 refactor(devtools): update the patch branch with the content of main. (#62623)
This is a technical commit.

PR Close #62623
2025-07-14 10:02:53 -07:00
Dmitry Kostyuk 546d7b8329 docs(docs-infra): fix nested routes example (#62608)
PR Close #62608
2025-07-14 10:00:49 -07:00
Matthieu Riegler b935eff007 docs: fix CLI reference layout (#62609)
fixes #62602

PR Close #62609
2025-07-14 09:59:55 -07:00
Matthieu Riegler ebfc946683 docs: add note about difference between class bindings and ngClass (#62611)
fixes #40623

PR Close #62611
2025-07-14 09:59:17 -07:00
Matthieu Riegler ddd92585a9 docs(docs-infra): Add status to some guide entries. (#62614)
Guide entries can now have "new" or "updated" tags.

PR Close #62614
2025-07-14 09:58:14 -07:00
Joao da Silva 4dd0586978 docs: fix lazy load example in define-routes.md (#62620)
Fixes #62619

PR Close #62620
2025-07-14 09:57:27 -07:00
Angular Robot 1fa10c07ce docs: update Angular CDK apis (#62601)
Updated Angular CDK api files.

PR Close #62601
2025-07-11 16:07:38 -07:00
Angular Robot db11cdd389 build: update all non-major dependencies (#62583)
See associated pull request for more information.

PR Close #62583
2025-07-11 14:46:59 -07:00
Jessica Janiuk 02dce8ee11 ci: add to public-api approvers list (#62591)
This appends reviewers to the approvers list.

PR Close #62591
2025-07-11 10:43:28 -07:00
fortnite misogynist 4bd178a68c docs: fix comment breaking Highlighter (#62577)
This fixes a comment that was causing issues with docs highlighting

PR Close #62577
2025-07-11 10:41:47 -07:00
Angular Robot cfdd04b2ac build: update cross-repo angular dependencies (#62565)
See associated pull request for more information.

PR Close #62565
2025-07-11 10:40:41 -07:00
Joey Perrott 4f1e88e598 build: use esbuild from aspect rules (#62568)
Use the esbuild ruleset from aspect rules instead of via @bazel/esbuild

PR Close #62568
2025-07-10 13:45:15 -07:00
Jessica Janiuk aea0a70c1d ci: adjust renovate teams (#62578)
This switches framework team to approve but not requested, and adds the currently active caretaker group to the teams for renovate.

PR Close #62578
2025-07-10 12:52:31 -07:00
Andrew Kushnir 6549418e39 refactor(core): include DI path into cyclic dependency error message (#50902)
This commit updates the logic to better handle a situation when there is a cyclic DI dependency detected. Previously, the error message used to contain the name of the token that triggered the problem. With this change, the DI resolution path would also be included, so that it's easier to find and resolve the cycle.

PR Close #50902
2025-07-10 10:35:12 -07:00
Alan Agius 66a85ab190 docs: update browsers support versions (#62572)
The current URL is not correct as it incorrectly includes browsers. We now replace the URL with the comparer provided by baseline which will be available soonish via `web-platform-dx.github.io`

PR Close #62572
2025-07-10 10:26:24 -07:00
Joey Perrott 6b271c88f2 build: use tsc from @npm2// instead of @npm// (#62558)
Use tsc from the new node_modules layout

PR Close #62558
2025-07-10 10:25:36 -07:00
Angular Robot e9905f7b7f build: update all non-major dependencies (#62515)
See associated pull request for more information.

PR Close #62515
2025-07-10 10:21:04 -07:00
Joey Perrott b4ae55ae68 build: use rollup directory instead of rollup through @bazel/rollup (#62556)
Use rollup directly instead of using the previous toolchain implementation

PR Close #62556
2025-07-09 16:53:25 -07:00
Angular Robot 6274ea7e8b docs: update Angular CLI help (#62519)
Updated Angular CLI help contents.

PR Close #62519
2025-07-09 14:03:50 -07:00
Alan Agius 276836ee73 fix(http): do not display warnings Angular detected that a HttpClient request with the keepalive option was sent using XHR when option is not true (#62536)
Currently, this warning is always displayed as the option defaults to false. We update the logic to only display the warning when it's true.

PR Close #62536
2025-07-09 12:45:27 -07:00
ice-blaze 11d817348c docs(forms): remove unecessary FormGroup casting (#62555)
Fixes #62554

PR Close #62555
2025-07-09 12:43:50 -07:00
Miles Malerba 317ae4443a ci: add gemini code assist config (#62560)
Configures gemini to not interact with new pull requests, only review on
demand

PR Close #62560
2025-07-09 12:42:46 -07:00
Matthieu Riegler 053cd3c747 docs(docs-infra): do not cache the versions.json file (#62534)
Without the flag, the file gets inline in the transfer cache making the resource useless.

PR Close #62534
2025-07-09 12:42:06 -07:00
Joey Perrott f038803693 build: migrate esbuild usages to aspect_rules_esbuild esbuild rule (#62529)
Migrate more usages of esbuild to new toolchain

PR Close #62529
2025-07-09 12:41:27 -07:00
Matthieu Riegler ee16715c68 docs(docs-infra): run analytics only on the browser (#62531)
We don't care about server, adev only uses SSG.
Also `setCookieConsent` is throwing on node.

PR Close #62531
2025-07-09 12:40:37 -07:00
Matthieu Riegler 59de6400fa docs(docs-infra): update update guide when changing level (#62526)
This commit also fixes the colors of the material button toggle

fixes #62432

PR Close #62526
2025-07-09 12:40:01 -07:00
Matthieu Riegler 2f969c8ac4 docs(docs-infra): fix banner position on mobile & tablet (#62521)
#62509

PR Close #62521
2025-07-09 12:39:14 -07:00
Ben Hong d5d692766c docs: add dedicated routing lifecycle and events guide (#62225)
doc: apply suggestions from code review

Co-authored-by: Enea Jahollari <jahollarienea14@gmail.com>

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

PR Close #62225
2025-07-09 12:38:34 -07:00