This project is mirrored from https://github.com/angular/angular.git.
Pull mirroring updated .
- Nov 21, 2023
-
-
Andrew Kushnir authored
-
Andrew Kushnir authored
-
Jessica Janiuk authored
This addresses a few minor formatting issues with the control flow migration. fixes: #53017 PR Close #53058
-
Kristiyan Kostadinov authored
Adds support for generating i18n instructions inside of blocks. Fixes #52540. Fixes #52767. PR Close #52958
-
Kristiyan Kostadinov authored
When blocks were initially implemented, they were represented as containers in the i18n AST. This is problematic, because block affect the structure of the message. These changes introduce a new `BlockPlaceholder` AST node and integrate it into the i18n pipeline. With the new node blocks are represented with the `START_BLOCK_<name>` and `CLOSE_BLOCK_<name>` placeholders. PR Close #52958
-
anthonyfr75 authored
fix(migrations): control flow migration fails for async pipe with unboxing of observable (#52756) (#52972) Update control flow syntax to use 'as' for proper async pipe handling, accounting for variable whitespace before 'let'. Fixes #52756 PR Close #52972
-
arturovt authored
This commit adds an `error` listener to image elements and removes both `load` and `error` listeners once the image loads or fails to load. The `load` listener would never have been removed if the image failed to load. PR Close #52990
-
arturovt authored
This commit updates the implementation of the `ImagePerformanceWarning` and runs the image scan even if the page has already been loaded. The `window.load` event would never fire if the page has already been loaded; that's why we're checking for the document's ready state. PR Close #52991
-
Jessica Janiuk authored
This separates out the NgSwitch migration pass from the NgSwitchCase / Default pass, which makes nested switch migrations work. fixes: #53009 PR Close #53010
-
Jessica Janiuk authored
With if then else use cases, we now properly account for the length of the original element's contents when tracking new offsets. fixes: #52927 PR Close #53006
-
Nicolas Frizzarin authored
Currently in the angular.dev documentation, afterNextRender function take directly the phase as a second parameter which is not correct. According to the api of this hook, the second parameter is an object which contains the phase. This PR update the part of the documentation PR Close #53025
-
arturovt authored
This commit cleans up the `loadingPromise` when no `dependenciesFn` is defined, as it's already cleaned up after the resolution of `Promise.allSettled`. This occurs with `prefetch on` triggers, such as when `triggerResourceLoading` is called from `ɵɵdeferPrefetchOnImmediate`, where there are no dependencies to load. The `loadingPromise` should still be cleaned up because it typically involves the `ZoneAwarePromise`, which isn't properly garbage collected when referenced elsewhere (in this case, it would be referenced from the `tView` data). PR Close #53031
-
Tim Deschryver authored
PR Close #53056
-
Tim Deschryver authored
PR Close #53056
-
- Nov 18, 2023
-
-
Sasidharan SD authored
PR Close #52995
-
Luke Schlangen authored
PR Close #52976
-
Kristiyan Kostadinov authored
Revert "fix(compiler-cli): add diagnostic for control flow that prevents content projection (#52726)" (#53012) This reverts commit b4d022e2. PR Close #53012
-
Kristiyan Kostadinov authored
Revert "test(core): add tests for control flow content projection with ng-container (#52726)" (#53012) This reverts commit 181f8e4b. PR Close #53012
-
Kristiyan Kostadinov authored
Revert "refactor(compiler-cli): expose ng-content selectors and preserveWhitespaces during template type checking (#52726)" (#53012) This reverts commit 4550a81b. PR Close #53012
-
Kristiyan Kostadinov authored
Revert "refactor(compiler): expose utility for creating CSS selectors from AST nodes (#52726)" (#53012) This reverts commit adbea7be. PR Close #53012
-
Enea Jahollari authored
PR Close #52982
-
Kristiyan Kostadinov authored
This is a follow-up to the fix from #52414. It adds a diagnostic that will tell users when a control flow is preventing its direct descendants from being projected into a specific component slot. PR Close #52726
-
Kristiyan Kostadinov authored
The control flow projection diagnostic will mention `ng-container` as a workaround for projection multiple nodes. These changes add a couple of tests to ensure that the approach works. PR Close #52726
-
Kristiyan Kostadinov authored
refactor(compiler-cli): expose ng-content selectors and preserveWhitespaces during template type checking (#52726) These changes expose the `ngContentSelectors` and `preserveWhitespaces` metadata to the TCB so they can be used in the next commit to implement a new diagnostic. PR Close #52726
-
Kristiyan Kostadinov authored
When doing directive matching in the compiler, we need to be able to create a selector from an AST node. We already have the utility, but these changes simplify the public API and expose it so it can be used in `compiler-cli`. PR Close #52726
-
- Nov 17, 2023
-
-
Andrew Scott authored
Tests still pass when using TestBed.createComponent directly PR Close #52983
-
arturovt authored
This commit removes the `load` event listener once it has fired within the `ImagePerformanceWarning`. The `load` event listener prevents the zone stuff from being garbage collected in development mode when debugging microfrontend applications that may be destroyed multiple times. PR Close #52512
-
Andrew Kushnir authored
This commit fixes an issue where having elements with local refs in some cases causes JS exception. PR Close #52973
-
Jessica Janiuk authored
This switches the default behavior of the control flow migration template reformatting from opt-in to opt-out. PR Close #52971
-
Jessica Janiuk authored
This adds the ability to reformat the template with proper indents after the migraion finishes. It is an optional parameter. PR Close #52939
-
Kristiyan Kostadinov authored
The `$first`, `$last`, `$even` and `$odd` variables in `@for` loops aren't defined on the template context of the loop, but are computed based on `$index` and `$count` (e.g. `$first` is defined as `$index === 0`). We do this calculation by looking up `$index` and `$count` when one of the variables is used. The problem is that all `@for` loop variables are available implicitly which means that when a nested loop tries to rewrite a reference to an outer loop computed variable, it finds its own `$index` and `$count` first and it doesn't look up the ones on the parent at all. This means that the calculated values will be incorrect at runtime. These changes work around the issue by defining nested-level-specific variable names that can be used for lookups (e.g. `$index` at level `2` will also be available as `ɵ$index_2`). This isn't the most elegant solution, however the `TemplatDefitinionBuilder` wasn't set up to handle shadowed variables like this and it doesn't make sense to refactor it given the upcoming template pipeline. Fixes #52917. PR Close #52931
-
ahmadhakeem18 authored
PR Close #52919
-
- Nov 16, 2023
-
-
Kristiyan Kostadinov authored
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be. Fixes #52885. PR Close #52935
-
Jessica Janiuk authored
-
Jessica Janiuk authored
-
Doug Parker authored
PR Close #52938
-
- Nov 15, 2023
-
-
Jessica Janiuk authored
This adds support to migrate ngForOf and ngForTrackBy when migrating control flow. PR Close #52903
-
Andrew Kushnir authored
Currently, when a component is overriden using `TestBed.overrideComponent`, Angular retains calculated scope for that component (a set of components and directives used within a component). This may cause stale information to be used in tests in some cases. This commit updates the logic to reset overridden component scope, so it gets re-computed during the next invocation. Resolves #52817. PR Close #52916
-
Alejandro authored
PR Close #52914
-
Andrew Scott authored
detectChanges private export is not needed. PR Close #52875
-