28623 Commits

Author SHA1 Message Date
Tim Deschryver 6a13fd573d docs: update defer testing snippet (#53056)
PR Close #53056
2023-11-20 08:54:01 -08:00
Tim Deschryver 6cb3ade035 docs: update defer test snippet (#53056)
PR Close #53056
2023-11-20 08:54:01 -08:00
Sasidharan SD 6c68f4ca71 docs: fix broken link for view encapsulation (#52995)
PR Close #52995
2023-11-17 12:18:27 -08:00
Luke Schlangen 4b81784317 docs: fix AppComponent class name (#52976)
PR Close #52976
2023-11-17 12:16:39 -08:00
Kristiyan Kostadinov 6df5f0e0f5 Revert "fix(compiler-cli): add diagnostic for control flow that prevents content projection (#52726)" (#53012)
This reverts commit b4d022e230.

PR Close #53012
2023-11-17 11:52:03 -08:00
Kristiyan Kostadinov f6a9292943 Revert "test(core): add tests for control flow content projection with ng-container (#52726)" (#53012)
This reverts commit 181f8e4b6c.

PR Close #53012
2023-11-17 11:52:03 -08:00
Kristiyan Kostadinov cfcce8c880 Revert "refactor(compiler-cli): expose ng-content selectors and preserveWhitespaces during template type checking (#52726)" (#53012)
This reverts commit 4550a81bdc.

PR Close #53012
2023-11-17 11:52:03 -08:00
Kristiyan Kostadinov cf0a0f3fab Revert "refactor(compiler): expose utility for creating CSS selectors from AST nodes (#52726)" (#53012)
This reverts commit adbea7befb.

PR Close #53012
2023-11-17 11:52:02 -08:00
Enea Jahollari 31a047f186 docs(core): replace RefreshTransplantedView with RefreshView (#52982)
PR Close #52982
2023-11-17 08:10:14 -08:00
Kristiyan Kostadinov f671f86ac2 fix(compiler-cli): add diagnostic for control flow that prevents content projection (#52726)
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
2023-11-17 08:08:42 -08:00
Kristiyan Kostadinov b07b39de78 test(core): add tests for control flow content projection with ng-container (#52726)
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
2023-11-17 08:08:42 -08:00
Kristiyan Kostadinov 221226e0a1 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
2023-11-17 08:08:41 -08:00
Kristiyan Kostadinov 6bcdaec268 refactor(compiler): expose utility for creating CSS selectors from AST nodes (#52726)
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
2023-11-17 08:08:41 -08:00
Andrew Scott f3b8a35933 test(core): Remove manual ComponentFixture construction (#52983)
Tests still pass when using TestBed.createComponent directly

PR Close #52983
2023-11-16 15:12:33 -08:00
arturovt e480a9fd63 refactor(common): remove load event listener once it is fired (#52512)
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
2023-11-16 15:11:59 -08:00
Andrew Kushnir 31a1575334 fix(core): handle local refs when getDeferBlocks is invoked in tests (#52973)
This commit fixes an issue where having elements with local refs in some cases causes JS exception.

PR Close #52973
2023-11-16 12:20:55 -08:00
Jessica Janiuk baeb671334 refactor(migrations): Switch control flow migration reformat default to true (#52971)
This switches the default behavior of the control flow migration template reformatting from opt-in to opt-out.

PR Close #52971
2023-11-16 11:16:30 -08:00
Jessica Janiuk f763d2666f refactor(migrations): Add optional template reformatting after migration (#52939)
This adds the ability to reformat the template with proper indents after the migraion finishes. It is an optional parameter.

PR Close #52939
2023-11-16 09:30:35 -08:00
Kristiyan Kostadinov 49dca36880 fix(compiler): nested for loops incorrectly calculating computed variables (#52931)
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
2023-11-16 09:29:47 -08:00
ahmadhakeem18 2580eccc2f docs: change class field external link to point to the right page (#52919)
PR Close #52919
2023-11-16 09:29:05 -08:00
Kristiyan Kostadinov 98376f2c09 fix(compiler): changed after checked error in for loops (#52935)
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
2023-11-15 21:13:37 +00:00
Jessica Janiuk f5307bf119 release: cut the v17.0.3 release 17.0.3 2023-11-15 12:23:29 -08:00
Doug Parker 151a544277 release: bump DevTools version to 1.0.9 (#52938)
PR Close #52938
2023-11-15 20:18:32 +00:00
Jessica Janiuk 4e200bf13b fix(migrations): Add missing support for ngForOf (#52903)
This adds support to migrate ngForOf and ngForTrackBy when migrating control flow.

PR Close #52903
2023-11-15 14:06:18 +00:00
Andrew Kushnir 5de7575be8 fix(core): reset cached scope for components that were overridden using TestBed (#52916)
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
2023-11-15 14:03:55 +00:00
Alejandro a523801b25 docs: fixed unexpected closing tags for Receipt (#52914)
PR Close #52914
2023-11-14 22:02:04 +00:00
Andrew Scott 290e26a2ab refactor(core): Remove detectChanges private export (#52875)
detectChanges private export is not needed.

PR Close #52875
2023-11-14 21:05:42 +00:00
tomastrajan 95e4806ce3 docs: fix and improve @defer testing docs for adev (#52874)
PR Close #52874
2023-11-14 19:16:41 +00:00
Tomas Trajan cc8dbb61c4 docs: fix and improve @defer testing docs (#52874)
- the example when taken from docs into projects didn't work
- getDeferBlocks has to be used with async
- improved description of default state (placeholder)
- improved assertion of <large-component /> as when generated by schematics

PR Close #52874
2023-11-14 19:16:41 +00:00
Sai Kumar Kola 64d9e658a4 docs: fix grammar in guide/defer (#52899)
docs: fix grammar in aio/guide/defer and adev/guide/defer

PR Close #52899
2023-11-14 18:32:51 +00:00
Andrew Scott b393e3727e refactor(core): Simplify detectChangesInternal call signature (#52866)
The call signature of detectChangesInternal requires parameters that can all be
found directly on lView. This commit removes those paramters and instead
grabs them in the function implementation.

PR Close #52866
2023-11-14 15:11:41 +00:00
Sasidharan SD 78f817c358 docs: fix gramatical mistake in angular roadmap (#52850)
PR Close #52850
2023-11-14 15:11:10 +00:00
Swami 60f979e01f docs: fix typos in angular.dev (#52803)
PR Close #52803
2023-11-14 15:10:41 +00:00
Christian Svensson eb44643bdf docs: correct a few broken links (#52688)
PR Close #52688
2023-11-14 15:10:07 +00:00
Sasidharan SD 561cb1d8da docs: fix provideRouter typo (#52798)
PR Close #52798
2023-11-13 23:25:57 +00:00
Dmitriy Mishchenko 031a1a8c8e docs(docs-infra): a11y improvement suggestion Property Binding tutorial (#52807)
#52639 issue fix suggestion

PR Close #52807
2023-11-13 23:25:23 +00:00
Sasidharan SD 24c6b0eafb docs: fix ngComponentOutlet api reference link (#52829)
PR Close #52829
2023-11-13 23:24:56 +00:00
oliv37 a2a5646253 docs: improve filter results example (#52838)
PR Close #52838
2023-11-13 23:24:28 +00:00
Jessica Janiuk d033540d0f fix(migrations): Add support for bound versions of NgIfElse and NgIfThenElse (#52869)
This ensures the bound version of NgIfElse and NgIfThenElse work properly with the migration.

fixes: #52842

PR Close #52869
2023-11-13 22:33:33 +00:00
marktechson 8b6fd8dd18 docs: remove live event from the home page (#52878)
PR Close #52878
2023-11-13 22:29:47 +00:00
Joey Perrott c8ff0be38f ci: correct label for bazel-saucelabs job (#52873)
Update the label to the correct schema

PR Close #52873
2023-11-13 22:08:45 +00:00
Etienne FRANK a00beec2e0 docs(forms): replace fb with formBuilder (#52795)
Shorten variable names isn't a good practice. To avoid spreading it, we removed it from Angular's documentation.

PR Close #52795
2023-11-13 18:59:04 +00:00
Andrew Scott 76aba9ef0e refactor(core): Move booleans in LContainer to flags slot (#52338)
There are now 2 booleans in the LContainer so this commit moves them to a shared
FLAGS slot like the LView.

PR Close #52338
2023-11-13 18:25:17 +00:00
Andrew Scott a55c8bb0e0 test(core): Ensure signals can be read after view creation during change detection (#52495)
These tests ensure signals can be read in a template after embedded
views are created in the middle of template execution of an update pass.
The embedded view templates are executed in create mode in the middle of
the component template being executed in update mode. This behavior was
found to not work correctly in past implementations of the reactive
template consumers.

PR Close #52495
2023-11-13 18:24:41 +00:00
Jessica Janiuk 3831942771 fix(migrations): Fixes issue with multiple if elses with same template (#52863)
This should fix the issue where if the same ng-template is used with multiple if / else statements, it replaces all usages properly.
fixes: #52854

PR Close #52863
2023-11-13 18:23:55 +00:00
Matthieu Riegler 30757bd4d5 refactor(animations): EnvironmentProviders for provideAnimationsAsync (#52862)
This will prevent devs from using these providers in at a component level.

PR Close #52862
2023-11-13 17:27:31 +00:00
Matthieu Riegler f5872c9921 fix(animations): prevent the AsyncAnimationRenderer from calling the delegate when there is no element. (#52570)
This happens when `issueAnimationCommand` is invoked

fixes #52538

PR Close #52570
2023-11-13 16:29:18 +00:00
Matthieu Riegler 7c066a4af4 fix(http): Use the response content-type to set the blob type. (#52840)
When downloading a PDF with the fetch client, the blob had no content. It couldn't be displayed in an iframe. This commit fixes this.

Relate to: https://stackoverflow.com/questions/77470626/possible-bug-in-httpclient-when-using-the-blob-data-type

PR Close #52840
2023-11-13 16:22:21 +00:00
AleksanderBodurri 6a1d4ed667 fix(core): handle non-container environment injector cases (#52774)
Previously we had logic for a special case where a root injector in standalone apps would skip the import paths calculation step for the `getEnvironmentInjectorProviders` function.

This commit intends to fix this for two other cases, namely:
- When an injector is created by a route (via the `providers` field and lazy loading).
- When an injector is manually created and attached to the injector tree

It does this by assuming that any environment injector it cannot find a provider imports container for was created without one, and simply returns the raw provider records without the import paths calculation.

PR Close #52774
2023-11-13 16:21:03 +00:00
Sylvain DEDIEU e46162d3e4 docs: update readme links to target angular.dev documentation (#52772)
Change the angular.io links to target the new angular.dev website
Changed the angular logo

PR Close #52772
2023-11-13 15:56:20 +00:00