Commit graph

3235 commits

Author SHA1 Message Date
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
Alex Rickabaugh
e3cef4a784 docs(core): deprecate providedIn: NgModule and providedIn: 'any' (#47616)
This commit deprecates the above two forms of `providedIn`.

DEPRECATED:

- The ability to pass an `NgModule` to the `providedIn` option for
`@Injectable` and `InjectionToken` is now deprecated.

`providedIn: NgModule` was intended to be a tree-shakable alternative to
NgModule providers. It does not have wide usage, and in most cases is used
incorrectly, in circumstances where `providedIn: 'root'` should be
preferred. If providers should truly be scoped to a specific NgModule, use
`NgModule.providers` instead.

- The ability to set `providedIn: 'any'` for an `@Injectable` or
`InjectionToken` is now deprecated.

`providedIn: 'any'` is an option with confusing semantics and is almost
never used apart from a handful of esoteric cases internal to the framework.

PR Close #47616
2022-10-04 11:52:38 -07:00
Jordan
7ab10a5031 docs: add Jordan Powell to GDE resources (#47598)
PR Close #47598
2022-10-04 11:52:04 -07:00
Dmytro Mezhenskyi
4ba2d3d6b6 docs: add missing link to canMatch guard (#47602)
PR Close #47602
2022-10-03 08:47:27 -07:00
Alexander Wiebe
89006b1025 fix(docs-infra): add punctuation to dr iq (#47525)
add punctuation to dr iq name to aid in clarity

Fixes #46011

PR Close #47525
2022-09-29 16:43:55 -07:00
Ciprian Sauliuc
752e2245f4 docs: add oxford commas and rephrase sentences (#47540)
PR Close #47540
2022-09-29 16:41:32 -07:00
Joe Martin (Crowdstaffing)
7809e3a405 docs: Add topics for lifecycle directory (#47392)
Add empty topics to lifecycle directory.

PR Close #47392
2022-09-29 10:51:00 -07:00
Joe Martin (Crowdstaffing)
ee0c7161dd docs: add new files (#47391)
Add new files for component content.

PR Close #47391
2022-09-29 10:50:14 -07:00
Simona Cotin
551c641a64 docs: update broken link (#47532)
PR Close #47532
2022-09-27 10:18:00 -07:00
Alan Agius
a4167c8854 docs: update what what the CLI collects in analytics (#47529)
This commit adds more information on what is collected by the Angular CLI as with https://github.com/angular/angular-cli/pull/23718 we will collect additional information.

PR Close #47529
2022-09-27 10:17:35 -07:00
Ashley Hunter
f9e21d36bd docs: fixing standalone components sample code (#47542)
PR Close #47542
2022-09-26 09:56:57 -07:00
Doug Parker
ddef448cf3 docs: add v15 scheduled release dates (#47513)
These dates are week-specific to give some flexibility during the release process which frequently happens. I back-dated the most recent minors mainly to make sure we include them when we eventually update to v16 and beyond.

PR Close #47513
2022-09-23 14:00:04 -07:00
famzila
150dd3092b docs: add fatima amzil to contributors (#47097)
PR Close #47097
2022-09-19 18:58:15 +02:00
Bob Watson
53db8ab246 docs: add standalone component intro video (#47359)
Fix: #47358

PR Close #47359
2022-09-19 17:19:09 +02:00
Bob Watson
58e3d79fe6 docs: add link to YouTube video of Typed Forms (#47361)
Fix: #47360

PR Close #47361
2022-09-19 17:12:34 +02:00
Angular Robot
247181f67d docs: update events (#47462)
Generated `events.json` with the latest events retrieved from the Firebase DB.

PR Close #47462
2022-09-19 17:08:06 +02:00
Mauro Mattos
ad098d82a8 docs(docs-infra): add missing decorator in tutorial step (#47456)
PR Close #47456
2022-09-19 09:40:12 +02:00
Andrew Kushnir
7f637e1873 docs: move Image Directive guide link to the Feature Preview section (#47466)
This commit updates the location of the Image Directive guide link in the left navigation menu. Now the link is located under the Feature Preview section.

Also, this commit updates the Image Directive guides to add a highlighted message that the directive is in the developer preview mode.

PR Close #47466
2022-09-19 09:37:37 +02:00
Benjamin Chanudet
f0f809c561 docs: replace deprecated --outFile option for ng extract-i18n (#47397)
replace deprecated --outFile option for ng extract-i18n

The `--outFile` command option was last used in Angular v10 (back when it was still `ng xi18n`), yet there are still references to it in the documentation, alongside the up-to-date option `--out-file`. This commit replaces all mentions to the incorrect option with the correct writing.
PR Close #47397
2022-09-12 13:25:20 -07:00
Abhishek Rawat
0d4594a53e docs: fix angle brackets in details code block (#47400)
Angle brackets are not showing inside the markdown code block by writing like &lt; &gt;.
PR Close #47400
2022-09-12 13:24:56 -07:00
George Kalpakas
c9241fdeb0 build(docs-infra): introduce new process for generating data for the events page (#45588)
This commit introduces a new process for generating data for the AIO
[events page](https://angular.io/events), which streamlines the process
and minimizes duplication and manual work. For more details, see
`aio/scripts/generate-events/README.md`.

PR Close #45588
2022-09-12 12:25:44 -07:00
abergquist
678c7f1841 docs: Removed unnecessary blank line (#47329)
PR Close #47329
2022-09-09 14:26:23 -07:00
Andrew Kushnir
ca7bf65933 fix(common): rename rawSrc -> ngSrc in NgOptimizedImage directive (#47362)
As an ongoing effort to stabilize the NgOptimizedImage API before existing the Developer Preview, this commit renames the `rawSrc` attribute used for the NgOptimizedImage selector matching to `ngSrc`. The `rawSrcset` is also renamed to `ngSrcset` for consistency.

The motivation for this change is to align the attribute name better with other built-in directives, such as `ngFor`, `ngIf`, `ngClass`, `ngStyle`, etc.

Note: this is technically a breaking change, but since the NgOptimizedImage directive is in the Developer Preview mode, we land the change in a patch branch.

PR Close #47362
2022-09-09 14:25:37 -07:00