Commit graph

29561 commits

Author SHA1 Message Date
Doug Parker
e639bf4965 release: bump DevTools version to 1.0.9 (#52938)
PR Close #52938
2023-11-15 20:18:32 +00:00
Jessica Janiuk
8f5124ea95 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
ee892ee294 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
f8d5b8464b docs: fixed unexpected closing tags for Receipt (#52914)
PR Close #52914
2023-11-14 22:02:03 +00:00
Andrew Scott
0a976c86d6 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
faaac056be docs: fix and improve @defer testing docs for adev (#52874)
PR Close #52874
2023-11-14 19:16:40 +00:00
Tomas Trajan
e02d0e4675 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:40 +00:00
Sai Kumar Kola
7d00175dae 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
7f9ab9dc56 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
3f094066fc docs: fix gramatical mistake in angular roadmap (#52850)
PR Close #52850
2023-11-14 15:11:10 +00:00
Swami
5e954bfc08 docs: fix typos in angular.dev (#52803)
PR Close #52803
2023-11-14 15:10:41 +00:00
Christian Svensson
cbd78af79d docs: correct a few broken links (#52688)
PR Close #52688
2023-11-14 15:10:06 +00:00
Sasidharan SD
15a825c113 docs: fix provideRouter typo (#52798)
PR Close #52798
2023-11-13 23:25:57 +00:00
Dmitriy Mishchenko
4d868a3df9 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
282a49c019 docs: fix ngComponentOutlet api reference link (#52829)
PR Close #52829
2023-11-13 23:24:56 +00:00
oliv37
2d98735084 docs: improve filter results example (#52838)
PR Close #52838
2023-11-13 23:24:28 +00:00
Jessica Janiuk
42805e3204 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
26e980d9d7 docs: remove live event from the home page (#52878)
PR Close #52878
2023-11-13 22:29:47 +00:00
Joey Perrott
0485eb816e ci: correct label for bazel-saucelabs job (#52873)
Update the label to the correct schema

PR Close #52873
2023-11-13 22:08:44 +00:00
Etienne FRANK
9e2c3bbccb 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:03 +00:00
Andrew Scott
726530a9af feat(router): Allow onSameUrlNavigation: 'ignore' in navigateByUrl (#52265)
There are cases where the application's default behavior is 'reload' and
a certain navigation might want to override this to be `ignore` instead.
This commit allows `onSameUrlNavigation` in the `router.navigateByUrl`
to be `ignore` where it was previously restricted to only `reload`.

PR Close #52265
2023-11-13 18:29:39 +00:00
Andrew Scott
c5ead61462 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
da616ee773 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
0e7b1daa8d 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
9135dbaab2 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
5ee11a74ec 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
cf86ae5c3a 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:20 +00:00
AleksanderBodurri
6aef0f6fc8 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
f51ce68bf5 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:19 +00:00
Sam Edwards
181e4f31ea docs: correct component name on Managing Dynamic Data on angular.dev website (#52792)
PR Close #52792
2023-11-13 15:55:51 +00:00
Jessica Janiuk
da97bbc762 fix(migrations): passed in paths will be respected in nx workspaces (#52796)
This fixes a bug where if you have multiple tsconfig files, the migration would not find anything to migrate at the passed in path.
fixes: #52787

PR Close #52796
2023-11-13 15:21:36 +00:00
Jessica Janiuk
17adf0f917 fix(migrations): Add support for removing imports post migration (#52763)
This update removes imports from component decorators and at the top of the files. It only removes standalone imports though. It does not remove CommonModule if that is the only import.

PR Close #52763
2023-11-13 15:21:06 +00:00
AleksanderBodurri
3cf18bb6f2 fix(devtools): check for all new DI debug APIs before trying to determine resolution path providers (#52791)
Previously, some versions of Angular 16.1.x that had 3/4 of the new DI debug APIs would enter a code path that required them to have access to the 4th.

Now DevTools checks for the existence of all 4 explicitly before going down this code path.

PR Close #52791
2023-11-10 18:37:05 +00:00
Miles Malerba
70fe5e60b3 refactor(compiler): Handle trailing spaces in ICU placeholders (#52698)
In some cases ICU expression placeholders may have trailing spaces that
need to be trimmed when matching the placeholder to its corresponding
text binding.

PR Close #52698
2023-11-10 17:01:07 +00:00
Miles Malerba
2c3b6c6e27 refactor(compiler): Fix some issues with i18n expressions in ICUs (#52698)
We were previously counting the i18n expression index and deciding when
to apply i18n expressions based on the i18n context. These should be
done based on the i18n block instead.

PR Close #52698
2023-11-10 17:01:07 +00:00
Miles Malerba
0864dbe571 refactor(compiler): Change how ICUs are ingested (#52698)
The previous commit added support for interpolated text in ICUs, but it
made the assumption that the interpolation would be a single variable
read expression.

To properly support all kinds of interpolation expressions, this commit
refactors how ICUs are ingested to allow us to re-use the same logic we
use for bound text outside of ICUs.

To accomplish this, the `IcuOp` creation op has been removed in favor of
a pair of ops: `IcuStartOp` and `IcuEndOp`, that mark the beginning and
end of the ICU. Now, instead of inserting an `IcuUpdateOp` in the update
IR, we call `ingestBoundText` and use the presence of the surrounding
`IcuStartOp` and `IcuEndOp` to match the interpolation with the ICU.

PR Close #52698
2023-11-10 17:01:07 +00:00
Miles Malerba
3a0ac32dcb refactor(compiler): Support expressions inside ICUs (#52698)
Previously ICUs were assumed to only generate a single i18n expression
per ICU. However, it is possible for ICUs to contain text interpolations
which requires additional expressions. This commit adds support for
multiple expressions per ICU.

PR Close #52698
2023-11-10 17:01:06 +00:00
Miles Malerba
ef6999f2f6 refactor(compiler): Support element tags inside ICUs (#52698)
ICUs that contain element tags need extra parameters for the i18n
message. These are in addition to the element slot params that are
already added to the parent i18n block's params. In this commit we add a
new phase to fill in these placeholders.

PR Close #52698
2023-11-10 17:01:06 +00:00
Miles Malerba
50a06fa451 refactor(compiler): More consistent sorting of i18n params (#52698)
Previously the template pipeline sorted i18n message params before
adding the sub-message placeholders. Now its sorts after all
placeholders are added.

Both the template pipeline and TemplateDefinitionBuilder previously
failed to sort the post-processing params. They both now sort these as
well. This is safe to change in TemplateDefinitionBuilder, as it does
not change anything about the functionality, it simply ensures that
params map in the output has the keys ordered in a way that can be
easily reproduced in the template pipeline.

PR Close #52698
2023-11-10 17:01:06 +00:00
Doug Parker
5ee935e7fe release: bump DevTools version to 1.0.8 (#52759)
PR Close #52759
2023-11-10 17:00:20 +00:00
Kristiyan Kostadinov
94096c6ede feat(core): support TypeScript 5.3 (#52572)
Updates the repo to support TypeScript 5.3 and resolve any issues. Fixes include:
* Updating usages of TS compiler APIs to match their new signatures.
* In TS 5.3 negative numbers are represented as `PrefixUnaryExpression` instead of `NumericExpression`. These changes update all usages to account for it since passing a negative number into the old APIs results in a runtime error.

PR Close #52572
2023-11-09 22:56:41 +00:00
Jessica Janiuk
beb18fb01c refactor(migrations): code clean up and add comments on exported functions (#52755)
This cleans up a bit of code to make maintenance easier. It also adds comments for all the exported methods so they are clear to anyone in the future.

PR Close #52755
2023-11-09 22:55:50 +00:00
Jessica Janiuk
f84cce09df docs: release notes for the v17.0.2 release 2023-11-09 12:26:27 -08:00
Pawel Kozlowski
6c8776ff71 fix(core): limit rate of markers invocations (#52742)
This PR assures that the performance markers are invoked
only once for a given feature.

Closes #52524

PR Close #52742
2023-11-09 19:58:26 +00:00
Sasidharan SD
154f286d55 docs: add extended diagnostic NG8109 (#52721)
PR Close #52721
2023-11-09 19:39:24 +00:00
Mikita Himpel
71a4d6aaef docs: fix programmatic-rendering example component name (#52731)
PR Close #52731
2023-11-09 19:38:18 +00:00
Nelson Gutierrez
c5e4424810 docs: add missing backtick on title (#52711)
PR Close #52711
2023-11-09 19:32:24 +00:00
Patrick Hyatt
cb5c6fc530 docs: correct typescript type inference link (#52714)
PR Close #52714
2023-11-09 19:30:39 +00:00
Balaji
5935f91cf7 docs: updating incorrect link in Class Binding page (#52715)
PR Close #52715
2023-11-09 19:28:06 +00:00
Mikhail Filin
867161f204 docs: remove broken link pill in dynamic component page (#52744)
PR Close #52744
2023-11-09 19:18:29 +00:00