Commit Graph

3957 Commits

Author SHA1 Message Date
Alan Agius 665af467d8 docs: remove CI testing setups (#47940)
This section is unnecessary given that all is needed for the user is to run `ng test`, and is also tricky to maintain (Node was hard coded to v14 still).

We have no mechanism of testing or verifying these setups, and we have no motivation to do so.

Users should see their CI providers documentation Any preconfigured Node setup is going to suggest `ng test`, which should "just work" for Angular.

PR Close #47940
2022-11-03 17:50:51 -07:00
Alan Agius 062e17b65d docs: update testing document to include karma config (#47940)
In version 15, the Angular CLI will no longer generate a `karma.conf.js` by default.

This commit updates the testing document to include an example of how to include a custom `karma.conf.js`.  Also, we update several parts of the documentation which were outdated.

PR Close #47940
2022-11-03 17:50:51 -07:00
Markus Eckstein bd04173910 docs: fix missing word (#47876)
PR Close #47876
2022-11-03 17:47:26 -07:00
Alan Agius 32135b27a1 docs: update examples to reflect changes in Angular CLI version 15. (#47904)
These changes include
- Remove the usage of `enableProdMode`
- Remove `test.ts`, `polyfills.ts`, `karma.conf.js` and environment files which are no longer generated by default

PR Close #47904
2022-11-03 17:46:46 -07:00
Alan Agius c9a6f95c9d docs: update analytics gathering documentation (#47840)
Currently there are 3 pages for analytics gathering information. Most of the information is duplicate.

With this change we remove the duplicate pages and outdated content to reflect the changes in version 15.

PR Close #47840
2022-11-03 17:45:35 -07:00
abergquist c82c1a5dfc docs: made code appear better, etc. (#47336)
Made code appear better and resolved some minor grammatical opportunities/issues.
PR Close #47336
2022-11-03 17:44:55 -07:00
mgechev 0bc4405860 docs: update roadmap as of q4 2022 (#47910)
PR Close #47910
2022-11-01 04:46:48 -07:00
Alex Rickabaugh 0d49fe01ea docs(core): update standalone docs for provideRouter (#47902)
This commit updates the standalone components guide on AIO to showcase the
new `provideRouter` API. Previously the guide demonstrated configuring the
router via `importProvidersFrom(RouterModule.forRoot(...))`. A new section
was added to ensure `importProvidersFrom` was still shown in an example.

PR Close #47902
2022-11-01 04:45:20 -07:00
Virginia Dooley 37ba610449 docs: Linting corrections. Restructuring or rewording sentences to be shorter and clearer. (#47897)
PR Close #47897
2022-10-28 02:37:46 -07:00
Charles Lyding e9d78d080f docs: update CLI related deprecation information (#47885)
There are no new CLI related deprecations for v15. However, multiple
features listed in the deprecation guide have since been removed and
are now also removed from the relevant sections of the guide.

PR Close #47885
2022-10-27 18:03:15 +02:00
Alan Agius 48853bef43 docs: update typescript configuration (#47842)
This commits update the TypeScript configuration for the updated version 15 release.

PR Close #47842
2022-10-25 10:29:37 +02:00
Alan Agius 3210bead77 docs: update configuring browser compatibility (#47842)
This commits adds more information about why and how Browserslist is used in the Angular CLI.

PR Close #47842
2022-10-25 10:29:37 +02:00
Alan Agius d234fb47f9 docs: update projects file structure (#47841)
With this change we update the file structure to reflect that of new projects in version 15.

PR Close #47841
2022-10-25 10:28:31 +02:00
vyom1611 41709d8aff docs: removing http-server section in Service worker tour (#47613)
- Based on issue #47583
- Updated docs for Service workers by removing the section which used http-server to use service workers with ng serve
- By changelog of v14.2.0, service workers become compatible with ng serve using feature #23679

PR Close #47613
2022-10-24 15:42:56 +02:00
onrails 2f32ce071e docs: fixing copy inconsistencies in schematics description (#47453)
I fixed inconsistent spelling and formatting and replaced a dead link to clarity design system starter.

docs(schematics): revert a change in schematic usage pronoun

docs: parentheses removal from schematic generation description
Co-Authored-By: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47453
2022-10-24 10:41:47 +02:00
WD Snoeijer 4e46370a44 docs: fix linter errors in user-input.md (#47832)
PR Close #47832
2022-10-21 19:14:00 +02:00
Balaji d436a19555 docs: fix minor typo in hierarchical-dependency-injection.md (#47812)
Small Typo change 
- renamed oh to or in https://angular.io/guide/hierarchical-dependency-injection#skipself-and-viewproviders
PR Close #47812
2022-10-21 17:33:11 +02:00
WD Snoeijer 0f726bda98 docs: fix linter errors for accessibility.md (#47725)
PR Close #47725
2022-10-19 20:13:53 +02:00
Andrew Kushnir b136e9eea6 docs: declare NgOptimizedImage APIs as stable (#47794)
In v14.2, we've introduced a new directive to help developers to configure images for better performance. The directive was initially released in the "developer preview" mode. We've collected the feedback, made several improvements and we are happy to announce that the NgOptimizedImage APIs are promoted to stable!

This commit updates vast majority of APIs to drop the `@developerPreview` label, which effectively documents them as stable.

There are few APIs though that retained the `@developerPreview` annotations:
- the `IMAGE_CONFIG` token
- the `ImageConfig` type
- the `fill` @Input of the directive

We plan to collect some additional feedback for the mentioned APIs and drop the `@developerPreview` annotation after that.

PR Close #47794
2022-10-19 20:13:12 +02:00
Virginia Dooley 80da664b71 docs: Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47790)
PR Close #47790
2022-10-19 20:10:55 +02:00
Kara Erickson b31091b222 docs(common): update image directive docs (#47796)
This is a small commit to:
- clarify that loaders aren't mandatory
- remove outdated preconnect option from docs
- clarify how width/height should be set for fixed size images
- minor structural changes for clarity

PR Close #47796
2022-10-19 15:25:14 +02:00
Virginia Dooley a4716840fc docs: Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. Inserted an introductory paragraph under level 1 heading. (#47788)
PR Close #47788
2022-10-19 15:24:10 +02:00
Andrew Kushnir 0d65e1de2c docs: declare Standalone APIs as stable (#47754)
In v14, we've introduced core concepts to allow Components, Directives and Pipes to configure their dependencies
 without the need to use NgModules and without the need to be declared in an NgModule. The concepts and initial
set of APIs were marked as "developer preview" to allow developers to use these APIs and share the feedback.

Since v14, we've been reviewing the entire API surface of the framework and either updating existing APIs to support standalone or creating new APIs that allowed to use Router, HttpClient and other abstractions without NgMod
ules.

Based on the mentioned work to review and stabilize APIs and also based on the positive feedback from the commun
ity, we are happy to announce that the Standalone APIs are promoted to stable!

This commit updates vast majority of standalone-related APIs to drop the `@developerPreview` label, which effect
ively documents then as stable.

Two APIs that retained the `@developerPreview` annotations are:
- withRequestsMadeViaParent (from `@angular/common/http`)
- renderApplication (from `@angular/platform-server`)

We plan to collect some additional feedback for the mentioned APIs and drop the `@developerPreview` annotation b
efore the next major release.

Co-Authored-By: Alex Rickabaugh <alx@alxandria.net>
Co-Authored-By: Andrew Scott <atscott@google.com>
Co-Authored-By: Dylan Hunn <dylhunn@gmail.com>
Co-Authored-By: Jessica Janiuk <jessicajaniuk@google.com>
Co-Authored-By: JoostK <joost.koehoorn@gmail.com>
Co-Authored-By: Kristiyan Kostadinov <crisbeto@abv.bg>
Co-Authored-By: Pawel Kozlowski <pkozlowski.opensource@gmail.com>

PR Close #47754
2022-10-17 12:15:20 +02:00
WD Snoeijer 6140bae5ce docs: fix linter errors for zone.md (#47707)
PR Close #47707
2022-10-17 12:14:44 +02:00
WD Snoeijer 623e97584c docs: fix linter errors for web-worker.md (#47766)
PR Close #47766
2022-10-17 12:13:40 +02:00
WD Snoeijer cd25cb2f83 docs: fix linter errors for view-encapsulation.md (#47772)
PR Close #47772
2022-10-17 12:11:52 +02:00
Paul Gschwendtner 0fb124ad83 build: run ng update for Angular CLI next (#47717)
Runs the Angular CLI v15 migrations for AIO.

PR Close #47717
2022-10-17 12:11:26 +02:00
abergquist 59f3324d6f docs: Separated HTML elements with blank lines (#47331)
Separated HTML elements with judicious use of space. It not only makes it easier to read the HTML; it also makes it consistent with the formatting of https://github.com/angular/angular/edit/main/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-ngif.component.html.

PR Close #47331
2022-10-13 19:10:27 +00:00
Bob Watson 6c98ca4572 docs: update of documentation contrib. guide (#47381)
This update describes the content authoring and revision process in sufficient detail for technical and non-technical contributors to the angular.io documentation.

PR Close #47381
2022-10-13 16:37:25 +00:00
Alex Castle 9483343ebf feat(common): Add fill mode to NgOptimizedImage (#47738)
Add a new boolean attribute to NgOptimizedImage called `fill` which does the following:
* Removes the requirement for height and width
* Adds inline styling to cause the image to fill its containing element
* Adds a default `sizes` value of `100vw` which will cause the image to have a responsive srcset automatically generated

PR Close #47738
2022-10-12 15:56:56 +00:00
Joshua Morony 3a9c452bad docs: add Joshua Morony to GDE resources (#47704)
PR Close #47704
2022-10-11 23:42:46 +00:00
WD Snoeijer 547b45a9da docs: fix linter errors for what-is-angular.md (#47708)
PR Close #47708
2022-10-11 23:07:09 +00:00
WD Snoeijer bbbd4c3ac8 docs: fix linter errors for security.md (#47688)
PR Close #47688
2022-10-11 22:05:43 +00:00
WD Snoeijer 23c06ee83a docs: fix linter errors for workspace-config.md (#47709)
PR Close #47709
2022-10-11 21:59:00 +00:00
WD Snoeijer 5fbe40c2f4 docs: fix linter errors for property-binding-best-practices.md (#47686)
PR Close #47686
2022-10-11 21:19:18 +00:00
WD Snoeijer 83f3d04f24 docs: fix linter errors for property-binding.md (#47687)
PR Close #47687
2022-10-11 21:18:45 +00:00
WD Snoeijer 1818c54b62 docs: fix linter errors in prerendering.md (#47724)
PR Close #47724
2022-10-11 15:59:24 +00:00
Aristeidis Bampakos ca2fa7ae85 docs: add 0 to filename of runtime error guides (#47722)
PR Close #47722
2022-10-10 22:30:43 +00:00
Alex Castle 4fde292bb5 feat(common): Add automatic srcset generation to ngOptimizedImage (#47547)
Add a feature to automatically generate the srcset attribute for images using the NgOptimizedImage directive. Uses the 'sizes' attribute to determine the appropriate srcset to generate.

PR Close #47547
2022-10-10 16:21:08 +00:00
Bob Watson 33dc1e602f docs: remove assorted lint errors (#47693)
PR Close #47693
2022-10-07 10:42:12 -07:00
Matthias Weiß bdb5371033 feat(common): add injection token for default DatePipe configuration (#47157)
This commit introduces a new `DATE_PIPE_DEFAULT_OPTIONS` token, which
can be used to configure default DatePipe options, such as date
format and timezone.

DEPRECATED:

The `DATE_PIPE_DEFAULT_TIMEZONE` token is now deprecated in favor
of the `DATE_PIPE_DEFAULT_OPTIONS` token, which accepts an object
as a value and the timezone can be defined as a field (called `timezone`)
on that object.

PR Close #47157
2022-10-07 09:16:00 -07:00
markostanimirovic 8d1f28a024 docs: add Marko to GDE resources (#47595)
PR Close #47595
2022-10-06 14:23:32 -07:00
Peter Dickten 214baeae8b docs: fixed typo in AsyncValidatorFn (#47465)
the return type must be
Observable<ValidationErrors | null>
instead of
Observable<ValidationErrors> | null

PR Close #47465
2022-10-06 14:00:49 -07:00
Mathew Berg 5377e35b53 docs: fix documentation linting errors in ajs-quick-reference.md (#47526)
PR Close #47526
2022-10-06 20:27:26 +00:00
WD Snoeijer 7702a3d4af docs: fix linter errors for lightweight-injection-tokens.md (#47673)
PR Close #47673
2022-10-06 18:10:34 +00:00
WD Snoeijer 5d002df47b docs: fix linter errors for lazy-loading-ngmodules.md (#47645)
Update aio/content/guide/lazy-loading-ngmodules.md

Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47645
2022-10-06 16:50:00 +00:00
WD Snoeijer fcea8fe377 docs: fix linter errors for libraries.md (#47668)
PR Close #47668
2022-10-06 16:48:39 +00:00
Andrew Kushnir f73ef21442 feat(router): merge RouterLinkWithHref into RouterLink (#47630)
This commit updates the `RouterLink` to extend the selector to also include `<a>` and `<area>` elements, which were previously matched by the `RouterLinkWithHref` directive. The code of the directives was merged together (since there was a lot of duplication) and this commit finalizes the merge. The `RouterLinkWithHref` becomes an alias of the `RouterLink` directive.

Now there is no need to import and use the `RouterLinkWithHref` class, the `RouterLink` directive will match any element that has the `routerLink` attribute.

DEPRECATED:

The `RouterLinkWithHref` directive is deprecated, use the `RouterLink` directive instead. The `RouterLink` contains the code from the `RouterLinkWithHref` to handle elements with `href` attributes.

PR Close #47630
2022-10-05 15:16:43 -07:00
WD Snoeijer 0035ccfe93 docs: fix linter errors for angular-compiler-options.md page (#47179) (#47618)
fixup! docs: fix linter errors for angular-compiler-options.md page (#47179)

PR Close #47618
2022-10-05 13:43:24 -07:00
Alex Rickabaugh da58801f95 feat(router): auto-unwrap default exports when lazy loading (#47586)
When using `loadChildren` or `loadComponent`, a common pattern is to pass
a function that returns a `Promise` from a dynamic import:

```typescript
{
  path: 'lazy',
  loadComponent: () => import('./lazy-file').then(m => m.LazyCmp),
}
```

The `.then` part of the expression selects the particular exported
component symbol from the dynamically imported ES module.

ES modules can have a "default export", created with the `export default`
modifier:

```typescript
@Component({...})
export default class LazyCmp { ... }
```

This default export is made available to dynamic imports under the well-
known key of `'default'`, per the ES module spec:
https://tc39.es/ecma262/#table-export-forms-mapping-to-exportentry-records

This commit adds a feature to the router to automatically dereference such
default exports. With this logic, when `export default` is used, a `.then`
operation to select the particular exported symbol is no longer required:

```typescript
{
  path: 'lazy',
  loadComponent: () => import('./lazy-file'),
}
```

The above `loadComponent` operation will automatically use the `default`
export of the `lazy-file` ES module.

This functionality works for `loadChildren` as well.

PR Close #47586
2022-10-04 14:40:58 -07:00