Compare commits

...

69 Commits

Author SHA1 Message Date
Andrew Kushnir 00f293c35f release: cut the v16.1.2 release 2023-06-21 11:25:30 -07:00
Heo Sangmin 5ae001829c fix(http): use serializeBody to support JSON payload in FetchBackend (#50776)
`HttpRequest.serializeBody` was used in HttpXhrBackend. `fetch` also needs to serialize request body.

Close #50775

PR Close #50776
2023-06-20 13:31:26 -07:00
Charles Lyding 6f443a9a8d refactor(compiler-cli): remove unused HandlerFlags enum (#50604)
The `HandlerFlags` enum is a leftover remnant of ngcc and is no longer used.

PR Close #50604
2023-06-20 13:01:49 -07:00
Charles Lyding 70e7ac56c8 refactor(compiler-cli): add internal compiler option to control class metadata emit (#50604)
An internal compiler option named `supportTestBed` is now available for use by the
Angular CLI. This option currently controls the extraction and emit of Angular class
metadata. This emitted information is only needed in AOT mode when using certain
TestBed APIs. However, AOT mode is currently not available for unit testing within
the Angular CLI. As a result, the metadata is not used within CLI generation applications
and in particular production applications. Without this option, the CLI needs to
manually perform a code transform to remove the metadata and also replicate TypeScript's
import eliding. This is can be a complicated operation and must be continually kept
up to date with any changes to both the Angular compiler and TypeScript. The introduction
of this new option alleviates these concerns.

PR Close #50604
2023-06-20 13:01:49 -07:00
Paul Gschwendtner 769a6f20f3 ci: update codeowners for benchpress (#50769)
Pawel and myself have investigated benchpress for quite some
time now, and I believe we have the most up-to-date understanding
in the team- so it would make sense to add us to the owners.

PR Close #50769
2023-06-20 13:00:37 -07:00
Paul Gschwendtner 78ece3149e build: speed up remote execution by allowing more concurrent jobs (#50734)
Bazel detects maximum number of jobs based on host resources.
Since we run remotely, we can increase this number significantly.

PR Close #50734
2023-06-20 18:05:24 +02:00
Paul Gschwendtner 44b7a73efb build: update browserslist db for integration tests (#50779)
Since we updated the devkit dependencies, we need to update
the browserslist DB versions in integration tests to avoid
browser mismatches causing errors like the following:

```
BrowserslistError:
[BABEL] /tmp/ng-integration-test-91jP3g/test-sandbox/node_modules/zone.js/fesm2015/zone.js: Unknown version 114 of edge (While processing: "base$0$0")
```

PR Close #50779
2023-06-20 18:04:52 +02:00
Paul Gschwendtner 945c900466 build: update angular dev-infra and chromium (#50779)
Updates Angular dev-infra and Chromium. Fixed up version of
https://github.com/angular/angular/pull/50111

PR Close #50779
2023-06-20 18:04:51 +02:00
Pawel Kozlowski 60b160f497 build: remove AngularJS benchmarks (#50730)
This change removes benchmark scenarios written in AngularJS
as the framework reached EOL and those numbers are no longer
relevant.

PR Close #50730
2023-06-20 14:57:06 +02:00
Angular Robot 7316f9655c build: update github/codeql-action action to v2.20.0 (#50774)
See associated pull request for more information.

PR Close #50774
2023-06-20 14:55:37 +02:00
Matthieu Riegler 9488a3fd46 fix(http): Send query params on fetch request (#50740)
QueryParams were missing when using the `FetchBackend`.

Fixes #50728

PR Close #50740
2023-06-20 12:59:27 +02:00
aanchal d274afc1a3 docs: included title attribute in the iframe tag (#50698)
PR Close #50698
2023-06-20 11:03:23 +02:00
Mladen Jakovljević 297b8e14e4 feat(docs-infra): add option to filter docs with developer preview status (#50142)
Add a feature to the ApiListComponent with which users can filter documents based on the "developer preview" status.

PR Close #50142
2023-06-20 11:01:32 +02:00
arturovt 1397721ed4 refactor(common): do not run CD when verifying image distortion (#50723)
This commit wraps the `assertNonZeroRenderedHeight` and `assertNoImageDistortion`
with `runOutsideAngular` to setup the `load` event listener outside of the Angular zone.
This was previously causing extra change detection cycles in development mode and
interfered debugging stuff.

PR Close #50723
2023-06-20 10:59:36 +02:00
Angular Robot 1bfde8c86c build: update eslint dependencies to v5.60.0 (#50690)
See associated pull request for more information.

PR Close #50690
2023-06-20 10:57:37 +02:00
Alan Agius 463e04ca22 refactor: use queueMicrotask to schedule micro tasks instead of various helpers (#50485)
`queueMicrotask` is an API which is supported by all browser and Node.js versions.

PR Close #50485
2023-06-15 16:38:21 +02:00
Paul Gschwendtner 1d3e96b7d9 test: mark ngtsc test target as flaky (#50718)
A larger investigation on why this is flaky is needed. Currently the
test is flaky with around 77% sucess rate and negatively impacts team
productivity. Subjectively, as reported by team members this it's much
more flaky than a success rate of 77%.

PR Close #50718
2023-06-15 15:34:43 +02:00
Angular Robot fd519b00dc build: update io_bazel_rules_sass digest to 13ff55c (#50717)
See associated pull request for more information.

PR Close #50717
2023-06-15 10:25:47 +02:00
Paul Gschwendtner 67e205ba13 ci: enable colors for bazel in CircleCi (#50720)
Enables colors for Bazel in CircleCI. Bazel does not seem to
detect color support properly, but CircleCI does support such.

Colors make debugging a little easier with larger Bazel logs.

PR Close #50720
2023-06-15 10:19:27 +02:00
Pawel Kozlowski e5c2271972 release: cut the v16.1.1 release 2023-06-14 18:41:34 +02:00
Paul Gschwendtner 71360b3a3e fix(compiler-cli): libraries compiled with v16.1+ breaking with Angular framework v16.0.x (#50715)
If a library is compiling with Angular v16.1.0, the library will break
for users that are still on Angular v16.0.x. This happens because the
`DirectiveDeclaration` or `ComponentDeclaration` types are not expecting
an extra field for `signals` metadata. This field was only added to the
generic types in `16.1.0`- so compilations fail with errors like this:

```
Error: node_modules/@angular/material/icon/index.d.ts:204:18 -
  error TS2707: Generic type 'ɵɵComponentDeclaration' requires between 7 and 9 type arguments.
```

To fix this, we quickly roll back the code for inserting this metadata
field. That way, libraries remain compatible with all v16.x framework
versions.

We continue to include the `signals` metadata if `signals: true` is set.
This is not public API anyway right now- so cannot happen- but imagine
we expose some signal APIs in e.g. 16.2.x, then we'd need this metadata
and can reasonably expect signal-component library users to use a more
recent framework core version.

PR Close #50715
2023-06-14 16:36:18 +02:00
Matthieu Riegler 5e1d8444ae fix(migrations): Prevent a component from importing itself. (#50554)
This commit fixes the migrations for recursive components.

fixes #50525

PR Close #50554
2023-06-14 15:44:35 +02:00
alkavats1 934f260914 docs: added the alt attribute to the imag tag and replaced the i tag with the em tag (#50570)
PR Close #50570
2023-06-14 15:28:22 +02:00
Paul Gschwendtner 8b09c74f47 refactor(compiler-cli): fix incremental compilation breaking when running compiler through closure (#50673)
If the compiler CLI is running through closure compiler, the trait
decorator handlers are converted from classes to functions as ES5
is picked as default output target for the bundled version.

The problem is that currently all trait handlers end up having the
same `name`. i.e. an empty string, and therefore adopting previous
traits from a previous build iteration result in the incorrect handler
being used for e.g. registrering, compiling etc- causing
ambiguous/confusing errors down the line in other parts.

We can look into changing the output target in the future, but even
then we are safer using an actual literal due to property renaming.

```$$closure$$NgModuleDecoratorHandler = function() {}`.

It is is questionable if we should just simply NOT run the compiler
through JSCompiler.

PR Close #50673
2023-06-14 15:26:00 +02:00
Angular Robot e94f3874aa docs: update Angular CLI help [16.1.x] (#50710)
Updated Angular CLI help contents.

PR Close #50710
2023-06-14 13:27:09 +02:00
Matthieu Riegler 9ff5572b9f refactor(core): handle #24571 todos. (#49221)
This commit removes the remaining TODO(issue/24571) in core code base.

PR Close #49221
2023-06-14 12:33:45 +02:00
Matthieu Riegler 0a72df6037 docs: remove allowEmptyCodegenFiles. (#50379)
`allowEmptyCodegenFiles` serves no purpose, no need to mention it.

PR Close #50379
2023-06-14 11:19:47 +02:00
Matthieu Riegler d2186e4f16 refactor(compiler-cli): deprecate allowEmptyCodegenFiles (#50379)
The `allowEmptyCodegenFiles` is not used anymore.

PR Close #50379
2023-06-14 11:19:47 +02:00
Matthieu Riegler 9c13901ee9 refactor(platform-browser): remove unused polyfill (#50661)
The `jasmineToString` on Map isn't used anymore.

PR Close #50661
2023-06-14 10:58:05 +02:00
Matthieu Riegler 00bc813199 refactor(platform-browser): replace our own toBeAnInstanceOf with toBeInstanceOf (#50661)
There is no need to maintain that matcher since jasmine provides its own !

PR Close #50661
2023-06-14 10:58:04 +02:00
Matthieu Riegler c74af838b1 refactor(platform-browser): remove unused testing matcher (#50661)
We has some custom matchers that aren't used anymore:

* `toContainError`
* `toBePromise`

PR Close #50661
2023-06-14 10:58:04 +02:00
Matthieu Riegler 57de6284ad docs(platform-server): Make links out of @see tags (#50110)
This commit is part of the work for angular#50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler e0552c0d29 docs(localize): Make links out of @see tags (#50110)
This commit is part of the work for angular#50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler 5fa1111eeb docs(docs-infra): throw an error when @link is used with a backtick reference (#50110)
As part of #50097, we'll add this constraint to the @see comments

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler b6e31be059 docs(animations): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler 737729f930 docs(common): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler 497f94eda0 docs(core): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:40 +02:00
Matthieu Riegler 633aeb0c5f docs(forms): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:39 +02:00
Matthieu Riegler b42b682391 docs(platform-browser): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:39 +02:00
Matthieu Riegler 22c95a2194 docs(router): Make links out of @see tags (#50110)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50110
2023-06-14 10:54:39 +02:00
Matthieu Riegler ffabe64242 docs(docs-infra): create code block for links to methods (#50110)
Before this commit, links to methods had to rely on a custom title (or the method name would be displayed).

With this commit, {@link MyClass#myMethod} will ouput a link as `MyClass#myMethod`.
This has a 2nd advantage : We can now rely on the validation by the `checkAnchorLinksProcessor` to ensure the method actually exist.

This commit is part of #50110 to improve linking in the documentation.

PR Close #50110
2023-06-14 10:54:39 +02:00
David-Emmanuel DIVERNOIS d9bed48eb5 fix(core): extend toSignal to accept any Subscribable (#50162)
Extend toSignal to accept any Subscribable (instead of only Observable)
for consistency with AsyncPipe and for broader compatibility with any
observable library (that is compatible with the Subscribable interface).
This is only a type change as the implementation does not use anything
else than the Subscribable interface anyway.

PR Close #50162
2023-06-14 10:49:56 +02:00
Pawel Kozlowski f48c0bc4e3 release: cut the v16.1.0 release 2023-06-13 17:08:46 +02:00
Angular Robot fa3b7332a9 build: update actions/checkout action to v3.5.3 (#50689)
See associated pull request for more information.

PR Close #50689
2023-06-13 14:48:02 +02:00
Andrew Kushnir b90f2b1d66 refactor(common): use transform functions in NgOptimizedImage inputs (#50580)
This commit refactors the code of NgOptimizedImage directive to switch from getter/setter approach to convers inputs to use the `transform` function instead.

PR Close #50580
2023-06-13 13:20:50 +02:00
Andrew Kushnir a2bfb62afb fix(core): avoid duplicated content during hydration while processing a component with i18n (#50644)
This commit updates an internal hydration logic to make sure that the content of components with i18n blocks is cleaned up before we start rendering it.

Resolves #50627.

PR Close #50644
2023-06-13 13:12:08 +02:00
Nikolas Kazepis 8203b1f810 docs: update an example in the RouterEvent description (#50526)
PR Close #50526
2023-06-13 13:08:15 +02:00
Angular Robot f13ecd5fad build: update all non-major dependencies (#50583)
See associated pull request for more information.

PR Close #50583
2023-06-13 12:45:13 +02:00
Angular Robot 7abb71609b build: lock file maintenance (#50532)
See associated pull request for more information.

PR Close #50532
2023-06-13 11:46:08 +02:00
Russ 6b1669f3bb docs: fix "After you finish" description of first-app-lesson-05.md (#50645)
Lesson 5 previously had the same "After you finish" description as Lesson 4.

PR Close #50645
2023-06-13 11:36:46 +02:00
Kristiyan Kostadinov 57f9efe200 docs: update schematic authoring guide to use new utilities (#50667)
Updates the guide for writing `ng add` schematics to include the new authoring utilities. I've also removed the `NodePackageInstallTask` because it's redundant.

PR Close #50667
2023-06-12 19:15:46 +02:00
Kristiyan Kostadinov 78837878c8 build: update AIO to Angular 16.1 (#50667)
Updates AIO to Angular 16.1.0 to allow for some docs to be updated.

PR Close #50667
2023-06-12 19:15:46 +02:00
Miles Malerba ecbdb24694 test(compiler): Prevent back-sliding on already passing template pipeline tests (#50582)
Add a flag to disable specific tests when testing the template pipeline

Mark the currently failing tests

Add the template pipeline tests to CI

Update package.json

Co-authored-by: Paul Gschwendtner <paulgschwendtner@gmail.com>

PR Close #50582
2023-06-12 18:25:43 +02:00
Angular Robot ffdc1304d6 build: update io_bazel_rules_sass digest to 6e0915e (#50605)
See associated pull request for more information.

PR Close #50605
2023-06-12 15:36:33 +02:00
alkavats1 381137905b refactor: removed the unused contructor in lazyModule (#50536)
empty constructor removed and reduced the codesmells

PR Close #50536
2023-06-12 15:35:36 +02:00
Kevin Gay 59bc1a2439 build: Update Glob to fast-glob to remove Inflight due to memory leak (#50632)
Update Glob to fast-glob to remove the dependence of Inflight that contains a memory leak

Signed-off-by: Kevin Gay <5970002+GayKevin@users.noreply.github.com>

PR Close #50632
2023-06-12 15:33:47 +02:00
Angular Robot d8c41fd44c build: update dependency build_bazel_rules_nodejs to v5.8.3 (#50666)
See associated pull request for more information.

PR Close #50666
2023-06-12 15:28:52 +02:00
Matthieu Riegler dfb4d32d55 docs: update first-app (#50663)
This commit updates the first-app demo to v16.

PR Close #50663
2023-06-12 15:22:28 +02:00
Nate Radebaugh 03e7952f4c docs(core): Add note about testing to NG0203 (#50620)
When running into NG0203 while testing, a solution can be to wrap the
function in the TestBed.runInInjectionContext method.

PR Close #50620
2023-06-12 15:21:11 +02:00
Hadi 3247a46485 docs: update first-app-lesson-11.md to include info about routerLink (#50348)
Add info about importing RouterLink and RouterOutlet.

The existing document results in an error. The error indicates that the anchor element doesn't have the binding property for routerLink.

The corresponding module (RouterModule) should be imported in the component template.

Add description for RouterModule in housing-location component

The description is added to fix the issue with the anchor element tag binding.

PR Close #50348
2023-06-12 14:26:04 +02:00
Manuel Timelthaler 3b2f119f57 docs: add missing navigation item (#50113)
PR Close #50113
2023-06-12 12:39:02 +02:00
aanchal 7c7a4a273a docs: added lang attributes in html files (#50588)
PR Close #50588
2023-06-12 12:08:10 +02:00
aanchal 8234738120 docs: removed duplicated words (#50648)
PR Close #50648
2023-06-12 11:43:43 +02:00
alkavats1 2d66e933c7 docs: added title attribute to the iframe tag (#50569)
PR Close #50569
2023-06-12 11:24:36 +02:00
Shadab Ansari d6f26a9d39 docs(packaging): Clarify the necessity of dev-dependencies (#50619)
Clarify the role of dev-dependencies. Dependencies are required for production
ie, execution of an application, whereas devDependencies are required for
developing as well as *building* the application (dev and prod build both)

PR Close #50619
2023-06-12 11:19:12 +02:00
Jessica Janiuk 2738c7b00d docs: add information about usage of innerHTML and outerHTML (#50643)
Usage of innerHTML and outerHTML will cause the same problem as using direct DOM manipulation.

PR Close #50643
2023-06-12 11:17:53 +02:00
aanchal 7ca5cb4969 docs: removed unused methods (#50631)
PR Close #50631
2023-06-09 17:41:56 +02:00
Pham Huu Hien 59e29fd6e6 docs: remove repeated word (#50614)
PR Close #50614
2023-06-09 17:39:15 +02:00
Alex Rickabaugh a66608a13c release: cut the v16.1.0-rc.0 release 2023-06-08 13:41:36 -07:00
363 changed files with 20213 additions and 16449 deletions
+4 -3
View File
@@ -108,9 +108,10 @@ build:remote --define=EXECUTOR=remote
# Set a higher timeout value, just in case.
build:remote --remote_timeout=600
# Increase the default number of jobs by 50% because our build has lots of
# parallelism
build:remote --jobs=150
# Bazel detects maximum number of jobs based on host resources.
# Since we run remotely, we can increase this number significantly.
common:remote --jobs=200
build:remote --google_default_credentials
# Limit the number of test jobs for on an AIO local deps build. The example tests running
+3
View File
@@ -10,3 +10,6 @@ test --flaky_test_attempts=2
# More details on failures
build --verbose_failures=true
# CI supports colors but Bazel does not detect it.
common --color=yes
+1 -1
View File
@@ -22,7 +22,7 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'aio: preview') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'aio: preview'))
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: ./.github/actions/yarn-install
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@5f06c4774df908ed69e1441f4ec63b898acf0c68
@@ -13,7 +13,7 @@ jobs:
assistant_to_the_branch_manager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@5f06c4774df908ed69e1441f4ec63b898acf0c68
+2 -2
View File
@@ -12,14 +12,14 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/commit-message-based-labels@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
post_approval_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/post-approval-changes@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/google-internal-tests@5f06c4774df908ed69e1441f4ec63b898acf0c68
with:
run-tests-guide-url: http://go/angular-g3sync-start
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
steps:
- name: 'Checkout code'
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
persist-credentials: false
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@83f0fe6c4988d98a455712a27f0255212bba9bd4 # v2.3.6
uses: github/codeql-action/upload-sarif@6c089f53dd51dc3fc7e599c3cb5356453a52ca9e # v2.20.0
with:
sarif_file: results.sarif
+1 -1
View File
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
+1 -1
View File
@@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
+2 -1
View File
@@ -781,8 +781,9 @@ groups:
])
reviewers:
users:
- alxhub
- devversion
- josephperrott
- pkozlowski-opensource
# =========================================================
# Integration Tests
+35 -40
View File
@@ -1,22 +1,51 @@
<a name="16.1.0-next.3"></a>
# 16.1.0-next.3 (2023-06-01)
### animations
<a name="16.1.2"></a>
# 16.1.2 (2023-06-21)
### http
| Commit | Type | Description |
| -- | -- | -- |
| [bada9199f5](https://github.com/angular/angular/commit/bada9199f53cb631d065a961427a3a1a8d9762f1) | fix | Trigger leave animation when ViewContainerRef is injected ([#48705](https://github.com/angular/angular/pull/48705)) |
| [9488a3fd46](https://github.com/angular/angular/commit/9488a3fd4640b902243f441cf54776160da1a0fe) | fix | Send query params on fetch request ([#50740](https://github.com/angular/angular/pull/50740)) |
| [5ae001829c](https://github.com/angular/angular/commit/5ae001829c3f3594e3c10f30e0b89ea1eb2b84fb) | fix | use serializeBody to support JSON payload in FetchBackend ([#50776](https://github.com/angular/angular/pull/50776)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.1.1"></a>
# 16.1.1 (2023-06-14)
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [71360b3a3e](https://github.com/angular/angular/commit/71360b3a3e7cb3419176c89f8c78ebd2e14ff880) | fix | libraries compiled with v16.1+ breaking with Angular framework v16.0.x ([#50715](https://github.com/angular/angular/pull/50715)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [d9bed48eb5](https://github.com/angular/angular/commit/d9bed48eb590bc4a45769835bccc206d418f620c) | fix | extend toSignal to accept any Subscribable ([#50162](https://github.com/angular/angular/pull/50162)) |
### migrations
| Commit | Type | Description |
| -- | -- | -- |
| [5e1d8444ae](https://github.com/angular/angular/commit/5e1d8444ae2952b4e9e5d7089200e7a3ac700e0d) | fix | Prevent a component from importing itself. ([#50554](https://github.com/angular/angular/pull/50554)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.1.0"></a>
# 16.1.0 (2023-06-13)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [72b4ff4b9e](https://github.com/angular/angular/commit/72b4ff4b9ea8bd77ab74f9834727390c82acb28d) | fix | untrack subscription and unsubscription in async pipe ([#50522](https://github.com/angular/angular/pull/50522)) |
| [f3867597f0](https://github.com/angular/angular/commit/f3867597f079794ae9c7ed8be3788c9cea5123a3) | feat | add component input binding support for NgComponentOutlet ([#49735](https://github.com/angular/angular/pull/49735)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [4e663297c5](https://github.com/angular/angular/commit/4e663297c564078c8185c6a73e2baa844406a315) | fix | error when reading compiled input transforms metadata in JIT mode ([#50600](https://github.com/angular/angular/pull/50600)) |
| [721bc72649](https://github.com/angular/angular/commit/721bc72649b7d73f730298e04a4606a8bfd53011) | fix | resolve deprecation warning with TypeScript 5.1 ([#50460](https://github.com/angular/angular/pull/50460)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [68017d4e75](https://github.com/angular/angular/commit/68017d4e75abed78b378dce54f860cfa0d0fa42f) | feat | add ability to transform input values ([#50420](https://github.com/angular/angular/pull/50420)) |
| [28c68f709c](https://github.com/angular/angular/commit/28c68f709cdc930e12bac51a266e7bf790656034) | fix | update `ApplicationRef.isStable` to account for rendering pending tasks ([#50425](https://github.com/angular/angular/pull/50425)) |
| [69dadd2502](https://github.com/angular/angular/commit/69dadd25020ee84364466c0740f695984dd8c84d) | feat | support TypeScript 5.1 ([#50156](https://github.com/angular/angular/pull/50156)) |
| [c0ebe34cbd](https://github.com/angular/angular/commit/c0ebe34cbd235dc0b5e56fbe37429b77c0d91170) | fix | add additional component metadata to component ID generation ([#50336](https://github.com/angular/angular/pull/50336)) |
### http
| Commit | Type | Description |
| -- | -- | -- |
| [85c5427582](https://github.com/angular/angular/commit/85c54275825a57fd3c7055a99e58bb211e085af9) | feat | Introduction of the `fetch` Backend for the `HttpClient` ([#50247](https://github.com/angular/angular/pull/50247)) |
<!-- CHANGELOG SPLIT MARKER -->
@@ -37,20 +66,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.1.0-next.2"></a>
# 16.1.0-next.2 (2023-05-24)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [75fdbcb8f2](https://github.com/angular/angular/commit/75fdbcb8f285ef17b5a73fb820b983137e40cab7) | fix | fix `Self` flag inside embedded views with custom injectors ([#50270](https://github.com/angular/angular/pull/50270)) |
| [8b44ba3170](https://github.com/angular/angular/commit/8b44ba31701a1c1cf1ec92d2a26f9cf657f5408b) | fix | host directives incorrectly validating aliased bindings ([#50364](https://github.com/angular/angular/pull/50364)) |
### http
| Commit | Type | Description |
| -- | -- | -- |
| [2cdb4c5911](https://github.com/angular/angular/commit/2cdb4c5911965aa273f11432e04502e52b5e1b9b) | fix | create macrotask during request handling instead of load start ([#50406](https://github.com/angular/angular/pull/50406)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.0.3"></a>
# 16.0.3 (2023-05-24)
### core
@@ -66,17 +81,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.1.0-next.1"></a>
# 16.1.0-next.1 (2023-05-17)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [c0ebe34cbd](https://github.com/angular/angular/commit/c0ebe34cbd235dc0b5e56fbe37429b77c0d91170) | fix | add additional component metadata to component ID generation ([#50336](https://github.com/angular/angular/pull/50336)) |
| [03f1e240b3](https://github.com/angular/angular/commit/03f1e240b368c4c87fd8412605bf0eff9adc153d) | fix | allow onDestroy unregistration while destroying ([#50237](https://github.com/angular/angular/pull/50237)) |
| [165b8b647c](https://github.com/angular/angular/commit/165b8b647c39503b9fefd00188948cdc522c2c10) | fix | allow passing value of any type to `isSignal` function ([#50035](https://github.com/angular/angular/pull/50035)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.0.2"></a>
# 16.0.2 (2023-05-17)
### core
@@ -88,15 +92,6 @@
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.1.0-next.0"></a>
# 16.1.0-next.0 (2023-05-10)
### core
| Commit | Type | Description |
| -- | -- | -- |
| [69dadd2502](https://github.com/angular/angular/commit/69dadd25020ee84364466c0740f695984dd8c84d) | feat | support TypeScript 5.1 ([#50156](https://github.com/angular/angular/pull/50156)) |
<!-- CHANGELOG SPLIT MARKER -->
<a name="16.0.1"></a>
# 16.0.1 (2023-05-10)
### core
+6 -6
View File
@@ -28,8 +28,8 @@ http_archive(
patches = [
"//tools/esm-interop:patches/bazel/nodejs_binary_esm_support.patch",
],
sha256 = "94070eff79305be05b7699207fbac5d2608054dd53e6109f7d00d923919ff45a",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.2/rules_nodejs-5.8.2.tar.gz"],
sha256 = "5dd1e5dea1322174c57d3ca7b899da381d516220793d0adef3ba03b9d23baa8e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.3/rules_nodejs-5.8.3.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
@@ -84,7 +84,7 @@ yarn_install(
YARN_LABEL,
"//:.yarnrc",
"//tools:postinstall-patches.js",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-e859696da7af56c811b6589f1ae888222d93d797.patch",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-8d4803573edc70b90a1134ffa996303d1dcc18a9.patch",
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.8.1.patch",
"//tools/esm-interop:patches/npm/@bazel+esbuild+5.7.1.patch",
"//tools/esm-interop:patches/npm/@bazel+protractor+5.7.1.patch",
@@ -199,10 +199,10 @@ cldr_xml_data_repository(
# sass rules
http_archive(
name = "io_bazel_rules_sass",
sha256 = "44e325c09a8a97c0b6f918400c10836fa61753c576e77ca74ec682c6ecc518c0",
strip_prefix = "rules_sass-236d2fc016738820e8dc6bea483074034c66ec0a",
sha256 = "033248203546d4ac5692edfb9314c75bc654de3a163c2eee92762893ea493a06",
strip_prefix = "rules_sass-13ff55c4a7dea6fbce8c429a1e6dae85bd2f4eca",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/236d2fc016738820e8dc6bea483074034c66ec0a.zip",
"https://github.com/bazelbuild/rules_sass/archive/13ff55c4a7dea6fbce8c429a1e6dae85bd2f4eca.zip",
],
)
+2 -2
View File
@@ -1,4 +1,4 @@
{
"branchName": "refs/heads/main",
"sha": "7b7b06a029295715b57b1a602b5021d0d0853bb3"
"branchName": "refs/heads/16.1.x",
"sha": "5f659f810481aa2b71b54e0856cbfd6f126ea68e"
}
+1 -1
View File
@@ -15,7 +15,7 @@
{
"name": "target",
"type": "string",
"description": "The Architect target to run provided in the the following format `project:target[:configuration]`.",
"description": "The Architect target to run provided in the following format `project:target[:configuration]`.",
"positional": 0
}
]
+25 -15
View File
@@ -23,16 +23,13 @@
],
"styles": [
],
"scripts": []
"scripts": [],
"polyfills": [
"zone.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
@@ -42,6 +39,14 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
@@ -53,8 +58,12 @@
"configurations": {
"production": {
"browserTarget": "addOneButton:build:production"
},
"development": {
"browserTarget": "addOneButton:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -74,18 +83,19 @@
"assets": [
"src/favicon.ico",
"src/assets"
],
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"builder": "@angular-eslint/builder:lint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
+20 -19
View File
@@ -3,15 +3,13 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"@angular/animations": "~15.2.0",
"@angular/common": "~15.2.0",
"@angular/compiler": "~15.2.0",
"@angular/core": "~15.2.0",
"@angular/platform-browser": "~15.2.0",
"@angular/platform-browser-dynamic": "~15.2.0",
"rxjs": "^7.5.2",
"tslib": "^2.3.1",
"zone.js": "^0.12.0"
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"rxjs": "^7.8.0",
"tslib": "^2.5.3",
"zone.js": "^0.13.0"
},
"scripts": {
"ng": "ng",
@@ -22,12 +20,18 @@
"e2e": "ng e2e"
},
"devDependencies": {
"@angular-devkit/build-angular": "~15.2.0",
"@angular/cli": "~15.2.0",
"@angular/compiler-cli": "~15.2.0",
"@angular-devkit/build-angular": "^16.0.0",
"@angular-eslint/builder": "16.0.3",
"@angular-eslint/eslint-plugin": "16.0.3",
"@angular-eslint/eslint-plugin-template": "16.0.3",
"@angular-eslint/schematics": "16.0.3",
"@angular-eslint/template-parser": "16.0.3",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@types/jasmine": "~4.3.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"eslint": "^8.40.0",
"jasmine-core": "~4.5.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.1",
@@ -35,9 +39,6 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"tslint": "~6.1.0",
"typescript": "~4.9.3"
"typescript": "~5.0.0"
}
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
// import required packages
import 'zone.js/dist/zone';
import 'zone.js';
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
@@ -1 +0,0 @@
import 'zone.js/dist/zone';
+1 -1
View File
@@ -10,7 +10,7 @@
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2015",
"target": "es2022",
"typeRoots": [
"node_modules/@types"
],
File diff suppressed because it is too large Load Diff
+8
View File
@@ -54,6 +54,14 @@ Work backwards from the stack trace of the error to identify a place where the d
To fix the error move the `inject()` call to an allowed place (usually a class constructor or a field initializer).
**Note:** If you are running in a test context, `TestBed.runInInjectionContext` will enable `inject()` to succeed.
```typescript
TestBed.runInInjectionContext(() => {
// ...
});
```
<!-- links -->
<!-- external links -->
+1 -1
View File
@@ -5,7 +5,7 @@
@description
This error means that during the hydration process, Angular expected a DOM structure as rendered and annotated during server side rendering. However, on the client, the DOM tree was different than the server rendered DOM tree.
This error typically happens due to direct DOM manipulation using native browser APIs that alter the DOM structure outside of what Angular produced. You can resolve this by refactoring the component to use native Angular APIs instead of native APIs. If that's not possible, you can add the `ngSkipHydration` attribute to your component's host node, which will disable hydration for the component and its children. `ngSkipHydration` should only be used as a last resort and should be considered a bug that needs to be fixed.
This error typically happens due to direct DOM manipulation using native browser APIs that alter the DOM structure outside of what Angular produced. It will also occur if you use `innerHTML` or `outerHTML` to set HTML content, which similarly alters the DOM structure outside of what Angular produced. You can resolve this by refactoring the component to use native Angular APIs instead of native APIs. If that's not possible, you can add the `ngSkipHydration` attribute to your component's host node, which will disable hydration for the component and its children. `ngSkipHydration` should only be used as a last resort and should be considered a bug that needs to be fixed.
More information about hydration can be found in [this guide](guide/hydration).
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Accessibility Example</title>
@@ -1,6 +1,6 @@
<!-- #docregion -->
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<base href="/">
<title>Angular binding syntax example</title>
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>NgmoduleDemo</title>
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Built-in Template Functions Example</title>
@@ -18,16 +18,13 @@ import { BROWSER_STORAGE, BrowserStorageService } from './storage.service';
{ provide: BROWSER_STORAGE, useFactory: () => sessionStorage }
]
})
export class StorageComponent implements OnInit {
export class StorageComponent {
constructor(
@Self() private sessionStorageService: BrowserStorageService,
@SkipSelf() private localStorageService: BrowserStorageService,
) { }
ngOnInit() {
}
setSession() {
this.sessionStorageService.set('hero', 'Dr Nice - Session');
}
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Feature Modules</title>
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Lazy loading feature modules</title>
@@ -9,8 +9,8 @@
"postbuild": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/collection.json ../../dist/my-lib/"
},
"peerDependencies": {
"@angular/common": "^7.2.0",
"@angular/core": "^7.2.0"
"@angular/common": "^16.1.0",
"@angular/core": "^16.1.0"
},
// #docregion collection
"schematics": "./schematics/collection.json",
@@ -3,7 +3,8 @@
"schematics": {
"ng-add": {
"description": "Add my library to the project.",
"factory": "./ng-add/index#ngAdd"
"factory": "./ng-add/index#ngAdd",
"schema": "./ng-add/schema.json"
}
}
}
@@ -3,7 +3,8 @@
"schematics": {
"ng-add": {
"description": "Add my library to the project.",
"factory": "./ng-add/index#ngAdd"
"factory": "./ng-add/index#ngAdd",
"schema": "./ng-add/schema.json"
},
"my-service": {
"description": "Generate a service in the project.",
@@ -1,10 +1,9 @@
import { Rule, SchematicContext, Tree } from '@angular-devkit/schematics';
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks';
import { Rule } from '@angular-devkit/schematics';
import { addRootImport } from '@schematics/angular/utility';
import { Schema } from './schema';
// Just return the tree
export function ngAdd(): Rule {
return (tree: Tree, context: SchematicContext) => {
context.addTask(new NodePackageInstallTask());
return tree;
};
export function ngAdd(options: Schema): Rule {
// Add an import `MyLibModule` from `my-lib` to the root of the user's project.
return addRootImport(options.project, ({code, external}) =>
code`${external('MyLibModule', 'my-lib')}`);
}
@@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/schema",
"$id": "SchematicsMyLibNgAdd",
"title": "MyLib ng add Schema",
"type": "object",
"properties": {
"project": {
"type": "string",
"description": "Name of the project.",
"$default": {
"$source": "projectName"
}
}
}
}
@@ -0,0 +1,4 @@
export interface Schema {
// Name of the project.
project: string;
}
@@ -12,6 +12,6 @@
<h4>Resource URL:</h4>
<p>Showing: {{dangerousVideoUrl}}</p>
<p>Trusted:</p>
<iframe class="e2e-iframe-trusted-src" width="640" height="390" [src]="videoUrl"></iframe>
<iframe class="e2e-iframe-trusted-src" width="640" height="390" [src]="videoUrl" title="trusted video url"></iframe>
<p>Untrusted:</p>
<iframe class="e2e-iframe-untrusted-src" width="640" height="390" [src]="dangerousVideoUrl"></iframe>
<iframe class="e2e-iframe-untrusted-src" width="640" height="390" [src]="dangerousVideoUrl" title="unTrusted video url"></iframe>
@@ -1,5 +1,5 @@
<!doctype html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Template Reference Variables Example</title>
@@ -34,8 +34,8 @@
<a href="#ref-vars">Template reference variables</a><br>
<a href="#inputs-and-outputs">Inputs and outputs</a><br>
<a href="#pipes">Pipes</a><br>
<a href="#safe-navigation-operator">Safe navigation operator <i>?.</i></a><br>
<a href="#non-null-assertion-operator">Non-null assertion operator <i>!.</i></a><br>
<a href="#safe-navigation-operator">Safe navigation operator <em>?.</em></a><br>
<a href="#non-null-assertion-operator">Non-null assertion operator <em>!.</em></a><br>
<a href="#enums">Enums</a><br>
<a href="#svg-templates">SVG Templates</a><br>
@@ -185,12 +185,12 @@ button</button>
<hr><h2 id="prop-vs-attrib">Property vs. Attribute (img examples)</h2>
<!-- examine the following <img> tag in the browser tools -->
<img src="images/ng-logo.svg"
[src]="heroImageUrl">
[src]="heroImageUrl" [alt]="hero.name">
<br><br>
<img [src]="iconUrl"/>
<img [attr.src]="villainImageUrl"/>
<img [src]="iconUrl" alt="icon"/>
<img [attr.src]="villainImageUrl" alt="villain-image"/>
<!-- eslint-enable @angular-eslint/template/alt-text -->
<a class="to-toc" href="#toc">top</a>
@@ -223,22 +223,22 @@ button</button>
<p>
<img src="{{heroImageUrl}}" alt="interpolated image of {{currentHero.name}}">
is the <i>interpolated</i> image.
is the <em>interpolated</em> image.
</p>
<p>
<img [src]="heroImageUrl" [alt]="'property bounded image of ' + currentHero.name">
is the <i>property bound</i> image.
is the <em>property bound</em> image.
</p>
<p><span>"{{title}}" is the <i>interpolated</i> title.</span></p>
<p>"<span [innerHTML]="title"></span>" is the <i>property bound</i> title.</p>
<p><span>"{{title}}" is the <em>interpolated</em> title.</span></p>
<p>"<span [innerHTML]="title"></span>" is the <em>property bound</em> title.</p>
<!--
Angular generates warnings for these two lines as it sanitizes them
WARNING: sanitizing HTML stripped some content (see https://g.co/ng/security#xss).
-->
<p><span>"{{evilTitle}}" is the <i>interpolated</i> evil title.</span></p>
<p>"<span [innerHTML]="evilTitle"></span>" is the <i>property bound</i> evil title.</p>
<p><span>"{{evilTitle}}" is the <em>interpolated</em> evil title.</span></p>
<p>"<span [innerHTML]="evilTitle"></span>" is the <em>property bound</em> evil title.</p>
<a class="to-toc" href="#toc">top</a>
@@ -484,12 +484,12 @@ without NgModel
<a class="to-toc" href="#toc">top</a>
<h4 id="ngFor-index">*ngFor with index</h4>
<p>with <i>semi-colon</i> separator</p>
<p>with <em>semi-colon</em> separator</p>
<div class="box">
<div *ngFor="let hero of heroes; let i=index">{{i + 1}} - {{hero.name}}</div>
</div>
<p>with <i>comma</i> separator</p>
<p>with <em>comma</em> separator</p>
<div class="box">
<!-- Ex: "1 - Hercules" -->
<div *ngFor="let hero of heroes, let i=index">{{i + 1}} - {{hero.name}}</div>
@@ -502,7 +502,7 @@ without NgModel
<button type="button" (click)="changeIds()">Change ids</button>
<button type="button" (click)="clearTrackByCounts()">Clear counts</button>
<p><i>without</i> trackBy</p>
<p><em>without</em> trackBy</p>
<div class="box">
<div #noTrackBy *ngFor="let hero of heroes">({{hero.id}}) {{hero.name}}</div>
@@ -522,24 +522,24 @@ without NgModel
<br><br><br>
<p>with trackBy and <i>semi-colon</i> separator</p>
<p>with trackBy and <em>semi-colon</em> separator</p>
<div class="box">
<div *ngFor="let hero of heroes; trackBy: trackByHeroes">
({{hero.id}}) {{hero.name}}
</div>
</div>
<p>with trackBy and <i>comma</i> separator</p>
<p>with trackBy and <em>comma</em> separator</p>
<div class="box">
<div *ngFor="let hero of heroes, trackBy: trackByHeroes">({{hero.id}}) {{hero.name}}</div>
</div>
<p>with trackBy and <i>space</i> separator</p>
<p>with trackBy and <em>space</em> separator</p>
<div class="box">
<div *ngFor="let hero of heroes trackBy: trackByHeroes">({{hero.id}}) {{hero.name}}</div>
</div>
<p>with <i>generic</i> trackById function</p>
<p>with <em>generic</em> trackById function</p>
<div class="box">
<div *ngFor="let hero of heroes, trackBy: trackById">({{hero.id}}) {{hero.name}}</div>
</div>
@@ -624,7 +624,7 @@ without NgModel
<a class="to-toc" href="#toc">top</a>
<!-- Null values and the safe navigation operator -->
<hr><h2 id="safe-navigation-operator">Safe navigation operator <i>?.</i></h2>
<hr><h2 id="safe-navigation-operator">Safe navigation operator <em>?.</em></h2>
<div>
The title is {{title}}
@@ -662,7 +662,7 @@ The null hero's name is {{nullHero && nullHero.name}}
<a class="to-toc" href="#toc">top</a>
<!-- non-null assertion operator -->
<hr><h2 id="non-null-assertion-operator">Non-null assertion operator <i>!.</i></h2>
<hr><h2 id="non-null-assertion-operator">Non-null assertion operator <em>!.</em></h2>
<div>
<!--No hero, no text -->
@@ -674,7 +674,7 @@ The null hero's name is {{nullHero && nullHero.name}}
<a class="to-toc" href="#toc">top</a>
<!-- non-null assertion operator -->
<hr><h2 id="any-type-cast-function">$any type cast function <i>$any( )</i>.</h2>
<hr><h2 id="any-type-cast-function">$any type cast function <em>$any( )</em>.</h2>
<div>
<!-- Accessing an undeclared member -->
@@ -26,13 +26,6 @@ For more information, see the [TypeScript Handbook](https://www.typescriptlang.o
The following options are available for configuring the AOT template compiler.
### `allowEmptyCodegenFiles`
When `true`, create all possible files even if they are empty.
Default is `false`.
Used by the Bazel build rules to simplify how Bazel rules track file dependencies.
Do not use this option outside of the Bazel rules.
### `annotationsAs`
Modifies how Angular-specific annotations are emitted to improve tree-shaking.
+1 -1
View File
@@ -85,7 +85,7 @@ If there is a mismatch between server and client DOM tree structures, the hydrat
### Direct DOM Manipulation
If you have components that manipulate the DOM using native DOM APIs, the hydration process will encounter errors. Specific cases where DOM manipulation is a problem are situations like accessing the `document`, querying for specific elements, and injecting additional nodes using `appendChild`. Detaching DOM nodes and moving them to other locations will also result in errors.
If you have components that manipulate the DOM using native DOM APIs or use `innerHTML` or `outerHTML`, the hydration process will encounter errors. Specific cases where DOM manipulation is a problem are situations like accessing the `document`, querying for specific elements, and injecting additional nodes using `appendChild`. Detaching DOM nodes and moving them to other locations will also result in errors.
This is because Angular is unaware of these DOM changes and cannot resolve them during the hydration process. Angular will expect a certain structure, but it will encounter a different structure when attempting to hydrate. This mismatch will result in hydration failure and throw a DOM mismatch error ([see below](#errors)).
+1 -1
View File
@@ -31,7 +31,7 @@ The `package.json` is organized into two groups of packages:
| Packages | Details |
|:--- |:--- |
| [Dependencies](guide/npm-packages#dependencies) | Essential to *running* applications. |
| [DevDependencies](guide/npm-packages#dev-dependencies) | Only necessary to *develop* applications. |
| [DevDependencies](guide/npm-packages#dev-dependencies) | Only necessary to *develop* and *build* applications. |
<div class="alert is-helpful">
+1 -1
View File
@@ -29,7 +29,7 @@ export class Ticker {
```
Like the `async` pipe, `toSignal` subscribes to the Observable immediately, which may trigger side effects. The subscription created by
`toSignal` automatically unsubscribes from the given Observable upon destruction of the the component in which `toSignal` is called.
`toSignal` automatically unsubscribes from the given Observable upon destruction of the component in which `toSignal` is called.
### Initial values
@@ -44,11 +44,7 @@ The following steps define this type of schematic.
<code-example header="projects/my-lib/schematics/ng-add/index.ts (ng-add Rule Factory)" path="schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts"></code-example>
The only step needed to provide initial `ng add` support is to trigger an installation task using the `SchematicContext`.
The task uses the user's preferred package manager to add the library to the project's `package.json` configuration file, and install it in the project's `node_modules` directory.
In this example, the function receives the current `Tree` and returns it without any modifications.
If you need to, do additional setup when your package is installed, such as generating files, updating configuration, or any other initial setup your library requires.
The Angular CLI will install the latest version of the library automatically, and this example is taking it a step further by adding the `MyLibModule` to the root of the application. The `addRootImport` function accepts a callback that needs to return a code block. You can write any code inside of the string tagged with the `code` function and any external symbol have to be wrapped with the `external` function to ensure that the appropriate import statements are generated.
### Define dependency type
+5
View File
@@ -1057,6 +1057,11 @@
"title": "Intro to components",
"tooltip": "About Components, Templates, and Views."
},
{
"url": "guide/architecture-services",
"title": "Intro to services and DI",
"tooltip": "About services and dependency injection."
},
{
"url": "guide/architecture-next-steps",
"title": "Next steps",
@@ -19,8 +19,7 @@ If you have any trouble during this lesson, you can review the completed code fo
## After you finish
* Your app has a new interface that it can use as a data type.
* Your app has an instance of the new interface with sample data.
* Your app's `HousingLocationComponent` template has a `HousingLocation` property to receive input.
## Conceptual preview of Inputs
[Inputs](api/core/Input) allow components to share data. The direction of the data sharing is from parent component to child component.
@@ -66,4 +65,4 @@ If you are having any trouble with this lesson, you can review the completed cod
* [Lesson 6 - Add a property binding to an component’s template](tutorial/first-app/first-app-lesson-06)
## For more information about the topics covered in this lesson, visit:
* [Sharing data between child and parent directives and components](guide/inputs-outputs)
* [Sharing data between child and parent directives and components](guide/inputs-outputs)
@@ -43,6 +43,8 @@ In this case, `:id` is dynamic and will change based on how the route is request
<code-example header="Add anchor with a routerLink directive to housing-location.component.ts" path="first-app-lesson-11/src/app/housing-location/housing-location.component.ts" region="add-router-link"></code-example>
The `routerLink` directive enables Angular's router to create dynamic links in the application. The value assigned to the `routerLink` is an array with two entries: the static portion of the path and the dynamic data.
For the routerLink to work in the template, add a file level import of RouterLink and RouterOutlet from '@angular/router', then update the component imports array to include both RouterLink and RouterOutlet
1. At this point you can confirm that the routing is working in your app. In the browser, refresh the home page and click the "learn more" button for a housing location.
+23 -23
View File
@@ -61,33 +61,33 @@
},
"private": true,
"dependencies": {
"@angular/animations": "16.0.0",
"@angular/cdk": "16.0.0-rc.2",
"@angular/common": "16.0.0",
"@angular/compiler": "16.0.0",
"@angular/core": "16.0.0",
"@angular/elements": "16.0.0",
"@angular/forms": "16.0.0",
"@angular/material": "16.0.0",
"@angular/platform-browser": "16.0.0",
"@angular/platform-browser-dynamic": "16.0.0",
"@angular/router": "16.0.0",
"@angular/service-worker": "16.0.0",
"@angular/animations": "16.1.0-rc.0",
"@angular/cdk": "16.1.0-rc.0",
"@angular/common": "16.1.0-rc.0",
"@angular/compiler": "16.1.0-rc.0",
"@angular/core": "16.1.0-rc.0",
"@angular/elements": "16.1.0-rc.0",
"@angular/forms": "16.1.0-rc.0",
"@angular/material": "16.1.0-rc.0",
"@angular/platform-browser": "16.1.0-rc.0",
"@angular/platform-browser-dynamic": "16.1.0-rc.0",
"@angular/router": "16.1.0-rc.0",
"@angular/service-worker": "16.1.0-rc.0",
"rxjs": "~7.8.0",
"safevalues": "^0.4.2",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/architect-cli": "0.1600.0",
"@angular-devkit/build-angular": "16.0.0",
"@angular-devkit/architect-cli": "0.1601.0-rc.0",
"@angular-devkit/build-angular": "16.1.0-rc.0",
"@angular-eslint/builder": "16.0.3",
"@angular-eslint/eslint-plugin": "16.0.3",
"@angular-eslint/eslint-plugin-template": "16.0.3",
"@angular-eslint/template-parser": "^16.0.3",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#7dad055464ea9847e4870b9e3baad1f0c417bdf7",
"@angular/cli": "16.0.0",
"@angular/compiler-cli": "16.0.0",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#cf8e57fef4c3cc567b2877dff99db8e828cb70ae",
"@angular/cli": "16.1.0-rc.0",
"@angular/compiler-cli": "16.1.0-rc.0",
"@bazel/bazelisk": "^1.7.5",
"@bazel/buildozer": "^6.0.0",
"@bazel/ibazel": "^0.16.2",
@@ -98,8 +98,8 @@
"@types/lunr": "^2.3.3",
"@types/node": "^12.7.9",
"@types/trusted-types": "^2.0.2",
"@typescript-eslint/eslint-plugin": "5.59.9",
"@typescript-eslint/parser": "5.59.9",
"@typescript-eslint/eslint-plugin": "5.60.0",
"@typescript-eslint/parser": "5.60.0",
"archiver": "^5.3.0",
"assert": "^2.0.0",
"canonical-path": "1.0.0",
@@ -110,10 +110,10 @@
"dgeni": "^0.4.14",
"dgeni-packages": "^0.30.0",
"entities": "^4.0.0",
"eslint": "8.41.0",
"eslint": "8.42.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jasmine": "4.1.3",
"eslint-plugin-jsdoc": "46.1.0",
"eslint-plugin-jsdoc": "46.2.6",
"eslint-plugin-prefer-arrow": "1.2.3",
"find-free-port": "^2.0.0",
"firebase-tools": "^12.0.0",
@@ -136,7 +136,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"light-server": "^2.9.1",
"lighthouse": "^9.0.0",
"lighthouse-logger": "^1.3.0",
@@ -144,7 +144,7 @@
"lunr": "^2.3.9",
"npm-run-all": "^4.1.5",
"protractor": "~7.0.0",
"puppeteer-core": "20.4.0",
"puppeteer-core": "20.6.0",
"rehype-slug": "^4.0.1",
"remark": "^12.0.0",
"remark-html": "^13.0.0",
@@ -90,6 +90,11 @@ describe('ApiListComponent', () => {
expectFilteredResult('status: security-risk', item => item.securityRisk);
});
it('should be visible if they have the selected developer preview status', () => {
component.setStatus({value: 'developer-preview', title: 'Developer Preview'});
expectFilteredResult('status: developer-preview', item => item.developerPreview);
});
it('should be visible if they match the selected API type', () => {
component.setType({value: 'class', title: 'Class'});
expectFilteredResult('type: class', item => item.docType === 'class');
@@ -146,6 +151,12 @@ describe('ApiListComponent', () => {
expectFilteredResult('security-risk', item => item.securityRisk);
});
it('should filter as expected when status is developer-preview', () => {
locationService.query = {status: 'developer-preview'};
fixture.detectChanges();
expectFilteredResult('developer-preview', item => item.developerPreview);
});
it('should filter as expected for ?type', () => {
locationService.query = {type: 'pipe'};
expectOneItem('pipe_1', 'common', 'pipe', 'stable');
@@ -235,6 +246,7 @@ const apiSections: ApiSection[] = [
docType: 'class',
stability: 'experimental',
securityRisk: false,
developerPreview: false
},
{
name: 'class_2',
@@ -243,6 +255,7 @@ const apiSections: ApiSection[] = [
docType: 'class',
stability: 'stable',
securityRisk: false,
developerPreview: false
},
{
name: 'directive_1',
@@ -251,6 +264,7 @@ const apiSections: ApiSection[] = [
docType: 'directive',
stability: 'stable',
securityRisk: true,
developerPreview: false
},
{
name: 'pipe_1',
@@ -259,6 +273,7 @@ const apiSections: ApiSection[] = [
docType: 'pipe',
stability: 'stable',
securityRisk: true,
developerPreview: false
},
],
},
@@ -275,6 +290,7 @@ const apiSections: ApiSection[] = [
docType: 'class',
stability: 'experimental',
securityRisk: false,
developerPreview: false
},
{
name: 'function_1',
@@ -283,6 +299,7 @@ const apiSections: ApiSection[] = [
docType: 'function',
stability: 'deprecated',
securityRisk: true,
developerPreview: false
},
{
name: 'const_1',
@@ -291,6 +308,7 @@ const apiSections: ApiSection[] = [
docType: 'const',
stability: 'stable',
securityRisk: false,
developerPreview: true
},
],
},
@@ -59,6 +59,7 @@ export class ApiListComponent implements OnInit {
statuses: Option[] = [
{ value: 'all', title: 'All' },
{ value: 'stable', title: 'Stable'},
{ value: 'developer-preview', title: 'Developer Preview'},
{ value: 'deprecated', title: 'Deprecated' },
{ value: 'security-risk', title: 'Security Risk' }
];
@@ -119,7 +120,10 @@ export class ApiListComponent implements OnInit {
const matchesQuery = (item: ApiItem) =>
sectionNameMatches || item.name.indexOf(query) !== -1;
const matchesStatus = (item: ApiItem) =>
status === 'all' || status === item.stability || (status === 'security-risk' && item.securityRisk);
status === 'all' ||
status === item.stability ||
(status === 'security-risk' && item.securityRisk) ||
(status === 'developer-preview' && item.developerPreview);
const matchesType = (item: ApiItem) =>
type === 'all' || type === item.docType;
@@ -14,6 +14,7 @@ export interface ApiItem {
docType: string;
stability: string;
securityRisk: boolean;
developerPreview: boolean;
}
export interface ApiSection {
@@ -136,7 +136,7 @@ export class LiveExampleComponent implements AfterContentInit {
*/
@Component({
selector: 'aio-embedded-stackblitz',
template: '<iframe #iframe style="border: 0" width="100%" height="100%"></iframe>',
template: '<iframe #iframe style="border: 0" width="100%" height="100%" title="live example"></iframe>',
styles: [ 'iframe { min-height: 400px; }' ]
})
export class EmbeddedStackblitzComponent implements AfterViewInit {
@@ -15,7 +15,7 @@ aio-api-list {
/* API FILTER MENU */
aio-select {
width: 200px;
width: 220px;
@media screen and (max-width: 600px) {
width: 100%;
@@ -13,14 +13,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"angular": "^1.8.3",
"angular-in-memory-web-api": "~0.16.0",
"angular-route": "1.8.3",
@@ -29,9 +29,9 @@
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@types/angular": "^1.8.4",
"@types/angular-route": "^1.7.2",
"@types/jasmine": "~4.3.0",
@@ -43,7 +43,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
@@ -13,23 +13,23 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"angular-in-memory-web-api": "~0.16.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@types/jasmine": "~4.3.0",
"@types/node": "^16.11.35",
"copyfiles": "^2.4.1",
@@ -40,7 +40,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
@@ -13,24 +13,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/elements": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/elements": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"angular-in-memory-web-api": "~0.16.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@types/jasmine": "~4.3.0",
"@types/node": "^16.11.35",
"jasmine-core": "~4.6.0",
@@ -40,7 +40,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
@@ -15,24 +15,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/localize": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/localize": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"angular-in-memory-web-api": "~0.16.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@types/jasmine": "~4.3.0",
"@types/node": "^16.11.35",
"jasmine-core": "~4.6.0",
@@ -42,7 +42,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
@@ -13,24 +13,24 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/service-worker": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"@angular/service-worker": "^16.1.0-rc.0",
"angular-in-memory-web-api": "~0.16.0",
"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@types/jasmine": "~4.3.0",
"@types/node": "^16.11.35",
"jasmine-core": "~4.6.0",
@@ -40,7 +40,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
@@ -25,15 +25,15 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/upgrade": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"@angular/upgrade": "^16.1.0-rc.0",
"core-js": "^2.5.4",
"rxjs": "~7.8.0",
"systemjs": "~0.19.39",
@@ -42,7 +42,7 @@
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular/compiler-cli": "^16.0.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^13.2.0",
"@types/angular": "^1.8.4",
@@ -58,7 +58,7 @@
"karma": "~6.4.0",
"karma-chrome-launcher": "~3.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"lite-server": "^2.6.1",
"protractor": "~7.0.0",
"rollup": "^2.70.1",
@@ -17,16 +17,16 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/platform-server": "^16.0.0",
"@angular/router": "^16.0.0",
"@nguniversal/express-engine": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/platform-server": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"@nguniversal/express-engine": "^16.1.0-rc.0",
"angular-in-memory-web-api": "~0.16.0",
"express": "^4.18.1",
"rxjs": "~7.8.0",
@@ -34,10 +34,10 @@
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@nguniversal/builders": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@nguniversal/builders": "^16.1.0-rc.0",
"@types/express": "^4.17.13",
"@types/jasmine": "~4.3.0",
"@types/node": "^16.11.35",
@@ -48,7 +48,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"typescript": "~4.9.3"
+19 -19
View File
@@ -19,20 +19,20 @@
"license": "MIT",
"repository": {},
"dependencies": {
"@angular/animations": "^16.0.0",
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/elements": "^16.0.0",
"@angular/forms": "^16.0.0",
"@angular/localize": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"@angular/platform-browser-dynamic": "^16.0.0",
"@angular/platform-server": "^16.0.0",
"@angular/router": "^16.0.0",
"@angular/service-worker": "^16.0.0",
"@angular/upgrade": "^16.0.0",
"@nguniversal/express-engine": "^16.0.0",
"@angular/animations": "^16.1.0-rc.0",
"@angular/common": "^16.1.0-rc.0",
"@angular/compiler": "^16.1.0-rc.0",
"@angular/core": "^16.1.0-rc.0",
"@angular/elements": "^16.1.0-rc.0",
"@angular/forms": "^16.1.0-rc.0",
"@angular/localize": "^16.1.0-rc.0",
"@angular/platform-browser": "^16.1.0-rc.0",
"@angular/platform-browser-dynamic": "^16.1.0-rc.0",
"@angular/platform-server": "^16.1.0-rc.0",
"@angular/router": "^16.1.0-rc.0",
"@angular/service-worker": "^16.1.0-rc.0",
"@angular/upgrade": "^16.1.0-rc.0",
"@nguniversal/express-engine": "^16.1.0-rc.0",
"angular": "^1.8.3",
"angular-in-memory-web-api": "~0.16.0",
"angular-route": "1.8.3",
@@ -45,10 +45,10 @@
"zone.js": "~0.13.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@nguniversal/builders": "^16.0.0",
"@angular-devkit/build-angular": "^16.1.0-rc.0",
"@angular/cli": "^16.1.0-rc.0",
"@angular/compiler-cli": "^16.1.0-rc.0",
"@nguniversal/builders": "^16.1.0-rc.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^13.2.0",
"@types/angular": "^1.8.4",
@@ -71,7 +71,7 @@
"karma-chrome-launcher": "~3.2.0",
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "~2.0.0",
"karma-jasmine-html-reporter": "~2.1.0",
"lite-server": "^2.6.1",
"lodash": "^4.16.2",
"protractor": "~7.0.0",
File diff suppressed because it is too large Load Diff
+1
View File
@@ -17,6 +17,7 @@ module.exports =
// Register the processors
.processor(require('./processors/mergeParameterInfo'))
.processor(require('./processors/processSeeTags'))
.processor(require('./processors/processPseudoClasses'))
.processor(require('./processors/convertPrivateClassesToInterfaces'))
.processor(require('./processors/generateApiListDoc'))
@@ -40,7 +40,8 @@ function getExportInfo(exportDoc) {
path: exportDoc.path,
docType: getDocType(exportDoc),
stability: getStability(exportDoc),
securityRisk: !!exportDoc.security
securityRisk: !!exportDoc.security,
developerPreview: !!exportDoc.developerPreview
};
}
@@ -67,17 +67,17 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[2].data[0].items).toEqual([
{ docType: 'directive', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: false },
{ docType: 'pipe', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false },
{ docType: 'decorator', title: 'CccCcc', name: 'cccccc', path: 'ccc', stability: '', securityRisk: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'ddd', stability: '', securityRisk: false }
{ docType: 'directive', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'pipe', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'decorator', title: 'CccCcc', name: 'cccccc', path: 'ccc', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'ddd', stability: '', securityRisk: false, developerPreview: false }
]);
expect(docs[2].data[1].items).toEqual([
{ docType: 'interface', title: 'EeeEee', name: 'eeeeee', path: 'eee', stability: '', securityRisk: false },
{ docType: 'function', title: 'FffFff', name: 'ffffff', path: 'fff', stability: '', securityRisk: false },
{ docType: 'enum', title: 'GggGgg', name: 'gggggg', path: 'ggg', stability: '', securityRisk: false },
{ docType: 'type-alias', title: 'HhhHhh', name: 'hhhhhh', path: 'hhh', stability: '', securityRisk: false },
{ docType: 'const', title: 'IiiIii', name: 'iiiiii', path: 'iii', stability: '', securityRisk: false },
{ docType: 'interface', title: 'EeeEee', name: 'eeeeee', path: 'eee', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'function', title: 'FffFff', name: 'ffffff', path: 'fff', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'enum', title: 'GggGgg', name: 'gggggg', path: 'ggg', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'type-alias', title: 'HhhHhh', name: 'hhhhhh', path: 'hhh', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'const', title: 'IiiIii', name: 'iiiiii', path: 'iii', stability: '', securityRisk: false, developerPreview: false },
]);
});
@@ -92,7 +92,7 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'pipe', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false },
{ docType: 'pipe', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false, developerPreview: false },
]);
});
@@ -106,8 +106,8 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'const', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: false },
{ docType: 'const', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false },
{ docType: 'const', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'const', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false, developerPreview: false },
]);
});
@@ -121,8 +121,23 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: true },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false },
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: true, developerPreview: false },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false, developerPreview: false },
]);
});
it('should convert developerPreview to a boolean developerPreview', () => {
const processor = processorFactory();
const docs = [
{ docType: 'package', id: '@angular/common/index', exports: [
{ docType: 'class', name: 'AaaAaa', path: 'aaa', developerPreview: true },
{ docType: 'class', name: 'BbbBbb', path: 'bbb' },
]}
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: '', securityRisk: false, developerPreview: true },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: '', securityRisk: false, developerPreview: false },
]);
});
@@ -138,10 +153,10 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: 'stable', securityRisk: false },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: 'experimental', securityRisk: false },
{ docType: 'class', title: 'CccCcc', name: 'cccccc', path: 'ccc', stability: 'deprecated', securityRisk: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'ddd', stability: '', securityRisk: false },
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'aaa', stability: 'stable', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'bbb', stability: 'experimental', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'CccCcc', name: 'cccccc', path: 'ccc', stability: 'deprecated', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'ddd', stability: '', securityRisk: false, developerPreview: false },
]);
});
@@ -157,10 +172,10 @@ describe('generateApiListDoc processor', () => {
];
processor.$process(docs);
expect(docs[1].data[0].items).toEqual([
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'xxx', stability: '', securityRisk: false },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'vvv', stability: '', securityRisk: false },
{ docType: 'class', title: 'CccCcc', name: 'cccccc', path: 'yyy', stability: '', securityRisk: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'uuu', stability: '', securityRisk: false },
{ docType: 'class', title: 'AaaAaa', name: 'aaaaaa', path: 'xxx', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'BbbBbb', name: 'bbbbbb', path: 'vvv', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'CccCcc', name: 'cccccc', path: 'yyy', stability: '', securityRisk: false, developerPreview: false },
{ docType: 'class', title: 'DddDdd', name: 'dddddd', path: 'uuu', stability: '', securityRisk: false, developerPreview: false },
]);
});
});
@@ -0,0 +1,20 @@
/**
* @dgProcessor
*
* @description
* Throws an error when @See is used with a backtick (`) reference.
*/
module.exports = function processSeeTags(createDocMessage) {
return {
$runAfter: ['tags-extracted'],
$runBefore: [],
$process(docs) {
docs.forEach((doc) => {
const backtick = doc.see?.find((see) => see.startsWith('`'));
if (backtick) {
throw new Error(createDocMessage(`@ "Use @link to create a link for ${backtick}`, doc));
}
});
},
};
};
@@ -49,6 +49,7 @@ module.exports = function getLinkInfo(getDocFromAlias, encodeCodeBlock, log) {
} else if (url.indexOf('#') > 0) {
var pathAndHash = url.split('#');
linkInfo = getLinkInfoImpl(pathAndHash[0], title, currentDoc);
linkInfo.title = encodeCodeBlock(pathAndHash.slice(-2).join('#'), true);
linkInfo.url = linkInfo.url + '#' + pathAndHash[1];
return linkInfo;
+2474 -2252
View File
File diff suppressed because it is too large Load Diff
+27 -27
View File
@@ -485,7 +485,7 @@ export class NgClass implements DoCheck {
// (undocumented)
ngDoCheck(): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": { "alias": "class"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": { "alias": "class"; "required": false; }; "ngClass": { "alias": "ngClass"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgClass, never>;
}
@@ -508,7 +508,7 @@ export class NgComponentOutlet implements OnChanges, OnDestroy {
// (undocumented)
ngOnDestroy(): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": { "alias": "ngComponentOutlet"; "required": false; }; "ngComponentOutletInjector": { "alias": "ngComponentOutletInjector"; "required": false; }; "ngComponentOutletContent": { "alias": "ngComponentOutletContent"; "required": false; }; "ngComponentOutletNgModule": { "alias": "ngComponentOutletNgModule"; "required": false; }; "ngComponentOutletNgModuleFactory": { "alias": "ngComponentOutletNgModuleFactory"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgComponentOutlet, "[ngComponentOutlet]", never, { "ngComponentOutlet": { "alias": "ngComponentOutlet"; "required": false; }; "ngComponentOutletInjector": { "alias": "ngComponentOutletInjector"; "required": false; }; "ngComponentOutletContent": { "alias": "ngComponentOutletContent"; "required": false; }; "ngComponentOutletNgModule": { "alias": "ngComponentOutletNgModule"; "required": false; }; "ngComponentOutletNgModuleFactory": { "alias": "ngComponentOutletNgModuleFactory"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgComponentOutlet, never>;
}
@@ -524,7 +524,7 @@ class NgForOf<T, U extends NgIterable<T> = NgIterable<T>> implements DoCheck {
get ngForTrackBy(): TrackByFunction<T>;
static ngTemplateContextGuard<T, U extends NgIterable<T>>(dir: NgForOf<T, U>, ctx: any): ctx is NgForOfContext<T, U>;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": { "alias": "ngForOf"; "required": false; }; "ngForTrackBy": { "alias": "ngForTrackBy"; "required": false; }; "ngForTemplate": { "alias": "ngForTemplate"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForOf<any, any>, "[ngFor][ngForOf]", never, { "ngForOf": { "alias": "ngForOf"; "required": false; }; "ngForTrackBy": { "alias": "ngForTrackBy"; "required": false; }; "ngForTemplate": { "alias": "ngForTemplate"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgForOf<any, any>, never>;
}
@@ -561,7 +561,7 @@ export class NgIf<T = unknown> {
static ngTemplateContextGuard<T>(dir: NgIf<T>, ctx: any): ctx is NgIfContext<Exclude<T, false | 0 | '' | null | undefined>>;
static ngTemplateGuard_ngIf: 'binding';
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": { "alias": "ngIf"; "required": false; }; "ngIfThen": { "alias": "ngIfThen"; "required": false; }; "ngIfElse": { "alias": "ngIfElse"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgIf<any>, "[ngIf]", never, { "ngIf": { "alias": "ngIf"; "required": false; }; "ngIfThen": { "alias": "ngIfThen"; "required": false; }; "ngIfElse": { "alias": "ngIfElse"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgIf<any>, never>;
}
@@ -599,20 +599,24 @@ export abstract class NgLocalization {
// @public
export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
set disableOptimizedSrcset(value: string | boolean | undefined);
// (undocumented)
get disableOptimizedSrcset(): boolean;
set fill(value: string | boolean | undefined);
// (undocumented)
get fill(): boolean;
set height(value: string | number | undefined);
// (undocumented)
get height(): number | undefined;
disableOptimizedSrcset: boolean;
fill: boolean;
height: number | undefined;
loaderParams?: {
[key: string]: any;
};
loading?: 'lazy' | 'eager' | 'auto';
// (undocumented)
static ngAcceptInputType_disableOptimizedSrcset: unknown;
// (undocumented)
static ngAcceptInputType_fill: unknown;
// (undocumented)
static ngAcceptInputType_height: unknown;
// (undocumented)
static ngAcceptInputType_priority: unknown;
// (undocumented)
static ngAcceptInputType_width: unknown;
// (undocumented)
ngOnChanges(changes: SimpleChanges): void;
// (undocumented)
ngOnDestroy(): void;
@@ -620,15 +624,11 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
ngOnInit(): void;
ngSrc: string;
ngSrcset: string;
set priority(value: string | boolean | undefined);
// (undocumented)
get priority(): boolean;
priority: boolean;
sizes?: string;
set width(value: string | number | undefined);
width: number | undefined;
// (undocumented)
get width(): number | undefined;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": { "alias": "ngSrc"; "required": false; }; "ngSrcset": { "alias": "ngSrcset"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "loaderParams": { "alias": "loaderParams"; "required": false; }; "disableOptimizedSrcset": { "alias": "disableOptimizedSrcset"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "src": { "alias": "src"; "required": false; }; "srcset": { "alias": "srcset"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgOptimizedImage, "img[ngSrc]", never, { "ngSrc": { "alias": "ngSrc"; "required": true; }; "ngSrcset": { "alias": "ngSrcset"; "required": false; }; "sizes": { "alias": "sizes"; "required": false; }; "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "priority": { "alias": "priority"; "required": false; }; "loaderParams": { "alias": "loaderParams"; "required": false; }; "disableOptimizedSrcset": { "alias": "disableOptimizedSrcset"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "src": { "alias": "src"; "required": false; }; "srcset": { "alias": "srcset"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgOptimizedImage, never>;
}
@@ -641,7 +641,7 @@ export class NgPlural {
// (undocumented)
set ngPlural(value: number);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": { "alias": "ngPlural"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPlural, "[ngPlural]", never, { "ngPlural": { "alias": "ngPlural"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgPlural, never>;
}
@@ -652,7 +652,7 @@ export class NgPluralCase {
// (undocumented)
value: string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPluralCase, "[ngPluralCase]", never, {}, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgPluralCase, "[ngPluralCase]", never, {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgPluralCase, [{ attribute: "ngPluralCase"; }, null, null, { host: true; }]>;
}
@@ -667,7 +667,7 @@ export class NgStyle implements DoCheck {
[klass: string]: any;
} | null | undefined);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": { "alias": "ngStyle"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgStyle, "[ngStyle]", never, { "ngStyle": { "alias": "ngStyle"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgStyle, never>;
}
@@ -677,7 +677,7 @@ export class NgSwitch {
// (undocumented)
set ngSwitch(newValue: any);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": { "alias": "ngSwitch"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitch, "[ngSwitch]", never, { "ngSwitch": { "alias": "ngSwitch"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitch, never>;
}
@@ -688,7 +688,7 @@ export class NgSwitchCase implements DoCheck {
ngDoCheck(): void;
ngSwitchCase: any;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": { "alias": "ngSwitchCase"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchCase, "[ngSwitchCase]", never, { "ngSwitchCase": { "alias": "ngSwitchCase"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchCase, [null, null, { optional: true; host: true; }]>;
}
@@ -697,7 +697,7 @@ export class NgSwitchCase implements DoCheck {
export class NgSwitchDefault {
constructor(viewContainer: ViewContainerRef, templateRef: TemplateRef<Object>, ngSwitch: NgSwitch);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchDefault, "[ngSwitchDefault]", never, {}, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSwitchDefault, "[ngSwitchDefault]", never, {}, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSwitchDefault, [null, null, { optional: true; host: true; }]>;
}
@@ -711,7 +711,7 @@ export class NgTemplateOutlet<C = unknown> implements OnChanges {
ngTemplateOutletContext: C | null;
ngTemplateOutletInjector: Injector | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet<any>, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgTemplateOutlet<any>, "[ngTemplateOutlet]", never, { "ngTemplateOutletContext": { "alias": "ngTemplateOutletContext"; "required": false; }; "ngTemplateOutlet": { "alias": "ngTemplateOutlet"; "required": false; }; "ngTemplateOutletInjector": { "alias": "ngTemplateOutletInjector"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgTemplateOutlet<any>, never>;
}
@@ -41,6 +41,7 @@ export interface I18nOptions {
// @public
export interface LegacyNgcOptions {
// @deprecated
allowEmptyCodegenFiles?: boolean;
flatModuleId?: string;
flatModuleOutFile?: string;
@@ -9,6 +9,7 @@ import { Injector } from '@angular/core';
import { MonoTypeOperatorFunction } from 'rxjs';
import { Observable } from 'rxjs';
import { Signal } from '@angular/core';
import { Subscribable } from 'rxjs';
// @public
export function takeUntilDestroyed<T>(destroyRef?: DestroyRef): MonoTypeOperatorFunction<T>;
@@ -22,21 +23,21 @@ export interface ToObservableOptions {
}
// @public
export function toSignal<T>(source: Observable<T>): Signal<T | undefined>;
export function toSignal<T>(source: Observable<T> | Subscribable<T>): Signal<T | undefined>;
// @public
export function toSignal<T>(source: Observable<T>, options?: ToSignalOptions<undefined> & {
export function toSignal<T>(source: Observable<T> | Subscribable<T>, options?: ToSignalOptions<undefined> & {
requireSync?: false;
}): Signal<T | undefined>;
// @public
export function toSignal<T, U extends T | null | undefined>(source: Observable<T>, options: ToSignalOptions<U> & {
export function toSignal<T, U extends T | null | undefined>(source: Observable<T> | Subscribable<T>, options: ToSignalOptions<U> & {
initialValue: U;
requireSync?: false;
}): Signal<T | U>;
// @public
export function toSignal<T>(source: Observable<T>, options: ToSignalOptions<undefined> & {
export function toSignal<T>(source: Observable<T> | Subscribable<T>, options: ToSignalOptions<undefined> & {
requireSync: true;
}): Signal<T>;
+27 -27
View File
@@ -139,7 +139,7 @@ export class AbstractFormGroupDirective extends ControlContainer implements OnIn
ngOnInit(): void;
get path(): string[];
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractFormGroupDirective, never, never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractFormGroupDirective, never, never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractFormGroupDirective, never>;
}
@@ -159,7 +159,7 @@ export interface AsyncValidatorFn {
export class CheckboxControlValueAccessor extends BuiltInControlValueAccessor implements ControlValueAccessor {
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxControlValueAccessor, "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxControlValueAccessor, "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxControlValueAccessor, never>;
}
@@ -167,7 +167,7 @@ export class CheckboxControlValueAccessor extends BuiltInControlValueAccessor im
// @public
export class CheckboxRequiredValidator extends RequiredValidator {
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxRequiredValidator, "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<CheckboxRequiredValidator, "input[type=checkbox][required][formControlName],input[type=checkbox][required][formControl],input[type=checkbox][required][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxRequiredValidator, never>;
}
@@ -198,7 +198,7 @@ export class DefaultValueAccessor extends BaseControlValueAccessor implements Co
constructor(renderer: Renderer2, elementRef: ElementRef, _compositionMode: boolean);
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultValueAccessor, "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DefaultValueAccessor, "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultValueAccessor, [null, null, { optional: true; }]>;
}
@@ -209,7 +209,7 @@ export class EmailValidator extends AbstractValidatorDirective {
// (undocumented)
enabled(input: boolean): boolean;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailValidator, "[email][formControlName],[email][formControl],[email][ngModel]", never, { "email": { "alias": "email"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<EmailValidator, "[email][formControlName],[email][formControl],[email][ngModel]", never, { "email": { "alias": "email"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<EmailValidator, never>;
}
@@ -272,7 +272,7 @@ export class FormArrayName extends ControlContainer implements OnInit, OnDestroy
ngOnInit(): void;
get path(): string[];
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormArrayName, "[formArrayName]", never, { "name": { "alias": "formArrayName"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormArrayName, "[formArrayName]", never, { "name": { "alias": "formArrayName"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormArrayName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
@@ -356,7 +356,7 @@ export class FormControlDirective extends NgControl implements OnChanges, OnDest
viewModel: any;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlDirective, "[formControl]", ["ngForm"], { "form": { "alias": "formControl"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlDirective, "[formControl]", ["ngForm"], { "form": { "alias": "formControl"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlDirective, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
}
@@ -379,7 +379,7 @@ export class FormControlName extends NgControl implements OnChanges, OnDestroy {
update: EventEmitter<any>;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlName, "[formControlName]", never, { "name": { "alias": "formControlName"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormControlName, "[formControlName]", never, { "name": { "alias": "formControlName"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormControlName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
@@ -492,7 +492,7 @@ export class FormGroupDirective extends ControlContainer implements Form, OnChan
readonly submitted: boolean;
updateModel(dir: FormControlName, value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupDirective, "[formGroup]", ["ngForm"], { "form": { "alias": "formGroup"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupDirective, "[formGroup]", ["ngForm"], { "form": { "alias": "formGroup"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupDirective, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
@@ -502,7 +502,7 @@ export class FormGroupName extends AbstractFormGroupDirective implements OnInit,
constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]);
name: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupName, "[formGroupName]", never, { "name": { "alias": "formGroupName"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<FormGroupName, "[formGroupName]", never, { "name": { "alias": "formGroupName"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<FormGroupName, [{ optional: true; host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
@@ -578,7 +578,7 @@ export const isFormRecord: (control: unknown) => control is FormRecord<AbstractC
export class MaxLengthValidator extends AbstractValidatorDirective {
maxlength: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxLengthValidator, "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", never, { "maxlength": { "alias": "maxlength"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxLengthValidator, "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", never, { "maxlength": { "alias": "maxlength"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MaxLengthValidator, never>;
}
@@ -587,7 +587,7 @@ export class MaxLengthValidator extends AbstractValidatorDirective {
export class MaxValidator extends AbstractValidatorDirective {
max: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidator, "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MaxValidator, "input[type=number][max][formControlName],input[type=number][max][formControl],input[type=number][max][ngModel]", never, { "max": { "alias": "max"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MaxValidator, never>;
}
@@ -596,7 +596,7 @@ export class MaxValidator extends AbstractValidatorDirective {
export class MinLengthValidator extends AbstractValidatorDirective {
minlength: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MinLengthValidator, "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", never, { "minlength": { "alias": "minlength"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MinLengthValidator, "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", never, { "minlength": { "alias": "minlength"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MinLengthValidator, never>;
}
@@ -605,7 +605,7 @@ export class MinLengthValidator extends AbstractValidatorDirective {
export class MinValidator extends AbstractValidatorDirective {
min: string | number | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<MinValidator, "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", never, { "min": { "alias": "min"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<MinValidator, "input[type=number][min][formControlName],input[type=number][min][formControl],input[type=number][min][ngModel]", never, { "min": { "alias": "min"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<MinValidator, never>;
}
@@ -630,7 +630,7 @@ export abstract class NgControl extends AbstractControlDirective {
export class NgControlStatus extends AbstractControlStatus {
constructor(cd: NgControl);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatus, "[formControlName],[ngModel],[formControl]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatus, "[formControlName],[ngModel],[formControl]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlStatus, [{ self: true; }]>;
}
@@ -639,7 +639,7 @@ export class NgControlStatus extends AbstractControlStatus {
export class NgControlStatusGroup extends AbstractControlStatus {
constructor(cd: ControlContainer);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatusGroup, "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgControlStatusGroup, "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgControlStatusGroup, [{ optional: true; self: true; }]>;
}
@@ -675,7 +675,7 @@ export class NgForm extends ControlContainer implements Form, AfterViewInit {
readonly submitted: boolean;
updateModel(dir: NgControl, value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForm, "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", ["ngForm"], { "options": { "alias": "ngFormOptions"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgForm, "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", ["ngForm"], { "options": { "alias": "ngFormOptions"; "required": false; }; }, { "ngSubmit": "ngSubmit"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgForm, [{ optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }]>;
}
@@ -705,7 +705,7 @@ export class NgModel extends NgControl implements OnChanges, OnDestroy {
viewModel: any;
viewToModelUpdate(newValue: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModel, "[ngModel]:not([formControlName]):not([formControl])", ["ngModel"], { "name": { "alias": "name"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; "options": { "alias": "ngModelOptions"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModel, "[ngModel]:not([formControlName]):not([formControl])", ["ngModel"], { "name": { "alias": "name"; "required": false; }; "isDisabled": { "alias": "disabled"; "required": false; }; "model": { "alias": "ngModel"; "required": false; }; "options": { "alias": "ngModelOptions"; "required": false; }; }, { "update": "ngModelChange"; }, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgModel, [{ optional: true; host: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; self: true; }, { optional: true; }, { optional: true; }]>;
}
@@ -715,7 +715,7 @@ export class NgModelGroup extends AbstractFormGroupDirective implements OnInit,
constructor(parent: ControlContainer, validators: (Validator | ValidatorFn)[], asyncValidators: (AsyncValidator | AsyncValidatorFn)[]);
name: string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModelGroup, "[ngModelGroup]", ["ngModelGroup"], { "name": { "alias": "ngModelGroup"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgModelGroup, "[ngModelGroup]", ["ngModelGroup"], { "name": { "alias": "ngModelGroup"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgModelGroup, [{ host: true; skipSelf: true; }, { optional: true; self: true; }, { optional: true; self: true; }]>;
}
@@ -729,7 +729,7 @@ export class NgSelectOption implements OnDestroy {
set ngValue(value: any);
set value(value: any);
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSelectOption, "option", never, { "ngValue": { "alias": "ngValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NgSelectOption, "option", never, { "ngValue": { "alias": "ngValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NgSelectOption, [null, null, { optional: true; host: true; }]>;
}
@@ -755,7 +755,7 @@ export class NumberValueAccessor extends BuiltInControlValueAccessor implements
registerOnChange(fn: (_: number | null) => void): void;
writeValue(value: number): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberValueAccessor, "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<NumberValueAccessor, "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<NumberValueAccessor, never>;
}
@@ -764,7 +764,7 @@ export class NumberValueAccessor extends BuiltInControlValueAccessor implements
export class PatternValidator extends AbstractValidatorDirective {
pattern: string | RegExp;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<PatternValidator, "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", never, { "pattern": { "alias": "pattern"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<PatternValidator, "[pattern][formControlName],[pattern][formControl],[pattern][ngModel]", never, { "pattern": { "alias": "pattern"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<PatternValidator, never>;
}
@@ -786,7 +786,7 @@ export class RadioControlValueAccessor extends BuiltInControlValueAccessor imple
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RadioControlValueAccessor, "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", never, { "name": { "alias": "name"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RadioControlValueAccessor, "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", never, { "name": { "alias": "name"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RadioControlValueAccessor, never>;
}
@@ -796,7 +796,7 @@ export class RangeValueAccessor extends BuiltInControlValueAccessor implements C
registerOnChange(fn: (_: number | null) => void): void;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RangeValueAccessor, "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]", never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RangeValueAccessor, "input[type=range][formControlName],input[type=range][formControl],input[type=range][ngModel]", never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RangeValueAccessor, never>;
}
@@ -821,7 +821,7 @@ export class RequiredValidator extends AbstractValidatorDirective {
enabled(input: boolean): boolean;
required: boolean | string;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RequiredValidator, ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", never, { "required": { "alias": "required"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RequiredValidator, ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", never, { "required": { "alias": "required"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RequiredValidator, never>;
}
@@ -834,7 +834,7 @@ export class SelectControlValueAccessor extends BuiltInControlValueAccessor impl
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectControlValueAccessor, "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectControlValueAccessor, "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SelectControlValueAccessor, never>;
}
@@ -846,7 +846,7 @@ export class SelectMultipleControlValueAccessor extends BuiltInControlValueAcces
value: any;
writeValue(value: any): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectMultipleControlValueAccessor, "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectMultipleControlValueAccessor, "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", never, { "compareWith": { "alias": "compareWith"; "required": false; }; }, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<SelectMultipleControlValueAccessor, never>;
}
+3 -3
View File
@@ -818,7 +818,7 @@ class RouterLink implements OnChanges, OnDestroy {
// (undocumented)
get urlTree(): UrlTree | null;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, "[routerLink]", never, { "target": { "alias": "target"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "fragment": { "alias": "fragment"; "required": false; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; }; "state": { "alias": "state"; "required": false; }; "relativeTo": { "alias": "relativeTo"; "required": false; }; "preserveFragment": { "alias": "preserveFragment"; "required": false; }; "skipLocationChange": { "alias": "skipLocationChange"; "required": false; }; "replaceUrl": { "alias": "replaceUrl"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; }, {}, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLink, "[routerLink]", never, { "target": { "alias": "target"; "required": false; }; "queryParams": { "alias": "queryParams"; "required": false; }; "fragment": { "alias": "fragment"; "required": false; }; "queryParamsHandling": { "alias": "queryParamsHandling"; "required": false; }; "state": { "alias": "state"; "required": false; }; "relativeTo": { "alias": "relativeTo"; "required": false; }; "preserveFragment": { "alias": "preserveFragment"; "required": false; }; "skipLocationChange": { "alias": "skipLocationChange"; "required": false; }; "replaceUrl": { "alias": "replaceUrl"; "required": false; }; "routerLink": { "alias": "routerLink"; "required": false; }; }, {}, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLink, [null, null, { attribute: "tabindex"; }, null, null, null]>;
}
@@ -846,7 +846,7 @@ export class RouterLinkActive implements OnChanges, OnDestroy, AfterContentInit
exact: boolean;
} | IsActiveMatchOptions;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; }; "ariaCurrentWhenActive": { "alias": "ariaCurrentWhenActive"; "required": false; }; "routerLinkActive": { "alias": "routerLinkActive"; "required": false; }; }, { "isActiveChange": "isActiveChange"; }, ["links"], never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterLinkActive, "[routerLinkActive]", ["routerLinkActive"], { "routerLinkActiveOptions": { "alias": "routerLinkActiveOptions"; "required": false; }; "ariaCurrentWhenActive": { "alias": "ariaCurrentWhenActive"; "required": false; }; "routerLinkActive": { "alias": "routerLinkActive"; "required": false; }; }, { "isActiveChange": "isActiveChange"; }, ["links"], never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkActive, [null, null, null, null, { optional: true; }]>;
}
@@ -896,7 +896,7 @@ export class RouterOutlet implements OnDestroy, OnInit, RouterOutletContract {
// (undocumented)
readonly supportsBindingToComponentInputs = true;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], { "name": { "alias": "name"; "required": false; }; }, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never, true, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<RouterOutlet, "router-outlet", ["outlet"], { "name": { "alias": "name"; "required": false; }; }, { "activateEvents": "activate"; "deactivateEvents": "deactivate"; "attachEvents": "attach"; "detachEvents": "detach"; }, never, never, true, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<RouterOutlet, never>;
}
+1 -1
View File
@@ -63,7 +63,7 @@ export class UpgradeComponent implements OnInit, OnChanges, DoCheck, OnDestroy {
// (undocumented)
ngOnInit(): void;
// (undocumented)
static ɵdir: i0.ɵɵDirectiveDeclaration<UpgradeComponent, never, never, {}, {}, never, never, false, never, false>;
static ɵdir: i0.ɵɵDirectiveDeclaration<UpgradeComponent, never, never, {}, {}, never, never, false, never>;
// (undocumented)
static ɵfac: i0.ɵɵFactoryDeclaration<UpgradeComponent, never>;
}
+3 -3
View File
@@ -2445,9 +2445,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
File diff suppressed because it is too large Load Diff
@@ -2525,9 +2525,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
+3 -3
View File
@@ -2450,9 +2450,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
+3 -3
View File
@@ -2480,9 +2480,9 @@ camelcase@^6.0.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
+3 -3
View File
@@ -2450,9 +2450,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
@@ -6,8 +6,7 @@ import {NgModule, Component} from '@angular/core';
jit: true
})
export class LazyComponent {
constructor() {
}
}
@NgModule({
+3 -3
View File
@@ -2450,9 +2450,9 @@ camelcase@^5.0.0, camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001449, caniuse-lite@^1.0.30001464:
version "1.0.30001477"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001477.tgz#a2ffb2276258233034bbb869d4558b02658a511e"
integrity sha512-lZim4iUHhGcy5p+Ri/G7m84hJwncj+Kz7S5aD4hoQfslKZJgt0tHc/hafVbqHC5bbhHb+mrW2JOUHkI5KH7toQ==
version "1.0.30001505"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001505.tgz"
integrity sha512-jaAOR5zVtxHfL0NjZyflVTtXm3D3J9P15zSJ7HmQF8dSKGA6tqzQq+0ZI3xkjyQj46I4/M0K2GbMpcAFOcbr3A==
caseless@~0.12.0:
version "0.12.0"
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -518,7 +518,7 @@
</div>
<embed id="trusted-types-embed" src="data:text/html,&lt;body&gt;&lt;h1&gt;Hello from embed&lt;/h1&gt;&lt;/body&gt;" />
<iframe id="trusted-types-iframe" [srcdoc]="iframeHtml"></iframe>
<iframe id="trusted-types-iframe" [srcdoc]="iframeHtml" title="trusted-types"></iframe>
<object id="trusted-types-object" [data]="safeResourceUrl" codebase="/"></object>
</div>
File diff suppressed because it is too large Load Diff
@@ -1,58 +0,0 @@
load("//tools:defaults.bzl", "app_bundle", "http_server", "ts_library")
load("@npm//@angular/build-tooling/bazel/benchmark/component_benchmark:benchmark_test.bzl", "benchmark_test")
load("//modules/benchmarks:e2e_test.bzl", "e2e_test")
package(default_visibility = ["//modules/benchmarks:__subpackages__"])
ts_library(
name = "ng1",
srcs = glob(["*.ts"]),
tsconfig = "//modules/benchmarks:tsconfig-build.json",
deps = [
"//modules/benchmarks/src:util_lib",
"//modules/benchmarks/src/tree:util_lib",
],
)
app_bundle(
name = "bundle",
entry_point = ":index.ts",
deps = [":ng1"],
)
# The script needs to be called `app_bundle` for easier syncing into g3.
genrule(
name = "app_bundle",
srcs = [":bundle.debug.min.js"],
outs = ["app_bundle.js"],
cmd = "cp $< $@",
)
http_server(
name = "devserver",
srcs = [
"index.html",
"@npm//:node_modules/angular-1.8/angular.js",
],
deps = [
":app_bundle",
],
)
benchmark_test(
name = "perf",
server = ":devserver",
deps = [
"//modules/benchmarks/src/tree:detect_changes_perf_tests_lib",
"//modules/benchmarks/src/tree:perf_tests_lib",
],
)
e2e_test(
name = "e2e",
server = ":devserver",
deps = [
"//modules/benchmarks/src/tree:detect_changes_e2e_tests_lib",
"//modules/benchmarks/src/tree:e2e_tests_lib",
],
)
@@ -1,38 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<!-- Prevent the browser from requesting any favicon. -->
<link rel="icon" href="data:," />
</head>
<body>
<h2>Params</h2>
<form>
Depth:
<input type="number" name="depth" placeholder="depth" value="10" />
<br />
<button>Apply</button>
</form>
<h2>Ng1 Tree Benchmark</h2>
<p>
<button id="destroyDom">destroyDom</button>
<button id="createDom">createDom</button>
<button id="detectChanges">detectChanges</button>
<button id="updateDomProfile">profile updateDom</button>
<button id="createDomProfile">profile createDom</button>
<button id="detectChangesProfile">profile detectChanges</button>
</p>
<div>Change detection runs:<span id="numberOfChecks"></span></div>
<div>
<tree id="root" data="initData">Loading...</tree>
</div>
<!-- BEGIN-EXTERNAL -->
<script src="/npm/node_modules/angular-1.8/angular.js"></script>
<!-- END-EXTERNAL -->
<!-- Needs to be named `app_bundle` for sync into Google. -->
<script src="/app_bundle.js"></script>
</body>
</html>
-59
View File
@@ -1,59 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {bindAction, profile} from '../../util';
import {buildTree, emptyTree, initTreeUtils} from '../util';
import {addTreeToModule} from './tree';
declare var angular: any;
function init() {
let detectChangesRuns = 0;
const numberOfChecksEl = document.getElementById('numberOfChecks')!;
addTreeToModule(angular.module('app', [])).run([
'$rootScope',
($rootScope: any) => {
function detectChanges() {
for (let i = 0; i < 10; i++) {
$rootScope.$digest();
}
detectChangesRuns += 10;
numberOfChecksEl.textContent = `${detectChangesRuns}`;
}
function noop() {}
function destroyDom() {
$rootScope.$apply(() => {
$rootScope.initData = emptyTree;
});
}
function createDom() {
$rootScope.$apply(() => {
$rootScope.initData = buildTree();
});
}
initTreeUtils();
bindAction('#destroyDom', destroyDom);
bindAction('#createDom', createDom);
bindAction('#detectChanges', detectChanges);
bindAction('#detectChangesProfile', profile(detectChanges, noop, 'detectChanges'));
bindAction('#updateDomProfile', profile(createDom, noop, 'update'));
bindAction('#createDomProfile', profile(createDom, destroyDom, 'create'));
}
]);
angular.bootstrap(document.querySelector('tree'), ['app']);
}
init();
-73
View File
@@ -1,73 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {TreeNode} from '../util';
declare var angular: any;
export function addTreeToModule(mod: any): any {
return mod
.directive(
'tree',
function() {
return {
scope: {data: '='},
template:
`<span ng-style="{'background-color': data.depth % 2 ? '' : 'grey'}"> {{data.value}} </span><tree-if data='data.right'></tree-if><tree-if data='data.left'></tree-if>`
};
})
// special directive for "if" as angular 1.3 does not support
// recursive components.
// Cloned from real ngIf directive, but using a lazily created transclude function.
.directive(
'treeIf',
[
'$compile', '$animate',
function($compile: any, $animate: any) {
let transcludeFn: any;
return {
transclude: 'element',
priority: 600,
terminal: true,
$$tlb: true,
link: function($scope: any, $element: any, $attr: any, ctrl: any) {
if (!transcludeFn) {
const template = '<tree data="' + $attr.data + '"></tree>';
transcludeFn = $compile(template);
}
let childElement: any, childScope: any;
$scope.$watch($attr.data, function ngIfWatchAction(value: any) {
if (value) {
if (!childScope) {
childScope = $scope.$new();
transcludeFn(childScope, function(clone: any) {
childElement = clone;
$animate.enter(clone, $element.parent(), $element);
});
}
} else {
if (childScope) {
childScope.$destroy();
childScope = null;
}
if (childElement) {
$animate.leave(childElement);
childElement = null;
}
}
});
}
};
}
])
.config([
'$compileProvider',
function($compileProvider: any) {
$compileProvider.debugInfoEnabled(false);
}
]);
}
+12 -11
View File
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "16.1.0-next.3",
"version": "16.1.2",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
@@ -27,7 +27,7 @@
"ng-dev": "ts-node --esm --project .ng-dev/tsconfig.json --transpile-only node_modules/@angular/ng-dev/bundles/cli.mjs",
"build": "ts-node --esm --project scripts/tsconfig.json scripts/build/build-packages-dist.mts",
"test": "bazelisk test",
"test:ci": "bazelisk test -- //... -//devtools/... -//aio/...",
"test:ci": "bazelisk test -- //... -//devtools/... -//aio/... && bazelisk test --//packages/compiler:use_template_pipeline //packages/compiler-cli/test/compliance/full",
"test-tsec": "bazelisk test //... --build_tag_filters=tsec --test_tag_filters=tsec",
"lint": "yarn -s tslint && yarn -s ng-dev format changed --check",
"tslint": "tslint -c tslint.json --project tsconfig-tslint.json",
@@ -45,11 +45,11 @@
},
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
"@angular-devkit/build-angular": "16.0.0-rc.4",
"@angular-devkit/core": "16.0.0-rc.4",
"@angular-devkit/schematics": "16.0.0-rc.4",
"@angular-devkit/build-angular": "16.1.0",
"@angular-devkit/core": "16.1.0",
"@angular-devkit/schematics": "16.1.0",
"@angular/cdk": "16.0.0-rc.2",
"@angular/cli": "16.0.0-rc.4",
"@angular/cli": "16.1.0",
"@angular/material": "16.0.0-rc.2",
"@babel/cli": "7.21.5",
"@babel/core": "7.21.8",
@@ -72,7 +72,7 @@
"@rollup/plugin-babel": "^6.0.0",
"@rollup/plugin-commonjs": "^25.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@schematics/angular": "16.0.0-rc.4",
"@schematics/angular": "16.1.0",
"@types/angular": "^1.6.47",
"@types/babel__core": "7.20.0",
"@types/babel__generator": "7.6.4",
@@ -136,7 +136,7 @@
"rollup-plugin-sourcemaps": "^0.6.3",
"rxjs": "^6.6.7",
"selenium-webdriver": "3.5.0",
"selenium-webdriver4": "npm:selenium-webdriver@4.9.2",
"selenium-webdriver4": "npm:selenium-webdriver@4.10.0",
"semver-dsl": "^1.0.1",
"shelljs": "^0.8.5",
"source-map": "0.7.4",
@@ -155,8 +155,8 @@
},
"// 2": "devDependencies are not used under Bazel. Many can be removed after test.sh is deleted.",
"devDependencies": {
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#7dad055464ea9847e4870b9e3baad1f0c417bdf7",
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#231bc6ee07c0f799d28f201a4e6d68ae31d88cfa",
"@angular/build-tooling": "https://github.com/angular/dev-infra-private-build-tooling-builds.git#cf8e57fef4c3cc567b2877dff99db8e828cb70ae",
"@angular/ng-dev": "https://github.com/angular/dev-infra-private-ng-dev-builds.git#e629d2c561fd3f961dde0c2895a562545b58b151",
"@babel/helper-remap-async-to-generator": "^7.18.9",
"@bazel/bazelisk": "^1.7.5",
"@bazel/buildifier": "^6.0.0",
@@ -166,10 +166,11 @@
"@types/cli-progress": "^3.4.2",
"@yarnpkg/lockfile": "^1.1.0",
"check-side-effects": "0.0.23",
"cldr": "7.4.0",
"cldr": "7.4.1",
"cldrjs": "0.5.5",
"conventional-changelog": "^3.1.24",
"firebase-tools": "^12.0.0",
"fast-glob": "3.2.12",
"glob": "8.1.0",
"gulp": "^4.0.2",
"gulp-conventional-changelog": "^3.0.0",
+1 -1
View File
@@ -59,7 +59,7 @@ export abstract class AnimationBuilder {
* Builds a factory for producing a defined animation.
* @param animation A reusable animation definition.
* @returns A factory object that can create a player for the defined animation.
* @see `animate()`
* @see {@link animate}
*/
abstract build(animation: AnimationMetadata|AnimationMetadata[]): AnimationFactory;
}
@@ -20,7 +20,7 @@ export type ɵStyleDataMap = Map<string, string|number>;
/**
* Represents animation-step timing parameters for an animation step.
* @see `animate()`
* @see {@link animate}
*
* @publicApi
*/
@@ -84,7 +84,7 @@ export declare interface AnimationOptions {
/**
* Adds duration options to control animation styling and timing for a child animation.
*
* @see `animateChild()`
* @see {@link animateChild}
*
* @publicApi
*/
@@ -6,15 +6,14 @@
* found in the LICENSE file at https://angular.io/license
*/
import {scheduleMicroTask} from '../util';
import {AnimationPlayer} from './animation_player';
/**
* A programmatic controller for a group of reusable animations.
* Used internally to control animations.
*
* @see `AnimationPlayer`
* @see `{@link animations/group group()}`
* @see {@link AnimationPlayer}
* @see {@link animations/group group}
*
*/
export class AnimationGroupPlayer implements AnimationPlayer {
@@ -37,7 +36,7 @@ export class AnimationGroupPlayer implements AnimationPlayer {
const total = this.players.length;
if (total == 0) {
scheduleMicroTask(() => this._onFinish());
queueMicrotask(() => this._onFinish());
} else {
this.players.forEach(player => {
player.onDone(() => {
@@ -5,7 +5,6 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {scheduleMicroTask} from '../util';
/**
* Provides programmatic control of a reusable animation sequence,
@@ -14,9 +13,9 @@ import {scheduleMicroTask} from '../util';
* <code>[create](api/animations/AnimationFactory#create)()</code> method instantiates and
* initializes this interface.
*
* @see `AnimationBuilder`
* @see `AnimationFactory`
* @see `animate()`
* @see {@link AnimationBuilder}
* @see {@link AnimationFactory}
* @see {@link animate}
*
* @publicApi
*/
@@ -24,20 +23,20 @@ export interface AnimationPlayer {
/**
* Provides a callback to invoke when the animation finishes.
* @param fn The callback function.
* @see `finish()`
* @see {@link #finish}
*/
onDone(fn: () => void): void;
/**
* Provides a callback to invoke when the animation starts.
* @param fn The callback function.
* @see `run()`
* @see {@link #play}
*/
onStart(fn: () => void): void;
/**
* Provides a callback to invoke after the animation is destroyed.
* @param fn The callback function.
* @see `destroy()`
* @see `beforeDestroy()`
* @see {@link #destroy}
* @see {@link #beforeDestroy}
*/
onDestroy(fn: () => void): void;
/**
@@ -113,9 +112,9 @@ export interface AnimationPlayer {
* Used internally when animations are disabled, to avoid
* checking for the null case when an animation player is expected.
*
* @see `animate()`
* @see `AnimationPlayer`
* @see `GroupPlayer`
* @see {@link animate}
* @see {@link AnimationPlayer}
* @see {@link ɵAnimationGroupPlayer AnimationGroupPlayer}
*
* @publicApi
*/
@@ -166,7 +165,7 @@ export class NoopAnimationPlayer implements AnimationPlayer {
/** @internal */
triggerMicrotask() {
scheduleMicroTask(() => this._onFinish());
queueMicrotask(() => this._onFinish());
}
private _onStart() {
-10
View File
@@ -1,10 +0,0 @@
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
export function scheduleMicroTask(cb: () => any) {
Promise.resolve().then(cb);
}
@@ -6,9 +6,9 @@
* found in the LICENSE file at https://angular.io/license
*/
import {fakeAsync} from '@angular/core/testing';
import {flushMicrotasks} from '../../core/testing/src/fake_async';
import {NoopAnimationPlayer} from '../src/players/animation_player';
import {scheduleMicroTask} from '../src/util';
{
describe('NoopAnimationPlayer', function() {
@@ -70,7 +70,7 @@ import {scheduleMicroTask} from '../src/util';
const player = new NoopAnimationPlayer();
player.onStart(() => {
scheduleMicroTask(() => log.push('started'));
queueMicrotask(() => log.push('started'));
});
player.onDone(() => log.push('done'));
expect(log).toEqual([]);
+2 -3
View File
@@ -5,16 +5,15 @@
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {scheduleMicroTask} from '../src/util';
{
describe('util', () => {
it('should schedule a microtask and not call an async timeout', (done) => {
let count = 0;
scheduleMicroTask(() => count++);
queueMicrotask(() => count++);
expect(count).toEqual(0);
Promise.resolve().then(() => {
queueMicrotask(() => {
expect(count).toEqual(1);
done();
});
+5 -5
View File
@@ -65,7 +65,7 @@ export class FetchBackend implements HttpBackend {
let response;
try {
const fetchPromise = this.fetchImpl(request.url, {signal, ...init});
const fetchPromise = this.fetchImpl(request.urlWithParams, {signal, ...init});
// Make sure Zone.js doesn't trigger false-positive unhandled promise
// error in case the Promise is rejected synchronously. See function
@@ -81,7 +81,7 @@ export class FetchBackend implements HttpBackend {
error,
status: error.status ?? 0,
statusText: error.statusText,
url: request.url,
url: request.urlWithParams,
headers: error.headers,
}));
return;
@@ -89,7 +89,7 @@ export class FetchBackend implements HttpBackend {
const headers = new HttpHeaders(response.headers);
const statusText = response.statusText;
const url = getResponseUrl(response) ?? request.url;
const url = getResponseUrl(response) ?? request.urlWithParams;
let status = response.status;
let body: string|ArrayBuffer|Blob|object|null = null;
@@ -143,7 +143,7 @@ export class FetchBackend implements HttpBackend {
headers: new HttpHeaders(response.headers),
status: response.status,
statusText: response.statusText,
url: getResponseUrl(response) ?? request.url,
url: getResponseUrl(response) ?? request.urlWithParams,
}));
return;
}
@@ -221,7 +221,7 @@ export class FetchBackend implements HttpBackend {
}
return {
body: req.body,
body: req.serializeBody(),
method: req.method,
headers,
credentials,

Some files were not shown because too many files have changed in this diff Show More