Commit graph

5705 commits

Author SHA1 Message Date
Paul Gschwendtner
648bbb097e fix(core): properly recognize failed fetch responses when loading external resources in JIT (#62992)
Currently when loading external resources in JIT, when `fetch` fails,
the `text` is empty and the component is loading. This hides the actual
underlying fetch error. We should properly detect this and error out.

PR Close #62992
2025-08-05 10:10:56 +02:00
Jessica Janiuk
de3a0c5cf3 fix(core): Fix animate.enter class removal when composing classes (#62981)
In the case when composing animation classes with `animate.enter` on the
element itself and also with host bindings, the removal would only
have context for one of the classes added: the last one added. This
allows for tracking of the classes added by `animate.enter` via a
WeakMap so we know the exact classes added and which to remove.

Also shores up the tests to make sure we are fully testing animate.enter.

PR Close #62981
2025-08-05 10:06:28 +02:00
Matthieu Riegler
d00b3fed58 feat(router): add a currentNavigation signal to the Router service. (#62971)
This new signal property is convenient to derive a `isNavigating` state.

`isNavigating = computed(() => !!this.router.currentNavigation())`

DEPRECATED: The Router.getCurrentNavigation method is deprecated. Use the Router.currentNavigation signal instead.

fixes #62958

PR Close #62971
2025-08-05 10:05:49 +02:00
Andrew Scott
141bb75ff2 feat(core): Promote zoneless to stable (#62699)
This commit moves zoneless from developer preview to stable and updates the roadmap to indicate it is ready for production use.

PR Close #62699
2025-08-05 10:03:31 +02:00
Jessica Janiuk
6597ac0af7 fix(core): fix support for space separated strings in leave animations (#62979)
Space separated strings, e.g. `class-1 class-2`, should work with both enter and leave animations. `animate.leave` lost that functionality in a refactor. Tests are now added to catch this.

fixes: #62964

PR Close #62979
2025-08-04 12:24:11 +02:00
Jessica Janiuk
857675fedb refactor(core): this delays removal of stylesheets when the element registry is present (#62943)
When animate.leave is used, stylesheet pruning causes issues. Stylesheets with the appropriate animations get pruned before the animations can run. This will delay the removal in the case that the registry is present.

fixes: #62942

PR Close #62943
2025-08-01 12:54:22 +00:00
Jessica Janiuk
455b147488 fix(core): fixes timing issues with enter animations (#62925)
In some patterns, `element.getAnimations()` will be an empty array despite the animation class being present during animation start and the style sheet showing a keyframe animation.
Moving the longest animation check to the end resolves this problem.

fixes: #62923

PR Close #62925
2025-08-01 08:06:34 +00:00
Joey Perrott
82cc576e6f build: use pnpm as the package manager instead of yarn (#62924)
Use pnpm instead of yarn as the package manager and interaction tool for the repo

PR Close #62924
2025-07-31 22:06:27 +00:00
Angular Robot
216caaf5ab build: update cross-repo angular dependencies (#62902)
See associated pull request for more information.

PR Close #62902
2025-07-31 09:52:50 +00:00
Kristiyan Kostadinov
b1514d512e fix(migrations): incorrect filtering in inject migration (#62913)
The inject migration wasn't implementing file filtering properly which resulted in it passing an invalid tsconfig path to TypeScript.

Fixes #62866.

PR Close #62913
2025-07-31 09:15:42 +00:00
Joey Perrott
cbc258eec8 build: remove ts_project_interop infrastructure (#62908)
Remove the interop macros and final usages

PR Close #62908
2025-07-31 09:12:58 +00:00
Jessica Janiuk
d23c5e4670 refactor(core): Tiny animation optimization (#62896)
This removes one redundant check to reduce code size.

PR Close #62896
2025-07-30 13:56:46 +00:00
Jessica Janiuk
320de4e96d refactor(core): deprecate animations field on component interface (#62895)
This deprecates the animations field on the component decorator in favor of animate.enter and leave.

DEPRECATED: @angular/animations

PR Close #62895
2025-07-30 10:35:29 +00:00
Matthieu Riegler
1ab3b5b21b refactor(core): add private resource error helper function for g3 migration (#62840)
This function is intented to be temporary to help migrate G3 code to the new throwing behavior.

PR Close #62840
2025-07-30 09:23:11 +00:00
Joey Perrott
49b7729e88 build: remove usages of rules_nodejs (#62885)
Remove rules_nodejs usages with direct migrations to rule_js alternatives

PR Close #62885
2025-07-30 08:51:27 +00:00
Joey Perrott
793ff35602 build: move http_server and generate_api_docs into defaults2.bzl (#62878)
Move http_server and generate_api_docs into defaults2.bzl as they are rules_js compliant

PR Close #62878
2025-07-29 16:53:54 +00:00
Jessica Janiuk
898244a03a refactor(core): add configurable behavior for animations to testbed (#62764)
This adds a test module configuration to define whether animations should be enabled or disabled in test. By default, they are disabled.

PR Close #62764
2025-07-29 09:49:35 +00:00
Joey Perrott
32c00ab416 build: standardize usage of js_binary (#62860)
Remove usages of nodejs_binary and use a commonly defined js_binary macro

PR Close #62860
2025-07-29 06:43:44 +02:00
Joey Perrott
17ada9838b build: move tsec to new toolchain (#62825)
Migrate tsec tooling/macro to use tsec directly as a js_binary and rely on ts_project dependencies.

PR Close #62825
2025-07-28 20:07:05 +02:00
Milo
92c2d2a006 fix(core): update symbols for new signals api (#62284)
approve the new symbols that appear from bundling the signals changes

PR Close #62284
2025-07-28 17:01:42 +02:00
Milo
3c008c9263 refactor(core): use quad linked lists for signals (#62284)
inspired by the design of Preact's signals, use linked lists instead of arrays for faster signal creation

PR Close #62284
2025-07-28 17:01:42 +02:00
Joey Perrott
caee6ff8e7 build: remove all usages of @bazel/runfiles (#62804)
Remove usages of @bazel/runfiles throughout the repository

PR Close #62804
2025-07-25 10:04:55 +02:00
Garegin Hakobyan
b11e0502f5 docs(docs-infra): correct typos in adev and wording in resource api (#62801)
PR Close #62801
2025-07-24 16:13:00 +00:00
Angular Robot
9d8c48dc4c build: update cross-repo angular dependencies (#62770)
See associated pull request for more information.

PR Close #62770
2025-07-24 09:24:50 +00:00
Jessica Janiuk
063b5e166f fix(core): switch check to documentElement with chaining (#62773)
This fixes a situation where DOM checks may report null.

PR Close #62773
2025-07-23 15:01:59 -04:00
Jessica Janiuk
593cc8a368 fix(core): checks if body exists before continuing (#62768)
This fixes a case in which the document exists, but the body does not.

PR Close #62768
2025-07-23 12:54:39 -04:00
Kristiyan Kostadinov
7767aa640c fix(compiler): allow more characters in square-bracketed attribute names (#62742)
Currently the HTML parser will stop parsing as soon as it hits an end character in the name of an attribute (e.g. `/` or `>`). This ends up being problematic with some third-party packages like Tailwind which uses a wider range of characters for its class names. While the characters are fine when inside the `class` attribute, our current parser behavior prevents users from setting those classes conditionally through `[class.]` bindings.

These changes adjust the parser to handle such cases.

Fixes #61671.

PR Close #62742
2025-07-23 11:06:47 -04:00
Jessica Janiuk
882522c1ad refactor(compiler): Tree shake Element Registry (#62682)
This creates a feature to detect usages of animate.leave and only enables the element removal registry when necessary

PR Close #62682
2025-07-23 09:37:16 -04:00
Jessica Janiuk
6b1f4b9e8b feat(core): add enter and leave animation instructions (#62682)
This adds the instructions to support enter and leave animations on nodes.

PR Close #62682
2025-07-23 09:37:16 -04:00
Kristiyan Kostadinov
cec91c0035 feat(core): add option to infer the tag names of components in tests (#62283)
Currently when testing a component using `TestBed.createComponent`, we always create the component as a `div` which isn't aligned with the runtime. The runtime tries to parse out the tag name from the first selector in `@Component` and only falls back to `div` if there isn't one. This behavior difference can cause components to not behave like they would in production which reduces the usefulness of the tests.

These changes add the `inferTagName` option to `TestBed.createComponent` and `TestBed.configureTestingModule` that allows apps to opt into inferring the tag name from the selector in the same way as the runtime. Currently the new option is set to `false`, but we intend to change it to `true` in a future version.

PR Close #62283
2025-07-23 07:30:36 -04:00
Kristiyan Kostadinov
68f3c65314 refactor(core): expose function for inferring tag name (#62283)
Exposes the code that we use to infer the tag name of a component as a private export so that we can use it in `TestBed`.

PR Close #62283
2025-07-23 07:30:36 -04:00
Joey Perrott
f5d9d084b6 build: move nodejs_test to js_test (#62709)
Move nodejs_test to js_test and remove unnecessary files after move

PR Close #62709
2025-07-22 10:07:13 -04:00
Hryhorii Avcharov
a2f366f629 feat(devtools): add transfer state tab (#62465)
Add transfer state tab, which is taking transfer state script by using APP_ID. Created internal api ɵgetTransferState to retrieve transfer state value from app into devtools app.

PR Close #62465
2025-07-22 08:41:10 -04:00
Leon Senft
4138aca91f feat(core): render ARIA property bindings as attributes (#62630)
Allow binding to ARIA attributes using property binding syntax _without_
the `attr.` prefix. For example, `[aria-label]="expr"` is now valid, and
equivalent to `[ariaLabel]="expr"`. Both examples bind to either a
matching input or the `aria-label` HTML attribute, rather than the
`ariaLabel` DOM property.

Binding ARIA properties as attributes will ensure they are rendered
correctly on the server, where the emulated DOM may not correctly
reflect ARIA properties as attributes.

Reuse the DOM schema registry from the compiler to map property names in
type check blocks.

PR Close #62630
2025-07-22 06:59:00 -04:00
Matthieu Riegler
db3c928305 refactor(core): add a getTransferState for the devtools (#62722)
`getTransferState` will expose public data from the transfer state. It will for example remove internal hydration data.

PR Close #62722
2025-07-21 17:00:27 -04:00
Joey Perrott
8bf97d1370 build: remove all usages of the interop_deps attr for ts_project and ng_project (#62732)
Remove all of the usages of interop_deps as attributes in the repo

PR Close #62732
2025-07-21 13:03:09 -04:00
Elizabeth
b8e415a717 fix(core): fix change tracking for Resource#hasValue (#62595)
When using `hasValue()` I would expect it to behave like any other
reactive value such that changes to the internal `value()` that do not
cause `hasValue()` to return anything different do not trigger change
detection, but this was not the case. This change wraps the value
checking in a `computed` such that it behaves as expected again while
still preserving the type narrowing.

PR Close #62595
2025-07-18 10:01:43 -04:00
Angular Robot
891444d48b build: update cross-repo angular dependencies (#62557)
See associated pull request for more information.

PR Close #62557
2025-07-18 09:47:19 -04:00
Andrew Scott
448a7f7e8f refactor(core): Use promise.finally for task removal (#62674)
Updates the approach from https://github.com/angular/angular/pull/62631 to
use Promise.finally for task removal. This is a bit cleaner and also handles
rejections from the donePromise

PR Close #62674
2025-07-18 07:19:49 -04:00
Joey Perrott
23d58777b4 build: migrate to new toolchain usage for api goldens (#62688)
Migrate api golden usage to be based on rules_js toolchain implementation

PR Close #62688
2025-07-17 18:13:42 -04:00
Matthieu Riegler
3171d01452 fix(compiler): fix detection of directive deps in JIT (#62666)
This fix also matches the implementation to the jsdoc for `hasDirectiveDependencies` "Whether any of the component's dependencies are directives"

fixes #62573

PR Close #62666
2025-07-17 14:20:31 -04:00
Joey Perrott
a959e5a5db build: remove ts_library definition (#62673)
Remove the ts_library macro from our defaults.bzl file

PR Close #62673
2025-07-17 13:59:37 -04:00
Jessica Janiuk
fc8247de95 refactor(core): add compiler support for animation instructions (#62528)
this adds the compiler code to support the animate instructions.

PR Close #62528
2025-07-16 16:44:16 -04:00
Joey Perrott
e25e6342f2 build: remove rules_nodejs based protractor tooling (#62649)
Remove the protractor setup based on rules_nodejs

PR Close #62649
2025-07-16 16:39:49 -04:00
Kristiyan Kostadinov
6dc29b3bf7 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:25 +02:00
Andrew Scott
859958dbfe 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
780774f948 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
Kristiyan Kostadinov
745ea44394 feat(core): support TypeScript 5.9 (#62541)
Updates the repo to support TypeScript 5.9 and expands the allowed version range.

PR Close #62541
2025-07-14 14:04:58 -07:00
Andrew Kushnir
96014b5f85 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
Joey Perrott
efc2a41d1d 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