Commit Graph

4824 Commits

Author SHA1 Message Date
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
Daniel Díaz 5014133be3 docs: transform to uppercase API word in HTTP file (#42140)
PR Close #42140
2021-05-18 08:35:54 -07:00
Lars Gyrup Brink Nielsen fd4dbcb0c7 docs: decorate input properties with @Input (#42128)
PR Close #42128
2021-05-18 08:35:05 -07:00
iRealNirmal 5885cf5ad8 build(docs-infra): fixed broken stackblitz examples (#42122)
This commit fixes the broken stackblitz examples.

Closes #42116 .

PR Close #42122
2021-05-18 08:34:40 -07:00
rachid Oussanaa 78e7312d39 docs: change `project` to `projected` for past tense (#42118)
PR Close #42118
2021-05-17 10:55:18 -07:00
Kristiyan Kostadinov e86a1d3441 docs: make all examples compatible with strict mode (#41999)
Turns on the `strict` compiler flag and resolves the compilation errors in the various AIO examples.

PR Close #41999
2021-05-17 10:42:18 -07:00
Daniel Díaz e89e3cb375 docs: uppercase API word in Ivy Compatibility file (#42089)
PR Close #42089
2021-05-14 21:06:32 +00:00
Renovate Bot fdb3d3076e build: update angular (#42035)
PR Close #42035
2021-05-13 16:13:20 -04:00
George Kalpakas ee280a3354 build(docs-infra): upgrade cli command docs sources to f9a9dc37e (#42038)
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](094a1b674...f9a9dc37e):

**Modified**
- help/update.json

PR Close #42038
2021-05-13 13:52:56 -04:00
George Kalpakas d94e1acd93 docs: change `updating-to-version-*` redirects to point to the respective versions (#42019)
Previously, the `updating-to-version-*` URLs would redirect to the next
version update guide. More specifically:
- `/guide/updating-to-version-10` --> `https://v11.angular.io/guide/updating-to-version-11`
- `/guide/updating-to-version-11` --> `/guide/updating-to-version-12`

This seems confusing and inconsistent. Either all URLs should redirect
to the latest update guide (currently `/guide/updating-to-version-12`)
or each URL should redirect to the corresponding version.

This commit implements the second approach:
- `/guide/updating-to-version-10` --> `https://v10.angular.io/guide/updating-to-version-10`
- `/guide/updating-to-version-11` --> `https://v11.angular.io/guide/updating-to-version-11`

PR Close #42019
2021-05-13 13:48:56 -04:00
Renovate Bot 45083bc302 build: lock file maintenance (#42015)
PR Close #42015
2021-05-13 13:32:27 -04:00
mgechev 53cd7e5eb5 docs: update the angular roadmap (#42050)
Update the Angular roadmap to reflect efforts in Q2 2021.

PR Close #42050
2021-05-12 20:46:33 -04:00
mgechev 53c10c325a docs: update the angular roadmap (#42050)
Update the Angular roadmap to reflect efforts in Q2 2021.

PR Close #42050
2021-05-12 20:46:33 -04:00
Alex Rickabaugh d34ce6b76a build(docs-infra): update docs examples to Angular v12.0.0 (#42071)
This commit updates the example boilerplate to Angular v12.0.0. The
[diff](https://github.com/cexbrayat/angular-cli-diff/compare/11.2.11...12.0.0)
is fairly trivial and the migrations did not produce any code changes.

PR Close #42071
2021-05-12 19:37:15 -04:00
iRealNirmal e071e3b507 build(docs-infra): fixed i18n broken stackblitz example (#42001)
This commit fixes the broken stackblitz example of i18n.

Closes #41838.

PR Close #42001
2021-05-10 16:11:34 -04:00
Pete Bacon Darwin 8e232e6d88 build(docs-infra): show a dist-tag when installing the CLI on non-stable versions (#41991)
It is important to use the correct major version of the Angular CLI when
following the examples in the tutorials. This commit provides a custom
element that renders an appropriate dist-tag in the setup step of
the tutorial when the docs are not in "stable" mode.

Fixes #39821

PR Close #41991
2021-05-10 16:10:33 -04:00
Igor Minar 6ebb86f9a2 docs: clarify the IE11 deprecation timeline, and link to the RFC (#42023)
PR Close #42023
2021-05-10 12:41:59 -04:00
Richard Sithole e2f09fe8de docs: fix a grammatical error in lazy-loading-ngmodules guide (#42008)
PR Close #42008
2021-05-10 11:53:18 -04:00
Renovate Bot 991ea6fc39 build: update all non-major dependencies (#41956)
PR Close #41956
2021-05-10 11:35:59 -04:00
Ajit Singh ddf2a6c975 build: update node version to stop aio from breaking while generating docs (#42009)
When aio yarn docs-only command runs on v12.14.1 it fails details given on issue #41979. Upgrading node version to v12.17.0 solves this but creates a new warning (node:467072) ExperimentalWarning: The ESM module loader is experimental.
This warning gets removed in v12.20.0. Upgrading node version to 12.20.0

PR Close #42009
2021-05-10 10:39:39 -04:00
Teri Glover 500db42a2e docs: Edited to remove jargon (#41976)
PR Close #41976
2021-05-10 10:29:36 -04:00
Pete Bacon Darwin d59f2b0d0c refactor(core): remove unnecessary cast (#41960)
The `as any` is no longer needed since `providedIn` can accept `'any'`.

PR Close #41960
2021-05-10 10:28:31 -04:00
Pete Bacon Darwin adc732decb refactor(docs-infra): remove unused CSS rule (#41960)
The `.ngmodule-iist` is no longer used so can be removed.

PR Close #41960
2021-05-10 10:28:30 -04:00
Pete Bacon Darwin 71f37c9d9c build(docs-infra): add NgModules references to provided injectables (#41960)
Parse the `providers` property of each NgModule doc and add this doc to
the `ngModules` property of each provided injectable.

PR Close #41960
2021-05-10 10:28:30 -04:00
Pete Bacon Darwin 85f5cb45d2 build(docs-infra): associate `providedIn` injectables with their NgModule (#41960)
Such injectables were not appearing in the providers lists of their NgModule.
This commit updates the doc-gen to support associating these automatically.
Further, it also allows developers to mark other injectables that are provided
in an NgModule with a reference to the NgModule where they are provided.

The commit also does a refactoring of the `processNgModuleDocs` dgeni
processor code, to make it easier to maintain.

Fixes #41203

PR Close #41960
2021-05-10 10:28:30 -04:00
Andrew J Asche 23f6b76d1a fix(docs-infra): update glossary to include the term template-input-variable (#41632)
Template input variables are now described in the glossary.

PR Close #41632
2021-05-10 10:27:55 -04:00
Pete Bacon Darwin 3a48c0739d build(docs-infra): ensure that terminal code snippets render correctly (#41986)
After the changes to the `lang-none` styling in #41335, code snippets marked with

```
language="none" class="code-shell"
```

were being styled with the same foreground and background colours.

It turns out that most of these ought to be marked `language="sh"`
in which case the `code-shell` style became redundant and has been
removed.

Fixes #41984

PR Close #41986
2021-05-07 13:11:04 -04:00
profanis 5cf429d64e docs: change the documentation of creating-libraries by providing material links (#41982)
while reading the documentation, I noticed that there were
references in the material's documentation. Since the
links were absent, I had to google the terms and
continue my study. I find it easier for the reader not
to be distracted by googling, but just clicking
and following the suggested links

PR Close #41982
2021-05-07 10:11:08 -04:00
Renovate Bot 3927e2529a build: update angular (#41955)
PR Close #41955
2021-05-07 10:03:36 -04:00
iRealNirmal 2b939767fe docs: update testing components doc with generated compileComponent (#41947)
Updated testing-components-scenarios.md to match CLI generated test case.

Closes #39740

PR Close #41947
2021-05-06 15:40:36 -04:00
Kapunahele Wong 3a5f006ca6 docs: add redirect and update updating-to-v11 to v12 (#41625)
PR Close #41625
2021-05-06 15:15:08 -04:00
Kapunahele Wong a4e3ea0311 feat(docs-infra): add support for unformatted code-snippets (#41335)
This commit adds support for skipping formatting in `<aio-code>`
elements (which are used by `<code-example>` and `<code-pane>` elements
under the hood) by specifying the `language` option as `'root'`.

This is useful for code-snippets that include plain text.

PR Close #41335
2021-05-06 15:03:44 -04:00
George Kalpakas 90d4b2277b build(docs-infra): upgrade cli command docs sources to 094a1b674 (#41958)
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](cf9e03b35...094a1b674):

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

PR Close #41958
2021-05-06 09:39:13 -04:00
Alan Agius 8c9a236cf2 docs: replace `client-project` in app-shell documentation (#41957)
This option no longer exists, instead we now point to the `cli/generate#app-shell-command` guide.

PR Close #41957
2021-05-06 09:38:09 -04:00
Renovate Bot 35fbd4f411 build: update dependency fs-extra to v10 (#41937)
PR Close #41937
2021-05-06 09:36:18 -04:00
Kapunahele Wong efe8566321 docs: edit strict-mode.md to remove references for opting in (#41542)
As of v12, strict mode is the default, so you don't have
to opt in anymore. This commit removes the instructions
to add --strict to the ng new.

PR Close #41542
2021-05-06 09:32:42 -04:00
David Shevitz c472c5b872 docs: initial commit of content projection topic. (#41143)
Content projection is an important part of Angular. However, it has
never been documented in the Angular documentation set. This topic
attempts to provide the basics of content projection for developers. It
is not a comprehensive guide; rather, it is a starting point that we
can hopefully expand upon in the future.

PR Close #41143
2021-05-05 13:47:27 -07:00
Kapunahele Wong 931d40b18a docs: add documentation for Angular linker (#41485)
PR Close #41485
2021-05-05 13:46:59 -07:00
George Kalpakas d64fa4fec8 build(docs-infra): upgrade cli command docs sources to cf9e03b35 (#41938)
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](ac6fc449e...cf9e03b35):

**Modified**
- help/generate.json
- help/new.json

PR Close #41938
2021-05-05 13:46:32 -07:00
cexbrayat fb38175a40 docs: remove ts-node and tslint form dev deps (#41950)
A recent commit 3b589030a8 reintroduced these dev deps.
They were previously removed by #41826 and #41873

PR Close #41950
2021-05-05 13:45:00 -07:00
Alan Agius 753fb06cef docs: remove reference to strict mode in local setup (#41952)
This is turned on by default in version 12 and prompt has been removed.
PR Close #41952
2021-05-05 13:44:30 -07:00
Dylan Hunn 43cc5a126b docs: add dylhunn to contributors (#41936)
PR Close #41936
2021-05-04 21:06:30 -07:00
Hugo Mejia b3cd1280da docs: attributes for 'label' and 'input' elements were mixed up (#41827)
A label should be 'for' an input, and an 'input' should have an 'id'.

PR Close #41827
2021-05-04 08:32:17 -07:00
Renovate Bot dac78d1ba1 build: update dependency yargs to v17 (#41920)
PR Close #41920
2021-05-04 08:31:47 -07:00
Joey Perrott 4dae97de43 docs: update Node.js supported version statement (#41820)
Update the statement expressing Angular's supported versions of Node.js. Previously, we stated
that the `current` version of Node.js was supported, however Node.js's `current` version maps
more closely to what we would term a `next` branch and is not expected meant for usage with
production applications. This intention is stated on Node.js Releases page:

> Production applications should only use Active LTS or Maintenance LTS releases.

PR Close #41820
2021-05-04 08:10:42 -07:00
David Shevitz 6d7d659919 docs: add new migration guide to v12 documentation that describes how to migrate older localization ids to new ones (#41828)
PR Close #41828
2021-05-04 08:09:52 -07:00
Talha Azhar f4be101c08 docs: fix text jargon from DI notes (#41928)
PR Close #41928
2021-05-04 08:08:46 -07:00
Renovate Bot f42796a8f5 build: lock file maintenance (#41924)
PR Close #41924
2021-05-03 14:27:06 -07:00
iRealNirmal 741c295129 docs: update file structure document (#41923)
Since angular 11 extra package.json isn't generated and with version 12 strict mode is opt out bases.
Updated document to reflect the state

Closes #40841.

PR Close #41923
2021-05-03 14:26:38 -07:00
David Shevitz 3b589030a8 docs: Remove references to protractor from documentation (#41731)
PR Close #41731
2021-05-03 14:26:09 -07:00
Kapunahele Wong 253ed5d484 docs: improve accessibility of form-validation example (#41283)
PR Close #41283
2021-05-03 14:25:11 -07:00
George Kalpakas 6967f3ca28 build(docs-infra): revert `watchr` to v3.0.1 to restore `docs-watch` performance (#41903)
[`watchr` v4.0.0][1] changes the way watched directories are
scanned/watched, thus causing a great increase in the consumed CPU and
RAM. This affects the performance of the `docs-watch` and transitively
`serve-and-sync` npm scripts.
(For reference, on my local machine it goes from 0% CPU and 275MB RAM
with v3.0.1 to 50% CPU and 10GB RAM with v4+.)

This commit pins `watchr` to version 3.0.1 (which is the latest version
that does not cause performance issues) and disabled automatic updates
via Renovate.

[1]: https://github.com/bevry/watchr/releases/tag/v4.0.0

PR Close #41903
2021-05-03 10:05:31 -07:00
Mikhail f12d067539 docs(forms): reduce ambiguity in forms data flow wording (#41900)
PR Close #41900
2021-05-03 10:01:14 -07:00
Mathias Schäfer 74da3724e4 docs: Update link to Testing Angular online book (#41906)
The book has moved to a its own domain.
PR Close #41906
2021-04-30 14:34:48 -07:00
Renovate Bot 5a38f17683 build: update angular (#41871)
PR Close #41871
2021-04-30 14:31:09 -07:00
David Shevitz b5134e2e39 docs: remove references to Trusted Types due to incompatibility with Webpack 5 (#41754)
PR Close #41754
2021-04-30 14:30:31 -07:00
Igor Minar 72384a3357 fix(docs-infra): switch over to img[loading=lazy] for front page images (#34900)
This should speed up the perceived loading latency as the image loading won't block rendering.

https://addyosmani.com/blog/lazy-loading/

PR Close #34900
2021-04-30 14:16:23 -07:00
Wojciech Okoński ea89617880 docs(docs-infra): fix handling of client-side errors in networking (#36608)
Previously example for handling client-side errors in networking didn't work when there was no Internet connection.
Caught error is ProgressEvent in such case, not ErrorEvent and error.error.message is undefined.

PR Close #36608
2021-04-29 13:51:42 -07:00
George Kalpakas f3331a8350 build(docs-infra): upgrade cli command docs sources to ac6fc449e (#41878)
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](2310e277b...ac6fc449e):

**Modified**
- help/add.json
- help/analytics.json
- help/deploy.json
- help/e2e.json
- help/help.json
- help/lint.json
- help/new.json
- help/run.json
- help/test.json

PR Close #41878
2021-04-29 10:09:09 -07:00
cexbrayat 79e82f22a5 docs: remove ts-node form dev deps (#41873)
Follow-up to #41826

The CLI now no longer installs `ts-node` since Protractor has been removed.
See https://github.com/angular/angular-cli/pull/20601 for the relevant PR in angular-cli.
This change has been released in the CLI v12.0.0-rc.1

PR Close #41873
2021-04-29 10:08:14 -07:00
Sam Severance d80ad951c6 docs: correct toh router tutorial (#41859)
* `SelectivePreloadingStrategyService` is already provided in the root
   module, so it should not be added to `AppRoutingModule` providers
   array

PR Close #41859
2021-04-29 10:05:30 -07:00
Teri Glover 55d9713664 docs: Edits to remove jargon (#41536)
PR Close #41536
2021-04-28 15:11:32 -07:00
Keen Yee Liau c31d6ea24e docs: remove tslint, codelyzer & protractor from dev deps (#41826)
TSLint and Codelyzer were deprecated in v11.
Protractor is no longer installed by default in new projects in v12.

PR Close #41826
2021-04-28 14:33:11 -07:00
Kapunahele Wong 695b72a972 docs: imrpove accessibility of lifecycle hooks example (#41071)
PR Close #41071
2021-04-28 14:26:34 -07:00
Kapunahele Wong 3ccad85b01 docs: add error page for NG6999 (#41708)
Adds page for NG6999 error for VE builds that attempt
to consume an Ivy-compiled library.
Will go here: https://angular.io/errors/NG6999

PR Close #41708
2021-04-28 14:22:46 -07:00
Pete Bacon Darwin 76c824b6da build(docs-infra): update to latest puppeteer (#41764)
The updates to WebDriver required an update to puppeteer to ensure
that the correct Chromium was downloaded.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 4f20cd16b4 build(docs-infra): add `assert` polyfill (#41764)
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius bdb8deaa51 build(docs-infra): remove `src/generated` from `ng test` configuration (#41764)
Assets are stored in memory during `ng test` hence since `src/generated` are unused we shouldn't include them.

PR Close #41764
2021-04-28 12:33:20 -07:00
Alan Agius 17ffb7480f build(docs-infra): update angular packages to `12.0.0-rc.0` (#41764)
Update Angular packages to `12.0.0-rc.0`

PR Close #41764
2021-04-28 12:33:20 -07:00
George Kalpakas 044b380e5a build: update remark packages (#41721)
This commit updates the `remark` packages to v12 instead of the latest
(v13), because v13 is a major breaking change that requires more
investigation and work.

More specifically, v13 replaces the internals of `remark` with a new
CommonMark-compliant parser. (See their [release notes][1] for more
info.)

This change causes our old `remark` plugins (in [renderMarkdown.js][2])
to stop working.

[1]: https://github.com/remarkjs/remark/releases/tag/13.0.0
[2]: d42019d412/aio/tools/transforms/remark-package/services/renderMarkdown.js (L17-L24)

PR Close #41721
2021-04-28 09:27:23 -07:00
George Kalpakas 3b7d4ebbd6 fix(docs-infra): do not redirect disambiguated URLs (#41842)
In #41788, logic was added to disambiguate case-insensitively equal docs
paths/URLs. This process includes appending a `-\d+` suffix to some
paths/URLs (for example, `/.../inject-1`). Unfortunately, some of the
Firebase redirects configured in `firebase.json` would match these URLs
and redirect them to non-existing paths.
Example failures: [stable][1], [next][2]

NOTE:
This was not picked up in the regular CI tests run for PRs, because the
local devserver and the preview server used to test PRs do not support
Firebase-like redirects.

This commit fixes this by ensuring these disambiguated paths/URLs are
not matched by the redirect rules by checking whether the part of the
suffix after the `-` contains any numeric digits. While this check is
not ideal, it should be good enough for our purpose, since the legacy
URLs that we do want to redirect contain suffixes such as `-class`,
`-function` and thus no numeric digits.

[1]: https://circleci.com/gh/angular/angular/974345
[2]: https://circleci.com/gh/angular/angular/974346

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 2076bde100 build(docs-infra): take disambiguated doc paths into account when generating the sitemap (#41842)
In ##41788, the `disambiguateDocsPathsProcessor` was introduced to fix
an issue with case-insensitively equal paths. This processor may alter
the paths of some docs and thus their final URL in the app.

Previously, both the `disambiguateDocPathsProcessor` and the
`createSitemap` processor (which relies on the docs' computed paths to
generate the sitemap file) were configured to run before the
"rendering-docs" phase. However, this resulted in the
`disambiguateDocPathsProcessor`'s running after `createSitemap`, which
meant that the sitemap did not include the updated doc paths.

This commit fixes it by ensuring that the
`disambiguateDocPathsProcessor` is explicitly run before the
`createSitemap` processor, so that the latter will be able to take into
account any changes made by the former.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 1aee5a79c6 test(docs-infra): make it easier to identify the failing URL in `testFirebaseRedirection.spec.ts` (#41842)
This commit includes the URL under test in the test description in
`testFirebaseRedirection.spec.ts` to make it easier to identify the
affected URL when a test fails.

It also avoids unnecessarily creating multiple `FirebaseRedirector`
instances by sharing instances between tests.

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas d1f5a9e44b test(docs-infra): update `firebase-test-utils` to support regex-based redirects (#41842)
This commit updates the utilities in `firebase-test-utils/` to also
support testing Firebase redirects that are configured using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas ae1ce5f9c7 refactor(docs-infra): prepare `firebase-test-utils` for accepting regex-based redirects (#41842)
Currently, the utilities for testing Firebase redirects assume that the
redirects are configured using the glob-based `source` property.
However, Firebase also supports configuring redirects using regular
expressions (via the `regex` property).
See the [Firebase docs][1] for more details.

This commit refactors the utilities in `firebase-test-utils/` to make it
easy to add support for such regex-based redirect configurations.

[1]: https://firebase.google.com/docs/hosting/full-config#redirects

PR Close #41842
2021-04-27 14:05:23 -07:00
George Kalpakas 36e10e7932 test(docs-infra): fix `create-example` tests on Windows (#41842)
Previously, the tests in `create-example.spec.ts` made assertions using
some hard-coded absolute paths (something like `/foo/bar`). This caused
the tests to fail on Windows, where the absolute paths are prefixed with
the drive letter (something like `C:/foo/bar`).

This commit uses `path.resolve()` to ensure paths are converted to the
format used on the current OS.

PR Close #41842
2021-04-27 14:05:23 -07:00
Amadou Sall 3783976543 docs: remove the section "Using components vs services from other modules" (#41835)
This section states that "Importing a module with services means that you will have a new instance of that service". This is only true for lazy-loaded `NgModules`. For non-lazy-loaded modules, my understanding is that the providers arrays are flattened into the root injector meaning that importing a module with a service doesn't create a new instance of that service.

PR Close #41835
2021-04-27 10:16:49 -07:00
Pete Bacon Darwin 01d1c46b16 build(docs-infra): update dgeni-packages to fix version list (#41832)
The current version was not being computed correctly for
next and rc deployments of the angular.io website.

Fixes #41829

PR Close #41832
2021-04-27 10:15:29 -07:00
Joey Perrott 2f678fcedb build: update node version requirements (#41822)
Update the node version requirements to only include the LTS versions supported, rather
than accidently including the active versions.

PR Close #41822
2021-04-26 15:21:13 -07:00
Kapunahele Wong 09abee359d docs: add metadata documentation to httpClient (#41706)
PR Close #41706
2021-04-26 15:17:51 -07:00
Chau Tran e47ea2959c docs: add chau tran to GDE resources (#41817)
PR Close #41817
2021-04-26 15:16:40 -07:00
Pete Bacon Darwin 4b4f565df1 docs: fix links to docs with ambiguous paths (#41788)
These docs were linking directly to docs that have ambiguous paths.
These changes ensure that these links are not affected by the
disambiguation processing of those docs.

PR Close #41788
2021-04-26 12:12:00 -07:00
Pete Bacon Darwin 538286df16 build(docs-infra): add path disambiguation (#41788)
When two documents have the same `outputPath`, only differing by
letter casing, there can be problems on case-insensitive file-systems:
Only one of each of the docs would end up being written.

Moreover, the Webpack 5 bundler will error if it comes across files
that have this kind of ambiguous paths.

This commit adds a new docType: `disambiguator`, which will display
a list of the docs that match an ambiguous path. Each of the ambiguous
docs is then given a unique path and outputPath to ensure there are no
collisions.

PR Close #41788
2021-04-26 12:12:00 -07:00
Pete Bacon Darwin 2ede980fea build(docs-infra): no duplicate docTypes in postProcessHtml processor (#41788)
This processor was being initialized with the same docTypes twice.

PR Close #41788
2021-04-26 12:11:59 -07:00
Renovate Bot 9e113f9cc4 build: update to version (#41806)
PR Close #41806
2021-04-26 12:06:48 -07:00
George Kalpakas 99f2ffc740 build: update stemmer to version 2.0.0 (#41724)
NOTE:
`stemmer` v2.0.0 switched to ES modules (see
words/stemmer@03519229c8), which means
that the only way to consume it in our CommonJS setup (for example, in
[generateKeywords][1]) is via an async `import()`.

This commit makes the `generateKeywords` processor asynchronous in order
to be able to dynamically import and use `stemmer`.

[1]: 251bec159a/aio/tools/transforms/angular-base-package/processors/generateKeywords.js

PR Close #41724
2021-04-26 11:00:59 -07:00
George Kalpakas a938849148 fix(docs-infra): apply custom `autoLinkCode` filters to single-word `<code>` elements (#41709)
Previously, the `autoLinkCode` Dgeni post-processor would not apply the
custom filters when matching the whole contents of a `<code>` element.
This meant that custom filters would not be applied to single-word
`<code>` elements.

You can see occurrences of this issue in the following sections of the
"Reactive forms" guide:
- [Creating nested form groups][1]
  (look for `street, city, state, and zip controls`)
- [Using the FormBuilder service to generate controls][2]
  (look for `group method`)

This commit fixes this by also applying the custom filters when
processing the whole contents of a `<code>` element.

This commit also updates the `filterPipes` custom filter to allow
matching a pipe's name in a single-word `<code>` element (where there is
no preceeding `|` character).

[1]: https://v10.angular.io/guide/reactive-forms#creating-nested-form-groups
[2]: https://v10.angular.io/guide/reactive-forms#using-the-formbuilder-service-to-generate-controls

PR Close #41709
2021-04-26 10:59:08 -07:00
George Kalpakas de19b8bb88 fix(docs-infra): do not process generated nodes for auto-linking (#41709)
While generating the docs, when a `<code>` element is inspected for
auto-linking, the `autoLinkCode` Dgeni post-processor will break its
contents up into words and generate text nodes for those words that
should not be auto-linked.

Previously, our text node visitor would visit these generated text nodes
and try to auto-link them too. As a result, it would unnecessarily
process nodes that had already been checked (and could potentially
generate links that would otherwise be ignored).

You can see an occurrence of this issue in the
[Create the product list][1] section of the
"Getting started with Angular" tutorial (look for `<a>`).

This commit fixes this by ensuring the visitor will skip the current
node and any nodes generated by `autoLinkCode`.

[1]: https://v11.angular.io/start#create-the-product-list

PR Close #41709
2021-04-26 10:59:07 -07:00
George Kalpakas 6465b5056a build(docs-infra): fix e2e testing SystemJS-based docs examples (#41796)
This commits makes the SystemJS-based docs examples more self-contained
by ensuring the necessary WebDrivers are fetched before running the e2e
tests.
This is a follow-up to #41689. (See there for more discussion.)

PR Close #41796
2021-04-26 09:25:12 -07:00
George Kalpakas 27ad7624d0 fix(docs-infra): fix external link icons positioning (#41794)
While trying to fix the appearance of `<code>` elements inside of
anchors with external URLs in #41694, the positioning of external link
icons was broken for anchors that would span multiple lines (see #41774
for details).

This commit fixes the positioning of external link icons, while still
preserving the correct appearance of `<code>` elements inside anchors
with external URLs.

NOTE:
Different types of links with external URLs can be seen in the following
docs sections:
- http://localhost:4200/docs#assumptions
- http://localhost:4200/guide/http#security-xsrf-protection
- http://localhost:4200/guide/workspace-config#generation-schematics

Fixes #41774

PR Close #41794
2021-04-26 09:24:04 -07:00
Kapunahele Wong 01e546f116 docs: improve accessibility of architecture example (#41314)
PR Close #41314
2021-04-26 09:13:49 -07:00
Kapunahele Wong 326884736e docs: make inputs-outputs example more accessible (#41288)
PR Close #41288
2021-04-26 09:12:17 -07:00
Kapunahele Wong 70fb3e958b docs: improve accessibility of http example (#41057)
PR Close #41057
2021-04-26 09:11:07 -07:00
Sam Severance 9f88da220c docs: Indicate `HttpClientModule` being imported (#41749)
PR Close #41749
2021-04-23 11:38:34 -07:00
George Kalpakas 81f61b276b build(docs-infra): upgrade cli command docs sources to 2310e277b (#41780)
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](064c3356e...2310e277b):

**Modified**
- help/build.json

PR Close #41780
2021-04-23 09:41:34 -07:00
Keen Yee Liau 64567d3d39 docs: Remove Protractor test from CI examples (#41733)
Protractor tests are no longer included in new projects starting from
Angular version 12.

PR Close #41733
2021-04-22 10:44:41 -07:00
George Kalpakas 6ca6302cf1 build(docs-infra): upgrade cli command docs sources to 064c3356e (#41765)
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](79d820c92...064c3356e):

**Modified**
- help/build.json
- help/e2e.json
- help/generate.json
- help/new.json

PR Close #41765
2021-04-22 08:44:42 -07:00
Aristeidis Bampakos dfdd4a2d74 docs: ident the library shematics guide properly (#41755)
PR Close #41755
2021-04-22 08:41:01 -07:00
George Kalpakas 122c8ba0e3 build(docs-infra): fix `StackblitzBuilder` after `jsdom` update (#41725)
In commit c617f1f768, `jsdom` was updated
from v9 to v16. This includes a breaking change that caused
`StackblitzBuilder` to fail to generate the StackBlitz examples.
However, this failure went unnoticed, because `StackblitzBuilder` still
completed successfully after failing to generate the examples. (This has
been fixed in the previous commit.)

This commit updates `StackblitzBuilder` to use the new `jsdom` API.

PR Close #41725
2021-04-22 08:38:20 -07:00
George Kalpakas 5a80bc6eb5 build(docs-infra): exit with an error code if generating StackBlitz examples fails (#41725)
Previously, failing to generate one or more StackBlitz examples would
log the errors but exit the command successfully. This made it easy to
miss such failures.

This commit fixes this by exiting the process with an error code if
generating one or more StackBlitz examples fails.
(In order to be able to see all potential errors, all examples are
attempted to be generated before exiting the process.)

PR Close #41725
2021-04-22 08:38:20 -07:00
Kapunahele Wong 6611d5c1c9 docs: add instructions for opting into latest Language Service (#41600)
PR Close #41600
2021-04-21 17:29:05 -07:00
Kapunahele Wong a2b671e61b docs: add margin to button boilerplate CSS for examples (#41413)
PR Close #41413
2021-04-20 11:37:27 -07:00
George Kalpakas 364ff96f28 build(docs-infra): upgrade cli command docs sources to 79d820c92 (#41719)
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](d902a289b...79d820c92):

**Modified**
- help/generate.json

PR Close #41719
2021-04-20 09:42:42 -07:00
Daniel Díaz e238f2c33a docs: rewrites animation query () method use (#41710)
PR Close #41710
2021-04-20 09:40:29 -07:00
unknown 0a19fc095d docs: add Material Design for Bootstrap to UI Component resources (#41702)
PR Close #41702
2021-04-20 09:39:15 -07:00
Oluwole Majiyagbe 03f3dcb700 docs: add API CMS capability to Angular App resources (#40924)
PR Close #40924
2021-04-20 09:37:50 -07:00
Pete Bacon Darwin 70341bcfed build(docs-infra): update docs examples to Angular v11.2.10 (#41689)
This commit updates the docs examples to Angular v11.2.10. See the [diff between 11.0.1 and 11.2.10 (FW) and 11.2.9 (CLI)][1].

The changes are fairly trivial including:

- Removal of `emitDecoratorMetadata` from tsconfig.json files, where no JIT compilation is required.
- Setting `enableI18nLegacyMessageIdFormat` to `false` for CLI based applications - the i18n example was already migrated away from legacy message IDs.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/11.2.9..11.0.1

PR Close #41689
2021-04-19 14:18:51 -07:00
Pete Bacon Darwin 1573510187 refactor(docs-infra): tidy up systemjs boilerplate for upgrade examples (#41689)
The ngUpgrade examples mostly rely upon SystemJS configuration.
This commit tidies up how these examples are built and tested so that
it will be easier to migrate them to work with Angular 11.2.x

PR Close #41689
2021-04-19 14:18:51 -07:00
Pete Bacon Darwin e06f1960f4 docs: migrate example to use non-legacy message IDs (#41689)
From 11.x, new projects are set up to use the latest message ID format.
This commit updates the i18n example project to stop using legacy IDs.

PR Close #41689
2021-04-19 14:18:51 -07:00
Renovate Bot c617f1f768 build: update jsdom to version 16.5.3 (#41695)
PR Close #41695
2021-04-19 14:16:46 -07:00
Bendik Skarpnes 5e343173e8 docs: fix styling issues in example CSS (#41222)
PR Close #41222
2021-04-19 14:15:45 -07:00
Pierre Portejoie fdd55c9ec7 docs: fix tutorial indicating the app is working when an error is actually displayed (#40732)
PR Close #40732
2021-04-19 14:14:58 -07:00
Amadou Sall 322db1755a docs: add missing preposition in the animations guide (#41697)
PR Close #41697
2021-04-19 08:35:11 -07:00
George Kalpakas 404ec48051 fix(docs-infra): fix code inside anchor elements with external URLs (#41694)
Previously, due to the `inline-flex` display style of anchor elements
with external URLs, `<code>` elements nested inside such anchor elements
would cause extra spacing between lines. An occurrence of this can be
seen in the [Angular workspace configuration][1] guide.

This commit fixes the problem by removing the `inline-flex` display
style (allowing anchor elements to fall back to the default `inline`
style).

For reference, the `inline-flex` style was introduced in commit
7944ee2c30 in order to avoid underlining
link icons. This style seems to no longer be necessary (either it was
never necessary or the underlying browser bug that made it necessary was
fixed).

Before: ![code links before][2]
After: ![code links after][3]

[1]: https://next.angular.io/guide/workspace-config#generation-schematics
[2]: https://user-images.githubusercontent.com/8604205/115149753-34589780-a06e-11eb-8d4e-825b5e94282d.png
[3]: https://user-images.githubusercontent.com/8604205/115149755-3589c480-a06e-11eb-9b15-825d75c74878.png

PR Close #41694
2021-04-19 08:32:08 -07:00
George Kalpakas 52bade5413 refactor(docs-infra): remove duplicate `ol` selector (#41694)
This commit removes a duplicate `ol` selector from `typography.scss`.

PR Close #41694
2021-04-19 08:32:08 -07:00
George Kalpakas f10a7e1f7e refactor(docs-infra): simplify regex in search WebWorker (#41693)
This commit simplifies a regex used in angular.io's search WebWorker. It
also updates some comments to add more context on what the code does.

PR Close #41693
2021-04-19 08:31:31 -07:00
Renovate Bot 343b9d0ddc build: update jasmine-spec-reporter to version 7.0.0 (#41692)
PR Close #41692
2021-04-19 08:30:54 -07:00
Renovate Bot 0c23c8b0ac build: update image-size to version 1.0.0 (#41691)
PR Close #41691
2021-04-19 08:30:19 -07:00
George Kalpakas 17c2f6ef07 docs: replace hair space with regular space in `creating-libraries.md` (#41690)
This commit replaces a [hair space][1] with a regular space in
`creating-libraries.md`.
(You can see the hair space "in action" in the "Schematics for
Libraries" link right above the [Publishing your library][2] section.

[1]: https://en.wikipedia.org/wiki/Template:Hair_space
[2]: https://v10.angular.io/guide/creating-libraries#publishing-your-library

PR Close #41690
2021-04-19 08:29:44 -07:00
George Kalpakas 185090b15d docs: add missing backticks in `schematics-for-libraries.md` (#41681)
PR Close #41681
2021-04-19 08:26:35 -07:00
George Kalpakas 13913231f1 test(docs-infra): change URL separator from `\t` to `-->` in `URLS_TO_REDIRECT.txt` (#41680)
Previously, the `URLS_TO_REDIRECT.txt` file was expected to separate
URLs by a `\t` character. This could easily been mistaken for a regular
space and would often result in test errors when updating the file.

This commit updates the `URLS_TO_REDIRECT.txt` file and the
corresponding test helpers to use `-->` (potentially surrounded by
whitespace) as a separator for the URLs. This also gives a hint about
the "from" --> "to" relationship of the redirect URL pair.

PR Close #41680
2021-04-19 08:26:01 -07:00
George Kalpakas 1d6af94cfb test(docs-infra): ignore empty lines in `URLS_TO_REDIRECT.txt` (#41680)
Previously, the `URLS_TO_REDIRECT.txt` file was expected to not contain
any empty lines. This could easily result in test errors when updating
the file, since it is common for IDEs/editors to automatically ensure
there is an empty line at the end of a saved file
([example failure][1]).

This commit updates the test helpers to be able to cope with empty or
whitespace-only lines in `URLS_TO_REDIRECT.txt` by ignoring such lines.

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

PR Close #41680
2021-04-19 08:26:00 -07:00
Kirk Larkin f0b80af2f2 docs: correct appUnless desc re true/false (#41656)
PR Close #41656
2021-04-19 08:23:10 -07:00
George Kalpakas d0b1f99598 docs: fix broken links to CLI wiki in the "Component styles" guide (#41516)
Fixes #41362

PR Close #41516
2021-04-19 08:22:19 -07:00
va-stefanek dfe52cd9e4 docs: change link to the styles configuration guide (#41516)
PR Close #41516
2021-04-19 08:22:19 -07:00
Eduard Bondarenko de25cdac54 docs: move lazy loading section to the best practices section (#41378)
PR Close #41378
2021-04-16 17:27:00 -07:00
Gérôme Grignon ad427cf30a docs: add mention to CSS styles for hero-detail (#41214)
PR Close #41214
2021-04-16 17:26:29 -07:00
sovtara 96175fdda2 docs: fix the property name in the example (#41410)
AppHighlight directive from the example doesn't have myHighlight attribute.
It only has appHighlight property. So we should use appHighlight instead of myHighlight.

PR Close #41410
2021-04-16 17:25:39 -07:00
Dharmen Shah d5a8302dfd docs: separate steps for github actions (#41594)
PR Close #41594
2021-04-16 17:25:01 -07:00
Dharmen Shah 494d8ce565 docs: add github actions in CI story (#41594)
PR Close #41594
2021-04-16 17:25:01 -07:00
Alan Agius d3edc5c0f5 test(docs-infra): run all example tests in IVY runtime (#41638)
We have several tests which use system.js, this means that we cannot use NGCC with `--create-ivy-entry-points`, also we need to process UMD bundles since our system.js configurations use UMDs.

PR Close #41638
2021-04-16 08:59:37 -07:00
Alan Agius e920eac026 build(docs-infra): update lite-server to fix errors on OSX (#41638)
```
$ lite-server -c bs-config.aot.json
$ ngc -p tsconfig-aot.json && rollup -c rollup-config.js
/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:26
  return (new fsevents(path)).on('fsevent', callback).start();
          ^
TypeError: fsevents is not a constructor
    at createFSEventsInstance (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:26:11)
    at setFSEventsListener (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:80:16)
    at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:244:16)
    at FSWatcher.<anonymous> (/Users/xxxx/git/angular/aio/tools/examples/shared/node_modules/browser-sync/node_modules/chokidar/lib/fsevents-handler.js:378:25)
    at LOOP (fs.js:1752:14)
    at processTicksAndRejections (internal/process/task_queues.js:79:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
completed: yarn serve:aot
```

PR Close #41638
2021-04-16 08:59:37 -07:00
Alan Agius 70425539f7 build(docs-infra): remove view engine related code (#41638)
This is a pre-update to Angular 12 cleanup.

This is not needed for version 12, since applications cannot be built using View Engine.

PR Close #41638
2021-04-16 08:59:37 -07:00
Renovate Bot 5d73b33ba2 build: update angular packages (#41633)
PR Close #41633
2021-04-16 08:52:38 -07:00
Julien Marcou 4412fcb670 build: update TypeScript to v4.2.4 (#41620)
Update TypeScript to be consistent across different packages.

PR Close #41620
2021-04-16 08:51:55 -07:00
Teri Glover 391d08f6fb docs: edits to remove jargon and abbreviations (#41530)
PR Close #41530
2021-04-15 16:00:53 -07:00
Teri Glover 9d8f345c0c docs: update copy in schematics.md (#41521)
PR Close #41521
2021-04-15 14:38:06 -07:00
George Kalpakas 9ffd9f6f37 build(docs-infra): upgrade cli command docs sources to d902a289b (#41641)
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](37b5f1c99...d902a289b):

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

PR Close #41641
2021-04-15 11:30:58 -07:00
Michael Hladky 4329ccae2c docs: add rx-angular to resources.json (#39291)
PR Close #39291
2021-04-14 15:50:44 -07:00
Alan Agius b649273f6c docs: remove `entryComponent` from deprecated list (#41408)
This has been removed in https://github.com/angular/angular-cli/pull/20402

PR Close #41408
2021-04-14 15:49:33 -07:00
Joey Perrott ee615e0744 build: upgrade to node 14 (#41544)
Upgrade local development environment for the angular repo to use node 14
dropping node 10 from supported for development within the angular repo.

PR Close #41544
2021-04-14 09:40:17 -07:00
pavlenko 261bce65fb docs: replace Codelyzer recommendation with Angular-ESLint in accessibility guide (#41294)
Replace Codelyzer recommendation with Angular-ESLint in accessibility guide since that tool is deprecated and was removed from the Angular CLI.

Closes #41573

PR Close #41294
2021-04-13 13:06:16 -07:00
Pete Bacon Darwin 60d023449b build(docs-infra): ensure that jasmine node tests fail on build error (#41596)
Previously if there was a problem when building the tests, the error would
be swallowed as an unhandled promise rejection. Now these are caught and
the process is exited with a non-zero value to prevent any CI jobs from
passing incorrectly.

PR Close #41596
2021-04-13 11:54:15 -07:00
Alan Agius b3d9dea52b build(docs-infra): add correct types to tuples (#41596)
This is to fix the below error:
```
tools/firebase-test-utils/FirebaseRedirect.ts:17:50 - error TS2345: Argument of type '(string | RegExp)[][]' is not assignable to parameter of type 'ReplacementDetail[]'.
  Type '(string | RegExp)[]' is missing the following properties from type 'ReplacementDetail': 0, 1

17     return XRegExp.replaceEach(this.destination, [...paramReplacers, ...restReplacers]);
```

https://app.circleci.com/pipelines/github/angular/angular/31076/workflows/5fd3851e-ae9e-4d77-b0ef-366ba38a9088/jobs/961795

PR Close #41596
2021-04-13 11:54:15 -07:00
aschaap fe6002977e docs: change (+) operator to `Number` function to match code (#41570)
PR Close #41570
2021-04-12 21:08:21 -07:00
aschaap 5e8dcfd641 docs(docs-infra): fix (+) not accepting null error by using `Number` instead (#41570)
Fix unexpected error when following the tutorial (when going through it with stricter type checking enforced). While (+) converts a string to an integer, it does not account for the possibility that `this.route.snapshot.paramMap.get('id')` could return null (type: string | null). Since this null case is not a practical outcome, it is a matter of types; switching from (+) to the `Number` function eliminates this issue, making the tutorial more robust.
PR Close #41570
2021-04-12 21:08:21 -07:00
aschaap 3a61bb82b3 docs: replaced erroneous instances of `HeroDetailsComponent` with `HeroDetailComponent` (#41569)
PR Close #41569
2021-04-12 21:07:35 -07:00
Nishu Goel d27c8b4d9f docs: add Nishu Goel to GDE list (#41347)
PR Close #41347
2021-04-12 21:06:00 -07:00
Alan Cohen 319da894be docs: change ActivatedRouteStub code sample to work with strictNullChecks on (#41559)
convertToParamMap() does not accept undefined.
Fix code sample so it can be used in strict mode without requiring changes.

PR Close #41559
2021-04-12 21:01:39 -07:00
Alan Agius 852b5e366e build: update `@angular-devkit/build-angular` to use commit SHA (#41434)
This is a temporary workaround until the CLI version containing a fix for the regression caused by deacc74 is available on NPM.

Without this change CLI builds will fail with;
```
angularCompiler.getNextProgram is not a function
```

PR Close #41434
2021-04-12 16:46:29 -07:00
Pete Bacon Darwin 5600df28e9 build(docs-infra): update dgeni-packages dependency (#41434)
This update includes fixes that prevented us from updating
other dependencies.

PR Close #41434
2021-04-12 16:46:29 -07:00
Alan Agius ed7d288364 build: update several dependencies (#41434)
With this change we update several dependencies to avoid Renovate creating a lot of PRs during onboarding. We also remove yarn workspaces as after further analysis these are not needed.

Certain dependencies such as `@octokit/rest`, `remark` and `@babel/*` have not been updated as they require a decent amount of work to update, and it's best to leave them for a seperate PR.

PR Close #41434
2021-04-12 16:46:29 -07:00
JoostK 6ba67c6fff feat(compiler-cli): mark ability to use partial compilation mode as stable (#41518)
This commit marks the `compilationMode` compiler option as stable, such
that libraries can be compiled in partial compilation mode.

In partial compilation mode, the compiler's output changes from fully
compiled AOT definitions to an intermediate form using partial
declarations. This form is suitable to be published to NPM, which now
allows libraries to be compiled and published using the Ivy compiler.

Please be aware that libraries that have been compiled using this mode
can only be used in Angular 12 applications and up; they cannot be used
when Ivy is disabled (i.e. when using View Engine) or in versions of
Angular prior to 12. The `compilationMode` option has no effect if
`enableIvy: false` is used.

Closes #41496

PR Close #41518
2021-04-12 10:31:12 -07:00
Sagar Pandita 05cc3c8ee2 docs: remove 'ui-jar' from Resources (#41552)
This commit removes 'ui-jar' from Resources, since it is not
compatible with the latest versions of Angular.

Fixes #41030

PR Close #41552
2021-04-12 10:05:50 -07:00
Aristeidis Bampakos aa755c8853 docs: add entry for prod tsconfig in library files (#41512)
Add an entry for TypeScript configuration file used in production

PR Close #41512
2021-04-09 07:46:52 -07:00
Pete Bacon Darwin 0a4308f756 docs: fix typo in migration guide (#41447)
Also reformat the table to look nice :-)

PR Close #41447
2021-04-07 13:51:08 -07:00
Pete Bacon Darwin 14a64acb72 build(docs-infra): store search dictionary as a string (#41447)
Previously, the search index info file contained an array of strings that is
the dictionary of terms in the corpus.
Storing this as a space separated string reduces the size of the file.

PR Close #41447
2021-04-07 13:51:08 -07:00
Pete Bacon Darwin 65cd44e731 build(docs-infra): tidy up the generateKeywords processor (#41447)
The recent PR #41368 contained some changes that could be improved.

PR Close #41447
2021-04-07 13:51:08 -07:00
Joey Perrott c385e74454 build: rely on engines to prevent using npm for dependency install (#41477)
Rather than relying on a preinstall script, set `engine-strict` to `true` in a
project `.npmrc` file, relying on the `engines` having `npm` set to note that
yarn should be used instead.

---

Output from `npm install` changes from:
```
$ npm install

> angular-srcs@12.0.0-next.7 preinstall /usr/local/account/js/angular
> node tools/yarn/check-yarn.js

/usr/local/account/js/angular/tools/yarn/check-yarn.js:12
  throw new Error(
  ^

Error: Please use Yarn instead of NPM to install dependencies. See: https://yarnpkg.com/lang/en/docs/install/
    at Object.<anonymous> (/usr/local/account/js/angular/tools/yarn/check-yarn.js:12:9)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! angular-srcs@12.0.0-next.7 preinstall: `node tools/yarn/check-yarn.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-srcs@12.0.0-next.7 preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/local/account/.npm/_logs/2021-04-06T22_54_02_292Z-debug.log
```
to
```
$ npm install
npm ERR! code ENOTSUP
npm ERR! notsup Unsupported engine for angular-srcs@12.0.0-next.7: wanted: {"node":">=10.19.0 <13.0.0","yarn":">=1.22.4 <2","npm":"Plesae use yarn instead of NPM to install dependencies"} (current: {"node":"10.20.1","npm":"6.14.4"})
npm ERR! notsup Not compatible with your version of node/npm: angular-srcs@12.0.0-next.7
npm ERR! notsup Not compatible with your version of node/npm: angular-srcs@12.0.0-next.7
npm ERR! notsup Required: {"node":">=10.19.0 <13.0.0","yarn":">=1.22.4 <2","npm":"Plesae use yarn instead of NPM to install dependencies"}
npm ERR! notsup Actual:   {"npm":"6.14.4","node":"10.20.1"}

npm ERR! A complete log of this run can be found in:
npm ERR!     /usr/local/account/.npm/_logs/2021-04-06T22_53_23_912Z-debug.log
```

PR Close #41477
2021-04-07 12:05:01 -07:00
Zack DeRose 18d4446dc6 docs: add Zack DeRose to GDE resources (#41464)
PR Close #41464
2021-04-07 11:52:00 -07:00
Paul Muriel Biya-Bi 5a81490554 docs: use the right tag in the HeroesComponent's template snippet (#41473)
Based on the tutorial content of the Hero Editor, the tag to be used in
HeroesComponent's template snippet should be h2 and not h3.

PR Close #41473
2021-04-07 11:51:37 -07:00
George Kalpakas ae6c195c87 docs: fix link URL in NG0100 error page (#41484)
Fixes #41474

PR Close #41484
2021-04-07 10:36:49 -07:00
Joey Perrott 4a68e13d1b build: update package.json engines range for nodes in preparation for upgrade (#41472)
In preparation for upgrading to `node@14`, and dropping `node@10`, updating the engines
for local `package.json`s.

PR Close #41472
2021-04-06 12:46:31 -07:00
George Kalpakas 4ae57cabd8 build: correctly publish `angular-in-memory-web-api` as CI build artifact (#41429)
Previously, the `angular-in-memory-web-api` package was built in
`dist/packages-dist/misc/angular-in-memory-web-api/`. This was different
from other Angular packages, which were placed directly in
`dist/packages-dist/`. This caused the `create-package-archives.sh`
script to create an invalid `misc.tgz` archive (i.e. treating the
`misc/` subdirectory as a package).
See, for example, the artifacts [here][1].

This commit changes the build scripts to have the
`angular-in-memory-web-api` package built in
`dist/angular-in-memory-web-api-dist/`, similar to how the `zone.js`
package is handled. It also updates the CircleCI config to correctly
publish the `angular-in-memory-web-api` package to CI build artifacts.

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

PR Close #41429
2021-04-06 10:22:54 -07:00
George Kalpakas a623bf4e70 build(docs-infra): enable linting for `ng-packages-installer` scripts (#41429)
This commit enables linting for the scripts in
`aio/tools/ng-packages-installer/`. It also makes the necessary changes
to the files to make linting pass.

PR Close #41429
2021-04-06 10:22:53 -07:00
George Kalpakas d42019d412 build(docs-infra): update `eslint` and `eslint-plugin-jasmine` to latest versions (#41429)
This commit updates the `eslint` and `eslint-plugin-jasmine` packages to
latest versions to take advantage of latest fixes and improvements.

PR Close #41429
2021-04-06 10:22:53 -07:00
George Kalpakas 2a76d8419c build(docs-infra): upgrade cli command docs sources to 37b5f1c99 (#41444)
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](e240e5b7c...37b5f1c99):

**Modified**
- help/build.json
- help/extract-i18n.json

##
Relevant changes in
[commit range](ea073c560...37b5f1c99) since PR #41435:

**Modified**
- help/build.json

##
Closes #41435

PR Close #41444
2021-04-05 12:42:44 -07:00
George Kalpakas 180c1b555f fix(docs-infra): avoid auto-linking generic word `state` (#41438)
Since `state` is a generic word, this commit adds it to the list of
ignored words for auto-linking to avoid incorrectly auto-linking to the
[state()][1] animation helper. For example, see `/ngsw/state` in the
[ServiceWorker in production][2] guide.

[1]: https://v10.angular.io/api/animations/state
[2]: https://v10.angular.io/guide/service-worker-devops#locating-and-analyzing-debugging-information

PR Close #41438
2021-04-05 08:56:43 -07:00
Philipp_Lypniakov fcd190aa9c docs: fix grammar mistake in `glossary.md` ("can exported" --> "can be exported") (#41440)
PR Close #41440
2021-04-05 08:17:26 -07:00
Gabrielle Crevecoeur 03a46afc91 docs: Including Visual Studio (#41414)
Uploading how to use the Angular Language Service in Visual Studio
PR Close #41414
2021-04-02 10:53:37 -07:00
GChuf 46a97b985e build: Bump minimum required node version to 10.19.0 (#41390)
Critical security vulnerability fixed in node v 10.19.0
Other performance and security updates since node 10.9.0

PR Close #41390
2021-04-02 10:29:24 -07:00
George Kalpakas 18abd3ce01 build(docs-infra): upgrade cli command docs sources to e240e5b7c (#41411)
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](b6effecae...e240e5b7c):

**Modified**
- help/extract-i18n.json
- help/generate.json

##
Relevant changes in
[commit range](935b1fdee...e240e5b7c) since PR #41394:

**Modified**
- help/generate.json

##
Closes #41394

PR Close #41411
2021-04-01 12:07:45 -07:00
Pete Bacon Darwin fccffc647b refactor(docs-infra): include more info in search index data (#41368)
The AIO search index is built in a WebWorker on the browser from a set
of page information that is downloaded as a JSON file (`search-data.json`).
We want to keep this file as small as possible while providing enough
data to generate a useful index to query against.

Previously, we only included one copy of each (non-ignored) term from each
doc but this prevents more subtle ranking of query results, since the number
of occurences of a term in a doc is lost.

This commit changes the generated file in the following ways:

- All non-ignored terms are now included in the order in which they appear
  in the doc.
- The terms are indexed into a dictonary to avoid the text of the term being
  repeated in every doc that contains the term.
- Each term is pre-"stemmed" using the same Porter Stemming algorith that the
  Lunr search engine uses.

The web-worker has been updated to decode the new format of the file.
Now that all terms are included, it may enable some level of phrase based
matching in the future.

The size of the generated file is considerably larger than previously, but
on production HTTP servers the data is sent compressed, which reduces the
size dramatically.

PR Close #41368
2021-04-01 12:02:37 -07:00
Pete Bacon Darwin 55f7f1d446 feat(docs-infra): improve search query processing (#41368)
This commit tries to improve the search results by processing
the query and attempting progressively less restrictive searches
until a non-zero set of pages is matched.

The new procesing includes:

* stripping off quote marks, which were causing searches to fail
* first attempting to match pages where ALL the query terms exist
* second attempting to match pages where ANY of the query terms exist
* third attempting to match pages where the title contains partial word matches

The first query attempt approximates, quite well, the idea of searching
for multi-word phrases. This is given the technical nature of the terms
and the fairly small size of the corpus.

PR Close #41368
2021-04-01 12:02:37 -07:00
George Kalpakas 3470ea17d5 fix(docs-infra): increase the max width of the `file-not-found` page (#41275)
Previously, the max width of the `file-not-found` page was limited to
50rem (800px by default). This allowed little space for showing
potentially helpful search results, which are shown in columns).

This commit increases the max width of the `file-not-found` page to
84rem (1344px by default) to allow search results to be visible without
requiring scrolling. This will not negatively affect UX, because the
page uses a multi-column layout and therefore there will rarely be long
lines of text to scan.

PR Close #41275
2021-04-01 11:36:44 -07:00
George Kalpakas 3cda3e6a32 fix(docs-infra): correctly show search results on narrow screens (#41275)
Previously, some part of the search results would be hidden and
inaccessible on narrow screens. This was caused by an issue with the
flexbox layout. See [here][1] for more info on the issue and the
available solutions.
NOTE: This issue affected both the search results shown when using the
search box (on the top right of the page) as well as the search results
shown in the `file-not-found` page.

This commit changes how the layout of search results is achieved to
ensure they are always accessible via scrolling on all screen sizes
(while keeping the same layout on larger screens).

Before: ![search results at 768px before][2]
After: ![search results at 768px after][3]

[1]: https://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container#33455342
[2]: https://user-images.githubusercontent.com/8604205/111772790-efe2ac00-88b5-11eb-925d-a80faeaa5369.png
[3]: https://user-images.githubusercontent.com/8604205/111772810-f5d88d00-88b5-11eb-8b2a-60bdc3736ea3.png

PR Close #41275
2021-04-01 11:36:44 -07:00
Pete Bacon Darwin 7dfa446c4a fix(common): temporarily re-export and deprecate `XhrFactory` (#41393)
The moved `XhrFactory` still needs to be available from `@angular/common/http`
for some libraries that were built prior to 12.0.0, otherwise they cannot be
used in applications built post-12.0.0.

This commit adds back the re-export of `XhrFactory` and deprecates it.

PR Close #41393
2021-04-01 11:26:11 -07:00
George Kalpakas 6391a4a49d docs: fix `.docs-card` tooltip and footer text in `docs` guide (#41250)
This commit updates the tooltip and footer description of the
"What is Angular" card in the `docs` guide to better match the card's
content. (It seems that the old content was copied/pasted from a
different card.)

It also updates the tooltip of the "Hello World" card to better describe
the card's purpose.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas e8a2e81e06 docs: correctly style alert in `updating-content-github-ui` guide (#41250)
This commit replaces the unknown `is-warning` CSS class from an alert in
the `updating-content-github-ui` guide with the `is-important` CSS class
(that causes the alert to be given an orange-ish background).

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 8debe95fc3 refactor(docs-infra): consistently format `docs-card` elements in the guides (#41250)
This commit formats the `docs-card` elements used in
`contributors-guide-overview` and `docs` guides to have consistent
indentation and line-wrapping.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 8b9d98ec63 docs: several minor fixes/improvements to docs contributing guides (#41250)
This commit includes several minor fixes and improvements to the
`updating-content-github-ui` and `updating-search-keywords` guides.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas f190c41e50 docs: use dedicated anchors for links to `CONTRIBUTING.md` (#41250)
Previously, some links to specific sections of `CONTRIBUTING.md` were
using hashes automatically generated by GitHub based on the section
headings. This resulted in less readable hashes which were directly tied
to the heading text and thus less robust (i.e. more likely to break if
the heading was re-worded in the future).

This commit switches such links to use the dedicated anchors, which are
more succinct/readable and more stable.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas 9629e232e0 docs: fix URLs in `reviewing-content` and `updating-search-keywords` guides (#41250)
This commit fixes some incorrect URLs in `reviewing-content` and
`updating-search-keywords` guides.

PR Close #41250
2021-04-01 11:19:57 -07:00
George Kalpakas bff7af4882 fix(docs-infra): add `updating-content-github-ui` guide to the sidenav (#41250)
It seems that the `updating-content-github-ui` guide was accidentally
omitted from the sidenav in #41061.

This commit adds the guide to the sidenav.

PR Close #41250
2021-04-01 11:19:57 -07:00
Pete Bacon Darwin a371646a37 build: update yargs dependency to 16.2.0. (#41351)
This avoids a vulnerability in the transitive y18n dependency.

Fixes #41215

PR Close #41351
2021-03-30 16:59:38 -07:00
profanis b75d02cf88 docs: describe how to run tests in GitLab CI (#40411)
The documentation has a very useful configuration for Travis and CircleCI but not for GitLab CI.
So, I thought that might be useful to have that as well.

PR Close #40411
2021-03-30 16:53:30 -07:00
Obumuneme Nwabude d35751d442 docs(docs-infra): update docs on configuring project for Travis CI (#37473)
Remove sudo since it no longer has use in Travis CI build configurations.
Change chrome addons to use the latest required method.
Remove dist to make the Travis CI builds run in the latest Ubuntu release: Xenial.
This because Trusty uses an older version of Chrome which is not supported
by the current the latest Chrome Driver, used in ng e2e tests.

Fixes #36451

PR Close #37473
2021-03-30 16:45:32 -07:00
Yvonne Allen da22d4904c docs: review and update components overview guide (#41263)
* add links to navigate to the create workspace and application and install Angular CLI how-to steps for easy navigation
* add reviewed tag with date guide was reviewed

PR Close #41263
2021-03-30 16:44:01 -07:00
Alan Agius 300d6d1e38 build(docs-infra): support building the local `angular-in-memory-web-api` package in `NgPackagesInstaller` (#41313)
In some cases, we want to test the AIO app or docs examples against the locally built `angular-in-memory-web-api` for example to ensure that the changes in a commit do not introduce a breaking changes.

PR Close #41313
2021-03-29 15:14:16 -07:00
Zach Arend dd82c8e9f4 docs(docs-infra): add Zach Arend to contributors.json (#41325)
Add an entry for Zach Arend to the contributors.json file.

PR Close #41325
2021-03-24 13:34:51 -07:00
Marios Radis a92a89b0eb docs: spelling changes in app.e2e-spec and validate-spec files (#41326)
PR Close #41326
2021-03-23 14:37:12 -07:00
Leandro Diniz eba1289ec9 docs: format browser-support tables for GitHub markdown (#41122)
Format the HTML used in browser-support.md such that the tables
render correctly under GitHub markdown.

PR Close #41122
2021-03-23 13:08:35 -07:00
waterplea 6a6d332c06 docs: add Alexander Inkin to GDE list (#41310)
PR Close #41310
2021-03-23 11:18:26 -07:00
George Kalpakas 80f11a9b86 ci: check that there are no unused contributor images (#41290)
When a contributor was removed from `contributors.json`, the
corresponding image should also be removed from
`aio/content/images/bios/`. However, this was often overlooked,
resulting in unused images remaining in `aio/content/images/bios/`.

This commit adds a check to ensure that all images in
`aio/content/images/bios/` are referenced in `contributors.json`.

PR Close #41290
2021-03-23 09:38:43 -07:00
George Kalpakas ac66b0199e build(docs-infra): remove unused contributor images (#41290)
This commit removes some contributor images that are no longer
referenced in `contributors.json` (i.e. they belong to contributors that
have since been removed).

BTW, removing these unused images saves ~720KB off the total size of the
assets that are deployed along with the app.

PR Close #41290
2021-03-23 09:38:43 -07:00
Kapunahele Wong e340d190bd docs: add some boilerplate button, h3, and hr styles (#41052)
PR Close #41052
2021-03-23 09:37:59 -07:00
Alisa Duncan 31dc483206 docs: add alisa duncan to GDE resources (#41295)
PR Close #41295
2021-03-23 09:37:11 -07:00
cindygk efe02d8b04 docs: update contributors.json (#41284)
PR Close #41284
2021-03-22 08:56:47 -07:00
Pete Bacon Darwin 5bc0a472bd refactor(docs-infra): remove image size exclusion list (#41292)
In #41253 the size of contributor images was limited, but
some images were already too large. So an exclusion list
was added. These images have now been reduced, so
the exclusion list is no longer needed.

The files were reduced by a combination of running them through the
https://tinyjpg.com/ online service and manually setting their size to
168px wide or tall using the MacOS Image Preview app.

PR Close #41292
2021-03-22 08:55:53 -07:00
Pete Bacon Darwin 2548921a19 docs: reduce the file size of contributor images (#41292)
Fixes #41287

PR Close #41292
2021-03-22 08:55:53 -07:00
MariosRadis ed5bfe8173 docs: simplify deleteHero method in tutorial (#41303)
Fixes #41233

PR Close #41303
2021-03-22 08:54:53 -07:00
Yvonne Allen b012a56615 docs: specify date format for reviewed tag (#41269)
Specify a date format for the reviewed tag and provided an example.

PR Close #41269
2021-03-19 12:38:50 -07:00
Andrew Kushnir 2ccb579e06 feat(docs-infra): add profile picture size check (#41253)
This commit updates the logic that validates contributors.json data and introduces a new check that verifies that profile images don't exceed specified limit.

PR Close #41253
2021-03-19 12:37:21 -07:00
Pete Bacon Darwin fbdb19c263 docs(localize): expose documentation for the `@angular/localize` package (#40317)
PR Close #40317
2021-03-19 12:36:10 -07:00
George Kalpakas 655507012b build(docs-infra): upgrade cli command docs sources to b6effecae (#41259)
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](5f5448301...b6effecae):

**Modified**
- help/extract-i18n.json

PR Close #41259
2021-03-18 10:02:54 -07:00
Samuel R ac9a250fc4 docs: update link to schematics schema (#41258)
PREVIOUSLY:
The https://angular.io/guide/schematics#configuring-cli-schematics page has a link to "app" schematic specifically and to a version 7.

NOW:
The https://angular.io/guide/schematics#configuring-cli-schematics page links to the latest version of schematics (all of them, not just the "app" schematic) to let the reader snoop around a bit.
PR Close #41258
2021-03-18 10:02:25 -07:00
Manuele Dones ac9c4289e0 docs: replace deprecated karma-coverage-istanbul-reporter (#41246)
'karma-coverage-istanbul-reporter' usage has been deprecated since version 11.
Please install 'karma-coverage' and update 'karma.conf.js.' For more info, see https://github.com/karma-runner/karma-coverage/blob/master/README.md

PR Close #41246
2021-03-18 10:01:57 -07:00
George Kalpakas e23994191c docs: make `HeroService#gerHero()` in `toh-pt5` compatible with TS strict mode (#41234)
Fixes #41207

PR Close #41234
2021-03-18 10:00:52 -07:00
George Kalpakas 6d47b05b5b docs: align `toh-pt5` code with `toh-pt4` (#41234)
This commit aligns the code of `HeroService` `getHeroes()` and
`getHero()` methods in `toh-pt5` with that of `toh-pt4`. I.e. it applies
the changes from #40419 to `toh-pt5`.

PR Close #41234
2021-03-18 10:00:52 -07:00
Preston Lamb 81d2aabcbb docs: add preston lamb to GDE resources (#41204)
PR Close #41204
2021-03-18 09:58:07 -07:00
Kristiyan Kostadinov 59ef40988e feat(core): support TypeScript 4.2 (#41158)
Updates the repo to TypeScript 4.2 and tslib 2.1.0.

PR Close #41158
2021-03-17 09:10:25 -07:00
Alan Agius 98de4cb1bf docs: add deprecation note next to IE 11 in browser-support page (#41147)
Add a deprecation note, that IE 11 will be deprecated in version 12.

See angular/angular-cli#20225 and https://techcommunity.microsoft.com/t5/microsoft-365-blog/microsoft-365-apps-say-farewell-to-internet-explorer-11-and/ba-p/1591666

PR Close #41147
2021-03-17 09:07:37 -07:00
George Kalpakas 6bc22a7557 build(docs-infra): upgrade cli command docs sources to 5f5448301 (#41239)
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](46538eea1...5f5448301):

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

PR Close #41239
2021-03-17 09:06:37 -07:00
Alan Agius 95aa0cf04c docs: update assets configuration to include `followSymlinks` option (#41238)
The `followSymlinks` is not listed in the assets configuration section.

PR Close #41238
2021-03-17 09:04:15 -07:00
Teri Glover 0f0f34fb8a docs: minor update to what is Angular topic (#41123)
PR Close #41123
2021-03-17 09:01:35 -07:00
Gérôme Grignon 7d5b60e409 docs: remove unused attribute (#41211)
Fixes #41210

PR Close #41211
2021-03-16 14:48:52 -07:00
George Kalpakas 6bdad5ef6c build(docs-infra): upgrade cli command docs sources to 46538eea1 (#41227)
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](edc1d0bc7...46538eea1):

**Modified**
- help/generate.json
- help/new.json

PR Close #41227
2021-03-16 11:04:21 -07:00
Alan Agius 7d6db009e9 docs: update docs to reflect production mode by default (#41173)
In CLI version 12, we introduced the concept of production builds by default.

With this change we update the documentation to reflect the changes.

More information about the change can be found https://github.com/angular/angular-cli/pull/20128

PR Close #41173
2021-03-16 09:32:44 -07:00
David Shevitz cc75e1d17b docs: add contributors guide to aio (#41061)
PR Close #41061
2021-03-15 12:16:37 -07:00
stefanos- cfaf425314 docs: add book about testing to resources (#41159)
PR Close #41159
2021-03-12 13:25:48 -08:00
Alan Agius 713b43f944 docs: remove deprecated Angular CLI APIs that have been removed (#41174)
With this change we remove deprecated Angular CLI APIs that have been removed in versions 12.

PR Close #41174
2021-03-12 13:24:28 -08:00
George Kalpakas 8d457ab2e1 fix(docs-infra): fix `<code-tabs>` in IE11 (#41183)
Previously, `<code-tabs>` did not work correctly in IE11. More
specifically, due to how IE11 handles updates to `innerHTML`, the
contents of `<code-pane>` elements were cleared before we could capture
them and pass them to the `<aio-code>` components.

This commit fixes it by ensuring we capture the `<code-pane>` contents
before clearing unneeded HTML.

Before: ![code tabs in IE11 before][1]
After: ![code tabs in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110815248-f4460e00-8292-11eb-868e-eca7ba5e9cd3.png
[2]: https://user-images.githubusercontent.com/8604205/110815253-f5773b00-8292-11eb-80a6-1a0b1ea44d8f.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas ea00e2c0b4 fix(docs-infra): fix display of AngularJS logo on the "Press kit" page in IE11 (#41183)
Previously, the AngularJS SVG logo shown on the "Press kit" page was not
displayed correctly in IE11 (see the image below).

This commit fixes it by explicitly specifying the SVG `viewBox` on the
logo.

Before: ![presskit AngularJS logo in IE11 before][1]
After: ![presskit AngularJS logo in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110812629-7123b880-8290-11eb-9f71-0ae910536fa5.png
[2]: https://user-images.githubusercontent.com/8604205/110812633-7254e580-8290-11eb-896c-84f595d273b8.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 0d1b3fe55e fix(docs-infra): fix the layout of the "Features" page in IE11 (#41183)
IE11 does not support `justify-content: space-evenly` and therefore
falls back to the default (`flex-start`), breaking the layout of the
items in the "Features" page (see the image below).

This commit fixes the layout by specifying `space-around` as a fallback
for `justify-content`, which keeps the layout closer to the intended.

Before: ![features page layout in IE11 before][1]
After: ![features page layout in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110811038-045bee80-828f-11eb-8027-d5851762a5eb.png
[2]: https://user-images.githubusercontent.com/8604205/110811076-0a51cf80-828f-11eb-98a0-2f2928128dd0.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 5c0122f7fd fix(docs-infra): fix the layout of docs pages in IE11 (#41183)
IE11 does not recognize the `<main>` element as a block element and
therefore it does not apply margin/paddings/widths as expected. This
resulted in the layout of docs pages being broken in IE11 (see the image
below).

This commit fixes the layout by explicitly setting `.sidenav-content`
(which is a `<main>` element) to `display: block`.

Before: ![docs pages layout in IE11 before][1]
After: ![docs pages layout in IE11 after][2]

[1]: https://user-images.githubusercontent.com/8604205/110808902-1b014600-828d-11eb-9eef-c1234dc2d436.png
[2]: https://user-images.githubusercontent.com/8604205/110808907-1ccb0980-828d-11eb-91d9-06e5cfafc894.png

PR Close #41183
2021-03-12 13:22:57 -08:00
George Kalpakas 8c939dcb40 fix(docs-infra): fix angular.io on browsers that support Custom Elements but not ES2015 (#41183)
Before #41162, angular.io was broken on IE 11 due to missing a polyfill
for an API (`Reflect.construct()`) needed by the Custom Elements ES5
shim. #41162 tried to fix this by loading the necessary polyfill
(`es.reflect.construct.js`) on browsers that do not support ES2015
modules (including IE 11).

It turns out that the fix in #41162 was itself broken, because the
`es.reflect.consruct.js` script (included directly in the page via a
`<script>` tag) was in CommonJS format (which cannot run in the browser
as is). By chance, this still allowed browsers that supported neither
Custom Elements nor ES2015 modules (such as IE 11) to work correctly as
a side-effect of loading the `@webcomponents/custom-elements` polyfill
after the Custom Elements ES5 shim (`native-shim.js`). However, on the
few browsers that natively support Custom Elements but not ES2015
modules, angular.io would still be broken.

This commit correctly fixes angular.io on all browsers by properly
bundling the polyfills and transpiling to ES5.

Implementation-wise, we use [esbuild][1] for bundling the polyfills (and
converting from CommonJS to a browser-compatible, IIFE-based format) and
[swc][2] for downleveling the code to ES5 (since `esbuild` only supports
ES2015+).

[1]: https://esbuild.github.io/
[2]: https://swc.rs/

PR Close #41183
2021-03-12 13:22:57 -08:00
Misko Hevery 70962465b5 fix(core): Switch `emitDistinctChangesOnlyDefaultValue` to true (#41121)
BREAKING CHANGE:

Switching default of `emitDistinctChangesOnlyDefaultValue`
which changes the default behavior and may cause some applications which
rely on the incorrect behavior to fail.

`emitDistinctChangesOnly` flag has also been deprecated and will be
removed in a future major release.

The previous implementation would fire changes `QueryList.changes.subscribe`
whenever the `QueryList` was recomputed. This resulted in an artificially
high number of change notifications, as it is possible that recomputing
`QueryList` results in the same list. When the `QueryList` gets recomputed
is an implementation detail, and it should not be the thing that determines
how often change event should fire.

Unfortunately, fixing the behavior outright caused too many existing
applications to fail. For this reason, Angular considers this fix a
breaking fix and has introduced a flag in `@ContentChildren` and
`@ViewChildren`, that controls the behavior.

```
export class QueryCompWithStrictChangeEmitParent {
  @ContentChildren('foo', {
    // This option is the new default with this change.
    emitDistinctChangesOnly: true,
  })
  foos!: QueryList<any>;
}
```
For backward compatibility before v12
`emitDistinctChangesOnlyDefaultValue` was set to `false. This change
changes the default to `true`.

PR Close #41121
2021-03-12 10:47:56 -08:00
Stepan Suvorov 94e8f5d4a4 docs: add stepan suvorov to GDE resources (#41178)
PR Close #41178
2021-03-11 09:31:48 -08:00
George Kalpakas f2ca29cd27 build(docs-infra): upgrade cli command docs sources to edc1d0bc7 (#41175)
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](d62203a9f...edc1d0bc7):

**Modified**
- help/add.json
- help/build.json
- help/e2e.json
- help/extract-i18n.json
- help/generate.json
- help/new.json
- help/serve.json
- help/test.json

PR Close #41175
2021-03-11 09:30:51 -08:00
George Kalpakas e1e766a880 fix(docs-infra): generate the `404.html` page correctly (#41163)
Previously, the generated `404.html` page did not include a `<body>`
tag. In some browsers (such as IE 11), this was causing warnings in the
console.

This commit ensures the generated page contains a `<body>` tag. It also
fixes the indentation in the generated page.

PR Close #41163
2021-03-11 09:30:03 -08:00
George Kalpakas 79e21b966e fix(docs-infra): fix angular.io on IE 11 (#41162)
Previously, the angular.io app was broken on IE 11. In particular, pages
that included Custom Elements would fail to load, because the
`Reflect.construct()` method (which the Custom Elements ES5 shim relies
on) was not available.

This commit fixes this by loading the polyfill for `Reflect.construct()`
on browsers that do not support ES2015 (including IE 11).

PR Close #41162
2021-03-11 09:25:32 -08:00
George Kalpakas d368fa2fa4 fix(docs-infra): avoid unnecessarily loading Custom Elements ES5 shim (#41162)
The custom elements spec is not compatible with ES5 style classes. This
means ES2015 code compiled to ES5 will not work with a native
implementation of Custom Elements. To support browsers that natively
support Custom Elements but not ES2015 modules, we load
`@webcomponents/custom-elements/src/native-shim.js`, which minimally
augments the native implementation to be compatible with ES5 code.
(See [here][1] for more details.)

Previously, the shim was included in `polyfills.ts`, which meant it was
loaded in all browsers (even those supporting ES2015 modules and thus
not needing the shim).

This commit moves the shim from `polyfills.ts` to a `nomodule` script
tag in `index.html`. This will ensure that it is only loaded in browsers
that do not support ES2015 modules and thus do not needed the shim.

NOTE:
This commit also reduces size of the polyfills bundle by ~400B
(52609B --> 52215B).

[1]: https://www.npmjs.com/package/@webcomponents/custom-elements#es5-vs-es2015

PR Close #41162
2021-03-11 09:25:32 -08:00
pniedermeyer 4c79b8a644 docs: Remove of unnecessary Input (#41150)
remove unnecessary Input

PR Close #41150
2021-03-10 11:20:01 -08:00
Aristeidis Bampakos a730315fb2 docs: use double quotes in Tour of Heroes (pt1) (#41134)
Use double quotes to be consistent across the component template

PR Close #41134
2021-03-09 08:56:50 -08:00
George Kalpakas f281310d39 fix(docs-infra): print info to help debugging SW cache issue (#41106)
From time to time, an angular.io page fails to load due to requesting a
file that cannot be found neither on the server nor in the cache. We
believe this is caused by the browser's partially clearing a cache.
See #28114 for more details.

Some time ago, we introduced [SwUpdate#unrecoverable][1] to help work
around this issue by [reloading the page][2] when such an error is
detected.

However, this issue still pops up occasionally (for example, #41073).

In an attempt to help diagnose the issue, this commit prints more info
regarding the SW state and cache content when this error occurs. It will
result in something like the following being printed to the console:

```
ServiceWorker: activated

Cache: ngsw:/:db:control (2 entries)
  - https://angular.io/assignments: {"f5f02035-ee1f-463c-946c-e8b85badca25":"5c95f89a85255a6fefb4045a20f751ef32b2f3a4"}
  - https://angular.io/latest: {"latest":"5c95f89a85255a6fefb4045a20f751ef32b2f3a4"}

Cache: ngsw:/:5c95f89a85255a6fefb4045a20f751ef32b2f3a4:assets:app-shell:cache (24 entries)
  - https://angular.io/0-es2015.867022f8bb092ae1efb1.worker.js
  - https://angular.io/announcement-bar-announcement-bar-module-es2015.1b5b762c9c8837c770f8.js
  - https://angular.io/api-api-list-module-es2015.40a43cd22f50f64d63bb.js
  ...

Cache: ngsw:/:db:ngsw:/:5c95f89a85255a6fefb4045a20f751ef32b2f3a4:assets:app-shell:meta (1 entries)
  - https://angular.io/https://fonts.gstatic.com/s/robotomono/v13/L0x5DF4xlVMF-BfR8bXMIjhLq3-cXbKD.woff2:
      {"ts":1615031956601,"used":true}

If you see this error, please report an issue at https://github.com/angular/angular/issues/new?template=3-docs-bug.md
including the above logs.
```

NOTE:
This change increases the main bundle by 1649B (0.37%), but it can be
reverted as soon as we gather enough info to diagnose the issue.

[1]: https://angular.io/api/service-worker/SwUpdate#unrecoverable
[2]: https://github.com/angular/angular/blob/c676ec1ce5d586d4bc46/aio/src/app/sw-updates/sw-updates.service.ts#L55-L61

PR Close #41106
2021-03-09 08:54:52 -08:00
George Kalpakas 7a27cd262f refactor(docs-infra): simplify code snippet indentation in the "Cheat sheet" guide (#41051)
Previously, the indentation of code snippets in the "Cheat sheet" guide
was done using `<br>` elements (for line breaks) and `&emsp;` HTML
entities (for space). This was laborious and put the onus on the author
to remember to use these symbols (instead of regular whitespace
characters).
(Discussed in
https://github.com/angular/angular/pull/41051#discussion_r585651621.)

This commit changes the way `<code>` elements are styles inside the
"Cheat sheet" guide to allow using regular whitespace characters in code
snippets. It also changes all `<br>`/`&emsp;` occurrences to `\n`/`  `
respectively to make code snippets more readable in the source code.

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas d7398d3025 fix(docs-infra): improve the layout of the "Features" page on medium screens (#41051)
The "Features" page organizes features in groups/rows of 3 features
each. On wide screens, all 3 paragraphs of a group/row can be shown next
to each other. On narrow screens (between 768px and 1057px), the layout
changes to stack the paragraphs vertically. On medium screens, however,
there is not enough space to show more than two paragraphs next to each
other.

Previously, the 3rd paragraph was wrapped over to the next line.

This commit improves the layout on medium screens by switching to
immediately stacking the paragraphs vertically as soon as there is not
enough space for them to be displayed in one row. Since the total width
is still too much for one paragraph, the paragraphs are limited to 80%
of the total width.

Before (on 1000px width): [features page (on 1000px) before][1]
After (on 1000px width): [features page (on 1000px) after][2]

[1]: https://user-images.githubusercontent.com/8604205/109825316-62128a00-7c42-11eb-8391-650201257274.png
[2]: https://user-images.githubusercontent.com/8604205/109825323-6343b700-7c42-11eb-86c1-e8307c5a727a.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas 1054d554d8 fix(docs-infra): avoid truncating several API list items (#41051)
Previously, with the min width of 220px per item, several API list items
were truncated.

This commit increases the min width per item to 330px, which allows
almost all items to have their full text shown. It also increases the
API list page's max content width from 50em (800px) to 62.5em (1000px)
to allow items to be shown on three columns despite their increased
width. This increase in the content width shouldn't negatively affect
UX, since the API list page uses a multi-column layout (i.e. it does not
contain 1000px-lines of text.)

Before: ![api-list before][1]
After: ![api-list after][2]

[1]: https://user-images.githubusercontent.com/8604205/109396457-5f5e1f00-793a-11eb-80cf-1418f409325a.png
[2]: https://user-images.githubusercontent.com/8604205/109396659-499d2980-793b-11eb-95d3-f54250f7fab5.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas a926fd020b fix(docs-infra): show ellipsis when text overflows in API list items (#41051)
Previously, when an API list item's text overflowed its container, it
was just hidden. This made it often difficult to realize that there was
more text.

This commit fixes this by ensuring an ellipsis (`...`) is shown when the
text overflows.

Before: ![api-list truncated before][1]
After: ![api-list truncated after][2]

[1]: https://user-images.githubusercontent.com/8604205/109396186-0cd03300-7939-11eb-921c-00621a3889a4.png
[2]: https://user-images.githubusercontent.com/8604205/109396187-0e016000-7939-11eb-9f3b-4535be083417.png

PR Close #41051
2021-03-09 08:52:52 -08:00
George Kalpakas 304a32b655 fix(docs-infra): limit max content width on "Contributors" and "Cheat sheet" pages (#41051)
Previously, the content width on the "Contributors" page (`/about`) and
the "Cheat sheet" guide (`/guide/cheatsheet`) was unlimited (i.e. the
content would take up all the available space horizontally). This was
not very ergonomic on large screens. Especially on the "Cheat sheet"
guide there was a lot of unnecessary whitespace between the code shown
on the left column and the description shown on the right column.

This commit fixes this by setting a max content width for both pages of
84em (1404px by default). This keeps the content at a more manageable
width and avoids unnecessary whitespace.

Before (contributors): ![contributors page on 2500px before][1]
Before (cheatsheet): ![cheatsheet on 2500px before][2]
After (contributors): ![contributors page on 2500px after][3]
After (cheatsheet): ![cheatsheet on 2500px after][4]

[1]: https://user-images.githubusercontent.com/8604205/109394323-1bb1e800-792f-11eb-9cd6-c5b83e5ae921.png
[2]: https://user-images.githubusercontent.com/8604205/109394329-1fde0580-792f-11eb-91c0-4ed7ad408b17.png
[3]: https://user-images.githubusercontent.com/8604205/109394319-181e6100-792f-11eb-9463-a281dfe80448.png
[4]: https://user-images.githubusercontent.com/8604205/109394330-210f3280-792f-11eb-9837-ddc7a8d01d19.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 4907d644bb refactor(docs-infra): use more consistent content width on marketing pages (#41051)
Previously, each marketing page used a different limit for its content's
width (if it had a limit at all) and implemented the width limiting in a
different way. Besides resulting in an inconsistent UX, this also made
it difficult to apply site-wide layout changes.

This commit makes the limit for most marketing pages consistent and uses
the same CSS class to make it easier to apply site-wide changes in the
future. The chosen limit is slightly larger than that of docs pages
(62.5em/1000px vs 50em/800px), because marketing pages have a different
type of content and layout (i.e. images, multi-column layout, etc.).
Finally, this commit also removes obsolete wrapper elements, CSS classes
and CSS styles, that are no longer necessary after the changes.

Notably, the homepage (`/`) and the "Contributors" page (`/about`) have
remained unchanged, because the former has its own layout that is
different from other marketing pages and the latter would offer a worse
UX with a small content width limit (as the one used on other marketing
pages).

The content widths of the rest of the marketing pages change slightly as
a result of the changes in this commit, but not in a way that would have
a negative impact on UX. More specifically:

| Page (URL)    | Size before | Size after |
|:--------------|------------:|-----------:|
| `/contribute` |       880px |     1000px |
| `/events`     |   unlimited |     1000px |
| `/features`   |       996px |     1000px |
| `/presskit`   |       800px |     1000px |
| `/resources`  |       800px |     1000px |

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 8365bc8946 refactor(docs-infra): fix code indentation in `ContributorListComponent`'s template (#41051)
This commit fixes the indentation of the template of
`ContributorListComponent` to make it more readable.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 1b38b413de docs: fix indentation of code snippets in the "Cheat sheet" guide (#41051)
Previously, the indentation of code snippets in the "Cheat sheet" guide
was done using regular spaces. However, leading whitespace is ignored in
HTML elements (by default), which resulted in the identation being lost.

This commit fixes this by using the `&emsp;` HTML entity for
indentation, ensuring the code snippets are easier to read.

Some examples:

Before: ![cheatsheet code indentation before][1]
After: ![cheatsheet code since PR 40944][2]

[1]: https://user-images.githubusercontent.com/8604205/109385242-218dd600-78fb-11eb-9261-18ab5f2c308c.png
[2]: https://user-images.githubusercontent.com/8604205/109385246-25b9f380-78fb-11eb-8e82-d8a561deba21.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 76daca800e refactor(docs-infra): remove unnecessary wrapper `<div>` from the "Cheat sheet" guide (#41051)
This commit removes an unnecessary wrapper `<div>` from the
"Cheat sheet" guide. The CSS styles that referenced the element's ID
(`#cheatsheet`) have been updated to use `.page-guide-cheatsheet`
instead.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas f85a178a49 fix(docs-infra): fix `<code>` styling in the "Cheat sheet" guide (#41051)
Since #40944, `<code>` elements have a distinctive background to make
them stand out from regular text. However, this styling is not desirable
in certain cells of the "Cheat sheet" guide's tables, which exclusively
contain code.

This commit updates the `<code>` styling to remove the distinctive
background in those "Cheat sheet" cells.

Before #40944: ![cheatsheet code before PR 40944][1]
Since #40944: ![cheatsheet code since PR 40944][2]
After this commit: ![cheatsheet code after][3]

[1]: https://user-images.githubusercontent.com/8604205/109383633-4f215200-78f0-11eb-95e2-2a2c4fb3a31f.png
[2]: https://user-images.githubusercontent.com/8604205/109383634-50527f00-78f0-11eb-8c48-ff5f96918c4d.png
[3]: https://user-images.githubusercontent.com/8604205/109383635-50eb1580-78f0-11eb-9cf2-98851692ddd9.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas d80d6ea3f6 fix(docs-infra): fix styling of `<code>` elements on older browsers (#41051)
Previously, styling of `<code>` elements utilized the `:not()` CSS
pseudo-class with multiple selectors (`:not(h1, h2, ...)`). It turns out
that older browsers (such as IE11) do not support multiple selectors in
a single `:not()` instance.
(See [MDN][1] and [CanIUse][2] for more info.)

This commit fixes `<code>` styling to use multiple separate `:not()`
instances instead (`:not(h1):not(h2)...`), so that they are styled
correctly on older browsers as well.

NOTE:
This change seems to trigger some kind of bug in LightHouse that causes
the a11y score of `/start` to be calculated as 0 (which is clearly
wrong). This happens on Linux (tested on CI and locally using the
Windows Subsystem for Linux (WSL)) - on Windows the score is computed
correctly as 98/100.
([Example failure][3])

The bug seems to be related to the layout of the content and goes away
if we change the viewport size (for example, switching to LightHouse's
`desktop` config) or make another change that affects the content's
layout (for example, reducing the padding of `<code>` elements).

To work around the issue, this commit updates the `test-aio-a11y.js`
script to test `/start-routing` instead of `/start`.

[1]: https://developer.mozilla.org/en-US/docs/Web/CSS/:not#description:~:text=Using%20two%20selectors
[2]: https://caniuse.com/css-not-sel-list
[3]: https://circleci.com/gh/angular/angular/931038

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 269d7e4d22 fix(docs-infra): improve the layout of the "Features" page on medium screens (#41051)
The "Features" page organizes features in groups/rows of 3 features
each. On wide screens, all 3 paragraphs of a group/row can be shown next
to each other. On narrow screens, the layout changes to stack the
paragraphs vertically. On medium screens, however, the 3rd paragragh is
wrapped over to the next line.

Previously, the wrapped content was left-aligned, which left a lot of
empty space on the right.

This commit improves the layout on medium screens by ensuring the
paragraphs are horizontally centered (with space distributed evenly
around them).

Before: ![features page before][1]
After: ![features page after][2]

[1]: https://user-images.githubusercontent.com/8604205/109344670-b64ef000-7877-11eb-9013-890562ff2f3d.png
[2]: https://user-images.githubusercontent.com/8604205/109344678-b7801d00-7877-11eb-9224-d7715f7d7235.png

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 27bb6f6a04 fix(docs-infra): use a fixed top-menu on marketing pages as well (#41051)
Previously, in contrast to docs pages, marketing pages had a non-fixed
top-menu, which meant that the top-menu would scroll out of the viewport
along with the rest of the content. This had a couple of downsides:
- The UI was different between pages (i.e. different top-menu behavior
  on docs vs marketing pages).
- Since some of the marketing pages are long, it was not easy for people
  to navigate to a different page (i.e. they had to scroll all the way
  back up).

This commit improves the UX by using the same, fixed top-menu on all
pages, which restores consistency and allows the user to navigate around
more easily.

NOTE:
The old behavior (non-fixed top-menu) is kept on the homepage, since its
top-menu design in a little different than other pages (e.g. it uses a
transparent top-menu) and would not play well with a fixed top-menu.

PR Close #41051
2021-03-09 08:52:51 -08:00
George Kalpakas 7944ee2c30 fix(docs-infra): do not underline link icons on hover (#41051)
The external links in the docs content and the download links in the
"Press kit" page have icons next to their text (an external link icon
and a download icon respectively).

Previously, when hovering over one of those links, the icons used to get
underlined along with the link text, which was not desirable.

This commit fixes it by changing the mechanics of how these icons are
positioned inside the anchor elements so that only the link text is
underlined on hover.

Before: ![external links on hover before][1]
Before: ![presskit links on hover before][2]
After: ![external links on hover after][3]
After: ![presskit links on hover after][4]

[1]: https://user-images.githubusercontent.com/8604205/109340455-b64bf180-7871-11eb-923b-3113a237b8d8.png
[2]: https://user-images.githubusercontent.com/8604205/109340461-b815b500-7871-11eb-9c9d-91b6ffb17346.png
[3]: https://user-images.githubusercontent.com/8604205/109340458-b77d1e80-7871-11eb-884c-c1093ec83e66.png
[4]: https://user-images.githubusercontent.com/8604205/109340462-b815b500-7871-11eb-8f00-702b2b61f6ac.png

PR Close #41051
2021-03-09 08:52:51 -08:00
Sagar Pandita c1a93fcf32 docs: remove augury resource (#41107)
Partially addresses #41030.

PR Close #41107
2021-03-08 10:00:13 -08:00
LordMsz 2d69f0c9ca docs: extend :host selector documentation (#41055)
explain behavior of selectors *before* `:host` that escape encapsulation
and explain preferred usage of `:host-context`

PR Close #41055
2021-03-08 08:36:04 -08:00
Pete Bacon Darwin 2893b925c3 build(docs-infra): capture all decorators in doc-gen (#41091)
In 6cff877 we broke the decorator docs because the
doc-gen no longer knew how to identify them.

This commit updates the dgeni processor responsible
for identifying the decorators in the code and ensures
that the docs are now generated correctly.

Fixes #40851

PR Close #41091
2021-03-08 08:34:40 -08:00
George Kalpakas 7854c4ddbe test(docs-infra): run a11y tests against `/tutorial` and update a11y scores (#41103)
This commit adds `/tutorial` to the list of angular.io pages that we run
a11y tests against and updates the required scores to match the current
ones (to avoid a future regression going unnoticed).

PR Close #41103
2021-03-08 08:33:47 -08:00
George Kalpakas e59246cf5c test(docs-infra): print the browser version in `audit-web-app.js` to help debugging (#41103)
This commit updates the `audit-web-app.js` script (used to run PWA and
a11y tests on angular.io) to also print the version of the browser used
to run the tests. This can help when debugging a CI failure.

PR Close #41103
2021-03-08 08:33:47 -08:00
Sivamuthu Kumar 44bb78dbbd docs: update repo link to auto scroll to readme section (#41105)
Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>
PR Close #41105
2021-03-08 08:33:00 -08:00
Sivamuthu Kumar 3d3ab4aa5d docs: add angular-eslint and remove codelyzer from tooling (#41105)
fixes #41029

PR Close #41105
2021-03-08 08:33:00 -08:00
Quentin Monmert c676ec1ce5 docs: fix some typos in angular.io examples (#41093)
This commit updates example code to make the spacing more consistent.

PR Close #41093
2021-03-05 15:08:11 -08:00
Carl Fredrik Samson e7453f15d5 docs: fix issue #40941 (#40942)
setting the `hero` property as an optional property fixes the compilation
error: `Property 'hero' has no initializer and is not definitely assigned
in the constructor` when having the ts transpiler set to "strict" mode.

PR Close #40942
2021-03-05 09:47:44 -08:00
Chris d9acaa8547 docs: remove Codelyzer recommendation from style guide (#40992)
Fixes #40903

PR Close #40992
2021-03-04 11:01:48 -08:00
MG 84b8f250f9 docs: add ng-mocks to tooling resources (#41027)
closes #41025

PR Close #41027
2021-03-03 23:31:38 +00:00
David Pine 7765b648e7 docs: update Angular Global Summit on event pages (#41050)
After my speaker meeting with the Geekle team, they communicated that
they moved the date to avoid colliding with ng-conf. Originally added
in#40697, per @mgechev.

PR Close #41050
2021-03-03 10:04:56 -08:00
David Shevitz d10599459d docs: update @reviewed date (#41060)
PR Close #41060
2021-03-03 10:03:57 -08:00
George Kalpakas ffbacbbc98 build(docs-infra): upgrade cli command docs sources to d62203a9f (#41046)
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](84b99497f...d62203a9f):

**Modified**
- help/build.json

PR Close #41046
2021-03-03 09:55:43 -08:00
George Kalpakas 21f0deeaa6 build(docs-infra): update Angular framework, Material and CLI to latest methods (#40994)
This commit updates the Angular framework, Angular CDK/Material and
Angular CLI to latest stable versions (11.2.3, 11.2.2 and 11.2.2
respectively).

This update also fixes a Lighthouse audit fail due to
`@angular/core@11.0.0` being identified as vulnerable to XSS:
https://snyk.io/vuln/SNYK-JS-ANGULARCORE-1070902

Regarding the payload size increases, they are mostly attributed to
Angular Material:
- Before this commit:     448461 B
- After framework update: 448554 B ( +93 B)
- After Material update:  449292 B (+738 B)
- After CLI update:       449310 B ( +18 B)

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas 6e40551394 build(docs-infra): update Lighthouse to version 7.2.0 (#40994)
In this version, we no longer need our custom logic to skip certain
HTTPS related audits on localhost, since Lighthouse will treat it as a
secure context (similar to how browsers do).
See also GoogleChrome/lighthouse#11766.

PR Close #40994
2021-03-03 09:43:56 -08:00
George Kalpakas cb16035fd3 fix(docs-infra): correctly display event dates on all timezones (#41053)
Previously, the event dates displayed on the angular.io "Events" page
(`/events`) was off by one day on timezones with a negative offset from
UTC. See
https://github.com/angular/angular/pull/41050#issuecomment-788958888.

This commit fixes it by using the `getUTC*` methods of the `Date` object
to extract the date info, which are not affected by the user's timezone.

PR Close #41053
2021-03-03 09:37:21 -08:00
Daniel 5eab6e14f1 docs: fix typo in router.md file (#41064)
PR Close #41064
2021-03-03 09:36:06 -08:00
Aristeidis Bampakos 198e841564 docs(http): add example for interceptor order (#39938)
Add an example for the order of interceptor with image

PR Close #39938
2021-03-01 15:33:36 -08:00
Kapunahele Wong 6c783c7fcb docs: rewrite structural-directives.md (#40015)
PR Close #40015
2021-03-01 15:32:26 -08:00
Kapunahele Wong 356d9a0537 docs: improve contrast of colors and body padding in boilerplate CSS (#40890)
Shifts colors to pass WebAIM contrast checker and adds media
query so that body padding is smaller at smaller widths.
Body padding responsiveness will help on StackBlitz and small
screens.

PR Close #40890
2021-03-01 15:30:32 -08:00
twerske be8893fd1d docs: add youtube to social icons (#40987)
PR Close #40987
2021-02-26 15:50:36 -08:00
Alan Agius 06fb318b3b docs: update inlineCritical default value (#40920)
Related to https://github.com/angular/angular-cli/pull/20096

PR Close #40920
2021-02-26 15:41:15 -08:00
Pete Bacon Darwin 4859c0947a build(docs-infra): implement full template checking for examples (#40930)
This commit turns on full template type checking and fixes the examples
that had errors.

PR Close #40930
2021-02-26 15:40:44 -08:00
Pete Bacon Darwin 03d92f75e6 build(docs-infra): enable Ivy in StackBlitz examples (#40930)
We need to explicitly set the `enableIvy` option in a tsconfig file
to tell StackBlitz not to use ViewEngine.

This commit will generate an appropriate tsconfig.json file in the
example data that is sent to StackBlitz, which matches the Ivy
setting of the AIO project itself.

PR Close #40930
2021-02-26 15:40:44 -08:00
George Kalpakas 272b5645c4 fix(docs-infra): improve the layout of the "Resources" page (#40944)
This commit improves the readability of the "Resources" page by limiting
the content's max width to 50em (which is 800px by default).

It also gets rid of custom color values and either uses the default
color or colors specified via Sass variables.

Before: ![resources page before][1]
After: ![resources page after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108601949-104b4380-73a8-11eb-864b-948db8c36f80.png
[2]: https://user-images.githubusercontent.com/8604205/108602036-894a9b00-73a8-11eb-870d-39bea9b46d97.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d3eff182e3 refactor(docs-infra): clean up styling of the `<aio-resource-list>` component (#40944)
This commit cleans up the styles and the elements/classes used for
styling the content of the `<aio-resource-list>` component.

This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 00562ed935 fix(docs-infra): center the "Contribute" page (#40944)
This commit improves the layout of the "Contribute" page by centering
the content (similar to other marketing pages).

Before: ![contribute layout before][1]
After: ![contribute layout after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108595056-5b545f00-7386-11eb-97b6-c3606dbfb5fa.png
[2]: https://user-images.githubusercontent.com/8604205/108595060-5becf580-7386-11eb-91fa-b2877f2a4691.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2af8099fbc fix(docs-infra): use up-to-date URLs in "Contribute" links (and replace deprecated `md-button`) (#40944)
This commit replaces some outdated URLs in "Contribute" links (on the
"Contribute" page):
- `github.com/angular/material2` --> `github.com/angular/components`
- `github.com/angular/angularfire2` --> `github.com/angular/angularfire`

It also replaces the deprecated `md-button` attribute with `mat-button`.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas c4a9c003cb fix(docs-infra): remove unwanted underline when hovering over contributor info links (#40944)
This commit removes an unwanted underline effect when hovering over
contributor info links (`.contributor-info > .info-item`). This was
accidentally introduced in #40427.

Before: ![contributor info on hover before][1]
After: ![contributor info on hover after][2]

[1]: https://user-images.githubusercontent.com/8604205/108560170-045a7580-7305-11eb-98d2-4302d98581c6.png
[2]: https://user-images.githubusercontent.com/8604205/108560176-058ba280-7305-11eb-97eb-74cf2c830a39.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d97b45d82a fix(docs-infra): make inline code stand out more (#40944)
This commit improves the styling of inline code blocks to make them
stand out more.

Before: ![code formatting before][1]
After: ![code formatting after][2]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108554295-8e521080-72fc-11eb-94e8-09246ae334c8.png
[2]: https://user-images.githubusercontent.com/8604205/108553733-c9077900-72fb-11eb-8001-1f0baf8b95bc.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 516de34778 fix(docs-infra): improve the appearance of `.filter-button` elements (#40944)
This commit improves the appearance of `.filter-button` elements used to
jump between different categories in "Contributors" and "Resources" pages.

Before (wide screen): ![contributors buttons (wide screen) before][1]
Before (narrow screen): ![contributors buttons (narrow screen) before][2]
After (wide screen): ![contributors buttons (wide screen) after][3]
After (narrow screen): ![contributors buttons (narrow screen) after][4]

This change has been extracted from #36045.

[1]: https://user-images.githubusercontent.com/8604205/108414895-72376c00-7235-11eb-9537-7a7b059d09fe.png
[2]: https://user-images.githubusercontent.com/8604205/108414923-782d4d00-7235-11eb-8ba4-87a3a9ae14cd.png
[3]: https://user-images.githubusercontent.com/8604205/108414929-78c5e380-7235-11eb-807a-109b4200e64e.png
[4]: https://user-images.githubusercontent.com/8604205/108414942-7cf20100-7235-11eb-8ef0-9b2da397b3ee.png

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas ae50e40216 refactor(docs-infra): move `.filter-button` styles inside `.group-buttons` (#40944)
Since `.filter-button` elements only appear inside `.group-buttons`
elements, this commit moves `.filter-button` CSS styles inside
`.group-buttons` styles.

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas d6f6197728 fix(docs-infra): put the license references in a separate paragraph in the footer (#40944)
This commit improves how sentences are broken up into lines in the
footer (due to the limited max-width of the content) by moving the
license references in a separate paragraph.

Before: ![footer before][1]
After: ![footer after][2]

[1]: https://user-images.githubusercontent.com/8604205/108595211-593ed000-7387-11eb-8ee5-f13c8bf522f4.png
[2]: https://user-images.githubusercontent.com/8604205/108595214-5a6ffd00-7387-11eb-9a9d-dbaa2175f51f.png

PR Close #40944
2021-02-26 15:39:29 -08:00
George Kalpakas 2475dbe7b2 refactor(docs-infra): remove redundant Sass mixin (#40944)
This commit removes the `bp()` Sass mixin, which was only used in one
place (and also included several unused code-branches).

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 2a518fb44c refactor(docs-infra): use Sass variables for colors used in themes (#40944)
This change has been extracted from #36045.

NOTE:
The color names for the RC theme were computed using
https://www.color-blindness.com/color-name-hue.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
George Kalpakas 6275346871 fix(docs-infra): increase margin of header-links (#40944)
This change has been extracted from #36045.

Co-authored-by: Stefanie Fluin <sjtrimble@gmail.com>

PR Close #40944
2021-02-26 15:39:28 -08:00
Theoklitos Bampouris fb82558d78 docs: Change lexical in security guide (#41016)
Change `onerror` attribute reference to `script` element reference
PR Close #41016
2021-02-26 15:14:57 -08:00
cexbrayat 91cdc11aa0 fix(common): allow number or boolean as http params (#40663)
This change fixes an incompatibility between the old `@angular/http` package
and its successor (`@angular/common/http`) by re-introducing the types that were supported before.

It now allows to use number and boolean directly as HTTP params, instead of having to convert it to string first.

Before:

    this.http.get('/api/config', { params: { page: `${page}` } });

After:

    this.http.get('/api/config', { params: { page }});

`HttpParams` has also been updated to have most of its methods accept number or boolean values.

Fixes #23856

BREAKING CHANGE:

The methods of the `HttpParams` class now accept `string | number | boolean`
instead of `string` for the value of a parameter.
If you extended this class in your application,
you'll have to update the signatures of your methods to reflect these changes.

PR Close #40663
2021-02-26 12:03:50 -08:00