Commit Graph

3974 Commits

Author SHA1 Message Date
Jacob Foshee fe1ada86e8 docs: add missing return to example storage.service.ts (#31434)
While JavaScript does support implicit returns, it seems TypeScript will not infer the function return type from
the implicit return of the last statement (at least not in TS 3.4.3). So, when the `return` is missing from the
`get` function the implicit type of the function is `void`. So for the `get` function to be usable it needs to an
explicit return.

PR Close #31434
2020-11-20 08:28:56 -08:00
Will Mendes 17d5266cdb docs: add ngx-skeleton-loader module into resources page (#39352)
PR Close #39352
2020-11-19 12:27:38 -08:00
WilliamKoza b1d300dc26 fix(common): Prefer to use pageXOffset / pageYOffset instance of scrollX / scrollY (#28262)
This fix ensures a better cross-browser compatibility.
This fix has been used for angular.io.

PR Close #28262
2020-11-19 12:22:03 -08:00
George Kalpakas 935cf433ed fix(docs-infra): support recovering from unrecoverable SW states (#39651)
Occasionally, the SW would end up in a broken state where some of the
eagerly cached resources of an older version were available in the local
cache, but others (such as lazy-loaded bundles) were not. This would
leave the app in a broken state and a blank screen would be displayed.
See #28114 for a more detailed discussion.

This commit takes advantage of the newly introduced (in v11)
[SwUpdate#unrecoverable][1] API to detect these bad states and recover
by doing a full page reload whenever an [UnrecoverableStateEvent][2] is
emitted.

Partially addresses #28114.

NOTE:
Currently, `SwUpdate.unrecoverable` only works if the app has already
bootstrapped; i.e. if only lazy-loaded bundles have been purged from the
cache.
That should be fine in practice, since the cache entries are removed in
least-recently-used order. Thus the eagerly loaded bundles will be the
last to be removed from the cache (which rarely happens in practice).

[1]: https://v11.angular.io/api/service-worker/SwUpdate#unrecoverable
[2]: https://v11.angular.io/api/service-worker/UnrecoverableStateEvent

PR Close #39651
2020-11-19 12:13:23 -08:00
George Kalpakas 305d05545a refactor(docs-infra): make `SwUpdatesService` depend on `LocationService` (#39651)
Previously, the `LocationService` depended on the `SwUpdatesService`.
This felt backwards, since `LocationService` is a more low-level and
basic service and should not be depending on a service for a
higher-level, specific feature (ServiceWorkers).

This commit inverses the relation, making `SwUpdatesService` depend on
`LocationService` instead.

PR Close #39651
2020-11-19 12:13:22 -08:00
George Kalpakas 824f051843 test(docs-infra): use existing `MockLogger` class in `SwUpdatesService` tests (#39651)
Since we have a `MockLogger` class in `src/testing/`, there is no need
to create a new `MockLogger` class for the `SwUpdatesService` unit
tests.

This commit switches to using the `MockLogger` class from
`src/testing/`.

PR Close #39651
2020-11-19 12:13:21 -08:00
Kapunahele Wong 61506404a9 docs: move di-in-action doc to conceptual ref section (#39544)
Removes duplicate info, moves document into conceptual
reference section, but doesn't edit remaining content.
Groups two dependency injection documents together in
one expandable nav section.

PR Close #39544
2020-11-19 08:56:14 -08:00
Keen Yee Liau d001ecc5a0 docs: fix confusing description for strictTemplates (#39745)
This commit fixes a confusing description of the `strictTemplates` flag.

> When `true`, enables strict template type checking in Angular version 9.

This seems to imply that the flag is only available in one version.
Strict template type checking is available in version 9 **and above**.

PR Close #39745
2020-11-18 16:00:35 -08:00
David Shevitz f8c623036e docs: Update releases.md with v11 information. (#39716)
PR Close #39716
2020-11-18 15:56:07 -08:00
George Kalpakas b521b5eb39 build(docs-infra): update @angular/material to 11.0.0 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0.

PR Close #39600
2020-11-18 15:49:17 -08:00
George Kalpakas 882804dd01 build(docs-infra): update @angular/* to 11.0.0 and @angular/cli to 11.0.1 (#39600)
This commit updates `@angular/*` and `@angular/cli` (and related
packages) to latest 11.0.x versions (11.0.0 and 11.0.1 respectively).
(See [here][1] for a diff between a v11.0.0-rc.2 and a v11.0.1 CLI app.)

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

PR Close #39600
2020-11-18 15:49:17 -08:00
George Kalpakas cfb7564dda build(docs-infra): update @angular/material to 11.0.0-rc.1 (#39600)
This commit updates `@angular/cdk` and `@angular/material` to version
11.0.0-rc.1.

PR Close #39600
2020-11-18 15:49:16 -08:00
George Kalpakas e3af1a874e build(docs-infra): downgrade `karma` to v5.1.1 due to regression in v5.2.0 (#39600)
This commit downgrades `karma` to version 5.1.1, because of a regression
in version 5.2.0: karma-runner/karma#3560
It has been fixed with karma-runner/karma@05dc288016 on
master, but the fix is not included in the latest release (v5.2.3).

PR Close #39600
2020-11-18 15:49:16 -08:00
George Kalpakas 18110a8ab0 build(docs-infra): update @angular/* and @angular/cli to 11.0.0-rc.2 (#39600)
This commit updates `@angular/*` and `@angular/cli` (and related
packages) to version 11.0.0-rc.2. Apart from the automatic migrations,
this commit also tries to align `aio/` with new apps generated by the
latest CLI. (See [here][1] for a diff between a v10.1.3 and a
v11.0.0-rc.2 CLI app.)

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/10.1.3...11.0.0-rc.2

PR Close #39600
2020-11-18 15:49:15 -08:00
George Kalpakas dc697d33d0 docs(http): fix em-dashes not displaying correctly (#38665)
Fixes #38662

PR Close #38665
2020-11-18 15:40:49 -08:00
Licanueto 3273856d33 docs: fixes on paragraph (#39664)
Phrasing improved, missing word added, lowercase "angular" fixed, unnecessary, commas removed.

PR Close #39664
2020-11-18 12:12:01 -08:00
Pete Bacon Darwin e4028ae5c4 build(docs-infra): compute previous version list (#39689)
Previously we hand coded the list of previous major versions
that are displayed in the left navigation.

Now these are generated from the tags in GitHub.

Closes #39688

PR Close #39689
2020-11-18 09:13:20 -08:00
Santosh Yadav 0ab833f5c2 docs: meetup url to https (#33713)
PR Close #33713
2020-11-18 09:10:36 -08:00
spixy 00291ae054 docs: fix dead CSRF link (#35929)
Fix dead CSRF link which were pointing to non-working resources

PR Close #35929
2020-11-17 16:16:27 -08:00
Antonio Cardenas 49410f8e93 docs: add spanish lang (#39502)
PR Close #39502
2020-11-17 13:09:46 -08:00
Ajit Singh 806d7aa22c docs: add documentation for ngNonBindable (#36560)
ngNonBindable documentation was not present, on docs site added documentation for ngNonBindable. With this template primitive, Angular won't
evaluate expressions in elements.

Fixes #28577 Fixes #19497

PR Close #36560
2020-11-17 11:56:46 -08:00
Keen Yee Liau 209a18c624 docs: remove bazel from deprecations doc (#39540)
Bazel builder and schematics have already been deprecated and removed in v10,
so there's no need to mention it in the index.

PR Close #39540
2020-11-17 11:54:44 -08:00
Kapunahele Wong 25d6fcacc4 docs: add doc with list of example apps currently in aio (#39295)
PR Close #39295
2020-11-13 11:34:43 -08:00
Kapunahele Wong 3f66a84e01 docs: edit inputs-outputs copy and headers (#39119)
PR Close #39119
2020-11-13 11:26:27 -08:00
Yvonne Allen 9e53c6ee40 docs(docs-infra): remove link to constructor article (#39670)
remove the link to the article called Flaw: Constructor does real work by Misko

Fixes #39106

PR Close #39670
2020-11-13 11:25:13 -08:00
Alan Agius c8ed497211 docs: clarify what we inline when font optimization is enabled (#39656)
Previously it wasn't clear that we only inline CSS definitions and not the resource

PR Close #39656
2020-11-12 13:53:07 -08:00
Kapunahele Wong 7ce825011b docs: archive di-navtree doc (#39543)
PR Close #39543
2020-11-12 13:52:04 -08:00
JiaLiPassion f8956adb73 build: update zone.js version to 0.11.3 (#39317)
Update the version of `zone.js` from 0.10.3 to 0.11.3 inside
Angular repo.

PR Close #39317
2020-11-12 13:51:29 -08:00
Kapunahele Wong a87236292e docs: edit two-way binding doc (#38952)
This commit edits copy and doc regions to clarify concepts.

PR Close #38952
2020-11-12 13:50:51 -08:00
SephirotJustin d1355caa74 docs: added missing slash to close tag (#39626)
PR Close #39626
2020-11-12 09:04:04 -08:00
Adrien Crivelli dc31724458 docs: WebStorm does not need @angular/language-service anymore (#39637)
Since WebStorm 2019.1, all of Angular Compiler validations has been implemented
as inspections, which has some additional benefits of being able to provide some
basic quick fixes like adding missing selector property, or something as neat as
auto-module import.

See https://intellij-support.jetbrains.com/hc/en-us/community/posts/360009914880

Signed-off-by: Adrien Crivelli <adrien.crivelli@gmail.com>

PR Close #39637
2020-11-12 09:03:39 -08:00
Leif Segen 3be344cdc2 docs: correct appearance of numbering (#39638)
Ordered list was appearing as 1,2,*1*,4,5,6 due to code block interrupting the flow.
This fixes the list to appear as 1,2,3,4,5,6.

PR Close #39638
2020-11-12 09:03:14 -08:00
mgechev 6d1347363e docs: update the roadmap with our priorities at Q4 (#39635)
PR Close #39635
2020-11-11 15:44:44 -08:00
David Shevitz f405aa51d7 docs: add update information for v11 release (#39607)
PR Close #39607
2020-11-09 12:20:34 -08:00
George Kalpakas 0edf6fc7f6 ci: log commands output when deploying angular.io to Firebase (#39596)
In #39470, the `deploy-to-firebase.sh` script (used to deploy AIO to
Firebase when building an upstream branch), was replaced by an
equivalent JS script. In this new `deploy-to-firebase.js` script, we
were overly aggressive with suppressing command output, which made it
hard to investigate failures ([example failing CI job][1]).

This commit updates the `deploy-to-firebase.js` script to capture
command output as usual in the CI job logs. This makes the output
similar to the one generated by the old [deploy-to-firebase.sh][2]
script ([example CI logs][3]).

One concern with capturing command output is having the value of a
secret environment variables leaked in the logs. This is not the case
here, since:
1. The secret env vars are not printed from the commands that use them.
2. CircleCI will [mask the values of secret env vars][4] in the output.

As an extra precaution (although not strictly necessary), we run `yarn`
with the `--silent` option, which avoid echoing the executed yarn
commands.

[1]: https://circleci.com/gh/angular/angular/849310
[2]: https://github.com/angular/angular/blob/3b0b7d22109c79b4dceb/aio/scripts/deploy-to-firebase.sh
[3]: https://circleci.com/gh/angular/angular/848109
[4]: https://circleci.com/docs/2.0/env-vars/#secrets-masking

PR Close #39596
2020-11-09 07:40:58 -08:00
George Kalpakas b9bf03af33 build(docs-infra): print the git commit when deploying to Firebase (#39596)
The commit updates the AIO deployment script to also print the commit
SHA. This makes it easier to check whether a version has been
successfully deployed, by comparing the commit SHA from the CI job with
the SHA in the version string in the footer of the AIO app.

PR Close #39596
2020-11-09 07:40:58 -08:00
Alan Agius 48d15fc760 docs: update cli deprecations (#39547)
Add new CLI deprecations and remove old ones

PR Close #39547
2020-11-09 07:40:24 -08:00
George Kalpakas 6138bc2774 build(docs-infra): upgrade cli command docs sources to 0defb1136 (#39575)
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](3552504ac...0defb1136):

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

PR Close #39575
2020-11-05 07:58:02 -08:00
George Vrettos 0aa53cdd60 docs: fix typo in the "Property Binding" guide (#39569)
PR Close #39569
2020-11-04 12:51:34 -08:00
Aristeidis Bampakos 9262702ef7 docs: fix typos in the "Attribute Binding" guide (#39562)
PR Close #39562
2020-11-04 11:42:44 -08:00
George Kalpakas 2f05f14e6b build(docs-infra): upgrade cli command docs sources to 3552504ac (#39561)
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](bf9a92299...3552504ac):

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

PR Close #39561
2020-11-04 10:53:35 -08:00
GeopJr 1e91f84697 docs: fix Android 10 codename (#39399)
Change Android 10's codename from "X" to "Q"
PR Close #39399
2020-11-03 16:10:56 -08:00
Pete Bacon Darwin 5f1e9758f5 build(docs-infra): ensure that deployment works on CI (#39535)
The actual "main" part of the script that is executed was using
an uninitialized variable. This is fixed and a test is added to
check.

PR Close #39535
2020-11-02 12:24:34 -08:00
George Kalpakas cf48d508af build(docs-infra): upgrade `firebase-tools` to v8.14.1 (#39470)
This commit upgrades `firebase-tools` (used to deploy angular.io to
Firebase hosting) to the latest version. This gives us access to the
latest fixes/improvements and also new features, such as
[version cloning][1].

[1]:
https://firebase.google.com/docs/hosting/manage-hosting-resources#cli-commands-cloning

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas a55a5696a1 build(docs-infra): deploy angular.io to new Firebase sites (#39470)
Previously, the documentation for each major Angular version was hosted
on each own Firebase project. This required creating a new project for
each major release and increased the administrative/maintenance cost.

Now that Firebase supports hosting [multiple websites][1] as part of the
same project, we are switching to deploying all major versions to sites
created on `angular-io` project.

This is part of the work needed to prepare angular.io for our
[new versioning/branching process][2] (also tracked in #39366).

[1]: https://firebase.google.com/docs/hosting/multisites
[2]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 699824a2a5 refactor(docs-infra): break up `deploy-to-firebase.js` script into functions (#39470)
This commit breaks up the code in `deploy-to-firebase.js` script, that
we use for deploying angular.io to production, to smaller functions
(instead of a monolithic block). This makes the script easier to
maintain and also makes testing individual operations easier.

The commit also updates the `deploy-to-firebase.spec.js` spec file to
take advantage of the standalone functions to speed up testing by
calling the corresponding function instead of having to spawn a new
process and run the `deploy-to-firebase.js` script with the `--dry-run`
flag.

NOTE: Before updating the tests, I verified that the updated
      `deploy-to-firebase.js` script passed the old tests.

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 1aaf556815 build(docs-infra): add support for RC deployments to deployment script (#39470)
This commit updates the angular.io deployment script
(`deploy-to-firebase.js`) to support deploying release-candidate
versions.

This is part of the work needed to prepare angular.io for our
[new versioning/branching process][1] (also tracked in #39366).

[1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 51fe0fe622 build(docs-infra): add new angular.io build configuration for release-candidates (#39470)
This commit adds a new build configuration/deployment mode (`rc`) for
deploying release-candidate versions to angular.io.

This is part of the work needed to prepare angular.io for our
[new versioning/branching process][1] (also tracked in #39366).

[1]: https://docs.google.com/document/d/197kVillDwx-RZtSVOBtPb4BBIAw0E9RT3q3v6DZkykU

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas 0f584694cc refactor(docs-infra): use Sass mixin to simplify the creation of deployment mode themes (#39470)
Different deployment modes (such as `archive` and `next`) are identified
by the different colors used in prominent elements of the page, such as
the topbar and the footer.

Previously, the necessary styles for creating such a deployment mode
"theme" were duplicated for each mode.

This commit simplifies the creation/modification of a deployment mode
theme by introducing a Sass mixin that generates the necessary styles
(when provided with necessary theme colors).

PR Close #39470
2020-11-02 07:57:51 -08:00
George Kalpakas eaf7d8d69f test(docs-infra): ensure `deploy-to-firebase` tests pass locally (#39470)
Previously, the `deploy-to-firebase.js` script and the accompanying
`deploy-to-firebase.spec.js` spec file were using the `origin` remote
alias in certain commands. This works fine on CI, where `origin` points
to the `angular/angular` GitHub repo, but might not work locally.

This commit ensures that the correct remote is used by explicitly
specifying it by the URL, thus ensuring that the tests will behave
identically on CI and locally.

PR Close #39470
2020-11-02 07:57:51 -08:00