Commit Graph

4024 Commits

Author SHA1 Message Date
Lars Gyrup Brink Nielsen 314be83a30 docs: correct pre-v9 TypeScript version ranges in version compatibiliy table (#51645)
For versions 5.x through 8.x, this is based on the `package.json` file of `@angular/compiler-cli`.

For versions 2.x through 4.x, this is based on Angular's changelog.

PR Close #51645
2023-09-07 12:56:16 -07:00
Lars Gyrup Brink Nielsen 1dda2a244e docs: normalize Angular version ranges in pre-v9 version compatibility table (#51645)
PR Close #51645
2023-09-07 12:56:16 -07:00
Lars Gyrup Brink Nielsen 6d86ac8663 docs: format version compatibility tables (#51645)
PR Close #51645
2023-09-07 12:56:16 -07:00
Mark Thompson 429b76eacf docs: convert dependency-injection-in-action (#51602)
* removes unused modules
* converts all components to standalone

PR Close #51602
2023-09-07 12:55:08 -07:00
Ben Hong d14560fa06 docs: migrate dynamic-form guide and code to standalone (#51540)
PR Close #51540
2023-09-07 10:07:03 -07:00
Ben Hong 763314f300 docs: migrate errors code example and guide to standalone (#51536)
PR Close #51536
2023-09-07 10:04:39 -07:00
Matthieu Riegler 3e0e6ed60f docs: update Dynamic Component loader docs to rely on ngComponentOutlet (#49915)
With #51148, the `ngComponentOutlet` directive now supports inputs.
This allows a less verbose and simpler API to instantiate components dynamicaly.

Fixes #49875

PR Close #49915
2023-09-07 10:03:22 -07:00
Ben Hong 3f2d783f65 docs: migrate toh-pt3 to standalone (#51581)
PR Close #51581
2023-09-07 10:02:40 -07:00
Ben Hong 52ff8a56d9 docs: migrate toh-pt2 to standalone (#51580)
PR Close #51580
2023-09-06 17:10:16 +00:00
Matthieu Riegler 8ad21ccfb8 docs: Add info about hydration caching. (#51648)
The docs was missing an important information about caching. Only GET/HEAD requests are cached until `isStable`

PR Close #51648
2023-09-06 15:31:36 +00:00
SrinathSree b6844a9056 docs: Added missing explanation of implements OnInit (#51634)
PR Close #51634
2023-09-05 20:08:56 +00:00
Angular Robot ca1dac2ada docs: update Angular CLI help [main] (#51661)
Updated Angular CLI help contents.

PR Close #51661
2023-09-05 20:07:50 +00:00
Andrew Scott b2aff43621 fix(router): Remove urlHandlingStrategy from public Router properties (#51631)
This commit removes the `urlHandlingStrategy` from the public Router's API

BREAKING CHANGE:
`urlHandlingStrategy` has been removed from the Router public API.
This should instead be configured through the provideRouter or RouterModule.forRoot APIs.

PR Close #51631
2023-09-05 17:09:13 +00:00
Matthieu Riegler 3c0c53d4df docs: remove mention of the string based lazy loading (#51651)
String based lazy loading has been deprecated in v8 and remove in v13. We can safely remove it from the docs.

PR Close #51651
2023-09-05 16:53:29 +00:00
Connie Leung 80de2500b2 docs: add Connie Leung to GDE contributors list (#51476)
PR Close #51476
2023-09-05 14:16:35 +00:00
eddiebee b37ba05804 docs: update the sentence to express its meaning (#51622)
PR Close #51622
2023-09-01 17:09:28 +00:00
Ben Hong 3658e25f2e docs: migrate toh-pt0 to standalone (#51575)
PR Close #51575
2023-08-31 21:43:19 +00:00
Shuaib hasan akib 3c28506f8e docs(docs-infra): for accessibility and responsive, iframe should be in video container, contain some space horizontally, and title (#51475)
PR Close #51475
2023-08-31 19:22:10 +00:00
Matthieu Riegler 525acbb165 docs: remove NG6999 error page. (#51588)
`NGMODULE_VE_DEPENDENCY_ON_IVY_LIB` was a ViewEngine related error. This commit removes the doc page but keeps a redirection for older versions still throwing this error.

PR Close #51588
2023-08-31 17:30:57 +00:00
Ward Bell acd59ad037 docs: Migrate Observables guides & code examples to standalone (#51516)
None of the guide pages mentions ngModules. Only `observables-in-angular` needed conversion to Standalone.

However, some of the guide pages reflect old versions of RxJS, including signatures that are no longer valid. These have been corrected.

More significantly, *the existing guide is pretty bad at explaining RxJS and its usage*. It was written (by me I think) in the very early days of Angular and Angular RxJS instruction. I've taught numerous "RxJS in Angular" classes since and learned from that experience what does and does not work with students.

There was neither the time nor the charter to completely overhaul this guide. But this commit attempts to remove what flops with students and to bring the teaching closer to what seems more effectively. I hope reviewers agree that my revisions are an improvement.

**Revised Overview**

The overview doc, `observables.md`, had a few errors (ex: `next` is NOT REQUIRED) and deprecated patterns (you now must pass the Observer object to `subscribe`).

More importantly, it was wildly overcomplicated and scary, especially when it got into multi-casting.

Moved the multi-casting section to  "RxJS Library" and rewrote it (with working example) for simplicity and context.

I made other changes in an effort to make this an overview that is  more comprehensive and more clear. I paid particular attention to the "Basic usage and terms" section.

Finally, I relocated the "Naming conventions for observables" section here from `rx-library`. This is the section that describes the dollar-sign convention. It made more sense for it to be here.

**Revised "RxJS Library" page and code**

*RxJS no longer supports chaining* and hasn't for a very long time. Removed note in `rx-library.md` that suggested you could use operator chaining.

The RxJS `pipe` discussion in the "Operators" section was just weird. Almost no one calls the `pipe` function. We certainly should *start* there. We should start with how people actually use operators - by adding them to the argument list of the `Observable.pipe()` method.

I kept the original `pipe` function example but subordinated it in a "callout". Most readers will (and should) ignore it.

`Subject` is a *critically important RxJS mechanism for creating custom observables*. It was completely missing from the list of observable creators on this guide page. So I added it to the "Observable creation functions" section of the guide and wrote an accompanying `MessageService` code sample (see the new `rx-library/app/` folder).

The `MessageService` is a pretty common pattern in Angular apps - far more common than creating an observable from a counter or an event, two of the creation patterns currently on this page.

This new section also afforded an opportunity to show how RxJS helps with building loosely coupled applications. We will soon be talking about Signals. Many will wonder whether and when they should still use RxJS.

At least a partial answer is that RxJS is really good at progressively combining and enhancing streams of data as they cross component boundaries. Of course you can pass signals around; but they are not as rich in transformers as RxJS. This is where RxJS shines.

**Revised "Comparing observables"**

The Promises section in `comparing-observables.md` had many errors and misleading remarks.

The comparison of error handling was especially egregious; the code example for that was nonsense.

The "Chain" sub-section was really about transforming values. It also failed to demonstrate chaining promise `.then`s.

Reworked these sub-sections and improved the code samples to match.

PR Close #51516
2023-08-31 17:00:46 +00:00
Andrew Scott 92f478ea7d docs: update router reference to use standalone (#51560)
this commit updates the router reference to use standalone features.

PR Close #51560
2023-08-31 16:59:15 +00:00
Ben Hong e4d2018f46 docs: migrate user-input code example to standalone (#51466)
PR Close #51466
2023-08-31 16:37:00 +00:00
Ben Hong b710ab63b4 docs: migrate two-way-binding to standalone (#51574)
PR Close #51574
2023-08-31 16:36:29 +00:00
Joey Perrott cfcd2e3aeb refactor(docs-infra): correct incomplete string replacement (#51585)
Find all usages of `\n` and replace them instead of just the first.

PR Close #51585
2023-08-31 16:35:51 +00:00
Joey Perrott e6235accb1 docs: remove unreachable/incorrect contributor links (#51350)
PR Close #51350
2023-08-30 19:41:53 +00:00
Luis Castro 6b5c812b6b docs(core): clarify InjectionToken usage (#51386)
- Emphasized the importance of using the same InjectionToken instance for both provider and injection call.
- Added examples to illustrate correct usages to prevent NullInjectorError.

PR Close #51386
2023-08-30 15:53:23 +00:00
Ben Hong dad47bb720 docs: migrate security guide and example to standalone (#51446)
PR Close #51446
2023-08-30 15:50:57 +00:00
Ben Hong 0f86a0b9e7 docs: migrate elements guide and code to standalone (#51455)
PR Close #51455
2023-08-30 00:01:12 +00:00
Aristeidis Bampakos 8c77240caa docs: fix casing of GitHub in navigation (#51427)
PR Close #51427
2023-08-29 23:32:36 +00:00
Aristeidis Bampakos 83b93d9537 docs: fix casing of image alt in page not found (#51432)
PR Close #51432
2023-08-29 23:30:51 +00:00
Ben Hong e027a59be0 docs: migrate built-in-template-functions to standalone (#51486)
PR Close #51486
2023-08-29 22:58:45 +00:00
Ben Hong dd52f9f05d docs: migrate view encapsulation guide and code to standalone (#51454)
PR Close #51454
2023-08-29 22:58:20 +00:00
Ben Hong 7d4550b7a7 docs: migrate accessibility guide and example to standalone (#51445)
PR Close #51445
2023-08-29 22:57:55 +00:00
Ben Hong fbdca15a86 docs: migrate attribute-binding code to standalone (#51477)
PR Close #51477
2023-08-29 22:38:02 +00:00
Ben Hong f6fa690152 docs: migrate directives guide and examples to standalone (#51416)
PR Close #51416
2023-08-29 22:37:37 +00:00
Ben Hong 5d1d3b3d9f docs: migrate angular compiler options code to standalone (#51467)
PR Close #51467
2023-08-29 22:24:41 +00:00
Joey Perrott 1f7e7dff50 fix(docs-infra): escape the . character in regex (#51555)
Escape the `.` character in a hostnaem regex

PR Close #51555
2023-08-29 21:13:14 +00:00
Ward Bell 8ef5cc680d docs: Migrate HttpClient guide and its code examples (/http) to standalone (#51400)
**Unit Testing Code Does Not Compile**

The compilation error is:
```
The compilation error is
./src/testing/http-client.spec.ts - Error: Module build failed (from ./node_modules/@ngtools/webpack/src/ivy/index.js):
Error: /home/projects/obk3vc--run/src/testing/http-client.spec.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
```
I’m not sure what to say about unit testing HTTP in a full Standalone app. Is it different?

_This is the only known remaining defect in this conversion of HTTP to Standalone._

**Edited content of  `http-request-data-from-server.md`**

The current version of this page is confusing. In particular

* It tells readers they **should always unsubscribe** from the HttpClient method calls. This is *not true* and this example doesn't even do it. I replaced this instruction with more nuanced advice and an explanation of why it is OK to not unsubscribe to HttpClient methods.

* There is a "helpful" note about using the RxJS `map` operator to transform the response. This is *not "helpfulf"*. It is *confusing* because the sample doesn't use `map` anywhere. It was unnecessary here, even if it might be helpful elsewhere. I removed this note.

* The "Requesting a typed response" section seemed unclear to me, particularly because the guide begins with a `get` request that already has the `Config` return type specification. My revision attempts to make this more clear.

* The bold "callout" about the `observe` and `responseType` options appears out of nowhere after "Requesting a typed response". It's disconcerting at best. I moved it to the bottom of the page and linked to it from the `options` discussion at the top.

I made a few other revisions that I hope improve the readability of this page.

**Corrected `http-make-jsonp-request.md`**

The JSONP example, handwritten in the guide page, would not have compiled. I added one that does to `heroes.service.ts` and displayed it on this page.

**Corrected `http-handle-request-errors.md`

This page ended with a section called "Sending data to a server" that introduces PUT, POST, and DELETE. These features have nothing to do with error handling and the verbiage here duplicates the opening paragraphs of the next topic which does: "Send data to a server". So I deleted this section from the error handling guide page.

**Archived http-setup-server-communication.md**

`http-setup-server-communication.md` appears to be the original long document that has since been divided over the other pages in this folder.

It shouldn’t be in the reader’s flow. I did update it for Standalone. But I also removed it from left-nav and marked as archived.

PR Close #51400
2023-08-29 21:03:49 +00:00
Andrew Scott c62e680098 fix(router): Remove deprecated Router properties (#51502)
This commit removes deprecated properties on the Router. These are meant
to be configured through DI and not meant to be changed during runtime.

BREAKING CHANGE: The following Router properties have been removed from
the public API:

- canceledNavigationResolution
- paramsInheritanceStrategy
- titleStrategy
- urlUpdateStrategy
- malformedUriErrorHandler

These should instead be configured through the `provideRouter` or
`RouterModule.forRoot` APIs.

PR Close #51502
2023-08-29 19:47:58 +00:00
Ben Hong 6fff65c384 docs: update what is angular to use standalone and cup of coffee (#51378)
PR Close #51378
2023-08-29 18:38:28 +00:00
Ben Hong 7ed4c56c24 docs: migrate event-binding code to standalone (#51538)
PR Close #51538
2023-08-29 17:53:54 +00:00
Ward Bell c0d3a019c2 docs: Migrate pipe guide and its code examples to standalone (#51333)
**Pipes Sample Code**

Migrated all sample code in the `examples/pipes` folder. Did not touch the pipes in the ToH or Testing folders.

>The existing, complex discussion of the `CurrencyPipe` within `pipes-transform-data.md` cried out for a new `concurrency-formatting.component` example`.

**Extracted "pipe precedence" into its own page**

The topic had been extracted from `pipe.md` and tacked on to the bottom of the `pipes-overview.md` page.

It's an advanced and somewhat obscure topic that doesn't belong in the overview. Rather than throw it away, I created a new `pipe-precedence.md` page and added it to the bottom of the pipes section navigation.

I also tried to improve both the guide text and the companion component, `precedence.component`.

**How to create a pipe is missing**

The readers are told they can create their own pipes in several places throughout the docs. But there are no links and you can't navigate to a page that covers the topic. This is a serious omission!

The topic is introduced in the `pipes-custom-data-trans.md` page (extracted verbatim from `pipes.md`). But you can't navigate to this page and their are no links to it.

TODO: restore this page and add it to the left-nav.

**Change `pipes.md` references to `pipe-overview.md`**

The original, kitchen-sink page, `pipes.md`, was disconnected from navigation long ago, in favor of multiple pages such as `pipe-overview.md`. The page is still in the AIO documentation and can be found by searching or by links from 3rd party documenters. Landing on that page hides the left-nav.

In this commit, we treat `pipes.md` as deprecated (which it seems to be). Therefore, this commit retargets previous `pipes.md` references to `pipe-overview.md`.

>The `change-detection-slow-computations.md` is the exception. It refers to "pure pipes", a subject not covered in the current pipe documentation. That reference is retargeted to `api/core/Pipe#pure`.

Certain code files are only referenced in `pipe.md`. They still work and are displayed in the overall pipes code sample as before. Now they are marked with deprecation comments for future treatment or removal.

For consistency, certain sections of `pipes.md` were replaced by the contents of the corresponding current pages.

PR Close #51333
2023-08-29 17:52:35 +00:00
Thomas Turrell-Croft a610eb160a docs: add browsers switch to CI test example (#50451)
PR Close #50451
2023-08-29 17:52:10 +00:00
Ben Hong f7364ece87 docs: migrate binding-syntax code to standalone (#51479)
PR Close #51479
2023-08-28 23:55:07 +00:00
Ward Bell a28864d0f7 docs: migrate template guide and its code examples to standalone. (#51364)
Guide pages do not mention `NgModule` so they are untouched (and not "reviewed" either).

All code was migrated, including code in the `template-expression-operators` folder despite it only being referenced in the “archived” guide, `template-expression-operators.md`.

PR Close #51364
2023-08-28 18:36:51 +00:00
Shuaib hasan akib dc4db80f9a docs(docs-infra): remove inactive resource from community page (#51418)
PR Close #51418
2023-08-28 18:36:25 +00:00
Dylan Hunn 9753347f8a docs: Add standalone edits to "Testing Components" (#51451)
Minimal updates to the "Testing Components" guide for standalone-by-default aio.

PR Close #51451
2023-08-28 18:35:56 +00:00
Andrew Scott 3dc74f3ac5 docs(router): Update the basic router guide to use standalone (#51452)
This commit updates the basic router-tutorial guide to use standalone features.

PR Close #51452
2023-08-28 18:35:31 +00:00
Mikka 1a1d0c90bf docs: remove MessageService information from HeroService section (#51501)
PR Close #51501
2023-08-28 16:44:57 +00:00
Andrew Scott 440684ddb4 docs(router): Update the url matcher guide to use standalone (#51450)
This commit updates the url matcher guide to use standalone rather than
NgModules.

PR Close #51450
2023-08-25 16:43:50 +00:00