5738 Commits

Author SHA1 Message Date
Katie Hempenius 40d8821dde docs: add image directive guide (#47155)
PR Close #47155
2022-08-24 12:16:48 -07:00
Kalbarczyk e05d6db2cd docs: add Angular & JavaScript Master Podcast to resources list (#47227)
PR Close #47227
2022-08-23 16:20:44 -07:00
Jessica Janiuk e2be52671e docs: update peek-a-boo example (#47219)
The peek-a-boo example image does not exactly reflect what happens. This updates the hook table and the image of the peek-a-boo output. Closes #40138

PR Close #47219
2022-08-22 16:03:19 -07:00
Kalbarczyk e717980d77 docs: add Angular Master website to resources list (#47129)
PR Close #47129
2022-08-22 16:02:19 -07:00
George Kalpakas 45a5aa8e01 refactor(docs-infra): fix TypeScript warnings due to property types (#47201)
Fix some TypeScript build warnings related to things like redundant `?.`
and `??` operators and uninitialized/non-nullable `@Input` properties.

You can see an example build with the warnings [on CI][1].

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-232

PR Close #47201
2022-08-22 10:51:02 -07:00
George Kalpakas 33f9dba686 fix(docs-infra): prevent unnecessary warning in mergeOverridenImplementation Dgeni processor (#47201)
The `mergeOverridenImplementation` processor tries to ensure that any
doc used with the `@overrideImplementation` annotation is not itself
public (and explicitly marks is as internal if it is).

Previously, it determined the public/private status of a doc by only
checking the value of the doc's `internal` property (which is mainly set
via the `@internal` annotation). This failed to account for docs marked
as "private exports" (such as those prefixed with `ɵ`), which are
essentially also treated as internal.

This would result in incorrect warnings. [Example warning][1]:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal';
> adding this annotation.

This commit prevents the incorrect warning by also checking the value of
the doc's `privateExport` property to determine its public/private
status.

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-164

PR Close #47201
2022-08-22 10:51:02 -07:00
George Kalpakas b9aa77d1d0 build(docs-infra): improve error message in mergeOverridenImplementation Dgeni processor (#47201)
Previously, error messages related to an overriden constructor doc would
stringify the doc as `[object Object]`, which is not helpful for
debugging the issue. For example:

> Constructor doc [object Object] was not marked '@internal'

This commit improves the error message by including the doc's ID
instead. For example, the above error message would become:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal'

PR Close #47201
2022-08-22 10:51:02 -07:00
Bob Watson e5de9a0722 docs: Add Bob Watson as a member of the Angular team (#47217)
PR Close #47217
2022-08-22 10:28:05 -07:00
George Kalpakas 7c5ede6552 fix(docs-infra): avoid distorting contributor images (#47215)
Ensure contributor images are not distorted.
This was accidentally broken in #46347.

PR Close #47215
2022-08-22 13:05:17 +00:00
George Kalpakas 8d4bc831aa build(docs-infra): upgrade cli command docs sources to 14d4d528c (#47148)
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](https://github.com/angular/cli-builds/compare/a764b37fa...14d4d528c):

**Modified**
- help/cache.json

PR Close #47148
2022-08-15 15:15:09 +00:00
Roman Matusevich 6277dd70d4 docs: remove duplicated styles (#47143)
PR Close #47143
2022-08-12 18:18:20 +00:00
Roman Matusevich d4678316b4 docs: fix code samples formatting in tutorial (#47144)
PR Close #47144
2022-08-12 18:17:26 +00:00
Bob Watson 757684b705 docs: set titles to sentence case (#47083)
* update overview and reviewing topics to accommodate new ToC
* incorporate edits from peer reviews

PR Close #47083
2022-08-12 18:04:25 +02:00
Bob Watson 1329707327 docs: clarify use of unsubscribe with HttpClient (#47127)
fix: #46542

PR Close #47127
2022-08-12 09:58:04 +00:00
Kalbarczyk adda3632d7 docs: add NG Poland 2022 and JS Poland 2022 to events (#47128)
PR Close #47128
2022-08-11 17:03:07 +00:00
Alma Eyre 777803c9fe docs: Moving a div down in tutorial toh-pt6.md (#47095)
PR Close #47095
2022-08-11 16:09:51 +00:00
Sonu Kapoor 8d0d6d941d docs: rename duplicate header (#47110)
PR Close #47110
2022-08-11 16:08:38 +00:00
Leosvel Pérez Espinosa 01f5598571 docs: remove duplicated sentence (#47126)
PR Close #47126
2022-08-11 16:04:15 +00:00
4javier 4e3fc7eac8 docs: clarify providers' injection in lazy loaded modules (#47094)
Addresses https://github.com/angular/angular/issues/47059
I try to keep the edit as concise as possible because adding any further
explanation would bring to much deeper info compared to the topic of the
page

Removed some convoluted info and replaced with a link to a page that
should focus on the specific aspect of the matter.
Conditional is obliged because IMHO that page should have a dedicated
paragraph explaining various ways of populating different injectors with
providers, and maybe integrating the interesting parts from the recent
created page about standalone app.
PR Close #47094
2022-08-10 10:45:03 -07:00
AntonioCardenas e4aee2b83d docs: add antoniocardenas to GDE resources (#47033)
PR Close #47033
2022-08-09 10:02:11 -07:00
Vovch 5e15e4f0c4 docs: change "zone" to "ngZone" in an example (#47079)
Change requesting "this.zone" to "this.ngZone" in the Plotly example, as it corresponds to the name declared in the constructor.
PR Close #47079
2022-08-09 10:01:26 -07:00
Angular Robot b59fe01c29 build: update eslint dependencies to v5.33.0 (#47087)
See associated pull request for more information.

PR Close #47087
2022-08-09 10:00:11 -07:00
Bob Watson 340fa465ce docs: add more documentation about lint messages (#47019)
Adds suggestions for how to resolve the most common messages produced by the documentation linter.

Adds links to the Proselint and other style tests to the new documentation.

Updates pullapprove and navigation.

PR Close #47019
2022-08-08 11:34:56 -07:00
onrails ddef8e2897 docs: updated reference link to NativeScript/Angular documentation (#47063)
PR Close #47063
2022-08-08 11:34:20 -07:00
Edward 951d02e1de docs: fix dependecy injection documentation page typos (#47057)
PR Close #47057
2022-08-08 11:33:04 -07:00
Bruno Barbosa 974a71c437 fix(docs-infra): fix nav css on tutorial tour of heroes (#47064)
Fix the navigation button to work properly by the css style applied when the button is active, on tutorial Tour of Heroes.

PR Close #47064
2022-08-08 11:32:40 -07:00
Roman Matusevich 4ae8b2e12c docs: fix text formatting for paragraph in Hierarchical injectors (#47067)
Paragraph of text is not wrapped into `p` tag due to missing empty line after the `div` block. The fix is just add an empty line.

PR Close #47067
2022-08-08 11:31:44 -07:00
Pawel Kozlowski 7f992326e4 docs: update link to the TypeScript handbook (#47075)
Closes #47070
PR Close #47075
2022-08-08 11:31:18 -07:00
Angular Robot ab9ce8a008 build: update all non-major dependencies (#46707)
See associated pull request for more information.

PR Close #46707
2022-08-08 09:23:56 -07:00
Jan Melcher 561cd84901 docs: fix link in dependency injection guide (#47055)
PR Close #47055
2022-08-08 09:23:06 -07:00
ileil 0920a15139 docs: update dependency injection content (#44466)
Refactored the DI section to improve doc quality, reduce cognitive load and drive consistency.

- Added an overview with prerequisites and doc cards that point to rest of the DI content
- Added introduction topic with topic purpose, value proposition and "fail fast"
- Broke apart complex concepts into simpler tasks
- Unified tone and language for each topic
- Added new content based on SME feedback
- Deleted obsolete content

PR Close #44466
2022-08-05 10:06:13 -07:00
Paul Gschwendtner 0b392afb69 build: update ngsw-config.json after redirect changes (#47048)
Looks like the `ngsw-config.json` file needs to be updated after a new
redirect being added in: https://github.com/angular/angular/pull/46820.

PR Close #47048
2022-08-05 09:56:56 -07:00
Paul Gschwendtner 9d9def3303 refactor(docs-infra): update safevalues and account for API changes (#47048)
Updates `safevalues` to unblock
https://github.com/angular/angular/pull/46707. As part of this commit
the necessary refactorings due to API changes are also made.

PR Close #47048
2022-08-05 09:56:56 -07:00
Jessica Janiuk f42a7c5234 docs(core): Add docs for keyboard event binding (#47022)
This adds new documentation on how to bind to keyboard events for key and code fields, and why you might use one over the other.

PR Close #47022
2022-08-03 17:35:56 -07:00
Bob Watson ed15427f19 docs: update Vale installation instructions (#47031)
This update includes:
* installation directions for the current version of the Vale VSCode extension (v. 0.15.0)
* a workaround for if the current version of the extension doesn't work.

PR Close #47031
2022-08-03 17:35:30 -07:00
Andrew Kushnir 7e491cfab3 fix(docs-infra): do not require @ngModule tag on standalone types (#47024)
This commit updates docs extraction logic to avoid requiring the `@ngModule` tag on standalone types, since they don't have to be present in any NgModule.

PR Close #47024
2022-08-03 11:04:55 -07:00
Andrew Scott 9e3994c7cc docs(core): Update inject error documentation (#47020)
The inject function is also available when using EnvironmentInjector.runInContext.

PR Close #47020
2022-08-02 18:06:55 -07:00
Angular Robot cb42788785 build: update eslint dependencies to v5.32.0 (#47016)
See associated pull request for more information.

PR Close #47016
2022-08-02 11:59:42 -07:00
George Kalpakas 7243564499 build(docs-infra): ensure all boilerplate dependencies are in sync (#47009)
All docs examples share the same `node_modules/` (symlinked into each
example from `aio/tools/examples/shared/node_modules/`). However, each
example type has a different `package.json`, which comes from
`aio/tools/examples/shared/boilerplate/*`). In order to ensure that the
dependencies in each example's `package.json` are the same as the ones
in the symlinked `node_modules/` (i.e. the ones that CI tests are run
with), we have a script (`yarn run sync-deps`) that can sync
dependencies from `shared/package.json` into the boilerplate
`package.json` files.

Previously, this script had to be run manually, which was easy to
forget/not know about and resulted in the boilerplate dependencies
often being out-of-sync with the ones in `shared/package.json` (and by
extension, the ones that were actually installed in `node_modules/`).

This commit helps keep the boilerplate dependencies up-to-date in the
following ways:
- Adds the `sync-deps` script to the `postinstall` scripts.
  This ensures that dependencies remain in sync whenever someone
  manually updates dependencies in `shared/package.json`.
- Runs the `sync-deps` script as a Renovate post-upgrade task.
  This ensures that the depenencies remain in sync whenever Renovate
  updates dependencies in `shared/package.json`.
  For more info on configuring post-upgrade tasks in Renovate, see:
  - [postUpgradeTasks][1]
  - [allowedPostUpgradeCommands][2]
  - [allowPostUpgradeCommandTemplating][3]

NOTE:
For the Renovate change to take effect, the [global config][4] in
`angular/dev-infra` also needs to be updated. This will be done in a
separate PR.

[1]: https://docs.renovatebot.com/configuration-options/#postupgradetasks
[2]: https://docs.renovatebot.com/self-hosted-configuration/#allowedpostupgradecommands
[3]: https://docs.renovatebot.com/self-hosted-configuration/#allowpostupgradecommandtemplating
[4]: https://github.com/angular/dev-infra/blob/22d3067021130271afcfd02d063828c5bdd9c2d7/.github/ng-renovate/runner-config.js

PR Close #47009
2022-08-02 11:58:51 -07:00
Andrew Scott d8cf78ba5e fix(router): Do not call preload method when not necessary (#47007)
In Angular 14, we introduced the `loadComponent` API for a `Route` to
allow lazy loading of a routed component in addition to the existing
`loadChildren` which allows lazy loading of child routes. As a result,
the `preload` method of the `PreloadingStrategy` needs to sometimes be
called even when there is a `canLoad` guard on the `Route`. `CanLoad`
guards block loading of child routes but _do not_ block loading of the
component.

This change updates the conditional checks in the internal preloader to
skip calling the `PreloadingStrategy.preload` when there is only a
`loadChildren` callback with a `canLoad` guard an no `loadComponent`.
In this case, the callback passed to the `preload` method is already
effectively a no-op so it's not necessary to call it at all.

resolves #47003

PR Close #47007
2022-08-02 09:38:28 -07:00
Marek Hám 57d4628e1f docs: fix link to live example (#47011)
Fixes #46975

PR Close #47011
2022-08-01 14:20:36 -07:00
Durairaj Subramaniam 2123317d02 docs: fix link in routing (#46988)
PR Close #46988
2022-08-01 13:00:24 -07:00
Roman Matusevich 6fc52c5cba docs: fix selector in Component Interaction guide (#46995)
The selector for the `CountdownTimerComponent` is `app-countdown-timer`
not `countdown-timer`.

PR Close #46995
2022-08-01 11:16:30 -07:00
Asaf M 4ac2196695 docs: fixed typos (#47008)
Used my script: https://github.com/Uziel302/websites-spell-checker/blob/master/mdnversion

PR Close #47008
2022-08-01 11:15:54 -07:00
George Kalpakas 3b34254932 docs(service-worker): remove duplication when describing notificationclick operations (#46912)
PR Close #46912
2022-08-01 09:51:56 -07:00
Tristan Sprößer 383090858c feat(service-worker): support sendRequest as a notificationclick action (#46912)
Implement a new `notificationclick` action, `sendRequest`, which sends a
GET request to the specified URL, without opening a new window. This can
be useful for hitting an API endpoint.

PR Close #46912
2022-08-01 09:51:55 -07:00
George Kalpakas f386cdb499 refactor(docs-infra): remove code that prints debug info (#46987)
In #41106, code was added in angular.io to print info that would help us
investigate and debug a ServiceWorker issue (#28114). Since the fix for
the issue was deployed on October 6th, 2021, the related error rate has
dropped dramatically:

![ChunkLoadError rate](https://user-images.githubusercontent.com/8604205/181502119-64ffb5de-f38e-4414-abcd-0fada29fd6d5.png)

Additionally, there have been no known occurrences or reports of the
issue in the last several months.

The remaining occurrences could be attributed to older versions still
being around on people's devices (due to the ServiceWorker caching) and
other circumstances not related to the ServiceWorker, for which there is
not much we can do. For example, a user could keep a tab open with an
older version of the app, which requests hashed files that no longer
exist on the server. If the ServiceWorker is not activated on such a tab
(either because the browser does not support it or because the user has
disabled it, for example), then it is expected that these requests would
fail.

This commit removes the code that prints ServiceWorker-related debug
info to reduce the payload size of the app.

Fixes #41117

PR Close #46987
2022-08-01 09:48:14 -07:00
Angular Robot 996071035b build: update eslint dependencies to v5.31.0 (#46968)
See associated pull request for more information.

PR Close #46968
2022-08-01 09:46:41 -07:00
Aristeidis Bampakos 0a5abf3093 docs: modify callout in TOH part 2 (#46964)
PR Close #46964
2022-08-01 09:30:04 -07:00
Andrew Quinn aadcc13106 docs: fix typo in guide/structural-directives page (#46961)
Fix typo [missing plural marker "element_s_"] on https://angular.io/guide/structural-directives.

Original:
>Structural directives are directives which change the DOM layout by adding and removing DOM element.

Fix:
>Structural directives are directives which change the DOM layout by adding and removing DOM element**s**.
PR Close #46961
2022-08-01 09:29:40 -07:00