Commit graph

2355 commits

Author SHA1 Message Date
Alex Rickabaugh
7bb3ffb77f fix(core): add rejectErrors option to toSignal (#52474)
By default, `toSignal` transforms an `Observable` into a `Signal`, including
the error channel of the Observable. When an error is received, the signal
begins throwing the error.

`toSignal` is intended to serve the same purpose as the `async` pipe, but
the async pipe has a different behavior with errors: it rejects them
outright, throwing them back into RxJS. Rx then propagates the error into
the browser's uncaught error handling logic. In the case of Angular, the
error is then caught by zone.js and reported via the application's
`ErrorHandler`.

This commit introduces a new option for `toSignal` called `rejectErrors`.
With that flag set, `toSignal` copies the async pipe's behavior, allowing
for easier migrations.

Fixes #51949

PR Close #52474
2023-10-31 14:59:26 -07:00
Jessica Janiuk
4c99eb31aa docs: update defer guide to use Deferrable View language (#52457)
This updates the defer guide to use the recommended language of
Deferrable Views.

PR Close #52457
2023-10-31 14:55:48 -07:00
Swami
6c274ec2ed docs(core): remove documentation of mutate function (#52435)
PR Close #52435
2023-10-31 13:42:14 -07:00
Jeremy Elbourn
5d73f9c9e8 docs: minor revisions to control flow guide (#52411)
This commit makes some minor writing changes to the control flow guide for brevity, consistency, and active voice.

PR Close #52411
2023-10-31 13:20:35 -07:00
Charles Lyding
b2d1e5cef4 docs: update esbuild guide for v17 (#52407)
Update new build system guide to reflect stable status and the use of the `application` builder in existing projects.

PR Close #52407
2023-10-31 13:10:43 -07:00
Francesco Donzello
df1b44e1ef docs: added missing imports for toSignal and toObservable (#52393)
PR Close #52393
2023-10-31 13:07:31 -07:00
Andrew Kushnir
07623caefe docs: update SSR docs (#52408)
This commit updates the `ssr.md` file to restructure (and simplify) SSR docs.

PR Close #52408
2023-10-27 15:16:14 -07:00
Jessica Janiuk
edea54714d docs: Add defer guide (#52380)
This adds a user guide for how to use defer.

PR Close #52380
2023-10-27 12:50:24 -07:00
Evan Kleiner
e06b73f742 docs: add warning for localhost proxy (#51948)
PR Close #51948
2023-10-27 12:32:19 -07:00
Alan Agius
cb8a741f14 docs: update SSR doc to reflect version 17 (#52398)
Changes to SSR doc

PR Close #52398
2023-10-26 12:30:59 -07:00
Pawel Kozlowski
3433728a82 docs: guide for the built-in control flow (#52369)
This change adds a dedicated developer guide for the
built-in control flow.

PR Close #52369
2023-10-26 09:38:56 -07:00
Andrea Canciani
fc9ba3978c refactor: fix a number of typos throughout the codebase (#52249)
Fix some typos such as `boostrap`, `propery` and more, both in
documentation and in code (comments, identifiers).

PR Close #52249
2023-10-25 16:51:24 -07:00
Susheel Thapa
31c7bc1cf4 docs: fixed typos (#52297)
PR Close #52297
2023-10-25 16:39:04 -07:00
Alan Agius
3598d212a6 docs: update to standalone and routing by default (#52293)
This commit covers several changes:
 - routing enabled by default
 - standalone by default

PR Close #52293
2023-10-25 16:37:52 -07:00
Pawel Kozlowski
30ae5bebf9 docs: remove the dev preview warning from the signals guide (#52375)
Signals are out of dev preview now.

PR Close #52375
2023-10-25 16:37:22 -07:00
mgechev
dea16201da docs: update the roadmap to reflect the progress as of v17 (#52356)
PR Close #52356
2023-10-25 09:31:46 -07:00
Alex Castle
e33a0ff3dd docs(common): add preconnect generation to NgOptimizedImage docs (#52248)
add a note on automated preconnect generation to the NgOptimizedImage docs' preconnect section, and add a related FAQ entry.

PR Close #52248
2023-10-24 09:26:06 -07:00
Doug Parker
d74dc9676e docs: fix typo (#52339)
PR Close #52339
2023-10-24 09:21:15 -07:00
Alan Agius
a20febebb1 docs: update app-shell docs to reflect v17 (#52294)
Update app-shell docs to reflect v17 changes

PR Close #52294
2023-10-23 12:03:15 -07:00
Alan Agius
e2d3119943 docs: update prerendering guide (#52300)
This commits update the prerendering docs with the version 17 changes.

PR Close #52300
2023-10-23 09:28:42 -07:00
Quentin
5bc0335358 docs: fix typo (#52233)
Fix word: standalone

PR Close #52233
2023-10-18 11:51:49 -07:00
Jeevan Mahesha
9b12c2ff82 docs: updated the export default router to satisfies instead of typecast (#52269)
PR Close #52269
2023-10-18 11:51:19 -07:00
Andrew Kushnir
39b149cefe docs: remove developer preview note from hydration feature in docs (#52197)
PR Close #52197
2023-10-18 18:21:48 +02:00
Quentin
4643b05b84 docs: fix typo (#52232)
Fix word: privileges

PR Close #52232
2023-10-17 18:10:05 +02:00
Quentin
b08abc4f9b docs: fix typo (#52219)
Fix word: incompatibilities

PR Close #52219
2023-10-16 18:30:43 +02:00
Andrew Miller
07b769e43b docs(language-service): add neovim setup to angular language service docs (#52212)
PR Close #52212
2023-10-16 18:19:10 +02:00
Matthieu Riegler
a0dc12bfe8 refactor(core): deprecate the NgProbeToken (#51396)
DEPRECATED: NgProbeToken

The `NgProbeToken` is not used internally since the transition from View Engine to Ivy. The token has no utility and can be removed from applications and libraries.

PR Close #51396
2023-10-13 12:19:05 +02:00
Ward Bell
f2513c540a docs: Phase 2 Sample Code Conversions to Standalone (#51918)
Phase 2 sample code conversions per instructions in doc: https://docs.google.com/document/d/1QqnVK8Mc0O1gU9ctPrs-JJ42V9_dHCuEttD_01pXh34/edit

**Included**

1. ajs-quick-reference

Minor changes to remove references to NgModule. Converted sample to standalone.

2. architecture

Migrated the code sample. Made minor changes to remove references to NgModule. I explicitly deprecated the `architecture-module.md` page and removed it from the navigation.

4. deprecations / deprecations-guide

Migrated the code sample which required pulling NgModule and Reactive Forms material into a new `deprecated` folder. Made minor changes to clarify when advice was specific to NgModule (see `loadChildren` in particular).

5. displaying-data

Deleted this `displaying-data` sample entirely as there is no need for a sample app just to display a single, vanilla data binding in the deprecated `zone.md` page. Replaced reference in `zone.md` with an inline code snippet.

10. ngcontainer

Converted the code sample. There is no guide page for this sample. It can be displayed in Stackblitz

**Excluded**

3. cli-builder

Code sample is not an app; nothing to convert.

6-9 - related to getting-started and setup.

Waiting until Angular team is ready to proceed.

11. providers

This is in its own commit and PR 51918 because it may not make sense to convert. See that PR for details.

12. routing-with-urlmatcher

No work needed. Already Standalone.

13 schematics-for-libraries

Non-trivial (see doc notes) and Angular may decide to leave as is. Should have own PR.

14 setup

Non-trivial (see doc notes) and Angular may decide to leave as is. Should have own PR.

PR Close #51918
2023-10-13 11:20:08 +02:00
Matthieu Riegler
a645ceca94 refactor(service-worker): Remove deprecated activated & available observables. (#49498)
`activated`and `available` were deprecated by #43535 in v13.

PR Close #49498
2023-10-10 11:54:07 -07:00
Matthieu Riegler
40113f653c feat(core): Remove deprecated CompilerOptions.useJit andCompilerOptions.missingTranslation. (#49672)
Both properties have been deprecated in v13 and are unused in v16.

PR Close #49672
2023-10-10 09:35:55 -07:00
Alex Castle
dde3fdabbd feat(common): upgrade warning to logged error for lazy-loaded LCP images using NgOptimizedImage (#52004)
Upgrade the existing warning so it now logs an error instead, when an LCP element is determined to not be usings the `priority` attribute. Error is logged, not thrown.

PR Close #52004
2023-10-04 11:36:01 -07:00
Jonathan Sharpe
c4d77fde12 docs: fix link to refer to RxJS pipes (#51851)
PR Close #51851
2023-09-29 15:24:31 -07:00
Jeevan Mahesha
9b40b64b68 docs: updated the server configuration for apache2 (#51921)
PR Close #51921
2023-09-27 09:22:12 -07:00
Matthieu Riegler
0598613950 refactor(animations): deprecation of AnimationDriver.NOOP (#51843)
The `NoopAnimationDriver` as static property of `AnimationDriver` prevents it from being removed by tree shaking. This commit deprecates it and exposes the `NoopAnimationDriver` on the public API to replace its usage.

DEPRECATED:
The `AnimationDriver.NOOP` symbol is deprecated, use `NoopAnimationDriver` instead.

PR Close #51843
2023-09-22 12:15:45 -07:00
Andrew Scott
3c6258c85b fix(router): Remove deprecated setupTestingRouter function (#51826)
The `setupTestingRouter` function is a factory function for creating a
new instance of the `Router`. This function is effectively a no-op.
Developers should use `RouterModule.forRoot` or `provideRouter` in tests
instead.

BREAKING CHANGE: The `setupTestingRouter` function has been removed. Use
`RouterModule.forRoot` or `provideRouter` to setup the `Router` for
tests instead.

PR Close #51826
2023-09-22 09:47:44 -07:00
David LJ
1e6c05512b docs: remove ref to no longer existing test.ts (#51462)
The file was removed in Angular 15.0.0 https://github.com/angular/angular-cli/releases/tag/15.0.0
56a1e8f9f5

Thanks to @atscott and @JeanMeche for the wording suggestion

PR Close #51462
2023-09-19 18:37:37 +02:00
Ward Bell
9f3b549cf6 docs: Migrate Service Worker to Standalone (#51687)
Although there are several pages, only `service-worker-getting-started.md` has an example.
That example code was migrated.

Worked around the few references to NgModule.

Other changes as follows:

**Revised "Getting Started"**

The original service worker example page (`service-worker-getting-started.md`) is full of holes! I don’t know how anyone got this working just by following this page

- it doesn’t tell you where to get the example (and it isn’t generated by AIO)
- it doesn’t tell you that ng serve doesn’t support service worker apps
- it mentions http-server in passing but not what that is or where to get it.
- several commands tell you to supply the “project-name” but (a) it doesn’t tell you how to find that name and (b) you never actually have to provide a name at all. That includes on the command that gets http-server going.

**Hid section on `ngsw-config` tool**

Hid the discussion of the `ngsw-config` tool in `service-worker-config.md` because
(a) the command invoke it didn't seem to work and (b) it referenced `<project-name>`
without explaining what that is or where to find it.

Left the hidden text in the page in case someone wants to do something about this.

Meanwhile, you seem to be able to edit the `ngsw-config.json` and then rebuild.
That should suffice.

**Disabled E2E**

The AIO CI will no longer attempt to run the (thin) E2E tests.

These tests could lightly test the app with the dev server but couldn't test the Service Worker aspects; that would require launching the app with something other than `ng serve` and the AIO CI is not set up for that.

The existing tests appeared to pass when run locally with the dev server.
However, only one of them actually ran; test runner reported.
"There were tests whose specified size is too big."

Decided to bypass E2E testing of this project for now.

PR Close #51687
2023-09-19 12:01:16 +02:00
Andrew Scott
0b3e6a41d0 fix(router): Remove malformedUriErrorHandler from ExtraOptions (#51745)
The `malformedUriErrorHandler` is used as a recovery mechanism for when the `UrlSerializer`
throws an error when parsing a URL string. If custom error handling is
desired for this, it should instead be done inside the
`UrlSerializer.parse` method itself. There's no reason to have an entire
feature option built around what can otherwise just be `try...catch`.

BREAKING CHANGE: `malformedUriErrorHandler` is no longer available in
the `RouterModule.forRoot` options. URL parsing errors should instead be
handled in the `UrlSerializer.parse` method.

PR Close #51745
2023-09-18 20:42:44 +02:00
Pawel Kozlowski
8486fa1594 Revert "feat(common): make the warning for lazy-loaded lcp image an error (#51748)" (#51810)
This reverts commit fe2fd7e1a8.

PR Close #51810
2023-09-18 13:35:55 +02:00
Alex Castle
fe2fd7e1a8 feat(common): make the warning for lazy-loaded lcp image an error (#51748)
upgrade the warning for lazy-loaded lcp images when using NgOptimizedImage to an error

BREAKING CHANGE:

Previously when NgOptimizedImage directive detected that an LCP image is lazy-loaded, a console warning was produced. Now the directive throws an error to make it more discoverable in a console. If you receive this error, refer to this guide for additional information: https://angular.io/guide/image-directive#step-4-mark-images-as-priority

PR Close #51748
2023-09-18 10:42:15 +02:00
Gerald Monaco
545db6d22d refactor(core): support phases in afterRender and afterNextRender (#51559)
Support for scheduling after*Render callbacks into various phases to minimize reflows

PR Close #51559
2023-09-18 10:40:18 +02:00
Mark Thompson
63b8108f66 docs: add revamped guide for dependency injection focused on standalone (#51572)
* Updates two of the md files to prioritize standalone components/architecture
* Updates three examples referenced in the guides
* Updates the svg diagram to reference the EnvironmentInjector instead of the ModuleInjector

PR Close #51572
2023-09-14 11:23:48 +02:00
Ben Hong
cbeef95c29 docs: migrate form-validation to standalone (#51709)
PR Close #51709
2023-09-12 12:24:03 -07:00
Ben Hong
65f7686769 docs: migrate reactive-forms to standalone (#51707)
PR Close #51707
2023-09-12 12:23:19 -07:00
Ben Hong
4e0a575262 docs: migrate forms-overview to standalone (#51699)
PR Close #51699
2023-09-12 12:22:46 -07:00
Ben Hong
7b0bfc1dd8 docs: migrate testing to standalone (#51684)
PR Close #51684
2023-09-12 12:22:14 -07:00
Ward Bell
b08323747e docs: Migrate 2nd set of template guide pages and code to Standalone (#51632)
Supplements PR 51364 Template Migration with overlooked pages and examples

Code migrated: `inputs-outputs`, `interpolation`, `property-binding`
Guide pages affected:
* `binding-overview.md`
* `event-binding.md` (already migrated; updated with link to explain passive events)
* `inputs-outputs.md`
* `interpolation.md`
* `property-binding-best-practices.md`
* `property-binding.md`
* `understanding-template-expr-overview.md` (archived)

E2E tests passed locally.

PR Close #51632
2023-09-12 12:21:32 -07:00
Ward Bell
f6ccb163aa docs: Migrate i18n guide pages and code to Standalone (#51589)
E2E tests passed locally

**Added `readme.md` to the example code**

This explains how to build and run the example for both English and French.

**Archived `i18n-optional-manual-runtime-locale.md`**

I was asked to cut out a substantial swath of this page by reviewer "zip-fa". All that remained was a brief paragraph.  I removed the page from the navigation after copying the remaining text to `i18n-optional-import-global-variants.md`. The page is still reachable by 3rd party links.

PR Close #51589
2023-09-12 12:20:45 -07:00
Ward Bell
44c7469495 docs: Migrate Universal guide and code to Standalone (#51564)
Heavily reworked with advice from Alan Agius.

FWIW
* `ng test` fails because there are no unit tests
* `yarn e2e` builds but fails - `Unable to start a WebDriver session.`

**Added `readme.md` to sample code**

Makes it easier for the casual downloader to try the example.

**Added `universal-ngmodule`**

The existing ngModule-based doc has a lot of guidance for developers who are still building with NgModule. Given that we are preserving the existing NgModule guidance (with modifications), it seems prudent to preserve the NgModule form of the Universal guidance. So I copied the existing guide and code to `universal-ngmodule` and added it to the left-side navigation under the "NgModules" sub-tree.

Warning: it retains all of the faults of the original guide ... faults that were addressed in the current revision.

PR Close #51564
2023-09-12 12:20:10 -07:00
Andrew Scott
2d5b6fad4e fix(docs-infra): Ensure experimental tag shows up on docs (#51712)
The experimental tag is part of the stability tags along with "deprecated". This commit updates some code to pick up experimental as well.

PR Close #51712
2023-09-11 09:20:52 -07:00