Commit Graph

28550 Commits

Author SHA1 Message Date
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
Sam Edwards 0fbdb63bbc 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 e1f84a31dc 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 aa2d815648 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:07 +00:00
AleksanderBodurri 54a7b33245 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 38aab6aa9d 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 12ffb25e94 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 cb5d9a480e 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 825718f2b1 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:07 +00:00
Miles Malerba 0b7e7fd3a5 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:07 +00:00
Miles Malerba 22ff9cacce 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:07 +00:00
Doug Parker 6b164dc83a release: bump DevTools version to 1.0.8 (#52759)
PR Close #52759
2023-11-10 17:00:20 +00:00
Jessica Janiuk c01af4302f 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 01efb1b807 release: cut the v17.0.2 release 17.0.2 2023-11-09 12:08:18 -08:00
Pawel Kozlowski b16fc2610a 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 cfb42ee2c8 docs: add extended diagnostic NG8109 (#52721)
PR Close #52721
2023-11-09 19:39:24 +00:00
Mikita Himpel 47756d81e5 docs: fix programmatic-rendering example component name (#52731)
PR Close #52731
2023-11-09 19:38:19 +00:00
Nelson Gutierrez 90018f9327 docs: add missing backtick on title (#52711)
PR Close #52711
2023-11-09 19:32:24 +00:00
Patrick Hyatt 7b60b5196f docs: correct typescript type inference link (#52714)
PR Close #52714
2023-11-09 19:30:39 +00:00
Balaji 35e998effb docs: updating incorrect link in Class Binding page (#52715)
PR Close #52715
2023-11-09 19:28:06 +00:00
Mikhail Filin 158b1984bf docs: remove broken link pill in dynamic component page (#52744)
PR Close #52744
2023-11-09 19:18:30 +00:00
Jeevan Mahesha 27bf371e32 docs: removed the broken link (#52743)
PR Close #52743
2023-11-09 19:06:13 +00:00
Tom Wilkinson 56ec37dcbc refactor(common): Update packages/common/src/navigation/platform_navigation.ts (#52363)
Co-authored-by: Andrew Scott <atscott01@gmail.com>

PR Close #52363
2023-11-09 18:01:33 +00:00
Thomas Wilkinson d5fd614836 refactor(common): Add fake implementation of PlatformNavigation. (#52363)
This implementation does most, but not all, of the things the native
Navigation API does. Also adds a spec that tests all the currently
supported behaviors.

PR Close #52363
2023-11-09 18:01:33 +00:00