27740 Commits

Author SHA1 Message Date
Aristeidis Bampakos 02cb0ba232 docs: fix typo in tutorial lesson 6 (#51002)
PR Close #51002
2023-07-11 08:25:48 -07:00
Matthieu Riegler 253d756464 fix(upgrade): Use takeUntil on leaky subscription. (#50901)
Using the life cycling hook `onDestroy` to end the subscription.

fixes #48032

PR Close #50901
2023-07-11 08:24:30 -07:00
Dzhavat Ushev 8bb6b7ddb5 docs: add missing backtick character (#50908)
PR Close #50908
2023-07-11 08:23:48 -07:00
Matthieu Riegler 61be62d621 refactor(core): fix Tnode/TView assertion. (#50914)
The debug data structure was removed in #48281. Before this fix the assertion relied on it.

PR Close #50914
2023-07-11 08:23:18 -07:00
Matthieu Riegler 5d6ec0336b fix(core): handle deref returning null on RefactiveNode. (#50992)
On Safari <16.1 there is a bug where `deref` can return `null`.

Fixes #50989

PR Close #50992
2023-07-11 08:22:47 -07:00
Kristiyan Kostadinov 29aaded0c3 refactor(compiler): introduce block parsing in lexer (#50895)
⚠️Disclaimer⚠️ this PR implements syntax that is still in an open RFC. It will be adjusted once the RFC is closed.

These changes extend the lexer to recognize the concepts of a block group (`{#foo paramA; paramB}{/foo}`) and a block (`{:foo paramA; paramB;}`) which will be useful later on for the control flow and defer proposals. Block groups can be used anywhere and require a closing tag while block can only be used inside of a block.

The idea is that in the next PRs the markup AST will be expanded to have some more specialized node like `ConditionalBlock` or `DeferBlock` which will then be turned into instructions.

PR Close #50895
2023-07-11 08:21:48 -07:00
Dylan Hunn 875851776c refactor(compiler): Generate attribute and attributeInterpolate instructions in template pipeline (#50818)
This commit adds the ability to generate attribute instructions as a result of property bindings such as `[attr.foo]='bar'` or `attr.foo='{{bar}}'`. "Singleton" interpolations, such as the previous example, will also be transformed into a simple `attribute` instruction.

PR Close #50818
2023-07-10 07:17:18 -07:00
alkavats1 581c36e695 docs: updated the i tag with the em tag (#50923)
PR Close #50923
2023-07-10 07:15:49 -07:00
Matthieu Riegler daea7dcd54 docs: remove mention of deprecated providedIn: module. (#50925)
Only 'any' and 'platform' are valid values.

PR Close #50925
2023-07-10 07:12:35 -07:00
Matthieu Riegler 394ca3b49a docs: Improve documentation about Injection context / inject (#49782)
Injection context has gain public visibility with the exposure of `inject`. Lets provide some insights.

Closes  #49774

PR Close #49782
2023-07-10 07:09:31 -07:00
aanchal c4103cf394 docs: omit repetitions (#50629)
PR Close #50629
2023-07-10 07:08:59 -07:00
Paul Gschwendtner 8a0c5c710a refactor: improve type safety of interpolation AST (#50903)
Instead of using `any`, we should use the actual types that
are available from the parser.

PR Close #50903
2023-07-10 07:08:28 -07:00
Andrew Kushnir 031b599a55 fix(core): ensure that standalone components get correct injector instances (#50954)
Prior to this change, we've used `componentDef.id` as a key in a Map that acts as a cache to avoid re-creating injector instances for standalone components. In v16, the logic that generates the id has changed from an auto-incremental to a generation based on metadata. If multiple components have similar metadata, their ids might overlap.

This commit updates the logic to stop using `componentDef.id` as a key and instead, use the `componentDef` itself. This would ensure that we always have a correct instance of an injector associated with a standalone component instance.

Resolves #50724.

PR Close #50954
2023-07-10 07:07:44 -07:00
Alan Agius 5528b72979 docs: add link to critters (#50958)
This commit add a link to critters which is used by the CLI to perform inlining of critical CSS.

PR Close #50958
2023-07-10 07:06:43 -07:00
Alex Rickabaugh 2b08503311 docs: release notes for the v16.1.4 release 2023-07-06 16:51:37 -07:00
Matthieu Riegler 5d11844a7c docs: update link to the TS config. (#50933)
This TS config doc is now at https://angular.io/guide/typescript-configuration

PR Close #50933
2023-07-05 13:58:35 +02:00
Muhammed Umar 941659f5fd docs: Router tutorial tour of heroes - doc bug fix suggestion #50794 (#50846)
:#

PR Close #50846
2023-07-05 13:57:31 +02:00
alkavats1 f9175dd3b3 docs: updated the b tag with the strong tag (#50921)
PR Close #50921
2023-07-05 13:55:52 +02:00
Angular Robot 6538e67e30 build: update eslint dependencies to v5.61.0 (#50931)
See associated pull request for more information.

PR Close #50931
2023-07-05 13:53:59 +02:00
Terry e77cb75c54 docs(forms): FormBuilder is not associated with ReactiveFormsModule (#50941)
PR Close #50941
2023-07-05 13:53:10 +02:00
Alex e47dfa09e7 docs: corrected line 4 by adding 'to' (#50937)
PR Close #50937
2023-07-05 13:51:17 +02:00
Hassen Gaaya 125fe19086 docs(docs-infra): add a missing @ to SkipSelf() (#50898)
PR Close #50898
2023-06-30 11:50:24 -07:00
Hassen Gaaya 0028b6d4d4 docs(docs-infra): add a missing dot (#50898)
PR Close #50898
2023-06-30 11:50:24 -07:00
Hassen Gaaya 4f31952779 docs(docs-infra): move the child closing </view> tag to the right position (#50898)
move the child component </view> tag just before the closing </app-child> and after the </app-inspector> tag since the app-inspector component is a child of the app-child component

PR Close #50898
2023-06-30 11:50:24 -07:00
Hassen Gaaya 1c30df2a5f docs(docs-infra): fix wrong mention of the parent component instead of child one (#50898)
replace the word Parent with Child in the code example since it's the child component that should be mentioned at this level of the code

PR Close #50898
2023-06-30 11:50:24 -07:00
Matthieu Riegler 925dad91a8 refactor(platform-browser-dynamic): Fix JSDoc comment (#50893)
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.

With this fix, the internal methods are no longer visible in the doc.

PR Close #50893
2023-06-30 11:49:29 -07:00
Matthieu Riegler 01e2bde0c0 refactor(animations): Fix JSDoc comment (#50893)
JSDoc comments should start with 2 stars or the annotations would not be picked up by the AIO workflow.

With this fix, the internal methods are no longer visible in the doc.

PR Close #50893
2023-06-30 11:49:29 -07:00
Matthieu Riegler 0bfd3f537c docs: Use id instead of name for anchor targets (#50885)
This commit also fixes a minor layout issue.

fixes #50727

PR Close #50885
2023-06-30 11:47:32 -07:00
Angular Robot 4782336fe4 build: update cross-repo angular dependencies (#50881)
See associated pull request for more information.

PR Close #50881
2023-06-30 11:43:29 -07:00
Angular Robot 471cdff082 build: update scorecard action dependencies (#50880)
See associated pull request for more information.

PR Close #50880
2023-06-30 11:42:48 -07:00
Angular Robot 4dcce63665 build: update all non-major dependencies (#50879)
See associated pull request for more information.

PR Close #50879
2023-06-30 11:41:51 -07:00
Payam Valadkhan 5724dbc82d test(compiler-cli): add compliance tests for NgModule only scenarios in local mode (#50577)
Reused the existing compliance tests for full compilation.

PR Close #50577
2023-06-30 11:38:36 -07:00
Payam Valadkhan c1d46b8c08 refactor(compiler-cli): add local option to compliance test infra (#50577)
The option 'local compile' is added for the test cases, and the locally compiled file for an input `abc.ts` is compared by default with the file `abc.local.js`. This allows to use the same input `abc.ts` for both full compilation (compared with `abc.js`) and local compilation (compared with `abc.local.js`). An example is provided in the next commit when compliance tests are added for the NgModule local compilation.

PR Close #50577
2023-06-30 11:38:35 -07:00
Payam Valadkhan a15a56cb5d refactor(compiler): add a new interface for NgModule metadata to t rebase be used in local compilation mode (#50577)
The new interface is discrete-unioned with the existing interface to cover the cases for local and global (i.e., full and partial) compilation modes.

This change of interface required some adjustmeents cross repo which explains the changes made to other files.

PR Close #50577
2023-06-30 11:38:35 -07:00
Payam Valadkhan 2034d8db27 refactor(compiler-cli): circuit out reference resolving in NgModule annotation handler in local compilation mode (#50577)
All attempts related to obtaining R3Reference for bootstrap, imports, exports and declarations are cut in local compilation mode.

This will allow the analysis to pass without any error diagnostics, but the result is a quite empty meta info. Next commits will add data to the meta so that the NgModule can be compiled more accurately.

PR Close #50577
2023-06-30 11:38:35 -07:00
Paul Gschwendtner a19a87df6c fix(upgrade): allow for downgraded components to work with component-router (#50871)
In the past, we had an implementation of the "Angular 2" router that
also worked with AngularJS. Published as `@angular/router`. We continued
to expose that router implementation in G3 and some applications still
use it. Now, when upgrading, they are seeing issues where the router
throws because it cannot find a route config/ or `$canActivate` on the
controller- simply because there is no `controller` function for
downgraded components.

We can fix this and unblock the update by simply ensuring a controller
function is defined.

PR Close #50871
2023-06-30 11:36:57 -07:00
Alex Rickabaugh 57c9399ca6 refactor(compiler): save/restore view when listeners read references (#50834)
Previously, the template pipeline save/restore view logic only added the
save/restore operation in listeners inside embedded views. However, this
operation is also needed if local refs are accessed within a listener body.

This commit updates the logic to detect more accurately whether save/restore
is needed.

PR Close #50834
2023-06-30 11:33:27 -07:00
arturovt b66a16ec4c fix(core): use setTimeout when coalescing tasks in Node.js (#50820)
This commit updates the implementation of the `getNativeRequestAnimationFrame`
and checks whether the current code runs in the browser before retrieving
`requestAnimationFrame`. `requestAnimationFrame` is not available when the code
is running in the Node.js environment. We have to fallback to `setTimeout` for
delaying the change detection.

PR Close #50820
2023-06-30 11:32:38 -07:00
Paul Gschwendtner 00f01497bc ci: reduce benchmark compare permissions
Even though the action is already guarded to only run for
organization members that manually trigger the action, we
can reduce the permissions by using a GitHub token without
any permissions to post the result comment.
2023-06-30 18:37:36 +02:00
Dylan Hunn 29bf476bfe refactor(compiler): Generate temporary variable assignments when function calls appear in a safe-access expression. (#50688)
The expression `a()?.b` should expand into `(tmp = a()) === null ? null : tmp.b`, in order to avoid calling the function `a()` twice.

This commit modifies the null-safe-expansion algorithm to emit temporary assignments, and provides the reification code to actually generate the declarations, assignments, and reads.

Note also that, with our bottom-up algorithm, there are some tricky cases when a function call exists inside an indexed access, such as `f1()?.[f2()?.a]?.b`. We add some special logic to avoid generating a double-assignment to the temporary storing the result of `f2()`.

Finally, there are opportunities to reuse the same temporary in expressions like `a?.[f()]?.[f()]`. We save this for the next commit.

PR Close #50688
2023-06-29 12:54:23 -07:00
Angular Robot a5bd5ddbaa build: lock file maintenance (#50877)
See associated pull request for more information.

PR Close #50877
2023-06-28 13:33:22 -07:00
Andrew Kushnir fc9da5ed8c release: cut the v16.2.0-next.1 release 16.2.0-next.1 2023-06-28 08:11:41 -07:00
Andrew Kushnir d9d1b85c80 docs: release notes for the v16.1.3 release 2023-06-28 08:07:34 -07:00
Angular Robot fb0a842ace build: update eslint dependencies to v5.60.1 (#50859)
See associated pull request for more information.

PR Close #50859
2023-06-27 15:59:53 -07:00
Scott Fredericksen ad1265e225 docs: clarify lesson 3, step 1 (#50849)
Unlike other steps of the tutorial, Lesson 3, Step 1 of the tutorial does not specify that the user should be in the project directory before creating the new component.

PR Close #50849
2023-06-27 15:59:13 -07:00
Angular Robot 77f0a2209a build: update all non-major dependencies (#50826)
See associated pull request for more information.

PR Close #50826
2023-06-27 15:58:35 -07:00
Angular Robot 7aa913e512 build: update actions/checkout digest to c85c95e (#50640)
See associated pull request for more information.

PR Close #50640
2023-06-27 15:57:59 -07:00
Matthieu Riegler 0522f1b353 docs: Add a doc for NG5014 (#50567)
Short explanation this help fix the `Root node not found` error

PR Close #50567
2023-06-27 15:57:23 -07:00
Alan Agius 29f6912e95 refactor(animations): remove redundant castings (#50860)
This commit removes unnecessary castings.

PR Close #50860
2023-06-27 06:27:15 -07:00
Alan Agius 0380564f85 fix(platform-browser): wait until animation completion before destroying renderer (#50860)
Prior to this commit, the renderer destroy method was being called before the animation complete. This is problematic when using `REMOVE_STYLES_ON_COMPONENT_DESTROY` as it causes the styles to be removed too early.

This commit, updates this destroy logic to be call the render destroy once the animations complete.

This has been reported internally in:
- http://b/271251353#comment12
- http://b/282004950#comment5

PR Close #50860
2023-06-27 06:27:15 -07:00