Commit Graph

28523 Commits

Author SHA1 Message Date
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
Thomas Wilkinson e2f3ae51df refactor(common): Add a new platform_navigation that provides the Navigation API. (#52363)
This allows using the Navigation API in Angular packages like Router.

PR Close #52363
2023-11-09 18:01:33 +00:00
Andrew Kushnir f61519ab90 refactor(core): delay applying component metadata until it's needed in tests (#52708)
When a component contains `@defer` blocks, Angular compiler generates the code to apply component metadata (from the `@Component` decorator) after resolving all dynamic dependencies. Currently, this function is invoked eagerly at runtime, which causes dynamic imports to be kicked off earlier than expected. With the change in this commit, Angular will start resolving async metadata when it becomes necessary during testing.

PR Close #52708
2023-11-09 16:58:06 +00:00
Vadim Makeev b651648db6 docs: make homepade example accessible (#52578)
PR Close #52578
2023-11-09 15:58:10 +00:00
Kristiyan Kostadinov a548c0333e fix(compiler-cli): incorrect inferred type of for loop implicit variables (#52732)
Fixes that all implicit variables in `@for` loops were inferred to be numbers, even though most are actually boolean.

Note that I also had to work around a weird TypeScript behavior in `tsDeclareVariable` where usually we declare variables in the following format:

```
var _t1: <type> = null!;
```

This works in most cases, but if the type is a `boolean`, TypeScript infers the variable as `never`, instead of `boolean`. I've worked around it by adding an `as boolean` to the initializer.

Fixes #52730.

PR Close #52732
2023-11-09 15:47:56 +00:00
cexbrayat 7a95cccf50 fix(compiler-cli): add interpolatedSignalNotInvoked to diagnostics (#52687)
This template diagnostic has been introduced in 8eef694def but was not enabled,
as it was not added to `ALL_DIAGNOSTIC_FACTORIES`.

PR Close #52687
2023-11-09 15:46:16 +00:00
Pawel Kozlowski 44c48a4835 fix(core): properly update collection with repeated keys in @for (#52697)
This change fixes a bug in the new list reconcilation algorithm
that could lead to an infinite loop in certain situations.

More specifically, it adjusts the internal MultiMap implementation
such that an entry returned from the .get call is the same entry
(for an identical key) removed by the .delete call.

The existing logic of the MultiMap was leading to a situation where
one view was requested and attached to LContainer, but a very different
view was removed from the MultiMap. This was leaving an attached LView
in a collection that was supposed to hold only detached views.

Closes #52524

PR Close #52697
2023-11-09 15:44:53 +00:00
cexbrayat 2cea80c6e2 fix(core): error code in image performance warning (#52727)
The warnings link to https://angular.io/errors/NG2965 which is a 404
The proper error page is https://angular.io/errors/NG0913

PR Close #52727
2023-11-09 15:44:24 +00:00
Sylvain DEDIEU 7d6752a806 docs(docs-infra): improve decorator deprecated property display in documentation (#52041)
Add the deprecated-api-item class on decorator-overview option code if deprecated. Add deprecated label on decorator-overview short description if deprecated. Add Add deprecated label on decorator option table header if option is deprecated.

PR Close #52041
2023-11-09 15:36:32 +00:00
Andrew Scott 354340d643 docs: fix broken http link (#52541)
fixes #52542

PR Close #52541
2023-11-09 15:35:59 +00:00
Andrew Scott e3950b4e1f docs: fix broken DI link on roadmap (#52541)
fixes #52539

PR Close #52541
2023-11-09 15:35:59 +00:00
Sam Verschueren 881bb4d719 docs: fix LCP element link (#52580)
PR Close #52580
2023-11-09 15:34:07 +00:00
Sasidharan SD 6c7d2b6fe3 docs: fix angular compatability version (#52585)
PR Close #52585
2023-11-09 15:33:38 +00:00
Sasidharan SD 96d554d8e7 docs: fix incorrect tag reference (#52586)
PR Close #52586
2023-11-09 15:01:03 +00:00
Sasidharan SD e994305d70 docs: fix repetetive text (#52587)
PR Close #52587
2023-11-09 15:00:27 +00:00
Sasidharan SD a87d50639b docs: fix cli command redirection (#52589)
PR Close #52589
2023-11-09 14:59:55 +00:00
Sasidharan SD 7e5d71de3e docs: fix prefetching typo issue (#52590)
PR Close #52590
2023-11-09 14:59:00 +00:00
Sasidharan SD bd8ac477c3 docs: add missing backtick (#52607)
PR Close #52607
2023-11-09 14:58:00 +00:00
Ryth-cs 1ce0f7b07a docs: correct reactive-forms typo (#52608)
PR Close #52608
2023-11-09 14:57:28 +00:00
Raghav Kanwal a08232793d docs: update typo in Guide/Testing (#52619)
PR Close #52619
2023-11-09 14:56:36 +00:00
technbuzz 8c3d41b5b3 docs: fix typo in component output guide (#52673)
We should use @Output rathar than @Input decorator for output events.
This comments fixes the typo by replacing Input with Output

PR Close #52673
2023-11-09 14:56:02 +00:00
Marianna Maglio 387051b078 docs: fix typos in tutorials/learn-angular (#52677)
PR Close #52677
2023-11-09 14:55:32 +00:00
Sasidharan SD d6fec2fc75 docs: fix developer preview link (#52693)
PR Close #52693
2023-11-09 14:54:55 +00:00
Jessica Janiuk 4626691198 release: cut the v17.0.1 release 17.0.1 2023-11-08 11:24:30 -08:00
Matthieu Riegler 5c6f3f8ec0 fix(http): Don't override the backend when using the InMemoryWebAPI (#52425)
When using `withFetch`,  the `PRIMARY_HTTP_BACKEND` token is set.

The InMemory Backend services will also set that token.

This means that providers order will matter and the latest on the list will be the one instantiated

PR Close #52425
2023-11-08 18:42:21 +00:00
Jessica Janiuk 70d30c28e0 fix(migrations): Add support for ng-templates with i18n attributes (#52597)
This makes sure that i18n attributes are preserved on ng-templates being removed during the migration.

fixes: #52517

PR Close #52597
2023-11-08 10:26:20 -08:00
Andrew Scott 6240613477 refactor(language-service): Add flag to allow disabling block syntax parsing (#52691)
This commit adds a flag to the language service config options to disable block
parsing in the compiler.

PR Close #52691
2023-11-08 10:25:22 -08:00
Kristiyan Kostadinov 227de98201 refactor(compiler): add flag to disable block syntax in language service (#52683)
Adds the private `_enableBlockSyntax` flag that can be used by the language service to disable blocks on apps that aren't on Angular v17.

PR Close #52683
2023-11-08 09:34:10 -08:00