Commit graph

29561 commits

Author SHA1 Message Date
Jeevan Mahesha
f2127368ba docs: removed the broken link (#52743)
PR Close #52743
2023-11-09 19:06:13 +00:00
Tom Wilkinson
029edea32a 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
27f5eed017 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
77770c6d5b 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
55d2c427c2 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
8c8ff63376 docs: make homepade example accessible (#52578)
PR Close #52578
2023-11-09 15:58:10 +00:00
Kristiyan Kostadinov
645447daff 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
8a87e62e19 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
ea8c9b61d2 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
cc68b0e9f5 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
b1cc0923a0 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
1d3d33ffd0 docs: fix broken http link (#52541)
fixes #52542

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

PR Close #52541
2023-11-09 15:35:59 +00:00
Sam Verschueren
56b96f6f19 docs: fix LCP element link (#52580)
PR Close #52580
2023-11-09 15:34:07 +00:00
Sasidharan SD
68f89b00a5 docs: fix angular compatability version (#52585)
PR Close #52585
2023-11-09 15:33:37 +00:00
Sasidharan SD
3d98a44db5 docs: fix incorrect tag reference (#52586)
PR Close #52586
2023-11-09 15:01:02 +00:00
Sasidharan SD
9dff1fe891 docs: fix repetetive text (#52587)
PR Close #52587
2023-11-09 15:00:27 +00:00
Sasidharan SD
2ee1b5cddf docs: fix cli command redirection (#52589)
PR Close #52589
2023-11-09 14:59:55 +00:00
Sasidharan SD
3153892342 docs: fix prefetching typo issue (#52590)
PR Close #52590
2023-11-09 14:58:59 +00:00
Sasidharan SD
0ffa228165 docs: add missing backtick (#52607)
PR Close #52607
2023-11-09 14:57:59 +00:00
Ryth-cs
01f9b57f6a docs: correct reactive-forms typo (#52608)
PR Close #52608
2023-11-09 14:57:28 +00:00
Raghav Kanwal
b25153abb3 docs: update typo in Guide/Testing (#52619)
PR Close #52619
2023-11-09 14:56:36 +00:00
technbuzz
fc8f521fc2 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
8fee560ca7 docs: fix typos in tutorials/learn-angular (#52677)
PR Close #52677
2023-11-09 14:55:32 +00:00
Sasidharan SD
4526335157 docs: fix developer preview link (#52693)
PR Close #52693
2023-11-09 14:54:55 +00:00
Jessica Janiuk
9cac4eea5b docs: release notes for the v17.0.1 release 2023-11-08 12:42:48 -08:00
Matthieu Riegler
291ba38623 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:20 +00:00
Jessica Janiuk
12f979d5c6 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
abdbdf787e 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
49cbe43886 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
Kristiyan Kostadinov
9b92d7d589 fix(docs-infra): fix menu icon size (#52689)
Fixes that the hamburger icon was too small, because the top nav is using the wrong kind of button. Switching it to the right one would require more refactoring so I went with the simpler approach for now.

PR Close #52689
2023-11-08 09:23:43 -08:00
cexbrayat
c745ca2a61 refactor(core): sanitize reactivity tests (#52632)
It was intriguing to see a double `fixture.detectChanges()` introduced by 38c9f08c8d
It turns out this is not needed.

PR Close #52632
2023-11-08 08:51:50 -08:00
Swami
abc225b910 docs: typo fix (#52511)
PR Close #52511
2023-11-08 08:51:28 -08:00
Andrew Scott
33da677ecc refactor(core): Remove RootViewRef<T> because it is the same as ViewRef<T> (#52430)
`RootViewRef<T>` extends `ViewRef<T>` and overrides 3 methods with behavior
that is identical to `ViewRef<T>`. This commit removes `RootViewRef<T>`
because it is not needed.

PR Close #52430
2023-11-08 08:50:50 -08:00
Matthieu Riegler
289a178ef0 docs: add v17 versions support (#51443)
* Node 16 support is dropped per angular/angular-cli#25675
* TS 5.2 is supported per #51334
* TS 5.1 and lower support is dropped by #51792

PR Close #51443
2023-11-08 08:50:20 -08:00
Lucas
62bd8c5200 docs: updating information about polyfills (#52519)
PR Close #52519
2023-11-08 08:49:28 -08:00
Andrew Scott
8592585f6a test(core): Add test to ensure writing to signals in afterRender hooks throws error (#52475)
We do not yet handle running change detection again if `afterRender`
hooks write to signals.

PR Close #52475
2023-11-08 08:48:44 -08:00
Jessica Janiuk
b9e2893e5c fix(migrations): Switches to multiple passes to fix several reported bugs (#52592)
Rather than migrate all in one pass, this now migrates in a separate pass per control flow item plus one for templates at the end. This resolves issues with multiple control flow items on a single element as well as making sure ng-templates are fully migrated before being moved to new locations.

fixes: #52518
fixes: #52516
fixes: #52513

PR Close #52592
2023-11-08 08:47:10 -08:00
Alex Rickabaugh
3f2501ecbd build: bump in-memory-web-api to v17 (#52676)
This commit updates the in-memory-web-api package versions from v16 -> v17.

PR Close #52676
2023-11-08 17:05:45 +01:00
Pawel Kozlowski
1e87ce2de2 docs: add the v17 blog post link to the changelog (#52675)
This commit adds the short link 'http://goo.gle/angular-v17' to the project changelog.

PR Close #52675
2023-11-08 16:23:01 +01:00
Pawel Kozlowski
33ae659100 build: update aio to 17.0.0 (#52635)
This commit updates the Angular version for AIO and its examples to 17.0.0

PR Close #52635
2023-11-08 16:02:33 +01:00
Pawel Kozlowski
5ebb361568 docs: release notes for the v17.0.0 release 2023-11-08 13:30:23 +01:00
Andrew Scott
897f014785 docs: release notes for the v17.0.0-rc.3 release 2023-11-06 16:12:23 -08:00
Andrew Scott
f887792c83 refactor(core): Add warning when signal equality is false for object.is (#52532)
This commit adds a warning when a signal equality function returns
`false` but `Object.is` returns `true`.

PR Close #52532
2023-11-06 15:53:09 -08:00
AleksanderBodurri
d01f371d9a refactor(devtools): update Angular logo for extension and loading animation (#52546)
Previously these were using the pre v17 Angular logo.

Now these have been updated to use the new Angular logo for V17+.

PR Close #52546
2023-11-06 12:34:20 -08:00
Dylan Hunn
699ae60df2 refactor(compiler): Fix two-way binding source maps (#52479)
Now that two-way bindings work correctly with implicit receivers, we can fix the corresponing source map tests. The main issue was that we were not properly mapping `elementEnd` for elements with no closing tag (self-closing elements).

PR Close #52479
2023-11-06 11:42:59 -08:00
Dylan Hunn
97b1377402 refactor(compiler): Fix two-way bindings in template pipeline (#52479)
Some two-way bindings tests were not working properly, because we could not ingest the implicit receiver required to write to the `ngModelChanges` property. Now, we properly resolve that implicit receiver to the root component context.

Also, add some tests, both for the simple case, and the case where the listener is inside a nested view.

PR Close #52479
2023-11-06 11:42:59 -08:00
Dylan Hunn
ee5d60b29b refactor(compiler): Support extracting deps functions for defer in template pipeline (#52479)
Some `defer` blocks have external dependencies on other components or directives. These dependencies need to be extracted into deps functions, which either return local deps, or use a dynamic import for non-local deps. Template Pipeline can now generate these functions.

PR Close #52479
2023-11-06 11:42:59 -08:00
Dylan Hunn
8b1b6d5678 refactor(compiler): Emit a template ref extractor on ng-templates with local refs (#52479)
When an `ng-template` has local refs, such as `<ng-template #foo>`, we must emit a `ɵɵtemplateRefExtractor` argument to the template creation functino. The template pipeline now supports this.

PR Close #52479
2023-11-06 11:42:59 -08:00
Dylan Hunn
813a70b4e9 refactor(compiler): Add template pipeline golden for differing consts (#52479)
The consts for this test are emitted in a different order, but the generated code is valid.

PR Close #52479
2023-11-06 11:42:58 -08:00