Commit Graph

4811 Commits

Author SHA1 Message Date
Alan Agius 665b986896 docs: CLI users polyfills (#42263)
With this change we remove polyfills that are listed in suggested/mandatory but are not needed by Angular CLI users, since the Angular CLI will include these polyfills by default.

Closes #39793

PR Close #42263
2021-06-09 16:10:47 -07:00
Pete Bacon Darwin e36c5b4c86 docs: fix `ngProjectAs` selector in example (#42523)
Fixes #42522

PR Close #42523
2021-06-09 12:10:20 -07:00
George Kalpakas 3c25242ada build(docs-infra): upgrade cli command docs sources to 18bbd044d (#42525)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](9cbb4059f...18bbd044d):

**Modified**
- help/generate.json

PR Close #42525
2021-06-09 09:14:39 -07:00
David Shevitz 3de774e778 docs: add guidance on adding filtering and sorting logic to componetns instead of pipes (#42368)
Fixes #41652

PR Close #42368
2021-06-08 17:53:30 -07:00
Renovate Bot 230f0c41b7 build: lock file maintenance (#42499)
PR Close #42499
2021-06-08 15:25:59 -07:00
Dylan Hunn 34ce635e3a feat(forms): undo revert and add ng-submitted class to forms that have been submitted. (#42132) (#42132)
As previously discussed in pull/31070 and issues/30486, this would be useful because it is often desirable to apply styles to fields that are both `ng-invalid` and `ng-pristine` after the first attempt at form submission, but Angular does not provide any simple way to do this (although evidently Angularjs did). This will now be possible with a descendant selector such as `.ng-submitted .ng-invalid`.

In this implementation, the directive that sets control status classes on forms and formGroups has its set of statuses widened to include `ng-submitted`. Then, in the event that `is('submitted')` is invoked, the `submitted` property of the control container is returned iff it exists. This is preferred over checking whether the container is a `Form` or `FormGroup` directly to avoid reflecting on those classes.

Closes #30486.

PR Close #42132.

This reverts commit 00b1444d12, undoing the rollback of this change.

PR Close #42132
2021-06-08 14:02:29 -07:00
Teri Glover 0777faccfb docs: Edited to remove jargon in Reference, Glossary, and Style sections (#42187)
PR Close #42187
2021-06-08 12:51:05 -07:00
kuncevic 2a28a1ddb2 docs: add Angular Rocks podcast (#42078)
PR Close #42078
2021-06-08 12:50:13 -07:00
Santosh Yadav 4975a106dc docs(platform-server): added commands for universal and add prerendering info (#36005)
Fixes #36004

PR Close #36005
2021-06-08 12:47:24 -07:00
Sam Severance f3fde4bbb5 docs: Add selector for `PeekABooDirective` (#42146)
PR Close #42146
2021-06-08 12:46:06 -07:00
Teri Glover 43b4a8c07c docs: Edited to remove jargon in Reference Errors (#42186)
PR Close #42186
2021-06-08 12:45:23 -07:00
Kapunahele Wong f33fa04fb8 docs: improve accessibility of animations example (#41385)
PR Close #41385
2021-06-08 12:43:32 -07:00
Kapunahele Wong 386550cdf3 docs: improve accessibility of reactive-forms example (#41252)
PR Close #41252
2021-06-08 12:42:20 -07:00
Kapunahele Wong 0031c8cf41 docs: improve accessibility of attribute-binding example (#41432)
PR Close #41432
2021-06-08 12:16:54 -07:00
Kapunahele Wong 4ff636d24d docs: improve accessibility of pipes example (#41317)
PR Close #41317
2021-06-08 12:16:08 -07:00
Chris 8fe40026c1 docs: clarify documentation regarding passing multiple configurations to ng build (#41333)
Fixes #40923

PR Close #41333
2021-06-08 11:49:24 -07:00
Tiago Temporin 08628b45d3 docs: add components to material community components description (#41987)
PR Close #41987
2021-06-08 11:48:40 -07:00
Pete Bacon Darwin f788e6b8a6 refactor(docs-infra): prepare DocumentService to handle new disambiguated URLs (#42509)
A subsequent commit is going to change disambiguated URLs.
This commit prepares the AIO application to attempt the new URLs
if the old URLs fail. This will help to mitigate problems that may occur
during the period between deployment of the new version and the
service-worker not being updated.

PR Close #42509
2021-06-08 11:45:53 -07:00
Pete Bacon Darwin 645cad5614 docs(core): describe interactions between view-encapsulated components (#42397)
This commit adds information to the view encapsulation guide that
describes the styling interactions between components that use differing
view encapsulation modes.

Closes #40715

PR Close #42397
2021-06-08 10:39:52 -07:00
MarsiBarsi d10c38a8f8 docs: add Roman Sedov to contributors page (#42515)
PR Close #42515
2021-06-08 10:37:51 -07:00
iRealNirmal 751f68dcf8 docs: updated collaborators and add angular dev's link (#42516)
Existing trusted collaborators link is not working and now link is updated to one of angular.io page also it was missing angular dev's link so added it.

Closes #42513.

PR Close #42516
2021-06-08 10:37:16 -07:00
Teri Glover f1d58efdb1 docs: Edits to remove jargon in Reference Observables, Dependency Injection (#42185)
PR Close #42185
2021-06-07 18:24:48 -07:00
George Kalpakas f85a120b7b docs(router): fix code-example headers (#42507)
Previously, the code-examples headers used in the
"Creating custom route matches" tutorial contained the name of the
example directory (`routing-with-urlmatcher`). This was confusing,
because the user was previously instructed to create an app named
`angular-custom-route-match` and switch to that directory.

This commit fixes it by removing the root directory name from the
headers, thus leaving the path of the file relative to the current
working directory. This also aligns with code-examples in other guides.

PR Close #42507
2021-06-07 11:58:20 -07:00
JoostK 64c8027538 docs: clarify how type-only imports can be used to avoid NG3003 (#42491)
Since #42453, type-only imports are not considered for cyclic imports.
This commit adds a note to the NG3003 error documentation to mention
using type-only imports to avoid the error.

PR Close #42491
2021-06-07 10:47:13 -07:00
Andrew Kushnir f4c55e464a docs: provide more info on the `NO_ERRORS_SCHEMA` schema (#42327)
The `NO_ERRORS_SCHEMA` schema can be used to ignore errors related to unknown elements or properties, but since it suppresses these errors it may also hide real problems in a template. This commit updates the `NO_ERRORS_SCHEMA` docs to mention that.

Closes #39454.

PR Close #42327
2021-06-07 10:46:34 -07:00
Kristiyan Kostadinov afd68e5674 feat(compiler): emit diagnostic for shadow dom components with an invalid selector (#42245)
This is based on a discussion we had a few weeks ago. Currently if a component uses `ViewEncapsulation.ShadowDom` and its selector doesn't meet the requirements for a custom element tag name, a vague error will be thrown at runtime saying something like "Element does not support attachShadowRoot".

These changes add a new diagnostic to the compiler that validates the component selector and gives a better error message during compilation.

PR Close #42245
2021-06-07 10:44:57 -07:00
Pete Bacon Darwin cc904b5226 docs(core): clarify deprecation of `entryComponents` (#42248)
These may still be needed in View Engine libraries.

Closes #39958

PR Close #42248
2021-06-07 10:02:01 -07:00
Alex Inkin b061e5b2d7 fix(docs-infra): fix search results font color (#42488)
Use the same white constant for no results message
PR Close #42488
2021-06-07 09:38:06 -07:00
Gourav102 5d70f09032 docs: Corrected spelling (#42493)
Corrected spelling of 'Properties'.
PR Close #42493
2021-06-07 09:36:18 -07:00
Gourav102 cd22c7a1f5 docs: Updated the code snippet path (#42494)
PR Close #42494
2021-06-07 09:32:57 -07:00
Igor Minar 30059173f4 docs: add node.js version info into the universal guide (#42375)
Previously we didn't document what versions were supported. Since universal requires node.js I'm adding version
information into the guide as a informative callout.

Fixes #39436

PR Close #42375
2021-06-04 15:21:21 -07:00
Teri Glover a5b5136843 docs: Edits to remove jargon in Reference NgModules (#42182)
PR Close #42182
2021-06-04 13:32:56 -07:00
Paul Gschwendtner 25f763cff8 feat(core): support TypeScript 4.3 (#42022)
Switches the repository to TypeScript 4.3 and the latest
version of tslib. This involves updating the peer dependency
ranges on `typescript` for the compiler CLI and for the Bazel
package. Tests for new TypeScript features have been added to
ensure compatibility with Angular's ngtsc compiler.

PR Close #42022
2021-06-04 11:17:09 -07:00
Jessica Janiuk 00b1444d12 Revert "feat(forms): add `ng-submitted` class to forms that have been submitted." (#42474)
This reverts commit f024d7556081f8913f21761bb8e6aab8d08be110.

PR Close #42474
2021-06-03 17:42:02 -07:00
David Shevitz aea56048f6 docs: update host and viewproviders section with correct logical tree representation (#42403)
Fixes #38741

PR Close #42403
2021-06-03 14:33:44 -07:00
George Kalpakas 268e0040e7 build(docs-infra): disable critical CSS inlining (#42435)
Previously, the critical CSS inlining optimization (which is turned on
by default in CLI v12+) was causing a Flash Of Unstyled Content (FOUC).
This was caused by the combination of the following facts:
- The way CSS inlining is implemented in the CLI makes loading the full
  styles asynchronous and non-render-blocking (so the app can bootstrap
  before the styles are fully downloaded).
- Angular.io does not employ the [app shell][1] pattern in order to
  render pages at build time, resulting in very minimal CSS rules being
  recognized as critical (for the purpose of inlining).

This commit fixes the FOUC by disabling the critical CSS inlining, while
we consider a better way to approach this (in order to be able to rip
the benefits of inlining without the FOUC).

[1]: https://angular.io/guide/app-shell

Fixes #42365

PR Close #42435
2021-06-03 14:32:06 -07:00
Dylan Hunn 47270d9e63 feat(forms): add `ng-submitted` class to forms that have been submitted. (#42132)
As previously discussed in pull/31070 and issues/30486, this would be useful because it is often desirable to apply styles to fields that are both `ng-invalid` and `ng-pristine` after the first attempt at form submission, but Angular does not provide any simple way to do this (although evidently Angularjs did). This will now be possible with a descendant selector such as `.ng-submitted .ng-invalid`.

In this implementation, the directive that sets control status classes on forms and formGroups has its set of statuses widened to include `ng-submitted`. Then, in the event that `is('submitted')` is invoked, the `submitted` property of the control container is returned iff it exists. This is preferred over checking whether the container is a `Form` or `FormGroup` directly to avoid reflecting on those classes.

Closes #30486.

PR Close #42132
2021-06-03 13:21:29 -07:00
cindygk c8e4783d14 docs: offboard misko and annie from contributors page (#42467)
PR Close #42467
2021-06-03 13:17:45 -07:00
George Kalpakas c964ad66d4 test(docs-infra): fix URL for a11y testing of angular.io (#42462)
This commit fixes one of the URLs used for testing the accessibility of
angular.io from `start-routing` to `start/start-routing`. The old URL is
not correct and result in a "Page not found" error.

This commit also increases some of the a11y scores.

PR Close #42462
2021-06-03 10:50:29 -07:00
Renovate Bot f02382dfd4 build: update dependency lighthouse to v8 (#42462)
PR Close #42462
2021-06-03 10:50:29 -07:00
David Shevitz 71fa896a91 docs: update link to jasmine documentation about spies (#42463)
PR Close #42463
2021-06-03 10:34:23 -07:00
Kristiyan Kostadinov 3d1c905c91 refactor(docs-infra): clean up AIO Sass files (#42442)
Cleans up AIO's Sass files by:
* Switching them all over to the `@use`-based API from Angular Material.
* Removing the import of the Material theming API in a bunch of places that weren't using it.
* Migrating the new usages of Sass utility functions to the new syntax (e.g. `map.get` vs `map-get`).
* Fixing a few files that were using 4 spaces for indentation instead of 2.

PR Close #42442
2021-06-02 13:25:42 -07:00
Alex 0ac193c86c docs: fix typo in the Router guide (#42455)
PR Close #42455
2021-06-02 13:24:30 -07:00
Sam Severance c0b2eeb54c docs: remove unused imports from unit tests (#42441)
PR Close #42441
2021-06-02 13:22:09 -07:00
Sam Severance c1a9f07ea1 docs: refactor `WelcomeComponent` unit test (#42441)
PR Close #42441
2021-06-02 13:22:08 -07:00
Igor Minar 1fe1dd1f19 docs: clarify the wording around live examples for all testing guides (#42406)
We should primarily point readers to the stackblitz that contains the spec files and runs them.

The application stackblitz is secondary (and doesn't actually contain the spec files, which is confusing).

Fixes #38535

PR Close #42406
2021-06-02 13:20:13 -07:00
Igor Minar 4c39869566 docs: add a note about javascript mime-types to the deployment guide (#42339)
Some servers don't serve the .js files with the correnct headers. This change documents the requirement.

Fixes #30835

PR Close #42339
2021-06-02 13:17:36 -07:00
Renovate Bot f3f10140b5 build: lock file maintenance (#42264)
PR Close #42264
2021-06-02 13:16:58 -07:00
David Pfeiffer 574f64041e docs: specify correct interceptor class type (#42437)
In the "Interceptor order" section of the HTTP guide there is a typo which incorrectly lists the same service twice when referring to two different services. The order that these services are listed is important, and this commit fixes the typo by listing the services in the correct order.
PR Close #42437
2021-06-01 16:36:58 -07:00
Renovate Bot 2b7dc15655 build: update dependency ts-node to v10 (#42257)
PR Close #42257
2021-06-01 14:12:37 -07:00
Renovate Bot 5babdb2284 build: update angular (#42379)
PR Close #42379
2021-06-01 12:51:54 -07:00
JoostK 44b737ecb4 docs: clarify how declaration files can be installed (#42417)
The documentation suggested that `@types/*` scoped packages would
automatically be recognized, however the CLI configures a project such
that the package has to be explicitly added to the TypeScript
configuration files.

Closes #37572

PR Close #42417
2021-06-01 10:17:32 -07:00
George Kalpakas 1d9c6bb31d docs(docs-infra): document the implementation of styles (incl. theming) in angular.io (#42396)
PR Close #42396
2021-06-01 10:16:21 -07:00
George Kalpakas 4a5af60dc5 fix(docs-infra): improve homepage layout in print mode (#42396)
In #41129, the `.hero-logo` image was changed from an `<img>` element to
a `<div>` with an image background. As a result, in print mode (where
browsers often omit backgrounds to save ink) the logo was not present.

This commit fixes this by ensuring the word `Angular` is displayed as a
title instead of the logo in print mode. It also hides the `Get started`
button in print mode, since it doesn't add any value.

Before: ![homepage-print before][1]
After: ![homepage-print after][2]

[1]: https://user-images.githubusercontent.com/8604205/120068867-889e6080-c08b-11eb-9bd5-233d8592f7ec.png
[2]: https://user-images.githubusercontent.com/8604205/120068869-89cf8d80-c08b-11eb-8740-a68a5ef68c34.png

PR Close #42396
2021-06-01 10:16:20 -07:00
George Kalpakas 58160742b1 refactor(docs-infra): remove unused `_typography-theme.scss` file (#42396)
This commit removes the `_typography-theme.scss` file that is currently
not used. The file contains a single Sass mixin
(`docs-site-typography-theme()`), which is never called.

PR Close #42396
2021-06-01 10:16:20 -07:00
George Kalpakas 3b97287758 refactor(docs-infra): minor refactorings/style changes (#42396)
This commit includes some minor refactorings and style changes as a
follow-up to PR #41129. (The changes were minor enough that didn't
warrant blocking the PR.)

PR Close #42396
2021-06-01 10:16:20 -07:00
George Kalpakas af762fa917 build: allow Node.js v15 and above for local development (#42387)
This commit changes the `engines` rules in the root `package.json` as
well as the `package.json` used when working on docs example to also
accept Node.js versions greater than v14. This aligns them with
`aio/package.json` and allows using Node.js v15 and v16 (current) for
local development in the `angular/angular` repo.

Related to #42367.

PR Close #42387
2021-06-01 10:14:08 -07:00
Dylan Hunn c54643f00e docs(forms): make the forms validation guide specify more clearly what happens when mixing HTML5 native validators with Angular forms. (#42377)
Previously, the docs didn't say anything about the fact that the `novalidate` attribute is added to the enclosing form, or how to override that behavior. I have added a couple lines in the appropriate spot clarifying this issue.

PR Close #42377
2021-06-01 10:13:36 -07:00
Doug Parker e0381a87c9 docs: update CLI builder to be platform agnostic (#42371)
Fixes #35373.

This changes the example from "run an arbitrary process" to "copy a file". This should make it a bit easier to follow, require less background knowledge to understand, and not use any platform-specific commands that won't work for Windows users.

The most glaring issue with this change is that this doc does not explictly specify how to build and run a builder. I've updated some of the files to hint at this a bit more (such as the `"implementation": "./dist/my-builder.js"`), but another pass is required to figure out the best way to compile a builder and how we want to structure this example to best communicate that.

PR Close #42371
2021-06-01 10:13:02 -07:00
Doug Parker 2a311c51e6 docs: minor cleanup (#42371)
Mainly just fixing some spacing and adding `.prototype` for non-static properties.

PR Close #42371
2021-06-01 10:13:02 -07:00
George Kalpakas e798bfabb0 build(docs-infra): fix linting warnings (#42359)
This commit fixes some linting warning that were printed when running
`ng lint`. The warnings can be seen in the `lint` step of
[this CI job][1].

Most of the warnings were related to the deprecation of passing context
to Jasmine matchers in favor of using the [withContext()][2] matcher
(introduced in Jasmine v3.3.0).

[1]: https://circleci.com/gh/angular/angular/995543
[2]: https://jasmine.github.io/api/3.3/matchers.html#withContext

PR Close #42359
2021-06-01 10:11:47 -07:00
Andrew Scott 62b5a6cb07 docs: add docs for DebugElement (#42352)
fixes #36048

PR Close #42352
2021-05-27 17:02:24 -07:00
Teri Glover 4cd2cc439d docs: Edits to remove jargon in Reference section (#42033)
PR Close #42033
2021-05-27 16:47:05 -07:00
Teri Glover ee0e3fbf89 docs: edits to remove jargon (#42025)
PR Close #42025
2021-05-27 16:46:11 -07:00
Teri Glover 3a959152f9 docs: Edited to remove jargon, fixed issue (#42026)
PR Close #42026
2021-05-27 15:37:14 -07:00
Teri Glover 1710fa861c docs: Edits to remove jargon (#42026)
PR Close #42026
2021-05-27 15:37:13 -07:00
Teri Glover 635aaaa27d docs: Edited to remove jargon. (#41978)
PR Close #41978
2021-05-27 15:36:38 -07:00
Andrew Scott d33fdea1e3 docs: clarify behavior of strict templates flags (#42392)
fixes #39355

PR Close #42392
2021-05-27 14:08:50 -07:00
Andrew Scott 8572fef491 docs: change markdown table to HTML table in template typecheck doc (#42392)
PR Close #42392
2021-05-27 14:08:49 -07:00
Joey Perrott fa0144fde6 docs: clarify the shortcomings of local variable technique for parent-child component interactions (#42331)
Closes #38302

PR Close #42331
2021-05-27 14:04:43 -07:00
AleksanderBodurri cdb8f556fb feat(docs-infra): implement dark mode (#41129)
defines styles for a first iteration of an aio darkmode

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri 8d9d1c293d feat(docs-infra): create module theme files (#41129)
creates theming files for the module styles in aio; done as part of the effor to make aio themeable

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri ab7e8dc99d feat(docs-infra): create typography and layout theme files (#41129)
creates theming files for the aio typography styles; done as part of the effort to make aio themeable

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri d429029074 refactor(docs-infra): grab scss mixins with scss use syntax instead of global imports (#41129)
move away from global mixins because @import is going to be deprecated

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri 21e35ece79 refactor(docs-infra): grab scss constants using scss use syntax instead of the global imports (#41129)
move away from using global constants in scss files because @import will be deprecated soon

PR Close #41129
2021-05-27 11:24:53 -07:00
AleksanderBodurri eff26e1be8 refactor(docs-infra): rename namespaced scss to index files (#41129)
scss files were forwarded from files that were named without convention, changes these file names to follow conventions

PR Close #41129
2021-05-27 11:24:52 -07:00
AleksanderBodurri 85a627f741 feat(docs-infra): port over material io theming logic to angular io (#41129)
brings in theming tools from material io into angular io in preparation of implementing darkmode

PR Close #41129
2021-05-27 11:24:52 -07:00
Igor Minar e73fef4d0b docs: add a note about <select> and nested <option>s in Ivy compat guide (#42338)
An internal change in Ivy has surfaced issues in previosly broken code. This change adds a note to the
Ivy compatibility guide as well as the TrackByFunction api docs.

Fixes #35896

PR Close #42338
2021-05-27 11:12:25 -07:00
George Kalpakas deb893095f build(docs-infra): remove unused `spy-directive.gif` image (#42388)
The only reference to the `spy-directive.gif` image was removed
in #42369, so the image is no longer used. This commit removes the file
from the repository.

PR Close #42388
2021-05-27 08:57:59 -07:00
George Kalpakas b57a1275b2 docs: fix typos in the `cli-builder` guide (#42386)
PR Close #42386
2021-05-27 08:57:20 -07:00
Sam Severance 17d0dd3593 docs: update links to Testing Component Scenarios page (#42385)
PR Close #42385
2021-05-27 08:56:05 -07:00
不肖・高橋 e87dbafba1 docs: fix a typo (#42384)
The 'B' in 'StackBlitz' is lowercased.
PR Close #42384
2021-05-27 08:55:28 -07:00
Wagner Maciel 38378ce50a docs: explain what a deploy url is and how it differs from a base href (#42363)
fixes #34931

PR Close #42363
2021-05-27 08:54:48 -07:00
Andrew Kushnir d74d1306e2 docs: improve preloading component data chapter (#42340)
This commit updates the `Lazy-loading feature modules` guide (guide/lazy-loading-ngmodules) to fix example code that illustrates the process of preloading component data.

Closes #37113.

PR Close #42340
2021-05-27 08:54:03 -07:00
Andrew Scott 7a6358b4a8 docs: add note to clarify that ngOnChanges is only called if inputs are bound (#42374)
fixes #23017

PR Close #42374
2021-05-26 17:17:25 -07:00
Igor Minar 141791e070 docs: add a note about the ngc command and command line options (#42373)
It turns out that we don't document anywhere how ngc works and what options we support.
I added a brief section, without going too much into details because most users should not need to use ngc directly.

I also came across some bug in `ngc` and filed #42372.

Fixes #29623

PR Close #42373
2021-05-26 17:16:39 -07:00
David Shevitz 74186c36de docs: remove lightbox gif from Use Directives to Watch the DOM section. (#42369)
This gif is out of date and causing reader confusion.

Fixes #40193

PR Close #42369
2021-05-26 15:49:05 -07:00
Andrew Kushnir e917d57dbb docs: use `json` pipe in Forms guide instead of a temporary diagnostic field (#42364)
Closes #37283.

PR Close #42364
2021-05-26 15:47:05 -07:00
Zach Arend 44027c4e0e build: allow node v15 and above for aio (#42367)
Changes the engines rule in aio to accept any node version greater than
or equal to v14. This allows node v15 to work with aio.

addresses #42076

PR Close #42367
2021-05-26 14:24:17 -07:00
Andrew Scott bcfe4afda9 docs: clarify that `forRoot` can be called in other modules (#42361)
The faq on `forRoot` implies that you cannot and should not call `forRoot` for an import
outside the AppModule. This is technically incorrect. This commit clarifies
the statement and refers the reader to the hierarchical injectors guide.

fixes #29002

PR Close #42361
2021-05-26 14:23:08 -07:00
Andrew Scott 4cb11cc4e7 docs: add note about why module import order is important (#42323)
Fixes #30223

PR Close #42323
2021-05-26 14:21:53 -07:00
Joey Perrott 4e9b61aaf9 docs: remove/update broken links in resources appearing on aio (#42232)
Remove or update broken links to resources from the resources and
contributors pages on aio.

Closes #39719

PR Close #42232
2021-05-26 14:21:12 -07:00
Suguru Inatomi 33e1a18530 build(docs-infra): allow only Node.js v14 and above (#42093)
The AIO doc-gen uses JavaScript syntax that requires node.js 14.0.0 or above.

Closes #42086

PR Close #42093
2021-05-26 20:07:51 +00:00
David Shevitz bd51762d6e docs: add section on binding to passive events (#42292)
fixes #41622

PR Close #42292
2021-05-26 20:06:57 +00:00
David Shevitz de8a6ae9ed docs: add example that exports a part of an animation for reuse (#42321)
Fixes #41334

PR Close #42321
2021-05-26 20:06:28 +00:00
Andrew Kushnir b2eab977d9 docs: remove `entryComponents` references from the custom elements guide (#42324)
Since `entryComponents` field is deprecated and no longer used in Ivy, this commit removes `entryComponents` references from the custom elements guide.

Closes #40341.

PR Close #42324
2021-05-26 20:06:00 +00:00
Igor Minar 38b0e71cb2 docs: move the schematics under Angular Tools menu section (#42332)
In #39176 Alan noted that schematics is currently misplaced and should really be under the Angular Tools menu item.

In that issue, Alan also noted the "Angular Compiler" and "Angular CLI" are not refereced from here.
Since the issue was created "Angular Compiler" has already been moved under "Angular Tools".

Angular CLI is documented throughout the docs, and the "CLI Command Reference" under References is really just a reference
so it seems correctly located.

Fixes #39176

PR Close #42332
2021-05-26 20:05:12 +00:00
Igor Minar 40bbcaa12d docs: move and update browser compatibility docs to browser-support guide (#42334)
I simplified the content significantly since most of it is not relevant any more.

Fixes #26525

PR Close #42334
2021-05-26 20:04:13 +00:00
Sam Severance da1a868ec2 docs: add missing `await` to `BannerComponent` unit test (#42336)
PR Close #42336
2021-05-26 20:03:46 +00:00
Sam Severance caf15da651 docs: fix `BannerComponent` unit tests (#42336)
remove `async` and `await` from `BannerComponent` test because the
component uses an inline template and styles

create doc region in `banner-external.component.spec.ts` demonstrating
test setup that may fail due to a missing call to `.compileComponents()`
for a component with an external template and stylesheet

PR Close #42336
2021-05-26 20:03:46 +00:00
Serguei Cambour 0166391402 docs: edit project structure description (#42346)
- improve `app` folder description: an initial skeleton app project, also called angular-tour-of-heroes (in the src subfolder), there is no `angular-tour-of-heroes` in the `src` subfolder.
- an end-to-end test project (in the e2e subfolder) removed as does not exist/was not created
PR Close #42346
2021-05-26 20:01:08 +00:00
Sam Severance 74ebdf6fdc docs: refactor `HeroDetailComponent` and unit test (#42349)
remove `@Input()` decorator from `hero` property because the component
is designed to get the hero via a service, not an input binding.

add `HTMLElement` type to `HeroDetailComponent` unit test

PR Close #42349
2021-05-26 20:00:35 +00:00
Teri Glover b7721aa630 docs: Edit correction to remove jargon in Release section (#42029)
PR Close #42029
2021-05-25 22:14:30 +00:00
Teri Glover 8109cba576 docs: Edits to remove jargon (#42029)
PR Close #42029
2021-05-25 22:14:30 +00:00
Pete Bacon Darwin 850028d000 docs: remove VS 2015 guide (#42253)
This guide is outdated and doesn't appear in the navigation.

Fixes #17320

PR Close #42253
2021-05-25 22:14:02 +00:00
Pete Bacon Darwin c2ed612da3 docs: convert the last `my-app` components to `app-root` (#42256)
Most of these were fixed in other PRs but there were are couple of stragglers.
Note that `my-app` components in non-documentation facing code, such as
compliance tests have not been changed.

Fixes #20235

PR Close #42256
2021-05-25 22:13:36 +00:00
Andrew Scott b0581f3117 docs: add link to the style precedence guide in ivy compatibility (#42317)
fixes #36508

PR Close #42317
2021-05-25 22:12:14 +00:00
Joey Perrott bdd3cca9ab docs: update wording for angular libraries mapping peer dependencies (#42322)
Update the wording for Angular Libraries mapping of peer dependencies to make
it clearer that only the parts of @angular/* that the library depends on
should be marked as peer dependencies.

Closes #37304

PR Close #42322
2021-05-25 22:09:51 +00:00
Pete Bacon Darwin 063d1789c2 docs: move "Browser Support" page in navigation tree (#42326)
Closes #39270

PR Close #42326
2021-05-25 22:09:25 +00:00
Igor Minar f74fd64523 fix(docs-infra): increase the opacity of background-color for inline `code` blocks (#42297)
I intentionally did not change the font size as discussed in #41196
because the current
font size is already about the same as the normal text size.

Fixes #41196

PR Close #42297
2021-05-25 17:59:26 +00:00
Andrew Scott 2ff5bfe139 docs: fix documentation of guard execution order (#42288)
The current documentation of the `CanDeactivate`, `CanActivate`, and
`CanActivateChild` guard execution order is incorrect. This commit
corrects the documentation. For reference, see https://stackblitz.com/edit/angular-canactivatechild-nqp1f7

Fixes #28082

PR Close #42288
2021-05-25 17:54:52 +00:00
Igor Minar dc6bff10ac docs: clarify the definition of the bundle bundget defaults with strict mode (#42289)
Previously we didn't clarify that the stricter defaults have no impact on existing
projects, and we also didn't define the default values for bundle budgets.

Fixes #41966

PR Close #42289
2021-05-25 17:54:05 +00:00
David Shevitz 1955dbb048 docs: remove references to CheckAlways and CheckOnce (#42300)
Fixes #29751

PR Close #42300
2021-05-25 17:53:23 +00:00
Alan Agius d15a6a3a71 docs: update web-worker syntax (#42306)
With this change we update the worker initialization syntax to reflect that used in Angular CLI 12.

Closes #42302

PR Close #42306
2021-05-25 17:52:58 +00:00
Andrew Scott 29e5d509aa docs: clarify expectations for `ActivatedRoute` observables (#42316)
https://github.com/angular/angular/issues/16261#issuecomment-748289240

A couple important things to note about the behavior:

* The component is destroyed, meaning that all of its members will be destroyed as well, including any subscriptions to the route params
* This _does not_ mean that any `finalize` operators or `complete` on the subscription is called. This only happens if the source completes or you unsubscribe from the subscription. The documentation doesn't state that the `Router` will do this, though I can still understand why the behavior is confusing.

You can play around with these scenarios here:
https://stackblitz.com/edit/rxjs-hmpizx
* `complete` the source without unsubscribe: `next`, `complete` and `finalize` are all called, even when `complete` is called before the `next` from the `delay`
* `unsubscribe` from subscription without `complete` on the source: `finalize` happens, but the `complete` of the subscription does not, and neither does `next`

So even if the `Router` were to call `complete` on all of the `Observables` on an `ActivatedRoute`, you would see that any subscriptions with a `delay` operator would still get called.

resolves #16261

PR Close #42316
2021-05-25 17:52:32 +00:00
Zach Arend 1c3fe69f92 docs: change Zeit -> Vercel (#42285)
In the deployment guide on AIO, change the Zeit company name to Vercel.
This is because Zeit rebranded to Vercel. Also update link to point to
Vercel's page about angular.

Fixes #38141

PR Close #42285
2021-05-25 02:43:38 +00:00
Igor Minar 44c8f46131 docs: fix ng-for link in structural-directives.md (#42293)
Correctly the reference to ng-for as `NgForOf` so that we get the word linked to the API page.

`NgFor` is not a JavaScript symbol so the docs infra doesn't autolink to the API page unless
we use the correct symbol name - `NgForOf`.

PR Close #42293
2021-05-25 02:43:12 +00:00
David Shevitz 1040697787 docs: remove sentence about how the not reloading the page. (#42290)
Fixes #41889

PR Close #42290
2021-05-24 15:42:42 -07:00
Sam Severance 29ece98744 docs: asynchronous test spy method (#42274)
fixes two `HeroService` tests that were synchronously
testing an asynchronous spy method

PR Close #42274
2021-05-24 15:18:43 -07:00
twerske 080211264f docs: remove kapunahele (#42233)
PR Close #42233
2021-05-24 15:18:17 -07:00
George Kalpakas 47bb841ed6 build(docs-infra): temporarily serve the DevTools guide at `/devtools` too (#42283)
The latest SW app version knows that `/devtools` should be redirected to
`/guide/devtools`. However, if a user has an older app version installed
(and until the SW downloads the latest version) they will get a 404 when
navigating to `/devtools`.

The reason is that the SW will see `/devtools` as a regular navigation
URL and serve `index.html` instead. The Angular app will then try to get
the content for `/devtools` by fetching `/generated/docs/devtools.json`
(which does not exist).

This commit fixes the issue by redirecting
`/generated/docs/devtools.json` to
`/geenrated/docs/guide/devtools.json`. When a user visits `/devtools`
for the first time, they will still be able to see the guide content
(while the SW updates in the background). On subsequent visits (once the
SW has downloaded the latest app version), they will be redirected to
`/guide/devtools`).

At a later time, once we are confident that the majority of users will
have updated to a newer app version, we can remove this temporary
redirect.

PR Close #42283
2021-05-24 15:17:21 -07:00
Sam Severance ad12b31c27 docs: unsubscribe from observables (#42284)
Add rxjs `first` operator in `DashboardHeroComponent` unit
tests to ensure unsubscription from observables

PR Close #42284
2021-05-24 15:16:52 -07:00
Zach Arend cb48bde35d docs: in toh-pt5, navigate back to home page after going to `/heroes` (#42279)
This fixes an issue in part 5 of the Tour of Heroes tutorial on
angular.io. At the end of the `Add RouterOutlet` section, the reader navigates to
`"/heroes"`. The next section, `Add a navigation link`, instructs the user to click ona link on the dashboard page to navigate to the heroes page. This is problematic because the previous section instructed the reader to navigate to the heroes page, not the dashboard. It assumes, the reader is on the dashboard page.

Fixes issue by instructing the reader to navigate back to the dashboard
after navigating to `"/heroes"` in the `Add RouterOutlet` section.

resolves #41212

PR Close #42279
2021-05-24 19:27:24 +00:00
George Kalpakas c820066d98 docs: align code in `product-example.component.*.ts` files (#42155)
This commit aligns the code in `product-alerts.component.ts` with
[product-alerts.component.1.ts][1], since both files are supposed to
represent the same component in different points in time. It also makes
the necessary changes in the respective templates.

This is a follow-up to #41999.

[1]: e86a1d3441/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts (L18)

PR Close #42155
2021-05-24 19:26:26 +00:00
Pete Bacon Darwin e16778d371 docs: fix multicasting observable example (#42258)
The example did not allow the async sequence to be cancelled
after the first timeout had completed.

Fixes #25804

PR Close #42258
2021-05-24 18:17:34 +00:00
Madleina Scheidegger 037792e8f6 docs: Update madleinas.jpg to fit size requirements (#42276)
PR Close #42276
2021-05-24 18:16:26 +00:00
Madleina Scheidegger 1e39cb7bca docs: add madleinas to contributors (#42276)
PR Close #42276
2021-05-24 18:16:26 +00:00
Joey Perrott 32b8832d61 docs: include source code styling section in docs style guide (#42227)
Include a source code styling section in the style guide for docs,
indicating to follow the Angular style guide where possible and
defining hexidecimal style guidance.

Closes #23691

PR Close #42227
2021-05-24 17:38:02 +00:00
mgechev c03280fd54 docs: update the intro image in the devtools guide (#42162)
The original image had an extra tooltip which was distracting and
unnecessary.

PR Close #42162
2021-05-24 14:47:31 +00:00
Alan Agius d7a1da9d4f docs: fix incorrect point in universal-in-action (#42262)
Previously it was mentioned that "Clicking a hero on the Heroes page does nothing.", this is not correct however since this link is implemented using `routerLink`.

Closes #41363

PR Close #42262
2021-05-24 14:47:06 +00:00
chenyunhsin 3293dd34ca docs: add missing `Product` interface to example (#42147)
Fixes #42144

PR Close #42147
2021-05-21 22:14:47 +00:00
Joey Perrott 4d56c10584 docs: move helpful alert regarding built-in directives to more logical place (#42226)
Moving the helpful alert expressing that built-in directives use public APIs
to be under the heading about built-in directives generally makes the content
in the alert more related to its surroundings than its previous location within
the ng-for section.

Closes #38525

PR Close #42226
2021-05-21 22:13:03 +00:00
iRealNirmal 03825cfab6 docs: updated animation docs intro section and example (#42046)
This commit updates the animation docs and provides better clarity for open-close component with it also added click event in open-close.component

Closes #39708

PR Close #42046
2021-05-21 18:09:26 +00:00
iRealNirmal 34cd4dc852 docs: add Angular 12 support information (#42124)
Added angular 12 suppport information in release document

Closes #42111

PR Close #42124
2021-05-21 18:08:09 +00:00
Sam Severance 62becc88f9 fix(docs-infra): fix example compilation issues (#42199)
Fix an issue that prevented the Http (tests) StackBlitz
and Testing (tests) StackBlitz from compiling.

Resolves #42198

PR Close #42199
2021-05-21 18:07:44 +00:00
Teri Glover d2a89dbbd9 docs: edits to remove jargon (#41282)
PR Close #41282
2021-05-20 23:06:02 +00:00
Teri Glover 57540f0e75 docs: edit to remove jargon (#41282)
PR Close #41282
2021-05-20 23:06:02 +00:00
David Shevitz 99f5b872e1 docs: add new tutorial that explains how to use the UrlMatcher for custom route matching (#42138)
PR Close #42138
2021-05-20 23:05:32 +00:00
Renovate Bot d6bc61ab5f build: update angular (#42090)
PR Close #42090
2021-05-20 17:25:51 +00:00
mgechev c9bc88757b docs: embed the devtools video in the corresponding guide (#42161)
Allow people consume the content in a video format.

PR Close #42161
2021-05-20 16:55:16 +00:00
George Kalpakas 04ab5edf65 test(docs-infra): correctly test URL redirects when the destination URL is also redirected (#42018)
Since #41625, `/guide/updating-to-version-10` is being redirected to
`https://v11.angular.io/guide/updating-to-version-11`. However,
`v11.angular.io` itself is being redirected to `angular.io`, while v11
is the latest stable version. As a result,
`/guide/updating-to-version-10` ends up being redirected to
`https://angular.io/guide/updating-to-version-11`. Currently, this
causes a CI failure in the `aio_monidoting` job ([example failure][1]).

This will change once v12 is released as the new stable version.
Alternatively, we could update the config and tests to expected
`/guide/updating-to-version-10` to be redirected to
`https://angular.io/guide/updating-to-version-11`, but that would end up
being redirected to `https://angular.io/guide/updating-to-version-12`
once v12 would be released, which is different behavior.

This commit provides a way to test for redirects when the destination
URL is itself redirected to a different URL. This allows us to use the
intended URL (for example, `https://v11.angular.io/...`), which will
continue to work as expected regardless of what is the latest stable
version without causing CI failures.

[1]: https://circleci.com/gh/angular/angular/983738

PR Close #42018
2021-05-20 16:07:59 +00:00
Renovate Bot 5c44ec1b45 build: lock file maintenance (#42120)
PR Close #42120
2021-05-19 09:20:53 -07:00
mgechev 132e418a30 docs: update the status of roadmap projects (#42159)
- Move Angular DevTools as completed
- Move optional NgModules as active

PR Close #42159
2021-05-19 09:19:06 -07:00
George Kalpakas d0958e8254 build(docs-infra): upgrade cli command docs sources to 9cbb4059f (#42172)
Updating [angular#master](https://github.com/angular/angular/tree/master) from
[cli-builds#master](https://github.com/angular/cli-builds/tree/master).

##
Relevant changes in
[commit range](f9a9dc37e...9cbb4059f):

**Modified**
- help/serve.json

PR Close #42172
2021-05-19 09:18:37 -07:00
David Shevitz 5b9a36cf95 docs: move all existing router documentation into a single location and add two new topics: an overview and a reference (#41972)
PR Close #41972
2021-05-18 15:39:38 -07:00
Renovate Bot b7d161487f build: update dependency esbuild to ^0.12.0 (#42143)
PR Close #42143
2021-05-18 15:37:07 -07:00
mgechev a303362481 docs: redirect for devtools to the corresponding guide (#42152)
Add redirects for Angular DevTools. We have
https://angular.io/guide/devtools as canonical URL, but as a short URL
we use https://angular.io/devtools to make the extension more
discoverable.

PR Close #42152
2021-05-18 11:18:35 -07:00
Sumit Arora 991f8523b3 docs: adding angular devtools documentation (#42152)
This PR adds user guide for Angular DevTools explaining the basics of
the component explorer and the profiler.

PR Close #42152
2021-05-18 11:18:35 -07:00
Sam Severance 63383c186d docs: use `ValidationErrors` interface in Form validation examples (#42135)
PR Close #42135
2021-05-18 10:14:02 -07:00
iron 2dfa010763 docs: update bazel migration doc link (#42142)
PR Close #42142
2021-05-18 08:36:23 -07:00