Commit graph

5851 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
Paul Gschwendtner
cddae0741b build: update cross angular deps and lock dependencies (#47717)
Renovate no longer updated the dependencies because they were expanded
to a range. Ranges did not satisfy the `@next` tag anymore- so Renovate
did was not able to update.

This fixes the dependencies by locking them- and also updates the
versions according to our Renovate config.

PR Close #47717
2022-10-17 12:11:25 +02:00
Charles Barnes
e0bda23ed1 docs(docs-infra): fix errors page hover styles (#47770)
fix hover styles for error messages to be consistent for dark theme

Fixes #47723

PR Close #47770
2022-10-17 09:57:46 +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
Angular Robot
e3fbeab3bd build: update dependency @rollup/plugin-commonjs to v23 (#47711)
See associated pull request for more information.

PR Close #47711
2022-10-11 23:09:06 +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
George Kalpakas
6bcde0e20a build(docs-infra): upgrade cli command docs sources to 46cb32b90 (#47703)
Updating [angular#main](https://github.com/angular/angular/tree/main) from
[cli-builds#main](https://github.com/angular/cli-builds/tree/main).

##
Relevant changes in
[commit range](77c70052e...46cb32b90):

**Modified**
- help/generate.json

PR Close #47703
2022-10-10 20:04:56 +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
deb4cabe2e docs: update spelling dictionary (#47697)
PR Close #47697
2022-10-07 11:45:32 -07: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
Renan Ferro
84478f5a1c refactor(docs-infra): add new Input for better description of close button in notification component (#47681)
Add a new input for banner description with default value, allowing the insertion of other descriptions and if nothing is passed, it assumes a default value.

PR Close #47681
2022-10-06 16:23:42 -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
Angular Robot
e0dd2c53c2 build: update cross-repo angular dependencies (#47600)
See associated pull request for more information.

PR Close #47600
2022-10-06 16:53:39 +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
George Kalpakas
382330cd6b build(docs-infra): upgrade cli command docs sources to 77c70052e (#47590)
Updating [angular#main](https://github.com/angular/angular/tree/main) from
[cli-builds#main](https://github.com/angular/cli-builds/tree/main).

##
Relevant changes in
[commit range](556a775f3...77c70052e):

**Modified**
- help/completion.json

PR Close #47590
2022-09-30 10:54:00 -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
Angular Robot
d90e76054f build: update cross-repo angular dependencies (#47454)
See associated pull request for more information.

PR Close #47454
2022-09-29 15:51:08 -07:00
George Kalpakas
c39a3a1539 build(docs-infra): upgrade cli command docs sources to 556a775f3 (#47554)
Updating [angular#main](https://github.com/angular/angular/tree/main) from
[cli-builds#main](https://github.com/angular/cli-builds/tree/main).

##
Relevant changes in
[commit range](4a6e62d46...556a775f3):

**Modified**
- help/build.json
- help/test.json

PR Close #47554
2022-09-29 10:53:50 -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
mgechev
d8f1f63860 docs: temporarily hide banner to improve survey visibility (#47564)
PR Close #47564
2022-09-29 10:49:35 -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
Andrew Kushnir
120555a626 feat(core): support object-based DI flags in TestBed.inject() (#46761)
This commit applies the changes similar to the ones performed for the `inject()` function in df246bb235.

The `TestBed.inject` function is updated to use previously added object-based API for options: now the flags argument supports passing an object which configures injection flags.

DEPRECATED:

The bit field signature of `TestBed.inject()` has been deprecated, in favor of the new options object.

PR Close #46761
2022-09-27 10:09:53 -07:00
Ashley Hunter
f9e21d36bd docs: fixing standalone components sample code (#47542)
PR Close #47542
2022-09-26 09:56:57 -07:00