Commit graph

29561 commits

Author SHA1 Message Date
Sai Kumar Kola
dfc6c8d0c7 fix: cta clickability issue in adev homepage. (#52905)
PR Close #52905
2024-01-25 22:48:47 +00:00
Aditya Kumar
c9c22fa059 docs: Fix open link in new tab (#53647)
Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>

PR Close #53647
2024-01-25 22:40:50 +00:00
louay.meskini
96bee52b28 docs: Fix links for NgZone (#53667)
PR Close #53667
2024-01-25 22:38:51 +00:00
jase
4bb1c8fe58 docs: fix http handler usage on interceptor example (#53772)
PR Close #53772
2024-01-25 22:38:18 +00:00
Trung Vo
3e2cd83e65 docs: add Trung Vo to GDE resources (#53599)
PR Close #53599
2024-01-25 22:29:26 +00:00
Aditya Kumar
ec526ca77a docs: Fix router api url link on tutorial page (#53416)
Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>

PR Close #53416
2024-01-25 22:27:11 +00:00
Ezéchiel Amen AGBLA
9f18227f3a docs: bad redirection in core Injector page for providers and injection token links (#52775)
PR Close #52775
2024-01-25 21:34:35 +00:00
Gleb28
001c30defd docs: removed repeated words "when" (#53828)
Fixes #53827

PR Close #53828
2024-01-25 21:31:33 +00:00
Sylvain DEDIEU
9bb1884304 docs: change the file of the provideHttpClient standalone example to match cli generated project (#52806)
The "Providing HttpClient through dependency injection" documentation now shows that in case of a standalone boostraped app, the provideHttpClient is to include in the app.config.ts file.

Also updated the http setup server communication example to align the new doc (adev) with the old one (aio).

PR Close #52806
2024-01-25 21:24:58 +00:00
Sasidharan SD
c8d1b11cec docs: fix invalid file replacement configuration (#52802)
PR Close #52802
2024-01-25 21:22:44 +00:00
Aditya Kumar
d404fe87e8 docs: Fix minor grammatical fixes in the documentations (#53418)
Signed-off-by: Aditya Kumar <aditya.kumar60@infosys.com>

PR Close #53418
2024-01-25 21:21:59 +00:00
Nelson Gutierrez
ef8c68bd22 docs: add correct language for syntax highlighting on new docs (#52712)
PR Close #52712
2024-01-25 21:19:29 +00:00
Nelson Gutierrez
8c65376324 docs: add correct syntax highlighting type in event binding documentation (#52712)
PR Close #52712
2024-01-25 21:19:29 +00:00
ilir.beqiri
35ec260029 docs: fix type at change detection with pipes section (#53940)
Fix a typo of word 'heroes' at docs guide for change detection with pure pipes

PR Close #53940
2024-01-25 20:46:18 +00:00
Kristiyan Kostadinov
c637dfa092 refactor(core): signals toString improvements (#54079)
Follow-up to #54002 that:
* Remove the `toString` implementation from the `primitives`.
* Guards the `toString` with `ngDevMode` and prints out the value.

PR Close #54079
2024-01-25 20:45:02 +00:00
Jessica Janiuk
a6dad59536 ci: update adev approvers list (#54081)
This temporarily updates the adev approvers list before we decide how we will handle adev content reviews going forward.

PR Close #54081
2024-01-25 20:40:08 +00:00
Ben Hong
d5c0743380 ci: add ben to reviewers for adev files (#54078)
For ADEV changes going forward, Ben will be helping the team to review all PRs associated with this project.

PR Close #54078
2024-01-25 20:18:51 +00:00
Angular Robot
58d4abcb22 docs: update Angular CLI help [main] (#54075)
Updated Angular CLI help contents.

PR Close #54075
2024-01-25 18:03:27 +00:00
vladboisa
8da67ae217 docs: fix & update MDN Shadow API link examples (#54040)
PR Close #54040
2024-01-25 18:02:58 +00:00
Ben Hong
c4853e952d docs: add documentation and script for local docs dev environment (#54038)
PR Close #54038
2024-01-25 18:02:27 +00:00
d-codez
fab1590731 docs: correct grammar in event handling documentation (#54009)
PR Close #54009
2024-01-25 18:01:50 +00:00
Kristiyan Kostadinov
656bc282e3 fix(core): add toString implementation to signals (#54002)
Since signals are function, currently stringifying them reveals the implementation of the function. This can lead to confusion since it contains internal implementation details. These changes add static `toString` function to address the issue.

**Note:** it's tempting to have `toString` output the actual value of the signal, but that would encourage users not to call the function which will be problematic in the long run. That's why these changes are using a static string instead.

PR Close #54002
2024-01-25 17:11:30 +00:00
arturovt
75aeae42b7 fix(animations): cleanup DOM elements when root view is removed with async animations (#53033)
Currently, when using `provideAnimationsAsync`, Angular uses `AnimationRenderer`
as the renderer. When the root view is removed, the `AnimationRenderer` defers the actual
work to the `TransitionAnimationEngine` to do this, and the `TransitionAnimationEngine`
doesn't actually remove the DOM node, but just calls `markElementAsRemoved()`.

The actual DOM node is not removed until `TransitionAnimationEngine` "flushes".

Unfortunately, though, that "flush" will never happen, since the root view is being
destroyed and there will be no more flushes.

This commit adds `flush()` call when the root view is being destroyed.

PR Close #53033
2024-01-25 16:32:57 +00:00
Kristiyan Kostadinov
93188cb439 refactor(compiler): distinguish two-way bindings in the AST (#54065)
During the template parsing stage two-way bindings are split up into a property and event binding. All the downstream code treats these binding the same as their one-way equivalents. For some future work we'll have to distinguish between the two so these changes update the `BoundElementProperty.type` and `ParsedEvent.type` to include a `TwoWay` type. All existing call-sites have been updated to treat `TwoWay` the same as `Property`/`Regular`, but more specialized logic will be added in the future.

PR Close #54065
2024-01-25 16:31:57 +00:00
Dylan Hunn
c3bb00a2eb refactor(compiler): Fix defer deps fn duplicate names in Template Pipeline (#54060)
Previously, defer deps fns names were only prefixed with the component name, meaning that distinct deps fns in the same component would produce a name collision. Now, we take into account the entire template function name when naming inner deps fns.

PR Close #54060
2024-01-25 16:31:01 +00:00
Diego Julião
bd9c2c5b3f docs: remove ngx-deploy-npm from deployers table (#53999)
PR Close #53999
2024-01-25 16:07:40 +00:00
Pawel Kozlowski
c04312860b refactor(core): introduce instructions for view queries as signals (#54017)
This commit adds new instructions to support view queries as signals.

PR Close #54017
2024-01-24 18:39:51 -05:00
Pawel Kozlowski
3e67b271ad refactor(core): introduce onDirty notification on QueryList (#54017)
This refactoring expands the QueryList such that we can add onDirty
callback to be invoked when a given query gets marked as dirty during
view insertion / removal. This mechanism is needed for signal-based
queries.

PR Close #54017
2024-01-24 18:39:51 -05:00
Pawel Kozlowski
73fec9ddbf refactor(core): extract more query logic from instructions (#54017)
This is a refactor commit that moves more query construction / refresh
logic from the body of instructions into dedicated functions. This is
in preparation for the signal-based query instructions.

PR Close #54017
2024-01-24 18:39:51 -05:00
Andrew Scott
308d83c312 refactor(core): race rAF and setTimeout in zoneless scheduler (#54023)
Update zoneless scheduler to run change detection after the first of
either `requestAnimationFrame` or `setTimeout` callbacks execute.

PR Close #54023
2024-01-24 18:39:15 -05:00
Jan Olaf Krems
c7df61fbc2 refactor(core): Allow mutation instead of reassignment of ngDevMode (#53862)
In some bundling scenarios, there may be local references to `ngDevMode` that need to be kept in sync with the global variable. This becomes hard to impossible if the global is reassigned. This allows setting the global to an empty object instead of `true` and preserve identity during `initNgDevMode`.
PR Close #53862
2024-01-24 18:38:50 -05:00
Andrew Scott
eddf5dae5e fix(compiler): Update type check block to fix control flow source mappings (#53980)
The source mappings and types for various pieces of the control flow
were not quite right and prevented the language service from providing
accurate information.

fixes https://github.com/angular/vscode-ng-language-service/issues/1988

PR Close #53980
2024-01-24 18:37:58 -05:00
Dylan Hunn
47e6e84101 feat(compiler): Add a TSConfig option useTemplatePipeline (#54057)
The Template Pipeline is a brand new backend for the Angular compiler, replacing `TemplateDefinitionBuilder`. It generates the Ivy instructions corresponding to an input template (or host binding). The Template Pipeline has an all-new design based on an intermediate representation compiled over many phases, which will allow us to experiment with compiler changes more easily in the future.

With this commit, the template pipeline can now be enabled in any project via the `useTemplatePipeline` TSConfig option. However, it is still disabled by default.

PR Close #54057
2024-01-24 18:36:23 -05:00
Dylan Hunn
0f5f45c0fa refactor(compiler): Support externally provided defer deps fns (#54043)
In #53591, Andrew added local compliation support for defer blocks. However, this requires the ability to emit pre-generated static defer deps functions. We now also support that feature in Template Pipeline.

PR Close #54043
2024-01-24 18:35:24 -05:00
Alex Rickabaugh
fad1354d50 release: cut the v17.2.0-next.0 release 2024-01-24 13:00:51 -08:00
nikvarma
9e10af45c5 docs: typo Chat to chart fix (#53892)
PR Close #53892
2024-01-24 21:23:51 +01:00
Pawel Kozlowski
a2a0b33c13 docs: release notes for the v17.1.1 release (#54056)
PR Close #54056
2024-01-24 20:35:15 +01:00
Paul Gschwendtner
77516450c8 refactor(compiler): support JIT for signal-based queries (#54019)
Similar to signal-based inputs, we support signal-based queries in JIT
by expecting a decorator to be added. This is a consequence of the
design, given that JIT requires query declaration information before
the class is initialized- but ironically there is no way to collect this
information without instantiating the class.

A JIT transform in the Angular CLI will automatically generate these
decorators for testing.

PR Close #54019
2024-01-24 16:13:31 +01:00
Paul Gschwendtner
17a47c4c54 refactor(compiler-cli): additional diagnostics for signal-based queries (#54019)
This commit introduces three additional diagnostics for queries:

- If a query (either using decorator or signal-based) is declared on a
  static class member, a diagnostic is raised.
- If a signal-based query is mixed with a query decorator, a diagnostic
  is raised. Similar to signal inputs.
- If a singal-based query is also declared in the directive/component
  class decorator metadata, a diagnostic is raised.

PR Close #54019
2024-01-24 16:13:31 +01:00
Paul Gschwendtner
a7017a0471 refactor(core): improve safety of input/query initializer API detection (#54019)
Due to some refactorings, we were only checking the function name
and whether it originates from an import. We should also verify the
module. This seems like logic we lost in the refactorings.

PR Close #54019
2024-01-24 16:13:31 +01:00
Paul Gschwendtner
3b6f636edf refactor(compiler-cli): collapse multiple query advance statements (#54019)
Collapses multiple sibling query advance statements into single
query advance invocations. This will help reducing generated code
for directives/components with many queries.

PR Close #54019
2024-01-24 16:13:31 +01:00
Paul Gschwendtner
998af3276f refactor(compiler-cli): move more query generation logic to dedicated file (#54019)
Without any modifications, this commit moves more of the the query
generation logic into its dedicated file.

PR Close #54019
2024-01-24 16:13:31 +01:00
Max
09f94234ee docs: fix typo in Custom directives section (#54044)
There was a grammatically incorrect sentence in the What is Angular page, Custom directives section. This change makes it more correct.
PR Close #54044
2024-01-24 15:32:22 +01:00
Paul Gschwendtner
25f91e38b2 build: ensure zone.js typing test is hermetic (#54048)
Currently the ZoneJS typing tests executes outside of Bazel, as a legacy
artifact of the monorepo merging (as it seems - not ideal at all).

Looks like this test relies on its own node modules, that were NOT
locked using a yarn lock file. This commit adds one, and specifically
locks it to a `@types/node` version that does not include the most
recent patch release (which seemingly introduced a breaking change)
that causes issues with TypeScript's lib checking.

Whenever we perform lock file maintenance in the future, we have the
following options:

- Consider disabling lib checking via `skipLibCheck` for this test. This
  may be acceptable.
- Continue locking the node version,
- Waiting for chokidar to comply with the new signature
- Waiting for the breaking change to be rolled back.

Culprit change:
https://github.com/DefinitelyTyped/DefinitelyTyped/pull/68300

PR Close #54048
2024-01-24 14:57:05 +01:00
Andrew Scott
bc85551bfc fix(router): revert commit that replaced last helper with native Array.at(-1) (#54021)
While `Array.at` is technically supported in all browsers we officially
support, the change was needlessly breaking without any real benefit.

PR Close #54021
2024-01-24 10:54:52 +01:00
Andrew Kushnir
aeaec8629c refactor(compiler-cli): rephrase an error message related to @defer and local compilation (#54030)
This commit updates the error message to cover cases when imported symbols have eager references inside of a file.

PR Close #54030
2024-01-24 10:08:50 +01:00
Alan Agius
a3787bdfa6 docs: update docs to reflect changes in Angular CLI version 17.1 (#53949)
This changes include mentioning the experimental application builder migration and changes to the `outputPath` and `optimization` option.

PR Close #53949
2024-01-23 18:56:18 +01:00
Younes Jaaidi
454d5e9c86 test(core): fix test with false-negative risk (#54025)
change assertion to handle the case where the function doesn't throw

PR Close #54025
2024-01-23 16:58:56 +01:00
Dylan Hunn
d99bc8aeb6 refactor(compiler): ICUs should roll up to the root i18n block for application (#54026)
Previously, if an ICU was inside a nested i18n root, it would use the nested root to calculate whether it should be applied. Now, we use the root i18n block.

PR Close #54026
2024-01-23 15:09:36 +01:00
Paul Gschwendtner
f81a4365fe test: add compliance tests for signal-based queries (#53978)
This commit adds compliance tests to ensure that the generated output of
signal-based queries matches our expectation.

Note: collapsing query advance instructions is not implemented yet.

PR Close #53978
2024-01-23 10:24:37 +01:00