Commit Graph

4024 Commits

Author SHA1 Message Date
Ikko Eltociear Ashimine 918e6f09b9 docs: fix typo in router-tutorial-toh.md (#49095)
non-existant -> non-existent
PR Close #49095
2023-02-16 15:50:55 -08:00
Kristiyan Kostadinov 06605cc760 docs: add guide for standalone migration (#49044)
Adds a guide describing how to use the standalone migration schematic. The new guide is grouped together with the existing standalone guide.

PR Close #49044
2023-02-16 15:33:18 -08:00
Joey Perrott 73211543b3 docs: remove former team members from bios (#48999)
PR Close #48999
2023-02-14 18:46:20 +01:00
Alvaro Junqueira 7e4c5543aa docs: fix the broke URL to w3c Trusted Types spec (#49047)
PR Close #49047
2023-02-14 16:25:54 +01:00
Kian Yang Lee 57d0c03e17 docs: Fixing typo error (#48891)
PR Close #48891
2023-02-06 12:38:26 -08:00
Matthieu Riegler c4e5840725 refactor(docs-infra): Enable @typescript-eslint/quotes rule for aio content (#48952)
The commit enables the @typescript-eslint/quotes rule which mendates single quotes over doubles and allows template literals with backticks.

PR Close #48952
2023-02-06 12:33:23 -08:00
Simona Cotin 5a886c0308 docs(extended-diagnostics): fix code example (#48963)
Update code examples to use < and &gt for html elements
PR Close #48963
2023-02-06 12:31:33 -08:00
Alex Castle 54b24eb40f feat(common): Add loaderParams attribute to NgOptimizedImage (#48907)
Add a new loaderParams attribute, which can be used to send arbitrary data to a custom loader, allowing for greater control of image CDN features.

PR Close #48907
2023-02-06 10:10:44 -08:00
Andrew Scott f5a7e02529 docs(router): Update functional guard and resolver docs (#48873)
This commit updates the docs of the functional guards and resolvers to improve the migration
experience when moving away from class-based equivalents.

PR Close #48873
2023-02-02 13:39:32 -08:00
Matthieu Riegler 7030fb8531 docs: display the exact command to generate a browserslist config (#48879)
`ng generate config browserslist` is the command to generate the browerslist

fixes #48878
PR Close #48879
2023-02-02 09:36:47 -08:00
Matthieu Riegler 8a9907c23a refactor(common): Remove currency pipe depreciation notice about the default currency (#48872)
Currency pipe won't be using the LOCALE_ID to determine the default currency.

fixes #47612

PR Close #48872
2023-02-02 09:30:04 -08:00
Besim Gürbüz 5c5d36547b docs: fix indentation error in content/guide/build.md (#48893)
PR Close #48893
2023-02-02 09:29:16 -08:00
Brecht Billiet d3a14d94a1 docs(docs-infra): update strongbrew resource to new website (#48340)
StrongBrew has stopped a few years back.
We are taking over at https://simplified.courses where we have an Angular blog, do on-site training and create content.

PR Close #48340
2023-01-27 17:07:19 +00:00
Santosh Yadav 869c9ac1a9 docs: add angular getting started course (#48619)
PR Close #48619
2023-01-27 16:51:06 +00:00
Santosh Yadav c2dc51af45 docs: add this is angular to Community Curations (#48618)
PR Close #48618
2023-01-27 16:23:53 +00:00
Walid Bouguima 8d3e246dda docs: update Reactive Forms' FormControl usage description (#48858)
It seems that the description of the `FormControl` usage is  incorrect or at least the copy is not very helpful for beginners and can be very confusing as we do not have a command to generate a `FormControl`, as far as I know  😄.  Additionally, the link for component generation points to the CLI page instead of the component generation section on the CLI page. It would be DX/UX for readers and users to get where the link's text is supposed to take them.
PR Close #48858
2023-01-27 16:22:11 +00:00
Onkar Ruikar 2352f8dca3 docs(docs-infra): in navigation put prerequisites page 'guide/property-binding' before 'guide/attribute-binding' (#48766)
Pages 'https://angular.io/guide/attribute-binding' and 'https://angular.io/guide/class-binding' have prerequisite of 'https://angular.io/guide/property-binding' but in navigation the property binding page comes much later.
The change puts the binding pages in prerequisite order.
PR Close #48766
2023-01-27 16:21:28 +00:00
Matthieu Riegler 33a636aaaf docs: fix crisis-center / crisis-list route parameter (#48853)
The params is in the child component, let's reflect that in the code.

fixes #36970

PR Close #48853
2023-01-26 22:01:42 +00:00
Virginia Dooley 14aefa1b03 docs: add new files for HTTP content (#47684)
PR Close #47684
2023-01-25 18:29:47 +00:00
Angular Robot 10634048ea docs: update Angular CLI help [main] (#48827)
Updated Angular CLI help contents.

PR Close #48827
2023-01-24 21:27:02 +00:00
Dylan Hunn c03e6a6097 docs: Use of $any() has no runtime incidence. (#48785)
Some users are woried about `$any()` as function calls are to be avoided in templates. This sentence clarifies the situation.

fixes #48781

PR Close #48785
2023-01-24 16:47:33 +00:00
Matthieu Riegler 82c8b7ae9e build(docs-infra): replace base64 images for stackblitz by svgs (#48774)
PNG converted to base64 don't work on stackblitz.
As stackblitz does't support binary files for dynamicaly created projects, we now use only svgs.

Fixes: #48773

PR Close #48774
2023-01-24 16:39:28 +00:00
Alan Agius 840530ffd8 docs: update supported Chrome version description (#48782)
- Update Chrome supported version description to match other browsers.
- Updates browserslist configuration in build section to match supported browsers

PR Close #48782
2023-01-20 17:07:53 +00:00
Virginia Dooley 2d0ca73d73 docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47907)
PR Close #47907
2023-01-20 01:21:07 +00:00
Virginia Dooley bca76ed43a docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47906)
docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made.  Restructuring or rewording sentences to be shorter and clearer.

docs: revised understanding doc and pullapprove.yml

PR Close #47906
2023-01-19 21:32:34 +00:00
Alan Agius 42ca9c0b02 docs: update documentation to use ng generate config and ng generate environments (#48757)
In Angular CLI 15.1  new sub commands to generate configuration and environments files were added. This commit updates several docs to mention these commands.

Closes #48364

PR Close #48757
2023-01-18 10:44:14 -08:00
Andrew Scott fb7b8a95f2 docs: Fix example in breaking changes to apply to correct sentence (#48758)
The "for example..." was supposed to apply to the production code, not the test code sentence.

fixes #48744

PR Close #48758
2023-01-17 09:21:50 -08:00
Bob Watson 0b57e24eb6 docs: add first-app-lesson-13 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson 1edf5874d7 docs: add first-app-lesson-12 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson d2333b4d35 docs: add first-app-lesson-11 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson 25ec456b9f docs: add first-app-lesson-10 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson d894e40dd5 docs: add first-app-lesson-09 example (#48512)
PR Close #48512
2023-01-12 11:44:07 -08:00
Bob Watson b3283bd271 docs: add first-app-lesson-08 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson 76daeb6ff7 docs: add first-app-lesson-07 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson 3344d839bf docs: add first-app-lesson-06 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson a19888cf06 docs: add first-app-lesson-05 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson af3947d2b1 docs: add first-app-lesson-04 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson 3519651f72 docs: add first-app-lesson-03 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson f7eef20a52 docs: add first-app-lesson-02 example (#48512)
PR Close #48512
2023-01-12 11:44:06 -08:00
Bob Watson dd8a5d56e3 docs: add first-app-lesson-01 example (#48512)
PR Close #48512
2023-01-12 11:44:05 -08:00
Andrew Scott 926c35f4ac docs: Deprecate class and InjectionToken and resolvers (#47924)
Class and `InjectionToken`-based guards and resolvers are not as configurable,
are less re-usable, require more boilerplate, cannot be defined inline with the route,
and require more in-depth knowledge of Angular features (`Injectable`/providers).
In short, they're less powerful and more cumbersome.

In addition, continued support increases the API surface which in turn increases
bundle size, code complexity, the learning curve and API surface to teach,
maintenance cost, and cognitive load (needing to grok several different types
of information in a single place).

Lastly, supporting only the `CanXFn` types for guards and `ResolveFn` type
for resolvers in the `Route` interface will enable better code
completion and integration with TypeScript. For example, when writing an
inline functional resolver today, the function is typed as `any` and
does not provide completions for the `ResolveFn` parameters. By
restricting the type to only `ResolveFn`, in the example below
TypeScript would be able to correctly identify the `route` parameter as
`ActivatedRouteSnapshot` and when authoring the inline route, the
language service would be able to autocomplete the function parameters.

```
const userRoute: Route = {
  path: 'user/:id',
  resolve: {
    "user": (route) => inject(UserService).getUser(route.params['id']);
  }
};
```

Importantly, this deprecation only affects the support for class and
`InjectionToken` guards at the `Route` definition. `Injectable` classes
and `InjectionToken` providers are _not_ being deprecated in the general
sense. Functional guards are robust enough to even support the existing
class-based guards through a transform:

```
function mapToCanMatch(providers: Array<Type<{canMatch: CanMatchFn}>>): CanMatchFn[] {
  return providers.map(provider => (...params) => inject(provider).canMatch(...params));
}
const route = {
  path: 'admin',
  canMatch: mapToCanMatch([AdminGuard]),
};
```

With regards to tests, because of the ability to map `Injectable`
classes to guard functions as outlined above, nothing _needs_ to change
if projects prefer testing guards the way they do today. Functional
guards can also be written in a way that's either testable with
`runInContext` or by passing mock implementations of dependencies.
For example:

```
export function myGuardWithMockableDeps(
  dep1 = inject(MyService),
  dep2 = inject(MyService2),
  dep3 = inject(MyService3),
) { }

const route = {
  path: 'admin',
  canActivate: [() => myGuardWithMockableDeps()]
}

// test file
const guardResultWithMockDeps = myGuardWithMockableDeps(mockService1, mockService2, mockService3);
const guardResultWithRealDeps = TestBed.inject(EnvironmentInjector).runInContext(myGuardWithMockableDeps);
```

DEPRECATED: Class and `InjectionToken` guards and resolvers are
deprecated. Instead, write guards as plain JavaScript functions and
inject dependencies with `inject` from `@angular/core`.

PR Close #47924
2023-01-11 15:01:08 -08:00
Angular Robot 7f68a709a7 docs: update Angular CLI help (#48704)
Updated Angular CLI help contents.

Closes #48701

PR Close #48704
2023-01-11 15:00:21 -08:00
Andrew Scott 8375a8c9a8 docs: Add heading to the router writable properties deprecation (#48684)
The deprecation note is missing a header. This commit adds one.

PR Close #48684
2023-01-11 14:59:04 -08:00
Jens 01be0e2874 docs: Add support for previous Chrome release (#48669)
Previous Chrome stable version should also be supported
PR Close #48669
2023-01-11 14:57:44 -08:00
Matthieu Riegler 518cc63022 docs: remove unused style guides. (#48587)
PR Close #48587
2023-01-11 14:57:09 -08:00
Bob Watson 7281dbc913 docs: minor copy edit to suggestion (#48484)
PR Close #48484
2023-01-11 14:56:31 -08:00
Bob Watson 874f197720 docs: minor copy edit to suggestion (#48484)
PR Close #48484
2023-01-11 14:56:31 -08:00
Bob Watson 84285c1ef8 docs: minor copy edit to suggestion (#48484)
PR Close #48484
2023-01-11 14:56:31 -08:00
Bob Watson 1c4eb67354 docs: minor copy edit to suggestion (#48484)
PR Close #48484
2023-01-11 14:56:30 -08:00
Aristeidis Bampakos deb27df160 docs: review router guards section in router guide (#48484)
PR Close #48484
2023-01-11 14:56:30 -08:00