Compare commits
130 Commits
master
...
backup-7.2
Author | SHA1 | Date | |
---|---|---|---|
![]() |
279c57f38d | ||
![]() |
35ec2dc9bc | ||
![]() |
332dcb2d47 | ||
![]() |
2c3b084817 | ||
![]() |
918d906a1e | ||
![]() |
12e3b71740 | ||
![]() |
9faad4b2b0 | ||
![]() |
42ccea547e | ||
![]() |
67e6b63165 | ||
![]() |
88d415515a | ||
![]() |
3bc02a3652 | ||
![]() |
a3f72d92f2 | ||
![]() |
f86eb9a133 | ||
![]() |
ac3c9c1e6e | ||
![]() |
c9f213c0ea | ||
![]() |
23d8edb263 | ||
![]() |
23e2127cee | ||
![]() |
0af5b8eb7a | ||
![]() |
17403a2b1d | ||
![]() |
325bf558ba | ||
![]() |
21a9fe64d6 | ||
![]() |
961d55395d | ||
![]() |
c7fe8de182 | ||
![]() |
7928356a62 | ||
![]() |
0316fda529 | ||
![]() |
6650e525ec | ||
![]() |
2558e6843c | ||
![]() |
1b2ba78090 | ||
![]() |
5f0d845ca9 | ||
![]() |
5f616ca613 | ||
![]() |
b47ea97a48 | ||
![]() |
f8101804a2 | ||
![]() |
5a8c14b6d7 | ||
![]() |
31556fa7b0 | ||
![]() |
01d475d6f3 | ||
![]() |
3c08b86e27 | ||
![]() |
b102835294 | ||
![]() |
0465dc6637 | ||
![]() |
937a856b47 | ||
![]() |
eeb4c87dc0 | ||
![]() |
a82ba5d4dc | ||
![]() |
28c6e9d684 | ||
![]() |
9ea8f7197f | ||
![]() |
0d9afd85f1 | ||
![]() |
d2eea769f6 | ||
![]() |
7bafe180fb | ||
![]() |
457781906b | ||
![]() |
2530c9d2dd | ||
![]() |
c18c46a976 | ||
![]() |
9447b852a4 | ||
![]() |
11d184aaae | ||
![]() |
d4b476fb45 | ||
![]() |
a64a7a4041 | ||
![]() |
9bda4460fa | ||
![]() |
acb69e8341 | ||
![]() |
69ca7cd381 | ||
![]() |
e5f5ad34a2 | ||
![]() |
51f8892d9b | ||
![]() |
a06469c2f5 | ||
![]() |
eb3345b950 | ||
![]() |
ecc304adac | ||
![]() |
49138bd114 | ||
![]() |
aa7f2c8dc7 | ||
![]() |
84857a267c | ||
![]() |
e0ed78c2d0 | ||
![]() |
b00efa3399 | ||
![]() |
cdfca90053 | ||
![]() |
0edca7997f | ||
![]() |
2ce90323b8 | ||
![]() |
7227b4aa62 | ||
![]() |
5a7dd73b2c | ||
![]() |
e1538fdd63 | ||
![]() |
81da0fe91f | ||
![]() |
fa377b350f | ||
![]() |
097af5ae2b | ||
![]() |
f1c3eab1e0 | ||
![]() |
1edb8af20f | ||
![]() |
0f34e3ac15 | ||
![]() |
1cca9cc9d1 | ||
![]() |
575cf3da0f | ||
![]() |
11dfdf7f57 | ||
![]() |
0bb03aaab1 | ||
![]() |
df2704dc12 | ||
![]() |
7714998869 | ||
![]() |
c9c06a014f | ||
![]() |
204b675ea4 | ||
![]() |
23c666bdf5 | ||
![]() |
9202a4de81 | ||
![]() |
8c51e83a46 | ||
![]() |
cbc45fd59b | ||
![]() |
11fe52b805 | ||
![]() |
50fadfaca3 | ||
![]() |
9e04284bb3 | ||
![]() |
216bbd09ef | ||
![]() |
0c683a73e2 | ||
![]() |
998bb8382e | ||
![]() |
f893e2e502 | ||
![]() |
bbe656e634 | ||
![]() |
17825e8f55 | ||
![]() |
7242551213 | ||
![]() |
1ad88e0e59 | ||
![]() |
6cc864a771 | ||
![]() |
3fc02ce60b | ||
![]() |
0a54825b29 | ||
![]() |
970e3a0f79 | ||
![]() |
791d8656fd | ||
![]() |
7e98eedf5e | ||
![]() |
5aecb2d43d | ||
![]() |
9a15a42f29 | ||
![]() |
fdd8b0402c | ||
![]() |
d8aeb59c1c | ||
![]() |
679235a44a | ||
![]() |
e9de47c969 | ||
![]() |
061615c16e | ||
![]() |
213e01bd38 | ||
![]() |
92d3942691 | ||
![]() |
4ad7e21ce8 | ||
![]() |
4b78c23c65 | ||
![]() |
70c184b4bd | ||
![]() |
98a617e415 | ||
![]() |
0ae1e93eed | ||
![]() |
dd59e9a343 | ||
![]() |
89fd1822d4 | ||
![]() |
4ae1880642 | ||
![]() |
c51b0b9564 | ||
![]() |
7bb760f6ff | ||
![]() |
2013ef7ed0 | ||
![]() |
6a13c107cf | ||
![]() |
a3debf6a72 | ||
![]() |
b1560f7357 |
4
.bazelrc
4
.bazelrc
@ -82,7 +82,9 @@ build --define=compile=legacy
|
|||||||
###############################
|
###############################
|
||||||
|
|
||||||
# Load default settings for Remote Build Execution
|
# Load default settings for Remote Build Execution
|
||||||
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.20.0.bazelrc
|
# When updating, the URLs of bazel_toolchains in packages/bazel/package.bzl
|
||||||
|
# may also need to be updated (see https://github.com/angular/angular/pull/27935)
|
||||||
|
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.21.0.bazelrc
|
||||||
|
|
||||||
# Increase the default number of jobs by 50% because our build has lots of
|
# Increase the default number of jobs by 50% because our build has lots of
|
||||||
# parallelism
|
# parallelism
|
||||||
|
@ -218,11 +218,12 @@ jobs:
|
|||||||
- run: yarn --cwd aio tools-test
|
- run: yarn --cwd aio tools-test
|
||||||
- run: ./aio/aio-builds-setup/scripts/test.sh
|
- run: ./aio/aio-builds-setup/scripts/test.sh
|
||||||
|
|
||||||
test_docs_examples_0:
|
test_docs_examples:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
docker:
|
docker:
|
||||||
# Needed because the example e2e tests depend on Chrome.
|
# Needed because the example e2e tests depend on Chrome.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
|
parallelism: 3
|
||||||
steps:
|
steps:
|
||||||
- checkout:
|
- checkout:
|
||||||
<<: *post_checkout
|
<<: *post_checkout
|
||||||
@ -235,28 +236,10 @@ jobs:
|
|||||||
- *yarn_install
|
- *yarn_install
|
||||||
# Install aio
|
# Install aio
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
||||||
# Run examples tests
|
# Run examples tests. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
|
||||||
- run: yarn --cwd aio example-e2e --setup --local --shard=0/2
|
# Since the parallelism is set to "3", there will be three parallel CircleCI containers
|
||||||
|
# with either "0", "1" or "2" as node index. This can be passed to the "--shard" argument.
|
||||||
test_docs_examples_1:
|
- run: yarn --cwd aio example-e2e --setup --local --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
|
||||||
<<: *job_defaults
|
|
||||||
docker:
|
|
||||||
# Needed because the example e2e tests depend on Chrome.
|
|
||||||
- image: *browsers_docker_image
|
|
||||||
steps:
|
|
||||||
- checkout:
|
|
||||||
<<: *post_checkout
|
|
||||||
- restore_cache:
|
|
||||||
key: *cache_key
|
|
||||||
- attach_workspace:
|
|
||||||
at: dist
|
|
||||||
- *define_env_vars
|
|
||||||
# Install root
|
|
||||||
- *yarn_install
|
|
||||||
# Install aio
|
|
||||||
- run: yarn --cwd aio install --frozen-lockfile --non-interactive
|
|
||||||
# Run examples tests
|
|
||||||
- run: yarn --cwd aio example-e2e --setup --local --shard=1/2
|
|
||||||
|
|
||||||
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
||||||
aio_preview:
|
aio_preview:
|
||||||
@ -333,6 +316,7 @@ jobs:
|
|||||||
# See comments inside the integration/run_tests.sh script.
|
# See comments inside the integration/run_tests.sh script.
|
||||||
integration_test:
|
integration_test:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
|
parallelism: 4
|
||||||
docker:
|
docker:
|
||||||
# Needed because the integration tests expect Chrome to be installed (e.g cli-hello-world)
|
# Needed because the integration tests expect Chrome to be installed (e.g cli-hello-world)
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
@ -348,7 +332,9 @@ jobs:
|
|||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
at: dist
|
at: dist
|
||||||
- *define_env_vars
|
- *define_env_vars
|
||||||
- run: ./integration/run_tests.sh
|
# Runs the integration tests in parallel across multiple CircleCI container instances. The
|
||||||
|
# amount of container nodes for this job is controlled by the "parallelism" option.
|
||||||
|
- run: ./integration/run_tests.sh ${CIRCLE_NODE_INDEX} ${CIRCLE_NODE_TOTAL}
|
||||||
|
|
||||||
# This job updates the content of repos like github.com/angular/core-builds
|
# This job updates the content of repos like github.com/angular/core-builds
|
||||||
# for every green build on angular/angular.
|
# for every green build on angular/angular.
|
||||||
@ -399,6 +385,95 @@ jobs:
|
|||||||
command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $CI_SECRET_SLACK_CARETAKER_WEBHOOK_URL'
|
command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $CI_SECRET_SLACK_CARETAKER_WEBHOOK_URL'
|
||||||
when: on_fail
|
when: on_fail
|
||||||
|
|
||||||
|
legacy-unit-tests-local:
|
||||||
|
<<: *job_defaults
|
||||||
|
docker:
|
||||||
|
- image: *browsers_docker_image
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
- *define_env_vars
|
||||||
|
- *yarn_install
|
||||||
|
- run: yarn tsc -p packages
|
||||||
|
- run: yarn tsc -p packages/examples
|
||||||
|
- run: yarn tsc -p modules
|
||||||
|
- run: yarn karma start ./karma-js.conf.js --single-run --browsers=ChromeNoSandbox
|
||||||
|
|
||||||
|
legacy-unit-tests-saucelabs:
|
||||||
|
<<: *job_defaults
|
||||||
|
# In order to avoid the bottleneck of having a slow host machine, we acquire a better
|
||||||
|
# container for this job. This is necessary because we launch a lot of browsers concurrently
|
||||||
|
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
|
||||||
|
resource_class: xlarge
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
- *define_env_vars
|
||||||
|
- *yarn_install
|
||||||
|
- run:
|
||||||
|
name: Preparing environment for running tests on Saucelabs.
|
||||||
|
command: |
|
||||||
|
setPublicVar KARMA_JS_BROWSERS $(node -e 'console.log(require("./browser-providers.conf").sauceAliases.CI_REQUIRED.join(","))')
|
||||||
|
setSecretVar SAUCE_ACCESS_KEY $(echo $SAUCE_ACCESS_KEY | rev)
|
||||||
|
- run:
|
||||||
|
name: Starting Saucelabs tunnel
|
||||||
|
command: ./scripts/saucelabs/start-tunnel.sh
|
||||||
|
background: true
|
||||||
|
- run: yarn tsc -p packages
|
||||||
|
- run: yarn tsc -p packages/examples
|
||||||
|
- run: yarn tsc -p modules
|
||||||
|
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
|
||||||
|
# too early without Saucelabs not being ready.
|
||||||
|
- run: ./scripts/saucelabs/wait-for-tunnel.sh
|
||||||
|
- run: yarn karma start ./karma-js.conf.js --single-run --browsers=${KARMA_JS_BROWSERS}
|
||||||
|
- run: ./scripts/saucelabs/stop-tunnel.sh
|
||||||
|
|
||||||
|
legacy-e2e-tests:
|
||||||
|
<<: *job_defaults
|
||||||
|
docker:
|
||||||
|
- image: *browsers_docker_image
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
- *define_env_vars
|
||||||
|
- *setup_circleci_bazel_config
|
||||||
|
- *yarn_install
|
||||||
|
- *setup_bazel_remote_execution
|
||||||
|
- attach_workspace:
|
||||||
|
at: dist
|
||||||
|
# Build the e2e tests using the existing Bazel "packages-dist" output that has been
|
||||||
|
# attached to this job. This avoids multiple rebuilds across various CI jobs.
|
||||||
|
- run: ./scripts/build-e2e-tests.sh --use-existing-packages-dist
|
||||||
|
- run:
|
||||||
|
name: Starting servers for e2e tests
|
||||||
|
command: yarn gulp serve serve-examples
|
||||||
|
background: true
|
||||||
|
- run: NODE_PATH=$NODE_PATH:./dist/all yarn protractor ./protractor-e2e.conf.js --bundles=true
|
||||||
|
- run: NODE_PATH=$NODE_PATH:./dist/all yarn protractor ./protractor-examples-e2e.conf.js --bundles=true
|
||||||
|
- run: NODE_PATH=$NODE_PATH:./dist/all yarn protractor ./protractor-perf.conf.js --bundles=true --dryrun
|
||||||
|
|
||||||
|
legacy-misc-tests:
|
||||||
|
<<: *job_defaults
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
<<: *post_checkout
|
||||||
|
- restore_cache:
|
||||||
|
key: *cache_key
|
||||||
|
- *define_env_vars
|
||||||
|
- *yarn_install
|
||||||
|
- attach_workspace:
|
||||||
|
at: dist
|
||||||
|
- run: yarn gulp check-cycle
|
||||||
|
# TODO: disabled because the Bazel packages-dist does not seem to have map files for
|
||||||
|
# the ESM5/ES2015 output. See: https://github.com/angular/angular/issues/27966
|
||||||
|
# - run: yarn gulp source-map-test
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
default_workflow:
|
default_workflow:
|
||||||
@ -408,19 +483,24 @@ workflows:
|
|||||||
- test_ivy_aot
|
- test_ivy_aot
|
||||||
- build-packages-dist
|
- build-packages-dist
|
||||||
- test_aio
|
- test_aio
|
||||||
|
- legacy-unit-tests-local
|
||||||
|
- legacy-unit-tests-saucelabs
|
||||||
- deploy_aio:
|
- deploy_aio:
|
||||||
requires:
|
requires:
|
||||||
- test_aio
|
- test_aio
|
||||||
|
- legacy-e2e-tests:
|
||||||
|
requires:
|
||||||
|
- build-packages-dist
|
||||||
|
- legacy-misc-tests:
|
||||||
|
requires:
|
||||||
|
- build-packages-dist
|
||||||
- test_aio_local:
|
- test_aio_local:
|
||||||
requires:
|
requires:
|
||||||
- build-packages-dist
|
- build-packages-dist
|
||||||
- test_aio_tools:
|
- test_aio_tools:
|
||||||
requires:
|
requires:
|
||||||
- build-packages-dist
|
- build-packages-dist
|
||||||
- test_docs_examples_0:
|
- test_docs_examples:
|
||||||
requires:
|
|
||||||
- build-packages-dist
|
|
||||||
- test_docs_examples_1:
|
|
||||||
requires:
|
requires:
|
||||||
- build-packages-dist
|
- build-packages-dist
|
||||||
- aio_preview:
|
- aio_preview:
|
||||||
@ -446,11 +526,15 @@ workflows:
|
|||||||
- integration_test
|
- integration_test
|
||||||
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
|
# Only publish if `aio`/`docs` tests using the locally built Angular packages pass
|
||||||
- test_aio_local
|
- test_aio_local
|
||||||
- test_docs_examples_0
|
- test_docs_examples
|
||||||
- test_docs_examples_1
|
|
||||||
# Get the artifacts to publish from the build-packages-dist job
|
# Get the artifacts to publish from the build-packages-dist job
|
||||||
# since the publishing script expects the legacy outputs layout.
|
# since the publishing script expects the legacy outputs layout.
|
||||||
- build-packages-dist
|
- build-packages-dist
|
||||||
|
- legacy-e2e-tests
|
||||||
|
- legacy-misc-tests
|
||||||
|
- legacy-unit-tests-local
|
||||||
|
- legacy-unit-tests-saucelabs
|
||||||
|
|
||||||
|
|
||||||
aio_monitoring:
|
aio_monitoring:
|
||||||
jobs:
|
jobs:
|
||||||
@ -462,3 +546,9 @@ workflows:
|
|||||||
branches:
|
branches:
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
# TODO:
|
||||||
|
# - don't build the g3 branch
|
||||||
|
# - verify that we are bootstrapping with the right yarn version coming from the docker image
|
||||||
|
# - check local chrome version pulled from docker image
|
||||||
|
# - remove /tools/ngcontainer
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# Load helpers and make them available everywhere (through `$BASH_ENV`).
|
# Variables
|
||||||
readonly envHelpersPath="`dirname $0`/env-helpers.inc.sh";
|
readonly envHelpersPath="`dirname $0`/env-helpers.inc.sh";
|
||||||
|
readonly getCommitRangePath="`dirname $0`/get-commit-range.js";
|
||||||
|
|
||||||
|
# Load helpers and make them available everywhere (through `$BASH_ENV`).
|
||||||
source $envHelpersPath;
|
source $envHelpersPath;
|
||||||
echo "source $envHelpersPath;" >> $BASH_ENV;
|
echo "source $envHelpersPath;" >> $BASH_ENV;
|
||||||
|
|
||||||
@ -9,14 +12,17 @@ echo "source $envHelpersPath;" >> $BASH_ENV;
|
|||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Define PUBLIC environment variables for CircleCI.
|
# Define PUBLIC environment variables for CircleCI.
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
# See https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables for more info.
|
||||||
|
####################################################################################################
|
||||||
setPublicVar PROJECT_ROOT "$(pwd)";
|
setPublicVar PROJECT_ROOT "$(pwd)";
|
||||||
setPublicVar CI_AIO_MIN_PWA_SCORE "95";
|
setPublicVar CI_AIO_MIN_PWA_SCORE "95";
|
||||||
# This is the branch being built; e.g. `pull/12345` for PR builds.
|
# This is the branch being built; e.g. `pull/12345` for PR builds.
|
||||||
setPublicVar CI_BRANCH "$CIRCLE_BRANCH";
|
setPublicVar CI_BRANCH "$CIRCLE_BRANCH";
|
||||||
setPublicVar CI_COMMIT "$CIRCLE_SHA1";
|
setPublicVar CI_COMMIT "$CIRCLE_SHA1";
|
||||||
# `CI_COMMIT_RANGE` will only be available when `CIRCLE_COMPARE_URL` is also available,
|
# `CI_COMMIT_RANGE` will only be available when `CIRCLE_COMPARE_URL` is also available (or can be
|
||||||
# i.e. on push builds (a.k.a. non-PR builds). That is fine, since we only need it in push builds.
|
# retrieved via `get-compare-url.js`), i.e. on push builds (a.k.a. non-PR, non-scheduled builds and
|
||||||
setPublicVar CI_COMMIT_RANGE "$(sed -r 's|^.*/([0-9a-f]+\.\.\.[0-9a-f]+)$|\1|i' <<< ${CIRCLE_COMPARE_URL:-})";
|
# rerun workflows of such builds). That is fine, since we only need it in push builds.
|
||||||
|
setPublicVar CI_COMMIT_RANGE "`[[ ${CIRCLE_PR_NUMBER:-false} != false ]] && echo "" || node $getCommitRangePath "$CIRCLE_BUILD_NUM" "$CIRCLE_COMPARE_URL"`";
|
||||||
setPublicVar CI_PULL_REQUEST "${CIRCLE_PR_NUMBER:-false}";
|
setPublicVar CI_PULL_REQUEST "${CIRCLE_PR_NUMBER:-false}";
|
||||||
setPublicVar CI_REPO_NAME "$CIRCLE_PROJECT_REPONAME";
|
setPublicVar CI_REPO_NAME "$CIRCLE_PROJECT_REPONAME";
|
||||||
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
||||||
@ -31,5 +37,26 @@ setSecretVar CI_SECRET_PAYLOAD_FIREBASE_TOKEN "$ANGULAR_PAYLOAD_TOKEN";
|
|||||||
setSecretVar CI_SECRET_SLACK_CARETAKER_WEBHOOK_URL "$SLACK_CARETAKER_WEBHOOK_URL";
|
setSecretVar CI_SECRET_SLACK_CARETAKER_WEBHOOK_URL "$SLACK_CARETAKER_WEBHOOK_URL";
|
||||||
|
|
||||||
|
|
||||||
|
####################################################################################################
|
||||||
|
# Define SauceLabs environment variables for CircleCI.
|
||||||
|
####################################################################################################
|
||||||
|
# In order to have a meaningful SauceLabs badge on the repo page,
|
||||||
|
# the angular2-ci account is used only when pushing commits to master;
|
||||||
|
# in all other cases, the regular angular-ci account is used.
|
||||||
|
if [ "${CI_PULL_REQUEST}" = "false" ] && [ "${CI_REPO_OWNER}" = "angular" ] && [ "${CI_BRANCH}" = "master" ]; then
|
||||||
|
setPublicVar SAUCE_USERNAME "angular2-ci";
|
||||||
|
setSecretVar SAUCE_ACCESS_KEY "693ebc16208a-0b5b-1614-8d66-a2662f4e";
|
||||||
|
else
|
||||||
|
setPublicVar SAUCE_USERNAME "angular-ci";
|
||||||
|
setSecretVar SAUCE_ACCESS_KEY "9b988f434ff8-fbca-8aa4-4ae3-35442987";
|
||||||
|
fi
|
||||||
|
setPublicVar SAUCE_READY_FILE /tmp/angular/sauce-connect-ready-file.lock
|
||||||
|
setPublicVar SAUCE_PID_FILE /tmp/angular/sauce-connect-pid-file.lock
|
||||||
|
setPublicVar SAUCE_TUNNEL_IDENTIFIER "angular-${CIRCLE_BUILD_NUM}-${CIRCLE_NODE_INDEX}"
|
||||||
|
# Amount of seconds we wait for sauceconnect to establish a tunnel instance. In order to not
|
||||||
|
# acquire CircleCI instances for too long if sauceconnect failed, we need a connect timeout.
|
||||||
|
setPublicVar SAUCE_READY_FILE_TIMEOUT 120
|
||||||
|
|
||||||
|
|
||||||
# Source `$BASH_ENV` to make the variables available immediately.
|
# Source `$BASH_ENV` to make the variables available immediately.
|
||||||
source $BASH_ENV;
|
source $BASH_ENV;
|
||||||
|
159
.circleci/get-commit-range.js
Normal file
159
.circleci/get-commit-range.js
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
/**
|
||||||
|
* **Usage:**
|
||||||
|
* ```
|
||||||
|
* node get-commit-range <build-number> [<compare-url> [<circle-token>]]
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* Returns the value of the `CIRCLE_COMPARE_URL` environment variable (if defined) or, if this is
|
||||||
|
* not a PR build (i.e. `CIRCLE_PR_NUMBER` is not defined), retrieves the equivalent of
|
||||||
|
* `CIRCLE_COMPARE_URL` for jobs that are part of a rerun workflow.
|
||||||
|
*
|
||||||
|
* **Context:**
|
||||||
|
* CircleCI sets the `CIRCLE_COMPARE_URL` environment variable (from which we can extract the commit
|
||||||
|
* range) on push builds (a.k.a. non-PR, non-scheduled builds). Yet, when a workflow is rerun
|
||||||
|
* (either from the beginning or from failed jobs) - e.g. when a job flakes - CircleCI does not set
|
||||||
|
* the `CIRCLE_COMPARE_URL`.
|
||||||
|
*
|
||||||
|
* **Implementation details:**
|
||||||
|
* This script relies on the fact that all rerun workflows share the same CircleCI workspace and the
|
||||||
|
* (undocumented) fact that the workspace ID happens to be the same as the workflow ID that first
|
||||||
|
* created it.
|
||||||
|
*
|
||||||
|
* For example, for a job on push build workflow, the CircleCI API will return data that look like:
|
||||||
|
* ```js
|
||||||
|
* {
|
||||||
|
* compare: 'THE_COMPARE_URL_WE_ARE_LOOKING_FOR',
|
||||||
|
* //...
|
||||||
|
* previous: {
|
||||||
|
* // ...
|
||||||
|
* build_num: 12345,
|
||||||
|
* },
|
||||||
|
* //...
|
||||||
|
* workflows: {
|
||||||
|
* //...
|
||||||
|
* workflow_id: 'SOME_ID_A',
|
||||||
|
* workspace_id: 'SOME_ID_A', // Same as `workflow_id`.
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* If the workflow is rerun, the data for jobs on the new workflow will look like:
|
||||||
|
* ```js
|
||||||
|
* {
|
||||||
|
* compare: null, // ¯\_(ツ)_/¯
|
||||||
|
* //...
|
||||||
|
* previous: {
|
||||||
|
* // ...
|
||||||
|
* build_num: 23456,
|
||||||
|
* },
|
||||||
|
* //...
|
||||||
|
* workflows: {
|
||||||
|
* //...
|
||||||
|
* workflow_id: 'SOME_ID_B',
|
||||||
|
* workspace_id: 'SOME_ID_A', // Different from current `workflow_id`.
|
||||||
|
* // Same as original `workflow_id`. \o/
|
||||||
|
* }
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
|
*
|
||||||
|
* This script uses the `previous.build_num` (which points to the previous build number on the same
|
||||||
|
* branch) to traverse the jobs backwards, until it finds a job from the original workflow. Such a
|
||||||
|
* job (if found) should also contain the compare URL.
|
||||||
|
*
|
||||||
|
* **NOTE 1:**
|
||||||
|
* This is only useful on workflows which are created by rerunning a workflow for which
|
||||||
|
* `CIRCLE_COMPARE_URL` was defined.
|
||||||
|
*
|
||||||
|
* **NOTE 2:**
|
||||||
|
* The `circleToken` will be used for CircleCI API requests if provided, but it is not needed for
|
||||||
|
* accessing the read-only endpoints that we need (as long as the current project is FOSS and the
|
||||||
|
* corresponding setting is turned on in "Advanced Settings" in the project dashboard).
|
||||||
|
*
|
||||||
|
* ---
|
||||||
|
* Inspired by https://circleci.com/orbs/registry/orb/iynere/compare-url
|
||||||
|
* (source code: https://github.com/iynere/compare-url-orb).
|
||||||
|
*
|
||||||
|
* We are not using the `compare-url` orb for the following reasons:
|
||||||
|
* 1. (By looking at the code) it would only work if the rerun workflow is the latest workflow on
|
||||||
|
* the branch (which is not guaranteed to be true).
|
||||||
|
* 2. It is less efficient (e.g. makes unnecessary CircleCI API requests for builds on different
|
||||||
|
* branches, installs extra dependencies, persists files to the workspace (as a means of passing
|
||||||
|
* the result to the calling job), etc.).
|
||||||
|
* 3. It is slightly more complicated to setup and consume than our own script.
|
||||||
|
* 4. Its implementation is more complicated than needed for our usecase (e.g. handles different git
|
||||||
|
* providers, handles newly created branches, etc.).
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Imports
|
||||||
|
const {get: httpsGet} = require('https');
|
||||||
|
|
||||||
|
// Constants
|
||||||
|
const API_URL_BASE = 'https://circleci.com/api/v1.1/project/github/angular/angular';
|
||||||
|
const COMPARE_URL_RE = /^.*\/([0-9a-f]+\.\.\.[0-9a-f]+)$/i;
|
||||||
|
|
||||||
|
// Run
|
||||||
|
_main(process.argv.slice(2));
|
||||||
|
|
||||||
|
// Helpers
|
||||||
|
async function _main([buildNumber, compareUrl = '', circleToken = '']) {
|
||||||
|
try {
|
||||||
|
if (!buildNumber || isNaN(buildNumber)) {
|
||||||
|
throw new Error(
|
||||||
|
'Missing or invalid arguments.\n' +
|
||||||
|
'Expected: buildNumber (number), compareUrl? (string), circleToken? (string)');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!compareUrl) {
|
||||||
|
compareUrl = await getCompareUrl(buildNumber, circleToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
const commitRangeMatch = COMPARE_URL_RE.exec(compareUrl)
|
||||||
|
const commitRange = commitRangeMatch ? commitRangeMatch[1] : '';
|
||||||
|
|
||||||
|
console.log(commitRange);
|
||||||
|
} catch (err) {
|
||||||
|
console.error(err);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBuildInfo(buildNumber, circleToken) {
|
||||||
|
console.error(`BUILD ${buildNumber}`);
|
||||||
|
const url = `${API_URL_BASE}/${buildNumber}?circle-token=${circleToken}`;
|
||||||
|
return getJson(url);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getCompareUrl(buildNumber, circleToken) {
|
||||||
|
let info = await getBuildInfo(buildNumber, circleToken);
|
||||||
|
const targetWorkflowId = info.workflows.workspace_id;
|
||||||
|
|
||||||
|
while (info.workflows.workflow_id !== targetWorkflowId) {
|
||||||
|
info = await getBuildInfo(info.previous.build_num, circleToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
return info.compare || '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getJson(url) {
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
const opts = {headers: {Accept: 'application/json'}};
|
||||||
|
const onResponse = res => {
|
||||||
|
const statusCode = res.statusCode || -1;
|
||||||
|
const isSuccess = (200 <= statusCode) && (statusCode <= 400);
|
||||||
|
let responseText = '';
|
||||||
|
|
||||||
|
res.
|
||||||
|
on('error', reject).
|
||||||
|
on('data', d => responseText += d).
|
||||||
|
on('end', () => isSuccess ?
|
||||||
|
resolve(JSON.parse(responseText)) :
|
||||||
|
reject(`Error getting '${url}' (status ${statusCode}):\n${responseText}`));
|
||||||
|
};
|
||||||
|
|
||||||
|
httpsGet(url, opts, onResponse).
|
||||||
|
on('error', reject).
|
||||||
|
end();
|
||||||
|
});
|
||||||
|
}
|
763
.github/CODEOWNERS
vendored
Normal file
763
.github/CODEOWNERS
vendored
Normal file
@ -0,0 +1,763 @@
|
|||||||
|
# ==================================================================================
|
||||||
|
# ==================================================================================
|
||||||
|
# Angular CODEOWNERS
|
||||||
|
# ==================================================================================
|
||||||
|
# ==================================================================================
|
||||||
|
#
|
||||||
|
# Configuration of code ownership and review approvals for the angular/angular repo.
|
||||||
|
#
|
||||||
|
# More info: https://help.github.com/articles/about-codeowners/
|
||||||
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# General rules / philosophy
|
||||||
|
# ================================================
|
||||||
|
#
|
||||||
|
# - we trust that people do the right thing and not approve changes they don't feel confident reviewing
|
||||||
|
# - we use github teams so that we funnel code reviews to the most appropriate reviewer, this is why the team structure is fine-grained
|
||||||
|
# - we enforce that only approved PRs get merged to ensure that unreviewed code doesn't get accidentally merged
|
||||||
|
# - we delegate approval rights as much as possible so that we can scale better
|
||||||
|
# - each group must have at least one person, but several people are preferable to avoid a single point of failure issues
|
||||||
|
# - most file groups have one or two global approvers groups as fallbacks:
|
||||||
|
# - @angular/fw-global-approvers: for approving minor changes, large-scale refactorings, and emergency situations.
|
||||||
|
# - @angular/fw-global-approvers-for-docs-only-changes: for approving minor documentation-only changes that don't require engineering review
|
||||||
|
# - a small number of file groups have very limited number of reviewers because incorrect changes to the files they guard would have serious consequences (e.g. security, public api)
|
||||||
|
#
|
||||||
|
# Configuration nuances:
|
||||||
|
#
|
||||||
|
# - This configuration works in conjunction with the protected branch settings that require all changes to be made via pull requests with at least one approval.
|
||||||
|
# - This approval can come from an appropriate codeowner, or any repo collaborator (person with write access) if the PR is authored by a codeowner.
|
||||||
|
# - Each codeowners team must have write access to the repo, otherwise their reviews won't count.
|
||||||
|
#
|
||||||
|
# In the case of emergency, the repo administrators which include angular-caretaker can bypass this requirement.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# GitHub username registry
|
||||||
|
# (just to make this file easier to understand)
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
# alexeagle - Alex Eagle
|
||||||
|
# alxhub - Alex Rickabaugh
|
||||||
|
# AndrewKushnir - Andrew Kushnir
|
||||||
|
# andrewseguin - Andrew Seguin
|
||||||
|
# benlesh - Ben Lesh
|
||||||
|
# brandonroberts - Brandon Roberts
|
||||||
|
# filipesilva - Filipe Silva
|
||||||
|
# gkalpak - George Kalpakas
|
||||||
|
# hansl - Hans Larsen
|
||||||
|
# IgorMinar - Igor Minar
|
||||||
|
# jasonaden - Jason Aden
|
||||||
|
# jenniferfell - Jennifer Fell
|
||||||
|
# kara - Kara Erickson
|
||||||
|
# kyliau - Keen Yee Liau
|
||||||
|
# matsko - Matias Niemelä
|
||||||
|
# mhevery - Misko Hevery
|
||||||
|
# ocombe - Olivier Combe
|
||||||
|
# petebacondarwin - Pete Bacon Darwin
|
||||||
|
# pkozlowski-opensource - Pawel Kozlowski
|
||||||
|
# robwormald - Rob Wormald
|
||||||
|
# stephenfluin - Stephen Fluin
|
||||||
|
# vikerman - Vikram Subramanian
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################################################
|
||||||
|
#
|
||||||
|
# Team structure and memberships
|
||||||
|
# ------------------------------
|
||||||
|
#
|
||||||
|
# This section is here just because the GitHub UI is too hard to navigate and audit.
|
||||||
|
#
|
||||||
|
# Any changes to team structure or memberships must first be made in this file and only then
|
||||||
|
# implemented in the GitHub UI.
|
||||||
|
#######################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/framework-global-approvers
|
||||||
|
# ===========================================================
|
||||||
|
# Used for approving minor changes, large-scale refactorings, and emergency situations.
|
||||||
|
# (secret team to avoid review requests, it also doesn't inherit from @angular/framework because nested teams can't be secret)
|
||||||
|
#
|
||||||
|
# - IgorMinar
|
||||||
|
# - kara
|
||||||
|
# - mhevery
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
# ===========================================================
|
||||||
|
# Used for approving minor documentation-only changes that don't require engineering review.
|
||||||
|
# (secret team to avoid review requests, it also doesn't inherit from @angular/framework because nested teams can't be secret)
|
||||||
|
#
|
||||||
|
# - brandonroberts
|
||||||
|
# - gkalpak
|
||||||
|
# - jenniferfell
|
||||||
|
# - petebacondarwin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-animations
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - matsko
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/tools-bazel
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alexeagle
|
||||||
|
# - kyliau
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/tools-cli
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alexeagle
|
||||||
|
# - filipesilva
|
||||||
|
# - hansl
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-compiler
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-ngcc
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
# - gkalpak
|
||||||
|
# - petebacondarwin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-core
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
# - AndrewKushnir
|
||||||
|
# - kara
|
||||||
|
# - mhevery
|
||||||
|
# - pkozlowski-opensource
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-http
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-elements
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - andrewseguin
|
||||||
|
# - gkalpak
|
||||||
|
# - robwormald
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-forms
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - kara
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/tools-language-service
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - kyliau
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-server
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
# - vikerman
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-router
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - jasonaden
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-service-worker
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
# - gkalpak
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-upgrade
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - gkalpak
|
||||||
|
# - petebacondarwin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-testing
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - vikerman
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-i18n
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - AndrewKushnir
|
||||||
|
# - mhevery
|
||||||
|
# - ocombe
|
||||||
|
# - vikerman
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-security
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - IgorMinar
|
||||||
|
# - mhevery
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/tools-benchpress
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alxhub
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-integration
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alexeagle
|
||||||
|
# - IgorMinar
|
||||||
|
# - mhevery
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/docs-infra
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - brandonroberts
|
||||||
|
# - gkalpak
|
||||||
|
# - IgorMinar
|
||||||
|
# - petebacondarwin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-docs-intro
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - brandonroberts
|
||||||
|
# - IgorMinar
|
||||||
|
# - stephenfluin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-docs-observables
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - benlesh
|
||||||
|
# - jasonaden
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-docs-packaging
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alexeagle
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-docs-marketing
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - IgorMinar
|
||||||
|
# - stephenfluin
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-public-api
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
# ===========================================================
|
||||||
|
# @angular/fw-dev-infra
|
||||||
|
# ===========================================================
|
||||||
|
#
|
||||||
|
# - alexeagle
|
||||||
|
# - IgorMinar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
######################################################################################################
|
||||||
|
#
|
||||||
|
# CODEOWNERS rules
|
||||||
|
# -----------------
|
||||||
|
#
|
||||||
|
# All the following rules are applied in the order specified in this file.
|
||||||
|
# The last rule that matches wins!
|
||||||
|
#
|
||||||
|
# See https://git-scm.com/docs/gitignore#_pattern_format for pattern syntax docs.
|
||||||
|
#
|
||||||
|
######################################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Default Owners
|
||||||
|
# (in case no pattern matches a path in a PR - this should be treated as a bug and result in adding the path to CODEOWNERS)
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
* @IgorMinar @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/animations
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/platform-browser/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/animations.md @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/animations/** @angular/fw-animations @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/bazel
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/bazel/** @angular/tools-bazel @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/compiler
|
||||||
|
# @angular/compiler-cli
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/compiler/** @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/compiler-cli/** @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/aot-compiler.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# packages/compiler-cli/src/ngcc/
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/compiler-cli/src/ngcc/** @angular/fw-ngcc @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/compiler-cli/ngtools
|
||||||
|
#
|
||||||
|
# a rule to control API changes between @angular/compiler-cli and @angular/cli
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/compiler-cli/src/ngtools/** @angular/tools-cli @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/core
|
||||||
|
# @angular/common (except @angular/common/http)
|
||||||
|
# @angular/platform-browser
|
||||||
|
# @angular/platform-browser-dynamic
|
||||||
|
# @angular/platform-webworker
|
||||||
|
# @angular/platform-webworker-dynamic
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/core/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/platform-browser/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/platform-browser-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/platform-webworker/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/platform-webworker-dynamic/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/attribute-directives.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/attribute-directives/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/attribute-directives/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/bootstrapping.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/bootstrapping/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/component-interaction.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/component-interaction/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/component-interaction/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/component-styles.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/component-styles/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/dependency-injection.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/dependency-injection/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/dependency-injection/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/dependency-injection-in-action.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/dependency-injection-in-action/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/dependency-injection-in-action/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/dependency-injection-pattern.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/dynamic-component-loader.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/dynamic-component-loader/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/dynamic-component-loader/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/entry-components.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/feature-modules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/feature-modules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/feature-modules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/frequent-ngmodules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/frequent-ngmodules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/hierarchical-dependency-injection.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/hierarchical-dependency-injection/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/lazy-loading-ngmodules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/lazy-loading-ngmodules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/lazy-loading-ngmodules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/lifecycle-hooks.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/lifecycle-hooks/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/lifecycle-hooks/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/examples/ngcontainer/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/ngcontainer/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/ngmodules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/ngmodules/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/ngmodule/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/ngmodule/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/ngmodule-api.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/ngmodule-faq.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/ngmodule-faq/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/ngmodule-vs-jsmodule.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/module-types.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/template-syntax.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/template-syntax/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/template-syntax/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/pipes.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/pipes/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/pipes/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/providers.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/providers/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/singleton-services.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/set-document-title.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/set-document-title/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/set-document-title/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/sharing-ngmodules.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
/aio/content/guide/structural-directives.md @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/structural-directives/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/structural-directives/** @angular/fw-core @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/common/http
|
||||||
|
# @angular/http
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/common/http/** @angular/fw-http @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/http/** @angular/fw-http @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/http.md @angular/fw-http @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/http/** @angular/fw-http @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/http/** @angular/fw-http @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/elements
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/elements/** @angular/fw-elements @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/elements/** @angular/fw-elements @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/elements/** @angular/fw-elements @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/elements.md @angular/fw-elements @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/forms
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/forms/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/forms.md @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/forms/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/forms/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/forms-overview.md @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/forms-overview/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/forms-overview/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/form-validation.md @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/form-validation/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/form-validation/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/dynamic-form.md @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/dynamic-form/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/dynamic-form/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/reactive-forms.md @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/reactive-forms/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/reactive-forms/** @angular/fw-forms @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/language-service
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/language-service/** @angular/tools-language-service @angular/framework-global-approvers
|
||||||
|
/aio/content/guide/language-service.md @angular/tools-language-service @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/language-service/** @angular/tools-language-service @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/platform-server
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/platform-server/** @angular/fw-server @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/universal.md @angular/fw-server @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/universal/** @angular/fw-server @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/router
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/router/** @angular/fw-router @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/router.md @angular/fw-router @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/router/** @angular/fw-router @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/router/** @angular/fw-router @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/service-worker
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/service-worker/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/service-worker-getting-started.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/service-worker-getting-started/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/service-worker-communications.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/service-worker-config.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/service-worker-devops.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/service-worker-intro.md @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/service-worker/** @angular/fw-service-worker @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/upgrade
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/examples/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/upgrade.md @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/upgrade-module/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/upgrade-phonecat-1-typescript/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/upgrade-phonecat-2-hybrid/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/upgrade-phonecat-3-final/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/upgrade-performance.md @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/ajs-quick-reference.md @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/ajs-quick-reference/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular/**/testing
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
testing/** @angular/fw-testing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/testing.md @angular/fw-testing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/testing/** @angular/fw-testing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/testing/** @angular/fw-testing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular i18n
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/core/src/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/core/src/render3/i18n.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/core/src/render3/i18n.md @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/core/src/render3/interfaces/i18n.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/locales/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/src/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/src/pipes/date_pipe.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/src/pipes/i18n_plural_pipe.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/src/pipes/i18n_select_pipe.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/src/pipes/number_pipe.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/compiler/src/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/compiler/src/render3/view/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/compiler-cli/src/extract_i18n.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/i18n.md @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# @angular security
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/core/src/sanitization/** @angular/fw-security
|
||||||
|
/packages/core/test/linker/security_integration_spec.ts @angular/fw-security
|
||||||
|
/packages/compiler/src/schema/** @angular/fw-security
|
||||||
|
/packages/platform-browser/src/security/** @angular/fw-security
|
||||||
|
/aio/content/guide/security.md @angular/fw-security @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/security/** @angular/fw-security @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# benchpress
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/packages/benchpress/** @angular/tools-benchpress @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# /integration/*
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/integration/** @angular/fw-integration @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# docs-infra
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/aio/* @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
/aio/aio-builds-setup/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
/aio/scripts/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
/aio/src/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
/aio/tests/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
/aio/tools/** @angular/docs-infra @angular/framework-global-approvers
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Docs: getting started & tutorial
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/aio/content/guide/quickstart.md @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/tutorial/** @angular/fw-docs-intro @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Docs: observables
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/aio/content/examples/observables/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/observables/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/observables.md @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/comparing-observables.md @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/observables-in-angular/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/guide/observables-in-angular/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/observables-in-angular.md @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/practical-observable-usage/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/practical-observable-usage.md @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/rx-library/** @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/rx-library.md @angular/fw-docs-observables @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Docs: packaging, tooling, releasing
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/aio/content/guide/npm-packages.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/browser-support.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/typescript-configuration.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/setup-systemjs-anatomy.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/setup.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/setup/** @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/deployment.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/releases.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/guide/updating.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Docs: marketing
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/aio/content/marketing/** @angular/fw-docs-marketing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/images/marketing/** @angular/fw-docs-marketing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/navigation.json @angular/fw-docs-marketing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/license.md @angular/fw-docs-marketing @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Build & CI Owners
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/* @angular/fw-dev-infra
|
||||||
|
/.buildkite/** @angular/fw-dev-infra
|
||||||
|
/.circleci/** @angular/fw-dev-infra
|
||||||
|
/.github/** @angular/fw-dev-infra
|
||||||
|
/docs/BAZEL.md @angular/fw-dev-infra
|
||||||
|
/scripts/** @angular/fw-dev-infra
|
||||||
|
/third_party/** @angular/fw-dev-infra
|
||||||
|
/tools/** @angular/fw-dev-infra
|
||||||
|
*.bzl @angular/fw-dev-infra
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# Public API
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/tools/public_api_guard/** @angular/fw-public-api
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ================================================
|
||||||
|
# CODEOWNERS Owners owners ...
|
||||||
|
# ================================================
|
||||||
|
|
||||||
|
/.github/CODEOWNERS @IgorMinar @angular/framework-global-approvers
|
4
.github/angular-robot.yml
vendored
4
.github/angular-robot.yml
vendored
@ -81,7 +81,7 @@ merge:
|
|||||||
# require that the PR has reviews from all requested reviewers
|
# require that the PR has reviews from all requested reviewers
|
||||||
#
|
#
|
||||||
# This enables us to request reviews from both eng and tech writers, or multiple eng folks, and prevents accidental merges.
|
# This enables us to request reviews from both eng and tech writers, or multiple eng folks, and prevents accidental merges.
|
||||||
# Rather than merging PRs with pending reviews, if all PullApprove requirements are satisfied and additional reviews are not needed pending reviewers should be removed via GitHub UI (this also leaves an audit trail behind these decisions).
|
# Rather than merging PRs with pending reviews, if all approvals are obtained and additional reviews are not needed, any pending reviewers should be removed via GitHub UI (this also leaves an audit trail behind these decisions).
|
||||||
requireReviews: true,
|
requireReviews: true,
|
||||||
|
|
||||||
# whether the PR shouldn't have a conflict with the base branch
|
# whether the PR shouldn't have a conflict with the base branch
|
||||||
@ -101,8 +101,6 @@ merge:
|
|||||||
|
|
||||||
# list of PR statuses that need to be successful
|
# list of PR statuses that need to be successful
|
||||||
requiredStatuses:
|
requiredStatuses:
|
||||||
- "continuous-integration/travis-ci/pr"
|
|
||||||
- "code-review/pullapprove"
|
|
||||||
- "ci/circleci: build"
|
- "ci/circleci: build"
|
||||||
- "ci/circleci: lint"
|
- "ci/circleci: lint"
|
||||||
|
|
||||||
|
541
.pullapprove.yml
541
.pullapprove.yml
@ -1,541 +0,0 @@
|
|||||||
# Configuration for pullapprove.com
|
|
||||||
#
|
|
||||||
# Approval access and primary role is determined by info in the project ownership spreadsheet:
|
|
||||||
# https://docs.google.com/spreadsheets/d/1-HIlzfbPYGsPr9KuYMe6bLfc4LXzPjpoALqtYRYTZB0/edit?pli=1#gid=0&vpid=A5
|
|
||||||
#
|
|
||||||
# === GitHub username to Full name map ===
|
|
||||||
#
|
|
||||||
# alexeagle - Alex Eagle
|
|
||||||
# alxhub - Alex Rickabaugh
|
|
||||||
# andrewseguin - Andrew Seguin
|
|
||||||
# benlesh - Ben Lesh
|
|
||||||
# brandonroberts - Brandon Roberts
|
|
||||||
# brocco - Mike Brocchi
|
|
||||||
# filipesilva - Filipe Silva
|
|
||||||
# gkalpak - George Kalpakas
|
|
||||||
# hansl - Hans Larsen
|
|
||||||
# IgorMinar - Igor Minar
|
|
||||||
# jasonaden - Jason Aden
|
|
||||||
# jenniferfell - Jennifer Fell
|
|
||||||
# kara - Kara Erickson
|
|
||||||
# kyliau - Keen Yee Liau
|
|
||||||
# matsko - Matias Niemelä
|
|
||||||
# mhevery - Misko Hevery
|
|
||||||
# petebacondarwin - Pete Bacon Darwin
|
|
||||||
# pkozlowski-opensource - Pawel Kozlowski
|
|
||||||
# robwormald - Rob Wormald
|
|
||||||
# vikerman - Vikram Subramanian
|
|
||||||
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
group_defaults:
|
|
||||||
required: 1
|
|
||||||
reset_on_reopened:
|
|
||||||
enabled: true
|
|
||||||
approve_by_comment:
|
|
||||||
enabled: false
|
|
||||||
# see http://docs.pullapprove.com/groups/author_approval/
|
|
||||||
author_approval:
|
|
||||||
# If the author is a reviewer on the PR, they will automatically have an "approved" status.
|
|
||||||
auto: true
|
|
||||||
|
|
||||||
groups:
|
|
||||||
# Require all PRs to have at least one approval from *someone*
|
|
||||||
all:
|
|
||||||
users: all
|
|
||||||
required: 1
|
|
||||||
rejection_value: -999
|
|
||||||
# In this group, your self-approval does not count
|
|
||||||
author_approval:
|
|
||||||
auto: false
|
|
||||||
ignored: true
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "*"
|
|
||||||
|
|
||||||
root:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "*"
|
|
||||||
exclude:
|
|
||||||
- "WORKSPACE"
|
|
||||||
- "BUILD.bazel"
|
|
||||||
- ".circleci/*"
|
|
||||||
- "aio/*"
|
|
||||||
- "integration/*"
|
|
||||||
- "modules/*"
|
|
||||||
- "packages/*"
|
|
||||||
- "tools/*"
|
|
||||||
users:
|
|
||||||
- alexeagle
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery
|
|
||||||
|
|
||||||
public-api:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "tools/public_api_guard/*"
|
|
||||||
users:
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery
|
|
||||||
|
|
||||||
bazel:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "WORKSPACE"
|
|
||||||
- ".bazel*"
|
|
||||||
- "*.bazel"
|
|
||||||
- "*.bzl"
|
|
||||||
- "packages/bazel/*"
|
|
||||||
- "/docs/BAZEL.md"
|
|
||||||
users:
|
|
||||||
- alexeagle #primary
|
|
||||||
- kyliau
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery
|
|
||||||
- vikerman #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
build-and-ci:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "*.yml"
|
|
||||||
- "*.json"
|
|
||||||
- "*.lock"
|
|
||||||
- "tools/*"
|
|
||||||
exclude:
|
|
||||||
- "aio/*"
|
|
||||||
- "packages/core/test/bundling/*"
|
|
||||||
- "tools/public_api_guard/*"
|
|
||||||
users:
|
|
||||||
- IgorMinar #primary
|
|
||||||
- alexeagle
|
|
||||||
- jasonaden
|
|
||||||
- mhevery #fallback
|
|
||||||
|
|
||||||
integration:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "integration/*"
|
|
||||||
users:
|
|
||||||
- alexeagle
|
|
||||||
- mhevery
|
|
||||||
- IgorMinar #fallback
|
|
||||||
|
|
||||||
core:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/core/*"
|
|
||||||
- "aio/content/guide/bootstrapping.md"
|
|
||||||
- "aio/content/examples/bootstrapping/*"
|
|
||||||
- "aio/content/guide/attribute-directives.md"
|
|
||||||
- "aio/content/examples/attribute-directives/*"
|
|
||||||
- "aio/content/images/guide/attribute-directives/*"
|
|
||||||
- "aio/content/guide/structural-directives.md"
|
|
||||||
- "aio/content/examples/structural-directives/*"
|
|
||||||
- "aio/content/images/guide/structural-directives/*"
|
|
||||||
- "aio/content/guide/dynamic-component-loader.md"
|
|
||||||
- "aio/content/examples/dynamic-component-loader/*"
|
|
||||||
- "aio/content/images/guide/dynamic-component-loader/*"
|
|
||||||
- "aio/content/guide/template-syntax.md"
|
|
||||||
- "aio/content/examples/template-syntax/*"
|
|
||||||
- "aio/content/images/guide/template-syntax/*"
|
|
||||||
- "aio/content/guide/dependency-injection.md"
|
|
||||||
- "aio/content/examples/dependency-injection/*"
|
|
||||||
- "aio/content/images/guide/dependency-injection/*"
|
|
||||||
- "aio/content/guide/dependency-injection-in-action.md"
|
|
||||||
- "aio/content/examples/dependency-injection-in-action/*"
|
|
||||||
- "aio/content/images/guide/dependency-injection-in-action/*"
|
|
||||||
- "aio/content/guide/hierarchical-dependency-injection.md"
|
|
||||||
- "aio/content/examples/hierarchical-dependency-injection/*"
|
|
||||||
- "aio/content/guide/singleton-services.md"
|
|
||||||
- "aio/content/guide/dependency-injection-pattern.md"
|
|
||||||
- "aio/content/guide/providers.md"
|
|
||||||
- "aio/content/examples/providers/*"
|
|
||||||
- "aio/content/guide/component-interaction.md"
|
|
||||||
- "aio/content/examples/component-interaction/*"
|
|
||||||
- "aio/content/images/guide/component-interaction/*"
|
|
||||||
- "aio/content/guide/component-styles.md"
|
|
||||||
- "aio/content/examples/component-styles/*"
|
|
||||||
- "aio/content/guide/lifecycle-hooks.md"
|
|
||||||
- "aio/content/examples/lifecycle-hooks/*"
|
|
||||||
- "aio/content/images/guide/lifecycle-hooks/*"
|
|
||||||
- "aio/content/examples/ngcontainer/*"
|
|
||||||
- "aio/content/images/guide/ngcontainer/*"
|
|
||||||
- "aio/content/guide/pipes.md"
|
|
||||||
- "aio/content/examples/pipes/*"
|
|
||||||
- "aio/content/images/guide/pipes/*"
|
|
||||||
- "aio/content/guide/entry-components.md"
|
|
||||||
- "aio/content/guide/set-document-title.md"
|
|
||||||
- "aio/content/examples/set-document-title/*"
|
|
||||||
- "aio/content/images/guide/set-document-title/*"
|
|
||||||
- "aio/content/guide/ngmodules.md"
|
|
||||||
- "aio/content/examples/ngmodules/*"
|
|
||||||
- "aio/content/examples/ngmodule/*"
|
|
||||||
- "aio/content/images/guide/ngmodule/*"
|
|
||||||
- "aio/content/guide/ngmodule-faq.md"
|
|
||||||
- "aio/content/examples/ngmodule-faq/*"
|
|
||||||
- "aio/content/guide/module-types.md"
|
|
||||||
- "aio/content/guide/sharing-ngmodules.md"
|
|
||||||
- "aio/content/guide/frequent-ngmodules.md"
|
|
||||||
- "aio/content/images/guide/frequent-ngmodules/*"
|
|
||||||
- "aio/content/guide/ngmodule-api.md"
|
|
||||||
- "aio/content/guide/ngmodule-vs-jsmodule.md"
|
|
||||||
- "aio/content/guide/feature-modules.md"
|
|
||||||
- "aio/content/examples/feature-modules/*"
|
|
||||||
- "aio/content/images/guide/feature-modules/*"
|
|
||||||
- "aio/content/guide/lazy-loading-ngmodules.md"
|
|
||||||
- "aio/content/examples/lazy-loading-ngmodules/*"
|
|
||||||
- "aio/content/images/guide/lazy-loading-ngmodules"
|
|
||||||
users:
|
|
||||||
- mhevery #primary
|
|
||||||
- jasonaden
|
|
||||||
- kara
|
|
||||||
- IgorMinar
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
animations:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/animations/*"
|
|
||||||
- "packages/platform-browser/animations/*"
|
|
||||||
- "aio/content/guide/animations.md"
|
|
||||||
- "aio/content/examples/animations/*"
|
|
||||||
- "aio/content/images/guide/animations/*"
|
|
||||||
users:
|
|
||||||
- matsko #primary
|
|
||||||
- mhevery #fallback
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
compiler/i18n:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/compiler/src/i18n/*"
|
|
||||||
- "aio/content/guide/i18n.md"
|
|
||||||
- "aio/content/examples/i18n/*"
|
|
||||||
users:
|
|
||||||
- alxhub #primary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
compiler:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/compiler/*"
|
|
||||||
- "aio/content/guide/aot-compiler.md"
|
|
||||||
users:
|
|
||||||
- alxhub #primary
|
|
||||||
- mhevery
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
compiler-cli/ngtools:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/compiler-cli/src/ngtools*"
|
|
||||||
users:
|
|
||||||
- hansl
|
|
||||||
- filipesilva #fallback
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
compiler-cli:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "packages/compiler-cli/*"
|
|
||||||
exclude:
|
|
||||||
- "packages/compiler-cli/src/ngtools*"
|
|
||||||
users:
|
|
||||||
- alexeagle
|
|
||||||
- alxhub
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
common:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "packages/common/*"
|
|
||||||
exclude:
|
|
||||||
- "packages/common/http/*"
|
|
||||||
users:
|
|
||||||
- pkozlowski-opensource #primary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
forms:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/forms/*"
|
|
||||||
- "aio/content/guide/forms.md"
|
|
||||||
- "aio/content/examples/forms/*"
|
|
||||||
- "aio/content/images/guide/forms/*"
|
|
||||||
- "aio/content/guide/forms-overview.md"
|
|
||||||
- "aio/content/examples/forms-overview/*"
|
|
||||||
- "aio/content/images/guide/forms-overview/*"
|
|
||||||
- "aio/content/guide/form-validation.md"
|
|
||||||
- "aio/content/examples/form-validation/*"
|
|
||||||
- "aio/content/images/guide/form-validation/*"
|
|
||||||
- "aio/content/guide/dynamic-form.md"
|
|
||||||
- "aio/content/examples/dynamic-form/*"
|
|
||||||
- "aio/content/images/guide/dynamic-form/*"
|
|
||||||
- "aio/content/guide/reactive-forms.md"
|
|
||||||
- "aio/content/examples/reactive-forms/*"
|
|
||||||
- "aio/content/images/guide/reactive-forms/*"
|
|
||||||
users:
|
|
||||||
- kara #primary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
http:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/common/http/*"
|
|
||||||
- "packages/http/*"
|
|
||||||
- "aio/content/guide/http.md"
|
|
||||||
- "aio/content/examples/http/*"
|
|
||||||
- "aio/content/images/guide/http/*"
|
|
||||||
users:
|
|
||||||
- alxhub #primary
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
language-service:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/language-service/*"
|
|
||||||
- "aio/content/guide/language-service.md"
|
|
||||||
- "aio/content/images/guide/language-service/*"
|
|
||||||
users:
|
|
||||||
- kyliau #primary
|
|
||||||
# needs secondary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
router:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/router/*"
|
|
||||||
- "aio/content/guide/router.md"
|
|
||||||
- "aio/content/examples/router/*"
|
|
||||||
- "aio/content/images/guide/router/*"
|
|
||||||
users:
|
|
||||||
- jasonaden #primary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
testing:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "*/testing/*"
|
|
||||||
- "aio/content/guide/testing.md"
|
|
||||||
- "aio/content/examples/testing/*"
|
|
||||||
- "aio/content/images/guide/testing/*"
|
|
||||||
users:
|
|
||||||
- vikerman
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
upgrade:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/upgrade/*"
|
|
||||||
- "aio/content/guide/upgrade.md"
|
|
||||||
- "aio/content/examples/upgrade-module/*"
|
|
||||||
- "aio/content/images/guide/upgrade/*"
|
|
||||||
- "aio/content/examples/upgrade-phonecat-1-typescript/*"
|
|
||||||
- "aio/content/examples/upgrade-phonecat-2-hybrid/*"
|
|
||||||
- "aio/content/examples/upgrade-phonecat-3-final/*"
|
|
||||||
- "aio/content/guide/upgrade-performance.md"
|
|
||||||
- "aio/content/guide/ajs-quick-reference.md"
|
|
||||||
- "aio/content/examples/ajs-quick-reference/*"
|
|
||||||
users:
|
|
||||||
- petebacondarwin #primary
|
|
||||||
- gkalpak
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
platform-browser:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/platform-browser/*"
|
|
||||||
users:
|
|
||||||
- mhevery #primary
|
|
||||||
# needs secondary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
platform-server:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/platform-server/*"
|
|
||||||
- "aio/content/guide/universal.md"
|
|
||||||
- "aio/content/examples/universal/*"
|
|
||||||
users:
|
|
||||||
- vikerman #primary
|
|
||||||
- alxhub #secondary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
platform-webworker:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/platform-webworker/*"
|
|
||||||
users:
|
|
||||||
- mhevery #primary
|
|
||||||
# needs secondary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- kara
|
|
||||||
|
|
||||||
service-worker:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/service-worker/*"
|
|
||||||
- "aio/content/guide/service-worker-getting-started.md"
|
|
||||||
- "aio/content/examples/service-worker-getting-started/*"
|
|
||||||
- "aio/content/guide/service-worker-communications.md"
|
|
||||||
- "aio/content/guide/service-worker-config.md"
|
|
||||||
- "aio/content/guide/service-worker-devops.md"
|
|
||||||
- "aio/content/guide/service-worker-intro.md"
|
|
||||||
- "aio/content/images/guide/service-worker/*"
|
|
||||||
users:
|
|
||||||
- gkalpak #primary
|
|
||||||
- alxhub
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
elements:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/elements/*"
|
|
||||||
- "aio/content/examples/elements/*"
|
|
||||||
- "aio/content/images/guide/elements/*"
|
|
||||||
- "aio/content/guide/elements.md"
|
|
||||||
users:
|
|
||||||
- andrewseguin #primary
|
|
||||||
- gkalpak
|
|
||||||
- robwormald
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
||||||
- kara
|
|
||||||
|
|
||||||
benchpress:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "packages/benchpress/*"
|
|
||||||
users:
|
|
||||||
- alxhub # primary
|
|
||||||
# needs secondary
|
|
||||||
- IgorMinar #fallback
|
|
||||||
- mhevery #fallback
|
|
||||||
|
|
||||||
docs-infra:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "aio/*"
|
|
||||||
exclude:
|
|
||||||
- "aio/content/*"
|
|
||||||
users:
|
|
||||||
- petebacondarwin #primary
|
|
||||||
- IgorMinar
|
|
||||||
- gkalpak
|
|
||||||
- mhevery #fallback
|
|
||||||
|
|
||||||
docs/guide-and-tutorial:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "aio/content/*"
|
|
||||||
exclude:
|
|
||||||
- "aio/content/marketing/*"
|
|
||||||
- "aio/content/navigation.json"
|
|
||||||
- "aio/content/license.md"
|
|
||||||
users:
|
|
||||||
- stephenfluin
|
|
||||||
- jenniferfell
|
|
||||||
- brandonroberts
|
|
||||||
- petebacondarwin
|
|
||||||
- gkalpak
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery #fallback
|
|
||||||
|
|
||||||
docs/marketing:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
include:
|
|
||||||
- "aio/content/marketing/*"
|
|
||||||
- "aio/content/images/marketing/*"
|
|
||||||
- "aio/content/navigation.json"
|
|
||||||
- "aio/content/license.md"
|
|
||||||
users:
|
|
||||||
- stephenfluin
|
|
||||||
- petebacondarwin
|
|
||||||
- gkalpak
|
|
||||||
- IgorMinar
|
|
||||||
- robwormald
|
|
||||||
- mhevery #fallback
|
|
||||||
|
|
||||||
docs/observables:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "aio/content/examples/observables/*"
|
|
||||||
- "aio/content/images/guide/observables/*"
|
|
||||||
- "aio/content/guide/observables.md"
|
|
||||||
- "aio/content/guide/comparing-observables.md"
|
|
||||||
- "aio/content/examples/observables-in-angular/*"
|
|
||||||
- "aio/content/images/guide/observables-in-angular/*"
|
|
||||||
- "aio/content/guide/observables-in-angular.md"
|
|
||||||
- "aio/content/examples/practical-observable-usage/*"
|
|
||||||
- "aio/content/guide/practical-observable-usage.md"
|
|
||||||
- "aio/content/examples/rx-library/*"
|
|
||||||
- "aio/content/guide/rx-library.md"
|
|
||||||
users:
|
|
||||||
- jasonaden
|
|
||||||
- benlesh
|
|
||||||
- IgorMinar
|
|
||||||
- mhevery
|
|
||||||
- jenniferfell #docs only
|
|
||||||
|
|
||||||
docs/packaging:
|
|
||||||
conditions:
|
|
||||||
files:
|
|
||||||
- "aio/content/guide/npm-packages.md"
|
|
||||||
- "aio/content/guide/browser-support.md"
|
|
||||||
- "aio/content/guide/typescript-configuration.md"
|
|
||||||
- "aio/content/guide/setup-systemjs-anatomy.md"
|
|
||||||
- "aio/content/examples/setup/*"
|
|
||||||
- "aio/content/guide/setup.md"
|
|
||||||
- "aio/content/guide/deployment.md"
|
|
||||||
- "aio/content/guide/releases.md"
|
|
||||||
- "aio/content/guide/updating.md"
|
|
||||||
users:
|
|
||||||
- IgorMinar #primary
|
|
||||||
- alexeagle
|
|
||||||
- hansl
|
|
||||||
- mhevery #fallback
|
|
||||||
- jenniferfell #docs only
|
|
66
.travis.yml
66
.travis.yml
@ -1,66 +0,0 @@
|
|||||||
language: node_js
|
|
||||||
sudo: false
|
|
||||||
dist: trusty
|
|
||||||
node_js:
|
|
||||||
- '10.9.0'
|
|
||||||
|
|
||||||
addons:
|
|
||||||
# firefox: "38.0"
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
# needed to install g++ that is used by npms's native modules
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
|
||||||
# needed to install g++ that is used by npms's native modules
|
|
||||||
- g++-4.8
|
|
||||||
|
|
||||||
branches:
|
|
||||||
except:
|
|
||||||
- g3
|
|
||||||
|
|
||||||
cache:
|
|
||||||
yarn: true
|
|
||||||
directories:
|
|
||||||
- ./node_modules
|
|
||||||
- ./.chrome/chromium
|
|
||||||
- ./aio/node_modules
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
# GITHUB_TOKEN_ANGULAR=<github token, a personal access token of the angular-builds account, account access in valentine>
|
|
||||||
# This is needed for the e2e Travis matrix task to publish packages to github for continuous packages delivery.
|
|
||||||
- secure: "aCdHveZuY8AT4Jr1JoJB4LxZsnGWRe/KseZh1YXYe5UtufFCtTVHvUcLn0j2aLBF0KpdyS+hWf0i4np9jthKu2xPKriefoPgCMpisYeC0MFkwbmv+XlgkUbgkgVZMGiVyX7DCYXVahxIoOUjVMEDCbNiHTIrfEuyq24U3ok2tHc="
|
|
||||||
matrix:
|
|
||||||
# Order: a slower build first, so that we don't occupy an idle travis worker waiting for others to complete.
|
|
||||||
- CI_MODE=e2e
|
|
||||||
- CI_MODE=js
|
|
||||||
- CI_MODE=saucelabs_required
|
|
||||||
# deactivated, see #19768
|
|
||||||
# - CI_MODE=browserstack_required
|
|
||||||
|
|
||||||
# We disable these optional jobs because those acquire tunnel and browser instances which
|
|
||||||
# could lead to rate limit excess while those are failing most of the time and nobody pays
|
|
||||||
# attention anyway.
|
|
||||||
# - CI_MODE=saucelabs_optional
|
|
||||||
# - CI_MODE=browserstack_optional
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- env: "CI_MODE=saucelabs_optional"
|
|
||||||
- env: "CI_MODE=browserstack_optional"
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
# source the env.sh script so that the exported variables are available to other scripts later on
|
|
||||||
- source ./scripts/ci/env.sh print
|
|
||||||
|
|
||||||
install:
|
|
||||||
- ./scripts/ci/install.sh
|
|
||||||
|
|
||||||
script:
|
|
||||||
- ./scripts/ci/build.sh
|
|
||||||
- ./scripts/ci/test.sh
|
|
||||||
- ./scripts/ci/angular.sh
|
|
||||||
# all the scripts under this line will not quickly abort in case ${TRAVIS_TEST_RESULT} is 1 (job failure)
|
|
||||||
- ./scripts/ci/cleanup.sh
|
|
||||||
- ./scripts/ci/print-logs.sh
|
|
98
CHANGELOG.md
98
CHANGELOG.md
@ -1,27 +1,55 @@
|
|||||||
<a name="7.2.0-rc.0"></a>
|
<a name="7.2.0"></a>
|
||||||
# [7.2.0-rc.0](https://github.com/angular/angular/compare/7.2.0-beta.2...7.2.0-rc.0) (2018-12-18)
|
# [7.2.0](https://github.com/angular/angular/compare/7.1.4...7.2.0) (2019-01-07)
|
||||||
|
|
||||||
|
7.2.0 release also contains all the fixes released in 7.1.4.
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add support for typescript 3.2 ([#27536](https://github.com/angular/angular/issues/27536)) ([17e702b](https://github.com/angular/angular/commit/17e702b))
|
||||||
|
* **bazel:** ng-new schematics with Bazel ([#27277](https://github.com/angular/angular/issues/27277)) ([06d4a0c](https://github.com/angular/angular/commit/06d4a0c))
|
||||||
|
* **forms:** match getError and hasError to get method signature ([#20211](https://github.com/angular/angular/issues/20211)) ([1b0b36d](https://github.com/angular/angular/commit/1b0b36d))
|
||||||
|
* **router:** add predicate function mode for runGuardsAndResolvers ([#27682](https://github.com/angular/angular/issues/27682)) ([12c3176](https://github.com/angular/angular/commit/12c3176)), closes [#26861](https://github.com/angular/angular/issues/26861) [#18253](https://github.com/angular/angular/issues/18253) [#27464](https://github.com/angular/angular/issues/27464)
|
||||||
|
* **router:** add a Navigation type available during navigation ([#27198](https://github.com/angular/angular/issues/27198)) ([d40af0c](https://github.com/angular/angular/commit/d40af0c))
|
||||||
|
* **router:** add pathParamsOrQueryParamsChange mode for runGuardsAndResolvers ([#27464](https://github.com/angular/angular/issues/27464)) ([d70a7f3](https://github.com/angular/angular/commit/d70a7f3)), closes [#26861](https://github.com/angular/angular/issues/26861) [#18253](https://github.com/angular/angular/issues/18253)
|
||||||
|
* **router:** allow passing `state` to routerLink directives ([#27198](https://github.com/angular/angular/issues/27198)) ([73f6ed9](https://github.com/angular/angular/commit/73f6ed9)), closes [#24617](https://github.com/angular/angular/issues/24617)
|
||||||
|
* **router:** allow passing state to `NavigationExtras` ([#27198](https://github.com/angular/angular/issues/27198)) ([67f4a5d](https://github.com/angular/angular/commit/67f4a5d))
|
||||||
|
* **router:** restore whole object when navigating back to a page managed by Angular router ([#27198](https://github.com/angular/angular/issues/27198)) ([2684249](https://github.com/angular/angular/commit/2684249))
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
* **animations:** do not truncate decimals for delay ([#24455](https://github.com/angular/angular/issues/24455)) ([f1c9d6a](https://github.com/angular/angular/commit/f1c9d6a))
|
* **animations:** do not truncate decimals for delay ([#24455](https://github.com/angular/angular/issues/24455)) ([f1c9d6a](https://github.com/angular/angular/commit/f1c9d6a))
|
||||||
* **animations:** mark actual descendant node as disabled ([#26180](https://github.com/angular/angular/issues/26180)) ([df123e0](https://github.com/angular/angular/commit/df123e0))
|
* **animations:** mark actual descendant node as disabled ([#26180](https://github.com/angular/angular/issues/26180)) ([df123e0](https://github.com/angular/angular/commit/df123e0))
|
||||||
|
* **bazel:** unable to launch protractor test on windows ([#27850](https://github.com/angular/angular/issues/27850)) ([1e6c9be](https://github.com/angular/angular/commit/1e6c9be))
|
||||||
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([f57916c](https://github.com/angular/angular/commit/f57916c))
|
* **bazel:** devserver entry_module should have underscore name ([#27719](https://github.com/angular/angular/issues/27719)) ([f57916c](https://github.com/angular/angular/commit/f57916c))
|
||||||
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([522919a](https://github.com/angular/angular/commit/522919a))
|
* **bazel:** emit full node stack traces when Angular compilation crashes ([#27678](https://github.com/angular/angular/issues/27678)) ([522919a](https://github.com/angular/angular/commit/522919a))
|
||||||
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
|
* **bazel:** fix major/minor semver check between [@angular](https://github.com/angular)/bazel npm packager version and angular bazel repo version ([#27635](https://github.com/angular/angular/issues/27635)) ([1cc08b4](https://github.com/angular/angular/commit/1cc08b4))
|
||||||
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([8313ffc](https://github.com/angular/angular/commit/8313ffc))
|
* **bazel:** Load http_archive and rules_nodejs dependencies ([#27609](https://github.com/angular/angular/issues/27609)) ([8313ffc](https://github.com/angular/angular/commit/8313ffc))
|
||||||
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([44dfa60](https://github.com/angular/angular/commit/44dfa60)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
|
* **bazel:** ng_package writes unrelevant definitions to bazel out ([#27519](https://github.com/angular/angular/issues/27519)) ([44dfa60](https://github.com/angular/angular/commit/44dfa60)), closes [/github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts#L105-L124](https://github.com//github.com/angular/angular/blob/4f9374951d67c75f67a31c110bd61ab72563db7d/packages/bazel/src/ng_package/packager.ts/issues/L105-L124)
|
||||||
* **bazel:** Set module_name and enable ng test ([#27715](https://github.com/angular/angular/issues/27715)) ([85866de](https://github.com/angular/angular/commit/85866de))
|
* **bazel:** Set module_name and enable ng test ([#27715](https://github.com/angular/angular/issues/27715)) ([85866de](https://github.com/angular/angular/commit/85866de))
|
||||||
|
* **bazel:** fix TS errors in the `schematics/bazel-workspace` files ([#27600](https://github.com/angular/angular/issues/27600)) ([3290fc3](https://github.com/angular/angular/commit/3290fc3))
|
||||||
|
* **bazel:** Read latest versions from latest-versions.ts & use semver check ([#27526](https://github.com/angular/angular/issues/27526)) ([30a3b49](https://github.com/angular/angular/commit/30a3b49))
|
||||||
|
* **bazel:** tsickle dependency not working with typescript 3.1.x ([#27402](https://github.com/angular/angular/issues/27402)) ([f034114](https://github.com/angular/angular/commit/f034114))
|
||||||
|
* **bazel:** do not throw error when writing tsickle externs ([#27200](https://github.com/angular/angular/issues/27200)) ([20a2bae](https://github.com/angular/angular/commit/20a2bae))
|
||||||
|
* **bazel:** do not throw if ts compile action does not create esm5 outputs ([#27401](https://github.com/angular/angular/issues/27401)) ([c61a8b7](https://github.com/angular/angular/commit/c61a8b7))
|
||||||
|
* **bazel:** ng_package cannot be run multiple times without clean ([#27200](https://github.com/angular/angular/issues/27200)) ([4f93749](https://github.com/angular/angular/commit/4f93749))
|
||||||
|
* **bazel:** ng_package not generating UMD bundles on windows ([#27200](https://github.com/angular/angular/issues/27200)) ([7d59880](https://github.com/angular/angular/commit/7d59880))
|
||||||
|
* **bazel:** ng_package should correctly map to source maps in secondary entry-points ([#27313](https://github.com/angular/angular/issues/27313)) ([eb17502](https://github.com/angular/angular/commit/eb17502)), closes [#25510](https://github.com/angular/angular/issues/25510)
|
||||||
|
* **bazel:** Respect existing angular installation ([#27495](https://github.com/angular/angular/issues/27495)) ([4da739a](https://github.com/angular/angular/commit/4da739a))
|
||||||
* **common:** KeyValuePipe should return empty array for empty objects ([#27258](https://github.com/angular/angular/issues/27258)) ([b39efdd](https://github.com/angular/angular/commit/b39efdd))
|
* **common:** KeyValuePipe should return empty array for empty objects ([#27258](https://github.com/angular/angular/issues/27258)) ([b39efdd](https://github.com/angular/angular/commit/b39efdd))
|
||||||
|
* **common:** expose request url in network error ([#27143](https://github.com/angular/angular/issues/27143)) ([1db53da](https://github.com/angular/angular/commit/1db53da)), closes [#27029](https://github.com/angular/angular/issues/27029)
|
||||||
* **compiler-cli:** create LiteralLikeNode for String and Number literal ([#27536](https://github.com/angular/angular/issues/27536)) ([2c9b6c0](https://github.com/angular/angular/commit/2c9b6c0))
|
* **compiler-cli:** create LiteralLikeNode for String and Number literal ([#27536](https://github.com/angular/angular/issues/27536)) ([2c9b6c0](https://github.com/angular/angular/commit/2c9b6c0))
|
||||||
|
* **compiler-cli:** flatModuleIndex files not generated on windows with multiple input files ([#27200](https://github.com/angular/angular/issues/27200)) ([d3c08e7](https://github.com/angular/angular/commit/d3c08e7))
|
||||||
|
* **core:** export a value for InjectFlags ([#27279](https://github.com/angular/angular/issues/27279)) ([23b06af](https://github.com/angular/angular/commit/23b06af)), closes [#27251](https://github.com/angular/angular/issues/27251)
|
||||||
|
* **core:** More precise return type for `InjectableDecorator` ([#27360](https://github.com/angular/angular/issues/27360)) ([4b9948c](https://github.com/angular/angular/commit/4b9948c)), closes [#26942](https://github.com/angular/angular/issues/26942)
|
||||||
|
* **forms:** typed argument for FormBuilder group ([#26985](https://github.com/angular/angular/issues/26985)) ([b0c7561](https://github.com/angular/angular/commit/b0c7561))
|
||||||
|
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||||
* **router:** ensure URL is updated after second redirect with UrlUpdateStrategy="eager" ([#27523](https://github.com/angular/angular/issues/27523)) ([ad26cd6](https://github.com/angular/angular/commit/ad26cd6)), closes [#27116](https://github.com/angular/angular/issues/27116)
|
* **router:** ensure URL is updated after second redirect with UrlUpdateStrategy="eager" ([#27523](https://github.com/angular/angular/issues/27523)) ([ad26cd6](https://github.com/angular/angular/commit/ad26cd6)), closes [#27116](https://github.com/angular/angular/issues/27116)
|
||||||
|
* **router:** update URL after redirects when urlHandlingStrategy='eager' ([#27356](https://github.com/angular/angular/issues/27356)) ([11a8bd8](https://github.com/angular/angular/commit/11a8bd8)), closes [#27076](https://github.com/angular/angular/issues/27076)
|
||||||
|
* **upgrade:** allow nesting components from different downgraded modules ([#27217](https://github.com/angular/angular/issues/27217)) ([bc0ee01](https://github.com/angular/angular/commit/bc0ee01))
|
||||||
|
* **upgrade:** correctly handle nested downgraded components with `downgradeModule()` ([#27217](https://github.com/angular/angular/issues/27217)) ([326b464](https://github.com/angular/angular/commit/326b464)), closes [#22581](https://github.com/angular/angular/issues/22581) [#22869](https://github.com/angular/angular/issues/22869) [#27083](https://github.com/angular/angular/issues/27083)
|
||||||
* **upgrade:** upgrade Directive facade should not return different instance from constructor ([#27660](https://github.com/angular/angular/issues/27660)) ([c986d3d](https://github.com/angular/angular/commit/c986d3d))
|
* **upgrade:** upgrade Directive facade should not return different instance from constructor ([#27660](https://github.com/angular/angular/issues/27660)) ([c986d3d](https://github.com/angular/angular/commit/c986d3d))
|
||||||
|
* **upgrade:** don't rely upon the runtime to resolve forward refs ([#27132](https://github.com/angular/angular/issues/27132)) ([a4462c2](https://github.com/angular/angular/commit/a4462c2))
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* add support for typescript 3.2 ([#27536](https://github.com/angular/angular/issues/27536)) ([17e702b](https://github.com/angular/angular/commit/17e702b))
|
|
||||||
* **router:** add predicate function mode for runGuardsAndResolvers ([#27682](https://github.com/angular/angular/issues/27682)) ([12c3176](https://github.com/angular/angular/commit/12c3176)), closes [#26861](https://github.com/angular/angular/issues/26861) [#18253](https://github.com/angular/angular/issues/18253) [#27464](https://github.com/angular/angular/issues/27464)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -44,19 +72,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.0-beta.2"></a>
|
|
||||||
# [7.2.0-beta.2](https://github.com/angular/angular/compare/7.2.0-beta.1...7.2.0-beta.2) (2018-12-11)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** fix TS errors in the `schematics/bazel-workspace` files ([#27600](https://github.com/angular/angular/issues/27600)) ([3290fc3](https://github.com/angular/angular/commit/3290fc3))
|
|
||||||
* **bazel:** Read latest versions from latest-versions.ts & use semver check ([#27526](https://github.com/angular/angular/issues/27526)) ([30a3b49](https://github.com/angular/angular/commit/30a3b49))
|
|
||||||
* **bazel:** tsickle dependency not working with typescript 3.1.x ([#27402](https://github.com/angular/angular/issues/27402)) ([f034114](https://github.com/angular/angular/commit/f034114))
|
|
||||||
* **forms:** typed argument for FormBuilder group ([#26985](https://github.com/angular/angular/issues/26985)) ([b0c7561](https://github.com/angular/angular/commit/b0c7561))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.1.3"></a>
|
<a name="7.1.3"></a>
|
||||||
## [7.1.3](https://github.com/angular/angular/compare/7.1.2...7.1.3) (2018-12-11)
|
## [7.1.3](https://github.com/angular/angular/compare/7.1.2...7.1.3) (2018-12-11)
|
||||||
|
|
||||||
@ -83,47 +98,6 @@
|
|||||||
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([236ac06](https://github.com/angular/angular/commit/236ac06)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
||||||
|
|
||||||
|
|
||||||
<a name="7.2.0-beta.1"></a>
|
|
||||||
# [7.2.0-beta.1](https://github.com/angular/angular/compare/7.1.0...7.2.0-beta.1) (2018-12-06)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **bazel:** do not throw error when writing tsickle externs ([#27200](https://github.com/angular/angular/issues/27200)) ([20a2bae](https://github.com/angular/angular/commit/20a2bae))
|
|
||||||
* **bazel:** do not throw if ts compile action does not create esm5 outputs ([#27401](https://github.com/angular/angular/issues/27401)) ([c61a8b7](https://github.com/angular/angular/commit/c61a8b7))
|
|
||||||
* **bazel:** ng_package cannot be run multiple times without clean ([#27200](https://github.com/angular/angular/issues/27200)) ([4f93749](https://github.com/angular/angular/commit/4f93749))
|
|
||||||
* **bazel:** ng_package not generating UMD bundles on windows ([#27200](https://github.com/angular/angular/issues/27200)) ([7d59880](https://github.com/angular/angular/commit/7d59880))
|
|
||||||
* **bazel:** ng_package should correctly map to source maps in secondary entry-points ([#27313](https://github.com/angular/angular/issues/27313)) ([eb17502](https://github.com/angular/angular/commit/eb17502)), closes [#25510](https://github.com/angular/angular/issues/25510)
|
|
||||||
* **bazel:** Respect existing angular installation ([#27495](https://github.com/angular/angular/issues/27495)) ([4da739a](https://github.com/angular/angular/commit/4da739a))
|
|
||||||
* **common:** expose request url in network error ([#27143](https://github.com/angular/angular/issues/27143)) ([1db53da](https://github.com/angular/angular/commit/1db53da)), closes [#27029](https://github.com/angular/angular/issues/27029)
|
|
||||||
* **compiler-cli:** flatModuleIndex files not generated on windows with multiple input files ([#27200](https://github.com/angular/angular/issues/27200)) ([d3c08e7](https://github.com/angular/angular/commit/d3c08e7))
|
|
||||||
* **core:** export a value for InjectFlags ([#27279](https://github.com/angular/angular/issues/27279)) ([23b06af](https://github.com/angular/angular/commit/23b06af)), closes [#27251](https://github.com/angular/angular/issues/27251)
|
|
||||||
* **core:** More precise return type for `InjectableDecorator` ([#27360](https://github.com/angular/angular/issues/27360)) ([4b9948c](https://github.com/angular/angular/commit/4b9948c)), closes [#26942](https://github.com/angular/angular/issues/26942)
|
|
||||||
* **forms:** apply unicode flag to pattern attribute when supported ([#20819](https://github.com/angular/angular/issues/20819)) ([3c34b8b](https://github.com/angular/angular/commit/3c34b8b))
|
|
||||||
* **platform-server:** add [@angular](https://github.com/angular)/http to the list of peerDependencies ([#27307](https://github.com/angular/angular/issues/27307)) ([32c5be9](https://github.com/angular/angular/commit/32c5be9)), closes [#26154](https://github.com/angular/angular/issues/26154)
|
|
||||||
* **router:** update URL after redirects when urlHandlingStrategy='eager' ([#27356](https://github.com/angular/angular/issues/27356)) ([11a8bd8](https://github.com/angular/angular/commit/11a8bd8)), closes [#27076](https://github.com/angular/angular/issues/27076)
|
|
||||||
* **upgrade:** don't rely upon the runtime to resolve forward refs ([#27132](https://github.com/angular/angular/issues/27132)) ([a4462c2](https://github.com/angular/angular/commit/a4462c2))
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* **bazel:** ng-new schematics with Bazel ([#27277](https://github.com/angular/angular/issues/27277)) ([06d4a0c](https://github.com/angular/angular/commit/06d4a0c))
|
|
||||||
* **router:** add a Navigation type available during navigation ([#27198](https://github.com/angular/angular/issues/27198)) ([d40af0c](https://github.com/angular/angular/commit/d40af0c))
|
|
||||||
* **router:** add pathParamsOrQueryParamsChange mode for runGuardsAndResolvers ([#27464](https://github.com/angular/angular/issues/27464)) ([d70a7f3](https://github.com/angular/angular/commit/d70a7f3)), closes [#26861](https://github.com/angular/angular/issues/26861) [#18253](https://github.com/angular/angular/issues/18253)
|
|
||||||
* **router:** allow passing `state` to routerLink directives ([#27198](https://github.com/angular/angular/issues/27198)) ([73f6ed9](https://github.com/angular/angular/commit/73f6ed9)), closes [#24617](https://github.com/angular/angular/issues/24617)
|
|
||||||
* **router:** allow passing state to `NavigationExtras` ([#27198](https://github.com/angular/angular/issues/27198)) ([67f4a5d](https://github.com/angular/angular/commit/67f4a5d))
|
|
||||||
* **router:** restore whole object when navigating back to a page managed by Angular router ([#27198](https://github.com/angular/angular/issues/27198)) ([2684249](https://github.com/angular/angular/commit/2684249))
|
|
||||||
|
|
||||||
<a name="7.2.0-beta.0"></a>
|
|
||||||
# [7.2.0-beta.0](https://github.com/angular/angular/compare/7.1.0...7.2.0-beta.0) (2018-11-28)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* **common:** expose request url in network error ([#27143](https://github.com/angular/angular/issues/27143)) ([1db53da](https://github.com/angular/angular/commit/1db53da)), closes [#27029](https://github.com/angular/angular/issues/27029)
|
|
||||||
* **upgrade:** don't rely upon the runtime to resolve forward refs ([#27132](https://github.com/angular/angular/issues/27132)) ([a4462c2](https://github.com/angular/angular/commit/a4462c2))
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="7.1.1"></a>
|
<a name="7.1.1"></a>
|
||||||
## [7.1.1](https://github.com/angular/angular/compare/7.1.0...7.1.1) (2018-11-28)
|
## [7.1.1](https://github.com/angular/angular/compare/7.1.0...7.1.1) (2018-11-28)
|
||||||
|
@ -191,7 +191,7 @@ If the commit reverts a previous commit, it should begin with `revert: `, follow
|
|||||||
Must be one of the following:
|
Must be one of the following:
|
||||||
|
|
||||||
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
|
||||||
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
|
* **ci**: Changes to our CI configuration files and scripts (example scopes: Circle, BrowserStack, SauceLabs)
|
||||||
* **docs**: Documentation only changes
|
* **docs**: Documentation only changes
|
||||||
* **feat**: A new feature
|
* **feat**: A new feature
|
||||||
* **fix**: A bug fix
|
* **fix**: A bug fix
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
[](https://travis-ci.org/angular/angular)
|
|
||||||
[](https://circleci.com/gh/angular/angular/tree/master)
|
[](https://circleci.com/gh/angular/angular/tree/master)
|
||||||
[](https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06)
|
[](https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06)
|
||||||
[](https://gitter.im/angular/angular?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
[](https://gitter.im/angular/angular?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
@ -61,7 +61,10 @@ local_repository(
|
|||||||
#
|
#
|
||||||
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
|
||||||
|
|
||||||
check_bazel_version("0.20.0", """
|
# Bazel version must be at least v0.21.0 because:
|
||||||
|
# - 0.21.0 --experimental_strict_action_env flag turned on by default which fixes cache when
|
||||||
|
# running `yarn bazel` (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
|
||||||
|
check_bazel_version("0.21.0", """
|
||||||
You no longer need to install Bazel on your machine.
|
You no longer need to install Bazel on your machine.
|
||||||
Angular has a dependency on the @bazel/bazel package which supplies it.
|
Angular has a dependency on the @bazel/bazel package which supplies it.
|
||||||
Try running `yarn bazel` instead.
|
Try running `yarn bazel` instead.
|
||||||
|
@ -74,7 +74,10 @@ Command syntax is shown as follows:
|
|||||||
* Option names are prefixed with a double dash (--).
|
* Option names are prefixed with a double dash (--).
|
||||||
Option aliases are prefixed with a single dash (-).
|
Option aliases are prefixed with a single dash (-).
|
||||||
Arguments are not prefixed.
|
Arguments are not prefixed.
|
||||||
For example: `ng build my-app -c production`
|
For example:
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng build my-app -c production
|
||||||
|
</code-example>
|
||||||
|
|
||||||
* Typically, the name of a generated artifact can be given as an argument to the command or specified with the --name option.
|
* Typically, the name of a generated artifact can be given as an argument to the command or specified with the --name option.
|
||||||
|
|
||||||
|
47
aio/content/examples/interpolation/e2e/src/app.e2e-spec.ts
Normal file
47
aio/content/examples/interpolation/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import { browser, element, by } from 'protractor';
|
||||||
|
|
||||||
|
describe('Interpolation e2e tests', () => {
|
||||||
|
|
||||||
|
beforeEach(function () {
|
||||||
|
browser.get('');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display Interpolation and Template Expressions', function () {
|
||||||
|
expect(element(by.css('h1')).getText()).toEqual('Interpolation and Template Expressions');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display Current customer: Maria', function () {
|
||||||
|
expect(element.all(by.css('h3')).get(0).getText()).toBe(`Current customer: Maria`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display The sum of 1 + 1 is not 4.', function () {
|
||||||
|
expect(element.all(by.css('p:last-child')).get(0).getText()).toBe(`The sum of 1 + 1 is not 4.`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display Expression Context', function () {
|
||||||
|
expect(element.all(by.css('h2')).get(1).getText()).toBe(`Expression Context`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display a list of customers', function () {
|
||||||
|
expect(element.all(by.css('li')).get(0).getText()).toBe(`Maria`);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display two pictures', function() {
|
||||||
|
let pottedPlant = element.all(by.css('img')).get(0);
|
||||||
|
let lamp = element.all(by.css('img')).get(1);
|
||||||
|
|
||||||
|
expect(pottedPlant.getAttribute('src')).toContain('pottedPlant');
|
||||||
|
expect(pottedPlant.isDisplayed()).toBe(true);
|
||||||
|
|
||||||
|
expect(lamp.getAttribute('src')).toContain('lamp');
|
||||||
|
expect(lamp.isDisplayed()).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should support user input', function () {
|
||||||
|
let input = element(by.css('input'));
|
||||||
|
let label = element(by.css('label'));
|
||||||
|
expect(label.getText()).toEqual('Type something:');
|
||||||
|
input.sendKeys('abc');
|
||||||
|
expect(label.getText()).toEqual('Type something: abc');
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,59 @@
|
|||||||
|
|
||||||
|
<div>
|
||||||
|
<h1>Interpolation and Template Expressions</h1>
|
||||||
|
<hr />
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h2>Interpolation</h2>
|
||||||
|
<!-- #docregion interpolation-example1 -->
|
||||||
|
<h3>Current customer: {{ currentCustomer }}</h3>
|
||||||
|
<!-- #enddocregion interpolation-example1 -->
|
||||||
|
|
||||||
|
<!-- #docregion component-property -->
|
||||||
|
<p>{{title}}</p>
|
||||||
|
<div><img src="{{itemImageUrl}}"></div>
|
||||||
|
<!-- #enddocregion component-property -->
|
||||||
|
|
||||||
|
<h3>Evaluating template expressions </h3>
|
||||||
|
<h4>Simple evaluation (to a string):</h4>
|
||||||
|
<!-- #docregion convert-string -->
|
||||||
|
<!-- "The sum of 1 + 1 is 2" -->
|
||||||
|
<p>The sum of 1 + 1 is {{1 + 1}}.</p>
|
||||||
|
<!-- #enddocregion convert-string -->
|
||||||
|
|
||||||
|
<h4>Evaluates using a method (also evaluates to a string):</h4>
|
||||||
|
<!-- #docregion invoke-method -->
|
||||||
|
<!-- "The sum of 1 + 1 is not 4" -->
|
||||||
|
<p>The sum of 1 + 1 is not {{1 + 1 + getVal()}}.</p>
|
||||||
|
<!-- #enddocregion invoke-method -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr />
|
||||||
|
<h2>Expression Context</h2>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h3>Component context, properties of app.component.ts:</h3>
|
||||||
|
<!-- #docregion component-context -->
|
||||||
|
<h4>{{recommended}}</h4>
|
||||||
|
<img [src]="itemImageUrl2">
|
||||||
|
<!-- #enddocregion component-context -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<h4>Template context, template input variables (let customer):</h4>
|
||||||
|
<!-- #docregion template-input-variable -->
|
||||||
|
<ul>
|
||||||
|
<li *ngFor="let customer of customers">{{customer.name}}</li>
|
||||||
|
</ul>
|
||||||
|
<!-- #enddocregion template-input-variable -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div (keyup)="0">
|
||||||
|
<h4>Template context: template reference variables (#customerInput):</h4>
|
||||||
|
<label>Type something:
|
||||||
|
<!-- #docregion template-reference-variable -->
|
||||||
|
<input #customerInput>{{customerInput.value}}</label>
|
||||||
|
<!-- #enddocregion template-reference-variable -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
@ -0,0 +1,27 @@
|
|||||||
|
import { TestBed, async } from '@angular/core/testing';
|
||||||
|
import { AppComponent } from './app.component';
|
||||||
|
describe('AppComponent', () => {
|
||||||
|
beforeEach(async(() => {
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
declarations: [
|
||||||
|
AppComponent
|
||||||
|
],
|
||||||
|
}).compileComponents();
|
||||||
|
}));
|
||||||
|
it('should create the app', async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
const app = fixture.debugElement.componentInstance;
|
||||||
|
expect(app).toBeTruthy();
|
||||||
|
}));
|
||||||
|
it(`should have as title 'Featured product:'`, async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
const app = fixture.debugElement.componentInstance;
|
||||||
|
expect(app.title).toEqual('Featured product:');
|
||||||
|
}));
|
||||||
|
it('should render title in a p tag', async(() => {
|
||||||
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
|
fixture.detectChanges();
|
||||||
|
const compiled = fixture.debugElement.nativeElement;
|
||||||
|
expect(compiled.querySelector('p').textContent).toContain('Featured product:');
|
||||||
|
}));
|
||||||
|
});
|
25
aio/content/examples/interpolation/src/app/app.component.ts
Normal file
25
aio/content/examples/interpolation/src/app/app.component.ts
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
import { CUSTOMERS } from './customers';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-root',
|
||||||
|
templateUrl: './app.component.html',
|
||||||
|
styleUrls: ['./app.component.css']
|
||||||
|
})
|
||||||
|
export class AppComponent {
|
||||||
|
customers = CUSTOMERS;
|
||||||
|
|
||||||
|
currentCustomer = 'Maria';
|
||||||
|
title = 'Featured product:';
|
||||||
|
itemImageUrl = '../assets/pottedPlant.png';
|
||||||
|
|
||||||
|
recommended = 'You might also like:';
|
||||||
|
itemImageUrl2 = '../assets/lamp.png';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
getVal(): number { return 2; }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
18
aio/content/examples/interpolation/src/app/app.module.ts
Normal file
18
aio/content/examples/interpolation/src/app/app.module.ts
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
|
import { AppComponent } from './app.component';
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
AppComponent
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
BrowserModule
|
||||||
|
],
|
||||||
|
providers: [],
|
||||||
|
bootstrap: [AppComponent]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
3
aio/content/examples/interpolation/src/app/customer.ts
Normal file
3
aio/content/examples/interpolation/src/app/customer.ts
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
export class Customer {
|
||||||
|
name: string;
|
||||||
|
}
|
9
aio/content/examples/interpolation/src/app/customers.ts
Normal file
9
aio/content/examples/interpolation/src/app/customers.ts
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
import { Customer } from './customer';
|
||||||
|
|
||||||
|
export const CUSTOMERS: Customer[] = [
|
||||||
|
{ name: 'Maria' },
|
||||||
|
{ name: 'Oliver' },
|
||||||
|
{ name: 'Walter' },
|
||||||
|
{ name: 'Lakshmi' },
|
||||||
|
{ name: 'Yasha' }
|
||||||
|
];
|
BIN
aio/content/examples/interpolation/src/assets/lamp.png
Normal file
BIN
aio/content/examples/interpolation/src/assets/lamp.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 33 KiB |
BIN
aio/content/examples/interpolation/src/assets/potted-plant.png
Normal file
BIN
aio/content/examples/interpolation/src/assets/potted-plant.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><%= utils.classify(name) %></title>
|
<title>Interpolation</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
@ -10,7 +10,5 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root></app-root>
|
<app-root></app-root>
|
||||||
<script src="/zone.min.js"></script>
|
|
||||||
<script src="/bundle.min.js"></script>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
12
aio/content/examples/interpolation/src/main.ts
Normal file
12
aio/content/examples/interpolation/src/main.ts
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
import { enableProdMode } from '@angular/core';
|
||||||
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
|
import { AppModule } from './app/app.module';
|
||||||
|
import { environment } from './environments/environment';
|
||||||
|
|
||||||
|
if (environment.production) {
|
||||||
|
enableProdMode();
|
||||||
|
}
|
||||||
|
|
||||||
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||||
|
.catch(err => console.log(err));
|
10
aio/content/examples/interpolation/stackblitz.json
Normal file
10
aio/content/examples/interpolation/stackblitz.json
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"description": "Interpolation",
|
||||||
|
"files": [
|
||||||
|
"!**/*.d.ts",
|
||||||
|
"!**/*.js",
|
||||||
|
"!**/*.[1,2].*"
|
||||||
|
],
|
||||||
|
"file": "src/app/app.component.ts",
|
||||||
|
"tags": ["interpolation"]
|
||||||
|
}
|
@ -61,7 +61,7 @@ export class Routable1Component implements OnInit {
|
|||||||
navStart: Observable<NavigationStart>;
|
navStart: Observable<NavigationStart>;
|
||||||
|
|
||||||
constructor(private router: Router) {
|
constructor(private router: Router) {
|
||||||
// Create a new Observable the publishes only the NavigationStart event
|
// Create a new Observable that publishes only the NavigationStart event
|
||||||
this.navStart = router.events.pipe(
|
this.navStart = router.events.pipe(
|
||||||
filter(evt => evt instanceof NavigationStart)
|
filter(evt => evt instanceof NavigationStart)
|
||||||
) as Observable<NavigationStart>;
|
) as Observable<NavigationStart>;
|
||||||
|
@ -5,10 +5,9 @@ import { retryWhen, map, mergeMap } from 'rxjs/operators';
|
|||||||
|
|
||||||
function backoff(maxTries, ms) {
|
function backoff(maxTries, ms) {
|
||||||
return pipe(
|
return pipe(
|
||||||
retryWhen(attempts => range(1, maxTries)
|
retryWhen(attempts => zip(range(1, maxTries), attempts)
|
||||||
.pipe(
|
.pipe(
|
||||||
zip(attempts, (i) => i),
|
map(([i]) => i * i),
|
||||||
map(i => i * i),
|
|
||||||
mergeMap(i => timer(i * ms))
|
mergeMap(i => timer(i * ms))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -0,0 +1,30 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-root',
|
||||||
|
templateUrl: './app.component.html',
|
||||||
|
styleUrls: ['./app.component.css']
|
||||||
|
})
|
||||||
|
export class AppComponent {
|
||||||
|
itemImageUrl = '../assets/lamp.png';
|
||||||
|
isUnchanged = true;
|
||||||
|
classes = 'special';
|
||||||
|
// #docregion parent-data-type
|
||||||
|
parentItem = 'bananas';
|
||||||
|
// #enddocregion parent-data-type
|
||||||
|
|
||||||
|
// #docregion pass-object
|
||||||
|
currentItem = [{
|
||||||
|
id: 21,
|
||||||
|
name: 'peaches'
|
||||||
|
}];
|
||||||
|
// #enddocregion pass-object
|
||||||
|
|
||||||
|
interpolationTitle = 'Interpolation';
|
||||||
|
propertyTitle = 'Property binding';
|
||||||
|
|
||||||
|
// #docregion malicious-content
|
||||||
|
evilTitle = 'Template <script>alert("evil never sleeps")</script>Syntax';
|
||||||
|
// #enddocregion malicious-content
|
||||||
|
}
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
// #docregion promise
|
// #docregion promise
|
||||||
|
|
||||||
import { fromPromise } from 'rxjs';
|
import { from } from 'rxjs';
|
||||||
|
|
||||||
// Create an Observable out of a promise
|
// Create an Observable out of a promise
|
||||||
const data = fromPromise(fetch('/api/endpoint'));
|
const data = from(fetch('/api/endpoint'));
|
||||||
// Subscribe to begin listening for async result
|
// Subscribe to begin listening for async result
|
||||||
data.subscribe({
|
data.subscribe({
|
||||||
next(response) { console.log(response); },
|
next(response) { console.log(response); },
|
||||||
|
@ -34,8 +34,9 @@ describe('sw-example App', () => {
|
|||||||
expect(items[3].getText()).toBe('Angular blog');
|
expect(items[3].getText()).toBe('Angular blog');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
// Check for a rejected promise as the service worker is not enabled
|
|
||||||
it('SwUpdate.checkForUpdate() should return a rejected promise', () => {
|
// Check for a rejected promise as the service worker is not enabled
|
||||||
|
it('SwUpdate.checkForUpdate() should return a rejected promise', () => {
|
||||||
const button = element(by.css('button'));
|
const button = element(by.css('button'));
|
||||||
const rejectMessage = element(by.css('p'));
|
const rejectMessage = element(by.css('p'));
|
||||||
button.click();
|
button.click();
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"projectType": "service-worker",
|
||||||
|
"e2e": [
|
||||||
|
{"cmd": "yarn", "args": ["e2e", "--no-webdriver-update"]},
|
||||||
|
{"cmd": "yarn", "args": ["build", "--prod"]},
|
||||||
|
{"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw.json'), 'ngsw.json is missing')"]},
|
||||||
|
{"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw-worker.js'), 'ngsw-worker.js is missing')"]},
|
||||||
|
{"cmd": "node", "args": ["--eval", "assert(require('./package.json').dependencies['@angular/service-worker'], '@angular/service-worker is missing')"]}
|
||||||
|
]
|
||||||
|
}
|
@ -12,9 +12,9 @@ export class AppComponent {
|
|||||||
constructor(private update: SwUpdate) {}
|
constructor(private update: SwUpdate) {}
|
||||||
|
|
||||||
updateCheck(): void {
|
updateCheck(): void {
|
||||||
this.update
|
this.update
|
||||||
.checkForUpdate()
|
.checkForUpdate()
|
||||||
.then(() => this.updateCheckText = 'resolved')
|
.then(() => this.updateCheckText = 'resolved')
|
||||||
.catch(err => this.updateCheckText = `rejected: ${err.message}`);
|
.catch(err => this.updateCheckText = `rejected: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { ApplicationRef, Injectable } from '@angular/core';
|
||||||
import { SwUpdate } from '@angular/service-worker';
|
import { SwUpdate } from '@angular/service-worker';
|
||||||
|
import { concat, interval } from 'rxjs';
|
||||||
|
import { first } from 'rxjs/operators';
|
||||||
// #docregion sw-check-update
|
|
||||||
import { interval } from 'rxjs';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CheckForUpdateService {
|
export class CheckForUpdateService {
|
||||||
|
|
||||||
constructor(updates: SwUpdate) {
|
constructor(appRef: ApplicationRef, updates: SwUpdate) {
|
||||||
interval(6 * 60 * 60).subscribe(() => updates.checkForUpdate());
|
// Allow the app to stabilize first, before starting polling for updates with `interval()`.
|
||||||
|
const appIsStable$ = appRef.isStable.pipe(first(isStable => isStable === true));
|
||||||
|
const everySixHours$ = interval(6 * 60 * 60 * 1000);
|
||||||
|
const everySixHoursOnceAppIsStable$ = concat(appIsStable$, everySixHours$);
|
||||||
|
|
||||||
|
everySixHoursOnceAppIsStable$.subscribe(() => updates.checkForUpdate());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// #enddocregion sw-check-update
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Directive, Input } from '@angular/core';
|
import { Directive, Input, HostListener } from '@angular/core';
|
||||||
|
|
||||||
// export for convenience.
|
// export for convenience.
|
||||||
export { RouterLink} from '@angular/router';
|
export { RouterLink} from '@angular/router';
|
||||||
@ -6,13 +6,13 @@ export { RouterLink} from '@angular/router';
|
|||||||
/* tslint:disable:directive-class-suffix */
|
/* tslint:disable:directive-class-suffix */
|
||||||
// #docregion router-link
|
// #docregion router-link
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[routerLink]',
|
selector: '[routerLink]'
|
||||||
host: { '(click)': 'onClick()' }
|
|
||||||
})
|
})
|
||||||
export class RouterLinkDirectiveStub {
|
export class RouterLinkDirectiveStub {
|
||||||
@Input('routerLink') linkParams: any;
|
@Input('routerLink') linkParams: any;
|
||||||
navigatedTo: any = null;
|
navigatedTo: any = null;
|
||||||
|
|
||||||
|
@HostListener('click')
|
||||||
onClick() {
|
onClick() {
|
||||||
this.navigatedTo = this.linkParams;
|
this.navigatedTo = this.linkParams;
|
||||||
}
|
}
|
||||||
|
@ -23,15 +23,6 @@ module.exports = function(config) {
|
|||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
},
|
},
|
||||||
|
|
||||||
customLaunchers: {
|
|
||||||
// From the CLI. Not used here but interesting
|
|
||||||
// chrome setup for travis CI using chromium
|
|
||||||
Chrome_travis_ci: {
|
|
||||||
base: 'Chrome',
|
|
||||||
flags: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// System.js for module loading
|
// System.js for module loading
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
|
@ -23,15 +23,6 @@ module.exports = function(config) {
|
|||||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||||
},
|
},
|
||||||
|
|
||||||
customLaunchers: {
|
|
||||||
// From the CLI. Not used here but interesting
|
|
||||||
// chrome setup for travis CI using chromium
|
|
||||||
Chrome_travis_ci: {
|
|
||||||
base: 'Chrome',
|
|
||||||
flags: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
files: [
|
files: [
|
||||||
// System.js for module loading
|
// System.js for module loading
|
||||||
'node_modules/systemjs/dist/system.src.js',
|
'node_modules/systemjs/dist/system.src.js',
|
||||||
|
@ -81,7 +81,7 @@ Other JavaScript modules use *import statements* to access public objects from o
|
|||||||
|
|
||||||
<img src="generated/images/guide/architecture/library-module.png" alt="Component" class="left">
|
<img src="generated/images/guide/architecture/library-module.png" alt="Component" class="left">
|
||||||
|
|
||||||
Angular loads as a collection of JavaScript modules. You can think of them as library modules. Each Angular library name begins with the `@angular` prefix. Install them with the `npm` package manager and import parts of them with JavaScript `import` statements.
|
Angular loads as a collection of JavaScript modules. You can think of them as library modules. Each Angular library name begins with the `@angular` prefix. Install them with the node package manager `npm` and import parts of them with JavaScript `import` statements.
|
||||||
|
|
||||||
<br class="clear">
|
<br class="clear">
|
||||||
|
|
||||||
|
@ -372,6 +372,27 @@ Here are the features which may require additional polyfills:
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr style="vertical-align: top">
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
[Router](guide/router)
|
||||||
|
|
||||||
|
when using [hash-based routing](guide/router#appendix-locationstrategy-and-browser-url-styles)
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
[ES7/array](guide/browser-support#core-es7-array)
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
IE 11
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
@ -402,7 +423,7 @@ Below are the polyfills which are used to test the framework itself. They are a
|
|||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
<a id='core-es7-reflect' href="https://github.com/zloirock/core-js/blob/master/es7/reflect.js">ES7/reflect</a>
|
<a id='core-es7-reflect' href="https://github.com/zloirock/core-js/tree/v2/fn/reflect">ES7/reflect</a>
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
@ -416,6 +437,24 @@ Below are the polyfills which are used to test the framework itself. They are a
|
|||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
|
||||||
|
<a id='core-es7-array' href="https://github.com/zloirock/core-js/tree/v2/fn/array">ES7/array</a>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
MIT
|
||||||
|
</td>
|
||||||
|
|
||||||
|
<td>
|
||||||
|
0.1KB
|
||||||
|
</td>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
|
|
||||||
<td>
|
<td>
|
||||||
|
@ -54,7 +54,7 @@ The following sets content sets default values for the production build target:
|
|||||||
|
|
||||||
```
|
```
|
||||||
export const environment = {
|
export const environment = {
|
||||||
production: true
|
production: true,
|
||||||
apiUrl: 'http://my-prod-url'
|
apiUrl: 'http://my-prod-url'
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@ -235,31 +235,31 @@ Each budget entry is a JSON object with the following properties:
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>baseline</td>
|
<td>baseline</td>
|
||||||
<td>An absolute baseline size for percentage values. </td>
|
<td>The baseline size for comparison.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maximumWarning</td>
|
<td>maximumWarning</td>
|
||||||
<td>Warns when a size exceeds this threshold percentage of the baseline.</td>
|
<td>The maximum threshold for warning relative to the baseline.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>maximumError</td>
|
<td>maximumError</td>
|
||||||
<td>Reports an error when the size exceeds this threshold percentage of the baseline.</td>
|
<td>The maximum threshold for error relative to the baseline.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>minimumWarning</td>
|
<td>minimumWarning</td>
|
||||||
<td>Warns when the size reaches this threshold percentage of the baseline.</td>
|
<td>The minimum threshold for warning relative to the baseline.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>minimumError</td>
|
<td>minimumError</td>
|
||||||
<td>Reports an error when the size reaches this threshold percentage of the baseline.</td>
|
<td>The minimum threshold for error relative to the baseline.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>warning</td>
|
<td>warning</td>
|
||||||
<td>Warns when the size ??reaches or exceeds?? this threshold percentage of the baseline.</td>
|
<td>The threshold for warning relative to the baseline (min & max).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>error</td>
|
<td>error</td>
|
||||||
<td>Reports an error when the size ??reaches or exceeds?? this threshold percentage of the baseline.</td>
|
<td>The threshold for error relative to the baseline (min & max).</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
189
aio/content/guide/creating-libraries.md
Normal file
189
aio/content/guide/creating-libraries.md
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
# Creating Libraries
|
||||||
|
|
||||||
|
You can create and publish new libraries to extend Angular functionality. If you find that you need to solve the same problem in more than one app (or want to share your solution with other developers), you have a candidate for a library.
|
||||||
|
|
||||||
|
An simple example might be a button that sends users to your company website, that would be included in all apps that your company builds.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
Use the Angular CLI to generate a new library skeleton with the following command:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng generate library my-lib
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
This creates the `projects/my-lib` folder in your workspace, which contains a component and a service inside an NgModule.
|
||||||
|
The workspace configuration file, `angular.json`, is updated with a project of type 'library'.
|
||||||
|
|
||||||
|
<code-example format="json">
|
||||||
|
"projects": {
|
||||||
|
...
|
||||||
|
"my-lib": {
|
||||||
|
"root": "projects/my-lib",
|
||||||
|
"sourceRoot": "projects/my-lib/src",
|
||||||
|
"projectType": "library",
|
||||||
|
"prefix": "lib",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||||
|
...
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
You can build, test, and lint the project with CLI commands:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng build my-lib
|
||||||
|
ng test my-lib
|
||||||
|
ng lint my-lib
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
Notice that the configured builder for the project is different from the default builder for app projects.
|
||||||
|
This builder, among other things, ensures that the library is always built with the [AoT compiler](guide/aot-compiler), without the need to specify the `--prod` flag.
|
||||||
|
|
||||||
|
To make library code reusable you must define a public API for it. This "user layer" defines what is available to consumers of your library. A user of your library should be able to access public functionality (such as NgModules, service providers and general utility functions) through a single import path.
|
||||||
|
|
||||||
|
The public API for your library is maintained in the `index.ts` file of your library folder.
|
||||||
|
Anything exported from this file is made public when your library is imported into an application.
|
||||||
|
Use an NgModule to expose services and components.
|
||||||
|
|
||||||
|
Your library should supply documentation (typically a README file) for installation and maintenance.
|
||||||
|
|
||||||
|
## Refactoring parts of an app into a library
|
||||||
|
|
||||||
|
To make your solution reusable, you need to adjust it so that it does not depend on app-specific code.
|
||||||
|
Here are some things to consider in migrating application functionality to a library.
|
||||||
|
|
||||||
|
* Declarations such as components and pipes should be designed as stateless, meaning they don’t rely on or alter external variables. If you do rely on state, you need to evaluate every case and decide whether it is application state or state that the library would manage.
|
||||||
|
|
||||||
|
* Any observables that the components subscribe to internally should be cleaned up and disposed of during the lifecycle of those components.
|
||||||
|
|
||||||
|
* Components should expose their interactions through inputs for providing context, and outputs for communicating events to other components.
|
||||||
|
|
||||||
|
* Services should declare their own providers (rather than declaring providers in the NgModule or a component), so that they are *tree-shakable*. This allows the compiler to leave the service out of the bundle if it never gets injected into the application that imports the library. For more about this, see [Tree-shakable providers](guide/dependency-injection-providers#tree-shakable-providers).
|
||||||
|
|
||||||
|
* If you register global service providers or share providers across multiple NgModules, use the [`forRoot()` and `forChild()` patterns](guide/singleton-services) provided by the [RouterModule](api/router/RouterModule).
|
||||||
|
|
||||||
|
* Check all internal dependencies.
|
||||||
|
* For custom classes or interfaces used in components or service, check whether they depend on additional classes or interfaces that also need to be migrated.
|
||||||
|
* Similarly, if your library code depends on a service, that service needs to be migrated.
|
||||||
|
* If your library code or its templates depend on other libraries (such a Angular Material, for instance), you must configure your library with those dependencies.
|
||||||
|
|
||||||
|
## Reusable code and schematics
|
||||||
|
|
||||||
|
A library typically includes *reusable code* that defines components, services, and other Angular artifacts (pipes, directives, and so on) that you simply import into a project.
|
||||||
|
A library is packaged into an npm package for publishing and sharing, and this package can also include [schematics](guide/glossary#schematic) that provide instructions for generating or transforming code directly in your project, in the same way that the CLI creates a generic skeleton app with `ng generate component`.
|
||||||
|
A schematic that is combined with a library can, for example, provide the Angular CLI with the information it needs to generate a particular component defined in that library.
|
||||||
|
|
||||||
|
What you include in your library is determined by the kind of task you are trying to accomplish.
|
||||||
|
For example, if you want a dropdown with some canned data to show how to add it to your app, your library could define a schematic to create it.
|
||||||
|
For a component like a dropdown that would contain different passed-in values each time, you could provide it as a component in a shared library.
|
||||||
|
|
||||||
|
Suppose you want to read a configuration file and then generate a form based on that configuration.
|
||||||
|
If that form will need additional customization by the user, it might work best as a schematic.
|
||||||
|
However, if the forms will always be the same and not need much customization by developers, then you could create a dynamic component that takes the configuration and generates the form.
|
||||||
|
In general, the more complex the customization, the more useful the schematic approach.
|
||||||
|
|
||||||
|
## Integrating with the CLI
|
||||||
|
|
||||||
|
A library can include [schematics](guide/glossary#schematic) that allow it to integrate with the Angular CLI.
|
||||||
|
|
||||||
|
* Include an installation schematic so that `ng add` can add your library to a project.
|
||||||
|
|
||||||
|
* Include generation schematics in your library so that `ng generate` can scaffold your defined artifacts (components, services, tests, and so on) in a project.
|
||||||
|
|
||||||
|
* Include an update schematic so that `ng update` can update your library’s dependencies and provide migrations for breaking changes in new releases.
|
||||||
|
|
||||||
|
To learn more, see [Schematics — An Introduction](https://blog.angular.io/schematics-an-introduction-dc1dfbc2a2b2).
|
||||||
|
|
||||||
|
## Publishing your library
|
||||||
|
|
||||||
|
Use the Angular CLI and the npm package manager to build and publish your library as an npm package.
|
||||||
|
Libraries are built in [AoT mode](guide/aot-compiler) by default, so you do not need to specify the `-prod` flag when building for publication.
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng build my-lib
|
||||||
|
cd dist/my-lib
|
||||||
|
npm publish
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
If you've never published a package in npm before, you must create a user account. Read more in [Publishing npm Packages](https://docs.npmjs.com/getting-started/publishing-npm-packages).
|
||||||
|
|
||||||
|
## Linked libraries
|
||||||
|
|
||||||
|
While working on a published library, you can use [npm link](https://docs.npmjs.com/cli/link) to avoid reinstalling the library on every build.
|
||||||
|
|
||||||
|
The library must be rebuilt on every change.
|
||||||
|
When linking a library, make sure that the build step runs in watch mode, and that the library's `package.json` configuration points at the correct entry points.
|
||||||
|
For example, `main` should point at a JavaScript file, not a TypeScript file.
|
||||||
|
|
||||||
|
## Use TypeScript path mapping for peer dependencies
|
||||||
|
|
||||||
|
Angular libraries should list all `@angular/*` dependencies as peer dependencies.
|
||||||
|
This insures that when modules ask for Angular, they all get the exact same module.
|
||||||
|
If a library lists `@angular/core` in `dependencies` instead of `peerDependencies`, it might get a different Angular module instead, which would cause your application to break.
|
||||||
|
|
||||||
|
While developing a library, you must install all peer dependencies through `devDependencies` to ensure that the library compiles properly.
|
||||||
|
A linked library will then have its own set of Angular libraries that it uses for building, located in its `node_modules` folder.
|
||||||
|
However, this can cause problems while building or running your application.
|
||||||
|
|
||||||
|
To get around this problem you can use TypeScript path mapping to tell TypeScript that it should load some modules from a specific location.
|
||||||
|
List all the peer dependencies that your library uses in the TypeScript configuration file `./tsconfig.json`, and point them at the local copy in the app's `node_modules` folder.
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
// ...
|
||||||
|
// paths are relative to `baseUrl` path.
|
||||||
|
"paths": {
|
||||||
|
"@angular/*": [
|
||||||
|
"../node_modules/@angular/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
This mapping ensures that your library always loads the local copies of the modules it needs.
|
||||||
|
|
||||||
|
## Using your own library in apps
|
||||||
|
|
||||||
|
You don't have to publish your library to the npm package manager in order to use it in your own apps, but you do have to build it first.
|
||||||
|
|
||||||
|
To use your own library in an app:
|
||||||
|
|
||||||
|
* Build the library. You cannot use a library before it is built.
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng build my-lib
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
* In your apps, import from the library by name:
|
||||||
|
```
|
||||||
|
import { my-export } from 'my-lib';
|
||||||
|
```
|
||||||
|
|
||||||
|
### Building and rebuilding your library
|
||||||
|
|
||||||
|
The build step is important if you haven't published your library as an npm package and then installed the package back into your app from npm.
|
||||||
|
For instance, if you clone your git repository and run `npm install`, your editor will show the `my-lib` imports as missing if you haven't yet built your library.
|
||||||
|
|
||||||
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
|
When you import something from a library in an Angular app, Angular looks for a mapping between the library name and a location on disk.
|
||||||
|
When you install a library package, the mapping is in the `node_modules` folder. When you build your own library, it has to find the mapping in your `tsconfig` paths.
|
||||||
|
|
||||||
|
Generating a library with the Angular CLI automatically adds its path to the `tsconfig` file.
|
||||||
|
The Angular CLI uses the `tsconfig` paths to tell the build system where to find the library.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
If you find that changes to your library are not reflected in your app, your app is probably using an old build of the library.
|
||||||
|
|
||||||
|
You can rebuild your library whenever you make changes to it, but this extra step takes time.
|
||||||
|
*Incremental builds* functionality improves the library-development experience.
|
||||||
|
Every time a file is changed a partial build is performed that emits the amended files.
|
||||||
|
|
||||||
|
Incremental builds can be run as a backround process in your dev environment. To take advantage of this feature add the `--watch` flag to the build command:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
ng build my-lib --watch
|
||||||
|
</code-example>
|
@ -162,7 +162,7 @@ Here's the revised component, making use of the injected service, side-by-side w
|
|||||||
</code-pane>
|
</code-pane>
|
||||||
</code-tabs>
|
</code-tabs>
|
||||||
|
|
||||||
`HeroService` must provided in some parent injector. The code in `HeroListComponent` doesn't depend on where `HeroService` comes from.
|
`HeroService` must be provided in some parent injector. The code in `HeroListComponent` doesn't depend on where `HeroService` comes from.
|
||||||
If you decided to provide `HeroService` in `AppModule`, `HeroListComponent` wouldn't change.
|
If you decided to provide `HeroService` in `AppModule`, `HeroListComponent` wouldn't change.
|
||||||
|
|
||||||
{@a singleton-services}
|
{@a singleton-services}
|
||||||
|
@ -35,7 +35,7 @@ Make a note of the user name and project name in GitHub.
|
|||||||
|
|
||||||
1. Build your project using Github project name, with the Angular CLI command [`ng build`](cli/build) and the options shown here:
|
1. Build your project using Github project name, with the Angular CLI command [`ng build`](cli/build) and the options shown here:
|
||||||
<code-example language="none" class="code-shell">
|
<code-example language="none" class="code-shell">
|
||||||
ng build --prod --output-path docs --base-href <project_name>
|
ng build --prod --output-path docs --base-href /<project_name>/
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
1. When the build is complete, make a copy of `docs/index.html` and name it `docs/404.html`.
|
1. When the build is complete, make a copy of `docs/index.html` and name it `docs/404.html`.
|
||||||
@ -46,9 +46,9 @@ Make a note of the user name and project name in GitHub.
|
|||||||
|
|
||||||
You can see your deployed page at `https://<user_name>.github.io/<project_name>/`.
|
You can see your deployed page at `https://<user_name>.github.io/<project_name>/`.
|
||||||
|
|
||||||
<div class="alert is-helpful>
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
Check out [angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages), a full featured package that does all this for you and has extra functionality.
|
Check out [angular-cli-ghpages](https://github.com/angular-buch/angular-cli-ghpages), a full featured package that does all this for you and has extra functionality.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
_Angular elements_ are Angular components packaged as _custom elements_, a web standard for defining new HTML elements in a framework-agnostic way.
|
_Angular elements_ are Angular components packaged as _custom elements_, a web standard for defining new HTML elements in a framework-agnostic way.
|
||||||
|
|
||||||
[Custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) are a Web Platform feature currently supported by Chrome, Opera, and Safari, and available in other browsers through polyfills (see [Browser Support](#browser-support)).
|
[Custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) are a Web Platform feature currently supported by Chrome, Firefox, Opera, and Safari, and available in other browsers through polyfills (see [Browser Support](#browser-support)).
|
||||||
A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code.
|
A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code.
|
||||||
The browser maintains a `CustomElementRegistry` of defined custom elements (also called Web Components), which maps an instantiable JavaScript class to an HTML tag.
|
The browser maintains a `CustomElementRegistry` of defined custom elements (also called Web Components), which maps an instantiable JavaScript class to an HTML tag.
|
||||||
|
|
||||||
|
@ -126,6 +126,12 @@ The following decorators can declare Angular class types:
|
|||||||
|
|
||||||
A [decorator](guide/glossary#decorator) statement immediately before a field in a class definition that declares the type of that field. Some examples are `@Input` and `@Output`.
|
A [decorator](guide/glossary#decorator) statement immediately before a field in a class definition that declares the type of that field. Some examples are `@Input` and `@Output`.
|
||||||
|
|
||||||
|
{@a collection}
|
||||||
|
|
||||||
|
## collection
|
||||||
|
|
||||||
|
In Angular, a set of related [schematics](#schematic) collected in an [npm package](#npm-package).
|
||||||
|
|
||||||
{@a cli}
|
{@a cli}
|
||||||
|
|
||||||
## command-line interface (CLI)
|
## command-line interface (CLI)
|
||||||
@ -135,6 +141,8 @@ The [Angular CLI](cli) is a command-line tool for managing the Angular developme
|
|||||||
* To begin using the CLI for a new project, see [Getting Started](guide/quickstart).
|
* To begin using the CLI for a new project, see [Getting Started](guide/quickstart).
|
||||||
* To learn more about the full capabilities of the CLI, see the [CLI command reference](cli).
|
* To learn more about the full capabilities of the CLI, see the [CLI command reference](cli).
|
||||||
|
|
||||||
|
See also [Schematics CLI](#schematics-cli).
|
||||||
|
|
||||||
{@a component}
|
{@a component}
|
||||||
|
|
||||||
## component
|
## component
|
||||||
@ -204,7 +212,6 @@ Don't declare the following:
|
|||||||
|
|
||||||
{@a decoration}
|
{@a decoration}
|
||||||
|
|
||||||
|
|
||||||
## decorator | decoration
|
## decorator | decoration
|
||||||
|
|
||||||
A function that modifies a class or property definition. Decorators (also called *annotations*) are an experimental (stage 2) [JavaScript language feature](https://github.com/wycats/javascript-decorators).
|
A function that modifies a class or property definition. Decorators (also called *annotations*) are an experimental (stage 2) [JavaScript language feature](https://github.com/wycats/javascript-decorators).
|
||||||
@ -270,6 +277,7 @@ A technique for adding a component to the DOM at run time. Requires that you exc
|
|||||||
|
|
||||||
See also [custom element](guide/glossary#custom-element), which provides an easier path with the same result.
|
See also [custom element](guide/glossary#custom-element), which provides an easier path with the same result.
|
||||||
|
|
||||||
|
|
||||||
{@a E}
|
{@a E}
|
||||||
|
|
||||||
{@a eager-loading}
|
{@a eager-loading}
|
||||||
@ -455,9 +463,11 @@ Similarly, you can build custom elements that can be loaded into an Angular app
|
|||||||
In Angular, a [project](guide/glossary#project) that provides functionality that can be included in other Angular apps.
|
In Angular, a [project](guide/glossary#project) that provides functionality that can be included in other Angular apps.
|
||||||
A library isn't a complete Angular app and can't run independently.
|
A library isn't a complete Angular app and can't run independently.
|
||||||
|
|
||||||
* Library developers can use the [CLI](guide/glossary#cli) to `generate` scaffolding for a new library in an existing [workspace](guide/glossary#workspace), and can publish a library as an `npm` package.
|
* Library developers can use the [Angular CLI](guide/glossary#cli) to `generate` scaffolding for a new library in an existing [workspace](guide/glossary#workspace), and can publish a library as an `npm` package.
|
||||||
|
|
||||||
* App developers can use the [CLI](guide/glossary#cli) to `add` a published library for use with an app in the same [workspace](guide/glossary#workspace).
|
* Application developers can use the [Angular CLI](guide/glossary#cli) to `add` a published library for use with an application in the same [workspace](guide/glossary#workspace).
|
||||||
|
|
||||||
|
See also [schematic](#schematic).
|
||||||
|
|
||||||
{@a lifecycle-hook}
|
{@a lifecycle-hook}
|
||||||
|
|
||||||
@ -644,6 +654,10 @@ An Angular [component](guide/glossary#component) with a `RouterOutlet` directive
|
|||||||
|
|
||||||
For more information, see [Routing and Navigation](guide/router).
|
For more information, see [Routing and Navigation](guide/router).
|
||||||
|
|
||||||
|
{@a rule}
|
||||||
|
|
||||||
|
In [schematics](#schematic), a function that operates on a [file tree](#file-tree) to create, delete, or modify files in a specific manner, and returns a new `Tree` object.
|
||||||
|
|
||||||
|
|
||||||
{@a S}
|
{@a S}
|
||||||
|
|
||||||
@ -652,12 +666,27 @@ For more information, see [Routing and Navigation](guide/router).
|
|||||||
## schematic
|
## schematic
|
||||||
|
|
||||||
A scaffolding library that defines how to generate or transform a programming project by creating, modifying, refactoring, or moving files and code.
|
A scaffolding library that defines how to generate or transform a programming project by creating, modifying, refactoring, or moving files and code.
|
||||||
The Angular [CLI](guide/glossary#cli) uses schematics to generate and modify [Angular projects](guide/glossary#project) and parts of projects.
|
A schematic defines [rules](#rule) that operate on a virtual file system called a [tree](#file-tree).
|
||||||
|
The [Angular CLI](guide/glossary#cli) uses schematics to generate and modify [Angular projects](guide/glossary#project) and parts of projects.
|
||||||
|
|
||||||
* Angular provides a set of schematics for use with the CLI. See the [Angular CLI command reference](cli). The [`ng add`](cli/add) command runs schematics as part of adding a library to your project. The [`ng generate`](cli/generate) command runs schematics to create apps, libraries, and Angular code constructs.
|
* Angular provides a set of schematics for use with the CLI. See the [Angular CLI command reference](cli). The [`ng add`](cli/add) command runs schematics as part of adding a library to your project. The [`ng generate`](cli/generate) command runs schematics to create apps, libraries, and Angular code constructs.
|
||||||
|
|
||||||
* Library developers can create schematics that enable the CLI to generate their published libraries.
|
* [Library](#library) developers can use the [Schematics CLI](#schematics-cli) to create schematics that enable the Angular CLI to add and update their published libraries, and to generate artifacts the library defines.
|
||||||
For more information, see [devkit documentation](https://www.npmjs.com/package/@angular-devkit/schematics).
|
|
||||||
|
For more information, see [devkit documentation](https://www.npmjs.com/package/@angular-devkit/schematics).
|
||||||
|
|
||||||
|
{@a schematics-cli}
|
||||||
|
|
||||||
|
## Schematics CLI
|
||||||
|
|
||||||
|
Schematics come with their own command-line tool.
|
||||||
|
Using Node 6.9 or above, install the Schematics CLI globally:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
npm install -g @angular-devkit/schematics-cli
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
This installs the `schematics` executable, which you can use to create a new project, add a new schematic to an existing project, or extend an existing schematic.
|
||||||
|
|
||||||
{@a scoped-package}
|
{@a scoped-package}
|
||||||
|
|
||||||
@ -759,6 +788,12 @@ An opaque identifier used for efficient table lookup. In Angular, a [DI token](g
|
|||||||
|
|
||||||
The translation process that transforms one version of JavaScript to another version; for example, down-leveling ES2015 to the older ES5 version.
|
The translation process that transforms one version of JavaScript to another version; for example, down-leveling ES2015 to the older ES5 version.
|
||||||
|
|
||||||
|
{@a file-tree}
|
||||||
|
|
||||||
|
## tree
|
||||||
|
|
||||||
|
In [schematics](#schematic), a virtual file system represented by the `Tree` class.
|
||||||
|
Schematic [rules](#rule) take a tree object as input, operate on them, and return a new tree object.
|
||||||
|
|
||||||
{@a typescript}
|
{@a typescript}
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# Hierarchical Dependency Injectors
|
# Hierarchical Dependency Injectors
|
||||||
|
|
||||||
The Angular dependency injection system is _hierarchical_.
|
The Angular dependency injection system is _hierarchical_.
|
||||||
There is a tree of injectors that parallel an app's component tree.
|
There is a tree of injectors that parallels an app's component tree.
|
||||||
You can reconfigure the injectors at any level of that component tree.
|
You can reconfigure the injectors at any level of that component tree.
|
||||||
|
|
||||||
This guide explores this system and how to use it to your advantage.
|
This guide explores this system and how to use it to your advantage.
|
||||||
|
30
aio/content/guide/libraries.md
Normal file
30
aio/content/guide/libraries.md
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
# Overview of Angular Libraries
|
||||||
|
|
||||||
|
Many applications need to solve the same general problems, such as presenting a unified user interface, presenting data, and allowing data entry.
|
||||||
|
Developers can create general solutions for particular domains that can be adapted for re-use in different apps.
|
||||||
|
Such a solution can be built as Angular *libraries* and these libraries can be published and shared as *npm packages*.
|
||||||
|
|
||||||
|
An Angular library is an Angular [project](guide/glossary#project) that differs from an app in that it cannot run on its own.
|
||||||
|
A library must be imported and used in an app.
|
||||||
|
|
||||||
|
Libraries extend Angular's base functionality. For example, to add [reactive forms](guide/reactive-forms) to an app, add the library package using `ng add @angular/forms`, then import the `ReactiveFormsModule` from the `@angular/forms` library in your application code.
|
||||||
|
Similarly, adding the [service worker](guide/service-worker-intro) library to an Angular application is one of the steps for turning an application into a [Progressive Web App](https://developers.google.com/web/progressive-web-apps/) (PWA).
|
||||||
|
[Angular Material](https://material.angular.io/) is an example of a large, general-purpose library that provides sophisticated, reusable, and adaptable UI components.
|
||||||
|
|
||||||
|
Any app developer can use these and other libraries that have been published as npm packages by the Angular team or by third parties. See [Using Published Libraries](guide/using-libraries).
|
||||||
|
|
||||||
|
## Creating libraries
|
||||||
|
|
||||||
|
If you have developed functionality that is suitable for reuse, you can create your own libraries.
|
||||||
|
These libraries can be used locally in your workspace, or you can publish them as [npm packages](guide/npm-packages) to share with other projects or other Angular developers.
|
||||||
|
These packages can be published to the npm registry, a private npm Enterprise registry, or a private package management system that supports npm packages.
|
||||||
|
See [Creating Libraries](guide/creating-libraries).
|
||||||
|
|
||||||
|
Whether you decide to package functionality as a library is an architectural decision, similar to deciding whether a piece of functionality is a component or a service, or deciding on the scope of a component.
|
||||||
|
|
||||||
|
Packaging functionality as a library forces the artifacts in the library to be decoupled from the application's business logic.
|
||||||
|
This can help to avoid various bad practices or architecture mistakes that can make it difficult to decouple and reuse code in the future.
|
||||||
|
|
||||||
|
Putting code into a separate library is more complex than simply putting everything in one app.
|
||||||
|
It requires more of an investment in time and thought for managing, maintaining, and updating the library.
|
||||||
|
This complexity can pay off, however, when the library is being used in multiple apps.
|
@ -95,7 +95,7 @@ if your components have `[(ngModel)]` two-way binding expressions.
|
|||||||
Import _shared_ and _feature_ modules when this module's components incorporate their
|
Import _shared_ and _feature_ modules when this module's components incorporate their
|
||||||
components, directives, and pipes.
|
components, directives, and pipes.
|
||||||
|
|
||||||
Import only [BrowserModule](guide/ngmodule-faq#q-browser-vs-common-module) in the root `AppModule`.
|
Import [BrowserModule](guide/ngmodule-faq#q-browser-vs-common-module) only in the root `AppModule`.
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
@ -340,11 +340,11 @@ code with checkbox switches and additional displays to help you experience these
|
|||||||
|
|
||||||
|
|
||||||
Replacing the array is an efficient way to signal Angular to update the display.
|
Replacing the array is an efficient way to signal Angular to update the display.
|
||||||
When do you replace the array? When the data change.
|
When do you replace the array? When the data changes.
|
||||||
That's an easy rule to follow in *this* example
|
That's an easy rule to follow in *this* example
|
||||||
where the only way to change the data is by adding a hero.
|
where the only way to change the data is by adding a hero.
|
||||||
|
|
||||||
More often, you don't know when the data have changed,
|
More often, you don't know when the data has changed,
|
||||||
especially in applications that mutate data in many ways,
|
especially in applications that mutate data in many ways,
|
||||||
perhaps in application locations far away.
|
perhaps in application locations far away.
|
||||||
A component in such an application usually can't know about those changes.
|
A component in such an application usually can't know about those changes.
|
||||||
@ -495,7 +495,7 @@ Write one more impure pipe, a pipe that makes an HTTP request.
|
|||||||
Remember that impure pipes are called every few milliseconds.
|
Remember that impure pipes are called every few milliseconds.
|
||||||
If you're not careful, this pipe will punish the server with requests.
|
If you're not careful, this pipe will punish the server with requests.
|
||||||
|
|
||||||
In the following code, the pipe only calls the server when the request URL changes and it caches the server response.
|
In the following code, the pipe only calls the server when the requested URL changes and it caches the server response.
|
||||||
The code uses the [Angular http](guide/http) client to retrieve data:
|
The code uses the [Angular http](guide/http) client to retrieve data:
|
||||||
|
|
||||||
|
|
||||||
|
@ -1304,7 +1304,7 @@ Create an `AppRouting` module in the `/app` folder to contain the routing config
|
|||||||
ng generate module app-routing --module app --flat
|
ng generate module app-routing --module app --flat
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
Import the `CrisisListComponent`, `HeroListComponent`, and `PageNotFoundCompponent` symbols
|
Import the `CrisisListComponent`, `HeroListComponent`, and `PageNotFoundComponent` symbols
|
||||||
just like you did in the `app.module.ts`. Then move the `Router` imports
|
just like you did in the `app.module.ts`. Then move the `Router` imports
|
||||||
and routing configuration, including `RouterModule.forRoot`, into this routing module.
|
and routing configuration, including `RouterModule.forRoot`, into this routing module.
|
||||||
|
|
||||||
@ -3392,10 +3392,10 @@ The admin feature is now protected by the guard, albeit protected poorly.
|
|||||||
|
|
||||||
Make the `AuthGuard` at least pretend to authenticate.
|
Make the `AuthGuard` at least pretend to authenticate.
|
||||||
|
|
||||||
The `AuthGuard` should call an application service that can login a user and retain information about the current user. Generate a new `AuthService` in the `admin` folder:
|
The `AuthGuard` should call an application service that can login a user and retain information about the current user. Generate a new `AuthService` in the `auth` folder:
|
||||||
|
|
||||||
<code-example language="none" class="code-shell">
|
<code-example language="none" class="code-shell">
|
||||||
ng generate service admin/auth
|
ng generate service auth/auth
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
Update the `AuthService` to log in the user:
|
Update the `AuthService` to log in the user:
|
||||||
|
@ -53,7 +53,7 @@ RxJS provides many operators, but only a handful are used frequently. For a list
|
|||||||
|
|
||||||
| Area | Operators |
|
| Area | Operators |
|
||||||
| :------------| :----------|
|
| :------------| :----------|
|
||||||
| Creation | `from`, `fromPromise`,`fromEvent`, `of` |
|
| Creation | `from`,`fromEvent`, `of` |
|
||||||
| Combination | `combineLatest`, `concat`, `merge`, `startWith` , `withLatestFrom`, `zip` |
|
| Combination | `combineLatest`, `concat`, `merge`, `startWith` , `withLatestFrom`, `zip` |
|
||||||
| Filtering | `debounceTime`, `distinctUntilChanged`, `filter`, `take`, `takeUntil` |
|
| Filtering | `debounceTime`, `distinctUntilChanged`, `filter`, `take`, `takeUntil` |
|
||||||
| Transformation | `bufferTime`, `concatMap`, `map`, `mergeMap`, `scan`, `switchMap` |
|
| Transformation | `bufferTime`, `concatMap`, `map`, `mergeMap`, `scan`, `switchMap` |
|
||||||
|
@ -35,11 +35,23 @@ It's possible to ask the service worker to check if any updates have been deploy
|
|||||||
|
|
||||||
Do this with the `checkForUpdate()` method:
|
Do this with the `checkForUpdate()` method:
|
||||||
|
|
||||||
<code-example path="service-worker-getting-started/src/app/check-for-update.service.ts" linenums="false" header="check-for-update.service.ts" region="sw-check-update"> </code-example>
|
<code-example path="service-worker-getting-started/src/app/check-for-update.service.ts" linenums="false" header="check-for-update.service.ts"> </code-example>
|
||||||
|
|
||||||
|
|
||||||
This method returns a `Promise` which indicates that the update check has completed successfully, though it does not indicate whether an update was discovered as a result of the check. Even if one is found, the service worker must still successfully download the changed files, which can fail. If successful, the `available` event will indicate availability of a new version of the app.
|
This method returns a `Promise` which indicates that the update check has completed successfully, though it does not indicate whether an update was discovered as a result of the check. Even if one is found, the service worker must still successfully download the changed files, which can fail. If successful, the `available` event will indicate availability of a new version of the app.
|
||||||
|
|
||||||
|
<div class="alert is-important">
|
||||||
|
|
||||||
|
In order to avoid negatively affecting the initial rendering, `ServiceWorkerModule` will by default
|
||||||
|
wait for the app to stabilize, before registering the ServiceWorker script. Constantly polling for
|
||||||
|
updates, e.g. with `interval()`, will prevent the app from stabilizing and the ServiceWorker
|
||||||
|
script will never be registered with the browser.
|
||||||
|
|
||||||
|
You can avoid that by waiting for the app to stabilize first, before starting to poll for updates
|
||||||
|
(as shown in the example above).
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
### Forcing update activation
|
### Forcing update activation
|
||||||
|
|
||||||
If the current tab needs to be updated to the latest app version immediately, it can ask to do so with the `activateUpdate()` method:
|
If the current tab needs to be updated to the latest app version immediately, it can ask to do so with the `activateUpdate()` method:
|
||||||
|
@ -90,6 +90,8 @@ The `installMode` determines how these resources are initially cached. The `inst
|
|||||||
|
|
||||||
* `lazy` does not cache any of the resources up front. Instead, the Angular service worker only caches resources for which it receives requests. This is an on-demand caching mode. Resources that are never requested will not be cached. This is useful for things like images at different resolutions, so the service worker only caches the correct assets for the particular screen and orientation.
|
* `lazy` does not cache any of the resources up front. Instead, the Angular service worker only caches resources for which it receives requests. This is an on-demand caching mode. Resources that are never requested will not be cached. This is useful for things like images at different resolutions, so the service worker only caches the correct assets for the particular screen and orientation.
|
||||||
|
|
||||||
|
Defaults to `prefetch`.
|
||||||
|
|
||||||
### `updateMode`
|
### `updateMode`
|
||||||
|
|
||||||
For resources already in the cache, the `updateMode` determines the caching behavior when a new version of the app is discovered. Any resources in the group that have changed since the previous version are updated in accordance with `updateMode`.
|
For resources already in the cache, the `updateMode` determines the caching behavior when a new version of the app is discovered. Any resources in the group that have changed since the previous version are updated in accordance with `updateMode`.
|
||||||
@ -98,6 +100,8 @@ For resources already in the cache, the `updateMode` determines the caching beha
|
|||||||
|
|
||||||
* `lazy` tells the service worker to not cache those resources. Instead, it treats them as unrequested and waits until they're requested again before updating them. An `updateMode` of `lazy` is only valid if the `installMode` is also `lazy`.
|
* `lazy` tells the service worker to not cache those resources. Instead, it treats them as unrequested and waits until they're requested again before updating them. An `updateMode` of `lazy` is only valid if the `installMode` is also `lazy`.
|
||||||
|
|
||||||
|
Defaults to the value `installMode` is set to.
|
||||||
|
|
||||||
### `resources`
|
### `resources`
|
||||||
|
|
||||||
This section describes the resources to cache, broken up into three groups.
|
This section describes the resources to cache, broken up into three groups.
|
||||||
@ -141,7 +145,7 @@ Occasionally APIs change formats in a way that is not backward-compatible. A new
|
|||||||
|
|
||||||
`version` provides a mechanism to indicate that the resources being cached have been updated in a backwards-incompatible way, and that the old cache entries—those from previous versions—should be discarded.
|
`version` provides a mechanism to indicate that the resources being cached have been updated in a backwards-incompatible way, and that the old cache entries—those from previous versions—should be discarded.
|
||||||
|
|
||||||
`version` is an integer field and defaults to `0`.
|
`version` is an integer field and defaults to `1`.
|
||||||
|
|
||||||
### `cacheConfig`
|
### `cacheConfig`
|
||||||
This section defines the policy by which matching requests will be cached.
|
This section defines the policy by which matching requests will be cached.
|
||||||
|
@ -94,6 +94,16 @@ Notice that all of the files the browser needs to render this application are ca
|
|||||||
* `favicon.ico`.
|
* `favicon.ico`.
|
||||||
* Build artifacts (JS and CSS bundles).
|
* Build artifacts (JS and CSS bundles).
|
||||||
* Anything under `assets`.
|
* Anything under `assets`.
|
||||||
|
* Images and fonts directly under the configured `outputPath` (by default `./dist/<project-name>/`) or `resourcesOutputPath`. See [`ng build`](cli/build) for more information about these options.
|
||||||
|
|
||||||
|
|
||||||
|
<div class="alert is-helpful">
|
||||||
|
Pay attention to two key points:
|
||||||
|
|
||||||
|
1. The generated `ngsw-config.json` includes a limited list of cachable fonts and images extentions. In some cases, you might want to modify the glob pattern to suit your needs.
|
||||||
|
|
||||||
|
1. If `resourcesOutputPath` or `assets` paths are modified after the generation of configuration file, you need to change the paths manually in `ngsw-config.json`.
|
||||||
|
</div>
|
||||||
|
|
||||||
### Making changes to your application
|
### Making changes to your application
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ There are two ways to make a service a singleton in Angular:
|
|||||||
* Declare that the service should be provided in the application root.
|
* Declare that the service should be provided in the application root.
|
||||||
* Include the service in the `AppModule` or in a module that is only imported by the `AppModule`.
|
* Include the service in the `AppModule` or in a module that is only imported by the `AppModule`.
|
||||||
|
|
||||||
Beginning with Angular 6.0, the preferred way to create a singleton services is to specify on the service that it should be provided in the application root. This is done by setting `providedIn` to `root` on the service's `@Injectable` decorator:
|
Beginning with Angular 6.0, the preferred way to create a singleton service is to specify on the service that it should be provided in the application root. This is done by setting `providedIn` to `root` on the service's `@Injectable` decorator:
|
||||||
|
|
||||||
<code-example path="providers/src/app/user.service.0.ts" header="src/app/user.service.0.ts" linenums="false"> </code-example>
|
<code-example path="providers/src/app/user.service.0.ts" header="src/app/user.service.0.ts" linenums="false"> </code-example>
|
||||||
|
|
||||||
|
@ -42,31 +42,46 @@ Begin with the first form of data binding—interpolation—to see how m
|
|||||||
|
|
||||||
{@a interpolation}
|
{@a interpolation}
|
||||||
|
|
||||||
## Interpolation ( <span class="syntax">{{...}}</span> )
|
## Interpolation and Template Expressions
|
||||||
|
|
||||||
You met the double-curly braces of interpolation, `{{` and `}}`, early in your Angular education.
|
Interpolation allows you to incorporate calculated strings into the text
|
||||||
|
between HTML element tags and within attribute assignments. Template
|
||||||
|
expressions are what you use to calculate those strings.
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="first-interpolation" header="src/app/app.component.html" linenums="false">
|
The interpolation <live-example></live-example> demonstrates all of
|
||||||
|
the syntax and code snippets described in this section.
|
||||||
|
|
||||||
|
### Interpolation `{{...}}`
|
||||||
|
|
||||||
|
Interpolation refers to embedding expressions into marked up text.
|
||||||
|
By default, interpolation uses as its delimiter the double curly braces, `{{` and `}}`.
|
||||||
|
|
||||||
|
In the following snippet, `{{ currentCustomer }}` is an example of interpolation.
|
||||||
|
|
||||||
|
<code-example path="interpolation/src/app/app.component.html" region="interpolation-example1" header="src/app/app.component.html" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
You use interpolation to weave calculated strings into the text between HTML element tags and within attribute assignments.
|
The text between the braces is often the name of a component
|
||||||
|
property. Angular replaces that name with the
|
||||||
|
string value of the corresponding component property.
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="title+image" header="src/app/app.component.html" linenums="false">
|
<code-example path="interpolation/src/app/app.component.html" region="component-property" header="src/app/app.component.html" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
The text between the braces is often the name of a component property. Angular replaces that name with the
|
In the example above, Angular evaluates the `title` and `itemImageUrl` properties
|
||||||
string value of the corresponding component property. In the example above, Angular evaluates the `title` and `heroImageUrl` properties
|
and fills in the blanks, first displaying some title text and then an image.
|
||||||
and "fills in the blanks", first displaying a bold application title and then a heroic image.
|
|
||||||
|
|
||||||
More generally, the text between the braces is a **template expression** that Angular first **evaluates**
|
More generally, the text between the braces is a **template expression**
|
||||||
and then **converts to a string**. The following interpolation illustrates the point by adding the two numbers:
|
that Angular first **evaluates** and then **converts to a string**.
|
||||||
|
The following interpolation illustrates the point by adding two numbers:
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="sum-1" header="src/app/app.component.html" linenums="false">
|
<code-example path="interpolation/src/app/app.component.html" region="convert-string" header="src/app/app.component.html" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
The expression can invoke methods of the host component such as `getVal()`, seen here:
|
The expression can invoke methods of the host component such as `getVal()` in
|
||||||
|
the following example:
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="sum-2" header="src/app/app.component.html" linenums="false">
|
<code-example path="interpolation/src/app/app.component.html" region="invoke-method" header="src/app/app.component.html" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
Angular evaluates all expressions in double curly braces,
|
Angular evaluates all expressions in double curly braces,
|
||||||
@ -74,60 +89,67 @@ converts the expression results to strings, and links them with neighboring lite
|
|||||||
it assigns this composite interpolated result to an **element or directive property**.
|
it assigns this composite interpolated result to an **element or directive property**.
|
||||||
|
|
||||||
You appear to be inserting the result between element tags and assigning it to attributes.
|
You appear to be inserting the result between element tags and assigning it to attributes.
|
||||||
It's convenient to think so, and you rarely suffer for this mistake.
|
|
||||||
Though this is not exactly true. Interpolation is a special syntax that Angular converts into a
|
|
||||||
[property binding](guide/template-syntax#property-binding), as is explained [below](guide/template-syntax#property-binding-or-interpolation).
|
|
||||||
|
|
||||||
But first, let's take a closer look at template expressions and statements.
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
|
However, interpolation is a special syntax that Angular converts into a
|
||||||
|
property binding.
|
||||||
|
|
||||||
|
If you'd like to use something other than `{{` and `}}`, you can
|
||||||
|
configure the interpolation delimiter via the
|
||||||
|
[interpolation](api/core/Component#interpolation)
|
||||||
|
option in the `Component` metadata.
|
||||||
|
|
||||||
<hr/>
|
</div>
|
||||||
|
|
||||||
{@a template-expressions}
|
### Template expressions
|
||||||
|
|
||||||
## Template expressions
|
A template **expression** produces a value and appears within the double
|
||||||
|
curly braces, `{{ }}`.
|
||||||
A template **expression** produces a value.
|
|
||||||
Angular executes the expression and assigns it to a property of a binding target;
|
Angular executes the expression and assigns it to a property of a binding target;
|
||||||
the target might be an HTML element, a component, or a directive.
|
the target could be an HTML element, a component, or a directive.
|
||||||
|
|
||||||
The interpolation braces in `{{1 + 1}}` surround the template expression `1 + 1`.
|
The interpolation braces in `{{1 + 1}}` surround the template expression `1 + 1`.
|
||||||
In the [property binding](guide/template-syntax#property-binding) section below,
|
In the property binding,
|
||||||
a template expression appears in quotes to the right of the `=` symbol as in `[property]="expression"`.
|
a template expression appears in quotes to the right of the `=` symbol as in `[property]="expression"`.
|
||||||
|
|
||||||
You write these template expressions in a language that looks like JavaScript.
|
In terms of syntax, template expressions are similar to JavaScript.
|
||||||
Many JavaScript expressions are legal template expressions, but not all.
|
Many JavaScript expressions are legal template expressions, with a few exceptions.
|
||||||
|
|
||||||
JavaScript expressions that have or promote side effects are prohibited,
|
You can't use JavaScript expressions that have or promote side effects,
|
||||||
including:
|
including:
|
||||||
|
|
||||||
* assignments (`=`, `+=`, `-=`, ...)
|
* Assignments (`=`, `+=`, `-=`, `...`)
|
||||||
* <code>new</code>
|
* Operators such as `new`, `typeof`, `instanceof`, etc.
|
||||||
* chaining expressions with <code>;</code> or <code>,</code>
|
* Chaining expressions with <code>;</code> or <code>,</code>
|
||||||
* increment and decrement operators (`++` and `--`)
|
* The increment and decrement operators `++` and `--`
|
||||||
|
* Some of the ES2015+ operators
|
||||||
|
|
||||||
Other notable differences from JavaScript syntax include:
|
Other notable differences from JavaScript syntax include:
|
||||||
|
|
||||||
* no support for the bitwise operators `|` and `&`
|
* No support for the bitwise operators such as `|` and `&`
|
||||||
* new [template expression operators](guide/template-syntax#expression-operators), such as `|`, `?.` and `!`.
|
* New template expression operators, such as `|`, `?.` and `!`
|
||||||
|
<!-- link to: guide/template-syntax#expression-operators -->
|
||||||
{@a expression-context}
|
|
||||||
|
|
||||||
### Expression context
|
### Expression context
|
||||||
|
|
||||||
The *expression context* is typically the _component_ instance.
|
The *expression context* is typically the _component_ instance.
|
||||||
In the following snippets, the `title` within double-curly braces and the
|
In the following snippets, the `recommended` within double curly braces and the
|
||||||
`isUnchanged` in quotes refer to properties of the `AppComponent`.
|
`itemImageUrl2` in quotes refer to properties of the `AppComponent`.
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="context-component-expression" header="src/app/app.component.html" linenums="false">
|
<code-example path="interpolation/src/app/app.component.html" region="component-context" header="src/app/app.component.html" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
An expression may also refer to properties of the _template's_ context
|
An expression may also refer to properties of the _template's_ context
|
||||||
such as a [template input variable](guide/template-syntax#template-input-variable) (`let hero`)
|
such as a template input variable,
|
||||||
or a [template reference variable](guide/template-syntax#ref-vars) (`#heroInput`).
|
<!-- link to built-in-directives#template-input-variables -->
|
||||||
|
`let customer`, or a template reference variable, `#customerInput`.
|
||||||
|
<!-- link to guide/template-ref-variables -->
|
||||||
|
|
||||||
<code-example path="template-syntax/src/app/app.component.html" region="context-var" header="src/app/app.component.html" linenums="false">
|
<code-example path="interpolation/src/app/app.component.html" region="template-input-variable" header="src/app/app.component.html (template input variable)" linenums="false">
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
<code-example path="interpolation/src/app/app.component.html" region="template-reference-variable" header="src/app/app.component.html (template reference variable)" linenums="false">
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
The context for terms in an expression is a blend of the _template variables_,
|
The context for terms in an expression is a blend of the _template variables_,
|
||||||
@ -136,34 +158,32 @@ If you reference a name that belongs to more than one of these namespaces,
|
|||||||
the template variable name takes precedence, followed by a name in the directive's _context_,
|
the template variable name takes precedence, followed by a name in the directive's _context_,
|
||||||
and, lastly, the component's member names.
|
and, lastly, the component's member names.
|
||||||
|
|
||||||
The previous example presents such a name collision. The component has a `hero`
|
The previous example presents such a name collision. The component has a `customer`
|
||||||
property and the `*ngFor` defines a `hero` template variable.
|
property and the `*ngFor` defines a `customer` template variable.
|
||||||
The `hero` in `{{hero.name}}`
|
|
||||||
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
|
The `customer` in `{{customer.name}}`
|
||||||
refers to the template input variable, not the component's property.
|
refers to the template input variable, not the component's property.
|
||||||
|
|
||||||
Template expressions cannot refer to anything in
|
Template expressions cannot refer to anything in
|
||||||
the global namespace (except `undefined`). They can't refer to `window` or `document`. They
|
the global namespace, except `undefined`. They can't refer to
|
||||||
can't call `console.log` or `Math.max`. They are restricted to referencing
|
`window` or `document`. Additionally, they
|
||||||
|
can't call `console.log()` or `Math.max()` and they are restricted to referencing
|
||||||
members of the expression context.
|
members of the expression context.
|
||||||
|
|
||||||
|
</div>
|
||||||
{@a no-side-effects}
|
|
||||||
|
|
||||||
{@a expression-guidelines}
|
|
||||||
|
|
||||||
### Expression guidelines
|
### Expression guidelines
|
||||||
|
|
||||||
Template expressions can make or break an application.
|
When using template expressions follow these guidelines:
|
||||||
Please follow these guidelines:
|
|
||||||
|
|
||||||
* [No visible side effects](guide/template-syntax#no-visible-side-effects)
|
* [No visible side effects](guide/template-syntax#no-visible-side-effects)
|
||||||
* [Quick execution](guide/template-syntax#quick-execution)
|
* [Quick execution](guide/template-syntax#quick-execution)
|
||||||
* [Simplicity](guide/template-syntax#simplicity)
|
* [Simplicity](guide/template-syntax#simplicity)
|
||||||
* [Idempotence](guide/template-syntax#idempotence)
|
|
||||||
|
|
||||||
The only exceptions to these guidelines should be in specific circumstances that you thoroughly understand.
|
|
||||||
|
|
||||||
#### No visible side effects
|
### No visible side effects
|
||||||
|
|
||||||
A template expression should not change any application state other than the value of the
|
A template expression should not change any application state other than the value of the
|
||||||
target property.
|
target property.
|
||||||
@ -172,37 +192,43 @@ This rule is essential to Angular's "unidirectional data flow" policy.
|
|||||||
You should never worry that reading a component value might change some other displayed value.
|
You should never worry that reading a component value might change some other displayed value.
|
||||||
The view should be stable throughout a single rendering pass.
|
The view should be stable throughout a single rendering pass.
|
||||||
|
|
||||||
#### Quick execution
|
An [idempotent](https://en.wikipedia.org/wiki/Idempotence) expression is ideal because
|
||||||
|
it is free of side effects and improves Angular's change detection performance.
|
||||||
|
|
||||||
|
In Angular terms, an idempotent expression always returns
|
||||||
|
*exactly the same thing* until
|
||||||
|
one of its dependent values changes.
|
||||||
|
|
||||||
|
Dependent values should not change during a single turn of the event loop.
|
||||||
|
If an idempotent expression returns a string or a number, it returns the same string or number when called twice in a row. If the expression returns an object, including an `array`, it returns the same object *reference* when called twice in a row.
|
||||||
|
|
||||||
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
|
There is one exception to this behavior that applies to `*ngFor`. `*ngFor` has `trackBy` functionality that can deal with referential inequality of objects that when iterating over them.
|
||||||
|
|
||||||
|
For more information, see the [*ngFor with `trackBy`](guide/template-syntax#ngfor-with-trackby) section of this guide.
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
### Quick execution
|
||||||
|
|
||||||
Angular executes template expressions after every change detection cycle.
|
Angular executes template expressions after every change detection cycle.
|
||||||
Change detection cycles are triggered by many asynchronous activities such as
|
Change detection cycles are triggered by many asynchronous activities such as
|
||||||
promise resolutions, http results, timer events, keypresses and mouse moves.
|
promise resolutions, HTTP results, timer events, key presses and mouse moves.
|
||||||
|
|
||||||
Expressions should finish quickly or the user experience may drag, especially on slower devices.
|
Expressions should finish quickly or the user experience may drag, especially on slower devices.
|
||||||
Consider caching values when their computation is expensive.
|
Consider caching values when their computation is expensive.
|
||||||
|
|
||||||
#### Simplicity
|
### Simplicity
|
||||||
|
|
||||||
Although it's possible to write quite complex template expressions, you should avoid them.
|
Although it's possible to write complex template expressions, it's a better
|
||||||
|
practice to avoid them.
|
||||||
|
|
||||||
A property name or method call should be the norm.
|
A property name or method call should be the norm, but an occasional Boolean negation, `!`, is OK.
|
||||||
An occasional Boolean negation (`!`) is OK.
|
Otherwise, confine application and business logic to the component,
|
||||||
Otherwise, confine application and business logic to the component itself,
|
where it is easier to develop and test.
|
||||||
where it will be easier to develop and test.
|
|
||||||
|
|
||||||
#### Idempotence
|
|
||||||
|
|
||||||
An [idempotent](https://en.wikipedia.org/wiki/Idempotence) expression is ideal because
|
|
||||||
it is free of side effects and improves Angular's change detection performance.
|
|
||||||
|
|
||||||
In Angular terms, an idempotent expression always returns *exactly the same thing* until
|
|
||||||
one of its dependent values changes.
|
|
||||||
|
|
||||||
Dependent values should not change during a single turn of the event loop.
|
|
||||||
If an idempotent expression returns a string or a number, it returns the same string or number
|
|
||||||
when called twice in a row. If the expression returns an object (including an `array`),
|
|
||||||
it returns the same object *reference* when called twice in a row.
|
|
||||||
|
|
||||||
|
<!-- end of Interpolation doc -->
|
||||||
|
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ You can fine-tune many options by editing the `karma.conf.js` and
|
|||||||
the `test.ts` files in the `src/` folder.
|
the `test.ts` files in the `src/` folder.
|
||||||
|
|
||||||
The `karma.conf.js` file is a partial karma configuration file.
|
The `karma.conf.js` file is a partial karma configuration file.
|
||||||
The CLI constructs the full runtime configuration in memory,based on application structure specified in the `angular.json` file, supplemented by `karma.conf.js`.
|
The CLI constructs the full runtime configuration in memory, based on application structure specified in the `angular.json` file, supplemented by `karma.conf.js`.
|
||||||
|
|
||||||
Search the web for more details about Jasmine and karma configuration.
|
Search the web for more details about Jasmine and karma configuration.
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ Continuous integration (CI) servers let you set up your project repository so th
|
|||||||
There are paid CI services like Circle CI and Travis CI, and you can also host your own for free using Jenkins and others.
|
There are paid CI services like Circle CI and Travis CI, and you can also host your own for free using Jenkins and others.
|
||||||
Although Circle CI and Travis CI are paid services, they are provided free for open source projects.
|
Although Circle CI and Travis CI are paid services, they are provided free for open source projects.
|
||||||
You can create a public project on GitHub and add these services without paying.
|
You can create a public project on GitHub and add these services without paying.
|
||||||
Contributions to the Angular repo are automatically run through a whole suite of Circle CI and Travis CI tests.
|
Contributions to the Angular repo are automatically run through a whole suite of Circle CI tests.
|
||||||
|
|
||||||
This article explains how to configure your project to run Circle CI and Travis CI, and also update your test configuration to be able to run tests in the Chrome browser in either environment.
|
This article explains how to configure your project to run Circle CI and Travis CI, and also update your test configuration to be able to run tests in the Chrome browser in either environment.
|
||||||
|
|
||||||
@ -2205,7 +2205,7 @@ seen in the `AppComponent` template.
|
|||||||
|
|
||||||
The URL bound to the `[routerLink]` attribute flows in to the directive's `linkParams` property.
|
The URL bound to the `[routerLink]` attribute flows in to the directive's `linkParams` property.
|
||||||
|
|
||||||
The `host` metadata property wires the click event of the host element
|
The `HostListener` wires the click event of the host element
|
||||||
(the `<a>` anchor elements in `AppComponent`) to the stub directive's `onClick` method.
|
(the `<a>` anchor elements in `AppComponent`) to the stub directive's `onClick` method.
|
||||||
|
|
||||||
Clicking the anchor should trigger the `onClick()` method,
|
Clicking the anchor should trigger the `onClick()` method,
|
||||||
|
@ -57,7 +57,7 @@ people who otherwise couldn't use the app at all.
|
|||||||
### Show the first page quickly
|
### Show the first page quickly
|
||||||
|
|
||||||
Displaying the first page quickly can be critical for user engagement.
|
Displaying the first page quickly can be critical for user engagement.
|
||||||
[53 percent of mobile site visits are abandoned](https://www.doubleclickbygoogle.com/articles/mobile-speed-matters/) if pages take longer than 3 seconds to load.
|
[53 percent of mobile site visits are abandoned](https://www.thinkwithgoogle.com/marketing-resources/data-measurement/mobile-page-speed-new-industry-benchmarks/) if pages take longer than 3 seconds to load.
|
||||||
Your app may have to launch faster to engage these users before they decide to do something else.
|
Your app may have to launch faster to engage these users before they decide to do something else.
|
||||||
|
|
||||||
With Angular Universal, you can generate landing pages for the app that look like the complete app.
|
With Angular Universal, you can generate landing pages for the app that look like the complete app.
|
||||||
@ -142,11 +142,11 @@ If your server handles HTTP requests, you'll have to add your own security plumb
|
|||||||
|
|
||||||
## Step 1: Install dependencies
|
## Step 1: Install dependencies
|
||||||
|
|
||||||
Install `@angular/platform-server` into your project. Use the same version as the other `@angular` packages in your project. You also need `ts-loader` for your webpack build and `@nguniversal/module-map-ngfactory-loader` to handle lazy-loading in the context of a server-render.
|
Install `@angular/platform-server` into your project. Use the same version as the other `@angular` packages in your project. You also need `ts-loader`, `webpack-cli` for your webpack build and `@nguniversal/module-map-ngfactory-loader` to handle lazy-loading in the context of a server-render.
|
||||||
|
|
||||||
```
|
<code-example language="sh" class="code-shell">
|
||||||
$ npm install --save @angular/platform-server @nguniversal/module-map-ngfactory-loader ts-loader
|
$ npm install --save @angular/platform-server @nguniversal/module-map-ngfactory-loader ts-loader webpack-cli
|
||||||
```
|
</code-example>
|
||||||
|
|
||||||
## Step 2: Prepare your app
|
## Step 2: Prepare your app
|
||||||
|
|
||||||
@ -325,6 +325,7 @@ import 'reflect-metadata';
|
|||||||
|
|
||||||
import { renderModuleFactory } from '@angular/platform-server';
|
import { renderModuleFactory } from '@angular/platform-server';
|
||||||
import { enableProdMode } from '@angular/core';
|
import { enableProdMode } from '@angular/core';
|
||||||
|
import { provideModuleMap } from '@nguniversal/module-map-ngfactory-loader';
|
||||||
|
|
||||||
import * as express from 'express';
|
import * as express from 'express';
|
||||||
import { join } from 'path';
|
import { join } from 'path';
|
||||||
@ -342,10 +343,8 @@ const DIST_FOLDER = join(process.cwd(), 'dist');
|
|||||||
// Our index.html we'll use as our template
|
// Our index.html we'll use as our template
|
||||||
const template = readFileSync(join(DIST_FOLDER, 'browser', 'index.html')).toString();
|
const template = readFileSync(join(DIST_FOLDER, 'browser', 'index.html')).toString();
|
||||||
|
|
||||||
// * NOTE :: leave this as require() since this file is built Dynamically from webpack
|
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./server/main');
|
||||||
const { AppServerModuleNgFactory, LAZY_MODULE_MAP } = require('./dist/server/main.bundle');
|
|
||||||
|
|
||||||
const { provideModuleMap } = require('@nguniversal/module-map-ngfactory-loader');
|
|
||||||
|
|
||||||
app.engine('html', (_, options, callback) => {
|
app.engine('html', (_, options, callback) => {
|
||||||
renderModuleFactory(AppServerModuleNgFactory, {
|
renderModuleFactory(AppServerModuleNgFactory, {
|
||||||
@ -437,23 +436,16 @@ node dist/server.js
|
|||||||
### Creating scripts
|
### Creating scripts
|
||||||
|
|
||||||
Now let's create a few handy scripts to help us do all of this in the future.
|
Now let's create a few handy scripts to help us do all of this in the future.
|
||||||
You can add these in the `"server"` section of the Angular configuration file, `angular.json`.
|
You can add these in the `"scripts"` section of the `package.json`.
|
||||||
|
|
||||||
<code-example format="." language="none" linenums="false">
|
<code-example format="." language="none" linenums="false">
|
||||||
"architect": {
|
"scripts": {
|
||||||
"build": { ... }
|
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
|
||||||
"server": {
|
"serve:ssr": "node dist/server.js",
|
||||||
...
|
"build:client-and-server-bundles": "ng build --prod && ng run my-project:server:production",
|
||||||
"scripts": {
|
"webpack:server": "webpack --config webpack.server.config.js --progress --colors",
|
||||||
// Common scripts
|
...
|
||||||
"build:ssr": "npm run build:client-and-server-bundles && npm run webpack:server",
|
}
|
||||||
"serve:ssr": "node dist/server.js",
|
|
||||||
|
|
||||||
// Helpers for the scripts
|
|
||||||
"build:client-and-server-bundles": "ng build --prod && ng build --prod --app 1 --output-hashing=false",
|
|
||||||
"webpack:server": "webpack --config webpack.server.config.js --progress --colors"
|
|
||||||
}
|
|
||||||
...
|
|
||||||
</code-example>
|
</code-example>
|
||||||
|
|
||||||
To run a production build of your app with Universal on your local system, use the following command.
|
To run a production build of your app with Universal on your local system, use the following command.
|
||||||
|
146
aio/content/guide/using-libraries.md
Normal file
146
aio/content/guide/using-libraries.md
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
# Using Published Libraries
|
||||||
|
|
||||||
|
When building Angular applications you can take advantage of sophisticated first-party libraries, such as [Angular Material](https://material.angular.io/), as well as rich ecosystem of third-party libraries.
|
||||||
|
See the [Angular Resources](https://angular.io/resources) page for links to the most popular ones.
|
||||||
|
|
||||||
|
## Installing libraries
|
||||||
|
|
||||||
|
Libraries are published as [npm packages](guide/npm-packages), usually together with schematics that integrate them with the Angular CLI.
|
||||||
|
To integrate reusable library code into an application, you need to install the package and import the provided functionality where you will use it. For most published Angular libraries, you can use the Angular CLI `ng add <lib_name>` command.
|
||||||
|
|
||||||
|
The `ng add` command uses the npm package manager or [yarn](https://yarnpkg.com/) to install the library package, and invokes schematics that are included in the package to other scaffolding within the project code, such as adding import statements, fonts, themes, and so on.
|
||||||
|
|
||||||
|
A published library typically provides a README or other documentation on how to add that lib to your app.
|
||||||
|
For an example, see [Angular Material](https://material.angular.io/) docs.
|
||||||
|
|
||||||
|
### Library typings
|
||||||
|
|
||||||
|
Library packages often include typings in `.d.ts` files; see examples in `node_modules/@angular/material`. If your library's package does not include typings and your IDE complains, you may need to install the library's associated `@types/<lib_name>` package.
|
||||||
|
|
||||||
|
To configure a library that does not include typings in the same package, install the related `@types` package with npm.
|
||||||
|
TypeScript looks for types in the `node_modules/@types` folder by default, so you don't have to add each type package individually.
|
||||||
|
|
||||||
|
For example, suppose you have a library named `d3`:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
npm install d3 --save
|
||||||
|
npm install @types/d3 --save-dev
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
Types defined in the library need to be added to the TypeScript configuration for the project that uses it.
|
||||||
|
|
||||||
|
* Add the library to the "types" array in `src/tsconfig.app.json`.
|
||||||
|
|
||||||
|
```
|
||||||
|
"types":[
|
||||||
|
"d3"
|
||||||
|
]
|
||||||
|
```
|
||||||
|
|
||||||
|
If a library doesn't have typings available at `@types/`, you can still use it by manually adding typings for it.
|
||||||
|
To do this:
|
||||||
|
|
||||||
|
1. Create a `typings.d.ts` file in your `src/` folder. This file is automatically included as global type definition.
|
||||||
|
|
||||||
|
2. Add the following code in `src/typings.d.ts`.
|
||||||
|
|
||||||
|
```
|
||||||
|
declare module 'host' {
|
||||||
|
export interface Host {
|
||||||
|
protocol?: string;
|
||||||
|
hostname?: string;
|
||||||
|
pathname?: string;
|
||||||
|
}
|
||||||
|
export function parse(url: string, queryString?: string): Host;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
3. In the component or file that uses the library, add the following code.
|
||||||
|
|
||||||
|
```
|
||||||
|
import * as host from 'host';
|
||||||
|
const parsedUrl = host.parse('https://angular.io');
|
||||||
|
console.log(parsedUrl.hostname);
|
||||||
|
```
|
||||||
|
|
||||||
|
You can define more typings as needed.
|
||||||
|
|
||||||
|
## Updating libraries
|
||||||
|
|
||||||
|
Libraries can be updated by their publishers, and also have their own dependencies which need to be kept current.
|
||||||
|
To check for updates to your installed libraries, use the [`ng update` command](cli/update).
|
||||||
|
|
||||||
|
Use `ng update <lib_name>` to update individual library versions. The Angular CLI checks the latest published release of the library, and if the latest version is newer than your installed version, downloads it and updates your `package.json` to match the latest version.
|
||||||
|
|
||||||
|
When you update Angular to a new version, you need to make sure that any libraries you are using are current. If libraries have interdependencies, you might have to update them in a particular order.
|
||||||
|
See the [Angular Update Guide](https://update.angular.io/) for help.
|
||||||
|
|
||||||
|
## Adding a library to the runtime global scope
|
||||||
|
|
||||||
|
Legacy JavaScript libraries that are not imported into an app can be added to the runtime global scope and loaded as if they were in a script tag.
|
||||||
|
Configure the CLI to do this at build time using the "scripts" and "styles" options of the build target in the [CLI configuration file](guide/workspace-config), `angular.json`.
|
||||||
|
|
||||||
|
For example, to use the [Bootstrap 4](https://getbootstrap.com/docs/4.0/getting-started/introduction/) library, first install the library and its dependencies using the npm package manager:
|
||||||
|
|
||||||
|
<code-example format="." language="bash">
|
||||||
|
npm install jquery --save
|
||||||
|
npm install popper.js --save
|
||||||
|
npm install bootstrap --save
|
||||||
|
</code-example>
|
||||||
|
|
||||||
|
In the `angular.json` configuration file, add the associated script files to the "scripts" array:
|
||||||
|
|
||||||
|
```
|
||||||
|
"scripts": [
|
||||||
|
"node_modules/jquery/dist/jquery.slim.js",
|
||||||
|
"node_modules/popper.js/dist/umd/popper.js",
|
||||||
|
"node_modules/bootstrap/dist/js/bootstrap.js"
|
||||||
|
],
|
||||||
|
```
|
||||||
|
|
||||||
|
Add the Bootstrap CSS file to the "styles" array:
|
||||||
|
|
||||||
|
```
|
||||||
|
"styles": [
|
||||||
|
"node_modules/bootstrap/dist/css/bootstrap.css",
|
||||||
|
"src/styles.css"
|
||||||
|
],
|
||||||
|
```
|
||||||
|
|
||||||
|
Run or restart `ng serve` to see Bootstrap 4 working in your app.
|
||||||
|
|
||||||
|
### Using runtime-global libraries inside your app
|
||||||
|
|
||||||
|
Once you import a library using the "scripts" array, you should **not** import it using an import statement in your TypeScript code (such as `import * as $ from 'jquery';`).
|
||||||
|
If you do, you'll end up with two different copies of the library: one imported as a global library, and one imported as a module.
|
||||||
|
This is especially bad for libraries with plugins, like JQuery, because each copy will have different plugins.
|
||||||
|
|
||||||
|
Instead, download typings for your library (`npm install @types/jquery`) and follow the library installation steps. This gives you access to the global variables exposed by that library.
|
||||||
|
|
||||||
|
### Defining typings for runtime-global libraries
|
||||||
|
|
||||||
|
If the global library you need to use does not have global typings, you can declare them manually as `any` in `src/typings.d.ts`. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
declare var libraryName: any;
|
||||||
|
```
|
||||||
|
|
||||||
|
Some scripts extend other libraries; for instance with JQuery plugins:
|
||||||
|
|
||||||
|
```
|
||||||
|
$('.test').myPlugin();
|
||||||
|
```
|
||||||
|
|
||||||
|
In this case, the installed `@types/jquery` doesn't include `myPlugin`, so you need to add an interface in `src/typings.d.ts`. For example:
|
||||||
|
|
||||||
|
```
|
||||||
|
interface JQuery {
|
||||||
|
myPlugin(options?: any): any;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
If don't add the interface for the script-defined extension, your IDE shows an error:
|
||||||
|
|
||||||
|
```
|
||||||
|
[TS][Error] Property 'myPlugin' does not exist on type 'JQuery'
|
||||||
|
```
|
@ -123,7 +123,7 @@ You can define and name additional alternate configurations (such as `stage`, fo
|
|||||||
|
|
||||||
The configurable options for a default or targeted build generally correspond to the options available for the [`ng build`](cli/build), [`ng serve`](cli/serve), and [`ng test`](cli/test) commands. For details of those options and their possible values, see the [CLI Reference](cli).
|
The configurable options for a default or targeted build generally correspond to the options available for the [`ng build`](cli/build), [`ng serve`](cli/serve), and [`ng test`](cli/test) commands. For details of those options and their possible values, see the [CLI Reference](cli).
|
||||||
|
|
||||||
Some additional options (listed below) can only be set through the configuration file, either by direct editing or with the `ng config` command.
|
Some additional options (listed below) can only be set through the configuration file, either by direct editing or with the [`ng config`](cli/config) command.
|
||||||
|
|
||||||
| OPTIONS PROPERTIES | DESCRIPTION |
|
| OPTIONS PROPERTIES | DESCRIPTION |
|
||||||
| :------------------------- | :---------------------------- |
|
| :------------------------- | :---------------------------- |
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<h1 class="no-toc">What is Angular?</h1>
|
<h1 class="no-toc">What is Angular?</h1>
|
||||||
|
|
||||||
Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop
|
Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or the desktop.
|
||||||
|
|
||||||
<div class="card-container">
|
<div class="card-container">
|
||||||
<a href="generated/live-examples/toh-pt1/stackblitz.html" target="_blank" class="docs-card"
|
<a href="generated/live-examples/toh-pt1/stackblitz.html" target="_blank" class="docs-card"
|
||||||
|
@ -453,6 +453,12 @@
|
|||||||
"rev": true,
|
"rev": true,
|
||||||
"title": "Smart Web Components",
|
"title": "Smart Web Components",
|
||||||
"url": "https://www.htmlelements.com/angular/"
|
"url": "https://www.htmlelements.com/angular/"
|
||||||
|
},
|
||||||
|
"AlyleUI": {
|
||||||
|
"desc": "Minimal Design, a set of components for Angular.",
|
||||||
|
"rev": true,
|
||||||
|
"title": "Alyle UI",
|
||||||
|
"url": "https://alyle-ui.firebaseapp.com/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -494,6 +494,27 @@
|
|||||||
"tooltip": "Learn how AngularJS concepts and techniques map to Angular."
|
"tooltip": "Learn how AngularJS concepts and techniques map to Angular."
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "Angular Libraries",
|
||||||
|
"tooltip": "Extending Angular with shared libraries.",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"url": "guide/libraries",
|
||||||
|
"title": "Libraries Overview",
|
||||||
|
"tooltip": "Understand how and when to use or create libraries."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "guide/using-libraries",
|
||||||
|
"title": "Using Published Libraries",
|
||||||
|
"tooltip": "Integrate published libraries into an app."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "guide/creating-libraries",
|
||||||
|
"title": "Creating Libraries",
|
||||||
|
"tooltip": "Extend Angular by creating, publishing, and using your own libraries."
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
@ -347,7 +347,7 @@ Add the following `addHero()` method to the `HeroService` class.
|
|||||||
`HeroService.addHero()` differs from `updateHero` in two ways.
|
`HeroService.addHero()` differs from `updateHero` in two ways.
|
||||||
|
|
||||||
* it calls `HttpClient.post()` instead of `put()`.
|
* it calls `HttpClient.post()` instead of `put()`.
|
||||||
* it expects the server to generates an id for the new hero,
|
* it expects the server to generate an id for the new hero,
|
||||||
which it returns in the `Observable<Hero>` to the caller.
|
which it returns in the `Observable<Hero>` to the caller.
|
||||||
|
|
||||||
Refresh the browser and add some heroes.
|
Refresh the browser and add some heroes.
|
||||||
|
@ -13,11 +13,10 @@
|
|||||||
"aio-check-local": "node tools/ng-packages-installer check .",
|
"aio-check-local": "node tools/ng-packages-installer check .",
|
||||||
"ng": "yarn check-env && ng",
|
"ng": "yarn check-env && ng",
|
||||||
"start": "yarn check-env && ng serve --configuration=fast",
|
"start": "yarn check-env && ng serve --configuration=fast",
|
||||||
"build": "yarn build-for stable",
|
"prebuild": "yarn setup",
|
||||||
"prebuild-for": "yarn setup",
|
"build": "yarn ~~build",
|
||||||
"build-for": "yarn ~~build --configuration",
|
|
||||||
"prebuild-local": "yarn setup-local",
|
"prebuild-local": "yarn setup-local",
|
||||||
"build-local": "yarn ~~build --configuration=stable",
|
"build-local": "yarn ~~build",
|
||||||
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 02d2ec250",
|
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 02d2ec250",
|
||||||
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
|
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
|
||||||
"test": "yarn check-env && ng test",
|
"test": "yarn check-env && ng test",
|
||||||
@ -64,7 +63,7 @@
|
|||||||
"update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
|
"update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
|
||||||
"~~check-env": "node scripts/check-environment",
|
"~~check-env": "node scripts/check-environment",
|
||||||
"~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"",
|
"~~clean-generated": "node --eval \"require('shelljs').rm('-rf', 'src/generated')\"",
|
||||||
"~~build": "ng build",
|
"~~build": "ng build --configuration=stable",
|
||||||
"post~~build": "yarn build-404-page",
|
"post~~build": "yarn build-404-page",
|
||||||
"~~build-ie-polyfills": "webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
|
"~~build-ie-polyfills": "webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
|
||||||
"~~http-server": "http-server",
|
"~~http-server": "http-server",
|
||||||
@ -112,7 +111,7 @@
|
|||||||
"cross-spawn": "^5.1.0",
|
"cross-spawn": "^5.1.0",
|
||||||
"css-selector-parser": "^1.3.0",
|
"css-selector-parser": "^1.3.0",
|
||||||
"dgeni": "^0.4.11",
|
"dgeni": "^0.4.11",
|
||||||
"dgeni-packages": "^0.27.0",
|
"dgeni-packages": "^0.27.1",
|
||||||
"entities": "^1.1.1",
|
"entities": "^1.1.1",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^3.19.0",
|
||||||
"eslint-plugin-jasmine": "^2.2.0",
|
"eslint-plugin-jasmine": "^2.2.0",
|
||||||
|
@ -93,7 +93,7 @@ fi
|
|||||||
cd "`dirname $0`/.."
|
cd "`dirname $0`/.."
|
||||||
|
|
||||||
# Build the app
|
# Build the app
|
||||||
yarn build-for $deployEnv --progress=false
|
yarn build --configuration=$deployEnv --progress=false
|
||||||
|
|
||||||
# Include any mode-specific files
|
# Include any mode-specific files
|
||||||
cp -rf src/extra-files/$deployEnv/. dist/
|
cp -rf src/extra-files/$deployEnv/. dist/
|
||||||
|
@ -23,13 +23,6 @@ const LIGHTHOUSE_FLAGS = {logLevel: 'info'};
|
|||||||
const SKIPPED_HTTPS_AUDITS = ['redirects-http'];
|
const SKIPPED_HTTPS_AUDITS = ['redirects-http'];
|
||||||
const VIEWER_URL = 'https://googlechrome.github.io/lighthouse/viewer/';
|
const VIEWER_URL = 'https://googlechrome.github.io/lighthouse/viewer/';
|
||||||
|
|
||||||
|
|
||||||
// Specify the path and flags for Chrome on Travis.
|
|
||||||
if (process.env.TRAVIS) {
|
|
||||||
process.env.LIGHTHOUSE_CHROMIUM_PATH = process.env.CHROME_BIN;
|
|
||||||
CHROME_LAUNCH_OPTS.chromeFlags = ['--no-sandbox'];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Be less verbose on CI.
|
// Be less verbose on CI.
|
||||||
if (process.env.CI) {
|
if (process.env.CI) {
|
||||||
LIGHTHOUSE_FLAGS.logLevel = 'error';
|
LIGHTHOUSE_FLAGS.logLevel = 'error';
|
||||||
|
@ -14,6 +14,7 @@ import { LocationService } from 'app/shared/location.service';
|
|||||||
import { ApiSection, ApiService } from './api.service';
|
import { ApiSection, ApiService } from './api.service';
|
||||||
|
|
||||||
import { Option } from 'app/shared/select/select.component';
|
import { Option } from 'app/shared/select/select.component';
|
||||||
|
import { map } from 'rxjs/operators';
|
||||||
|
|
||||||
class SearchCriteria {
|
class SearchCriteria {
|
||||||
query ? = '';
|
query ? = '';
|
||||||
@ -67,14 +68,17 @@ export class ApiListComponent implements OnInit {
|
|||||||
private locationService: LocationService) { }
|
private locationService: LocationService) { }
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.filteredSections = combineLatest(
|
this.filteredSections =
|
||||||
this.apiService.sections,
|
combineLatest(
|
||||||
this.criteriaSubject,
|
this.apiService.sections,
|
||||||
(sections, criteria) => {
|
this.criteriaSubject
|
||||||
return sections
|
).pipe(
|
||||||
.map(section => ({ ...section, items: this.filterSection(section, criteria) }));
|
map( results => ({ sections: results[0], criteria: results[1]})),
|
||||||
}
|
map( results => (
|
||||||
);
|
results.sections
|
||||||
|
.map(section => ({ ...section, items: this.filterSection(section, results.criteria) }))
|
||||||
|
))
|
||||||
|
);
|
||||||
|
|
||||||
this.initializeSearchCriteria();
|
this.initializeSearchCriteria();
|
||||||
}
|
}
|
||||||
|
@ -91,17 +91,19 @@ export class NavigationService {
|
|||||||
*/
|
*/
|
||||||
private getCurrentNodes(navigationViews: Observable<NavigationViews>): Observable<CurrentNodes> {
|
private getCurrentNodes(navigationViews: Observable<NavigationViews>): Observable<CurrentNodes> {
|
||||||
const currentNodes = combineLatest(
|
const currentNodes = combineLatest(
|
||||||
navigationViews.pipe(map(views => this.computeUrlToNavNodesMap(views))),
|
navigationViews.pipe(
|
||||||
this.location.currentPath,
|
map(views => this.computeUrlToNavNodesMap(views))),
|
||||||
|
this.location.currentPath,
|
||||||
(navMap, url) => {
|
).pipe(
|
||||||
const matchSpecialUrls = /^api/.exec(url);
|
map((result) => ({navMap: result[0] , url: result[1]})),
|
||||||
|
map((result) => {
|
||||||
|
const matchSpecialUrls = /^api/.exec(result.url);
|
||||||
if (matchSpecialUrls) {
|
if (matchSpecialUrls) {
|
||||||
url = matchSpecialUrls[0];
|
result.url = matchSpecialUrls[0];
|
||||||
}
|
}
|
||||||
return navMap.get(url) || { '' : { view: '', url: url, nodes: [] }};
|
return result.navMap.get(result.url) || { '' : { view: '', url: result.url, nodes: [] }};
|
||||||
})
|
}),
|
||||||
.pipe(publishReplay(1));
|
publishReplay(1));
|
||||||
(currentNodes as ConnectableObservable<CurrentNodes>).connect();
|
(currentNodes as ConnectableObservable<CurrentNodes>).connect();
|
||||||
return currentNodes;
|
return currentNodes;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injector, ReflectiveInjector } from '@angular/core';
|
import { Injector, ReflectiveInjector } from '@angular/core';
|
||||||
import { fakeAsync, tick } from '@angular/core/testing';
|
import { fakeAsync, tick } from '@angular/core/testing';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/common';
|
||||||
|
|
||||||
import { ScrollService } from 'app/shared/scroll.service';
|
import { ScrollService } from 'app/shared/scroll.service';
|
||||||
import { ScrollItem, ScrollSpiedElement, ScrollSpiedElementGroup, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
import { ScrollItem, ScrollSpiedElement, ScrollSpiedElementGroup, ScrollSpyService } from 'app/shared/scroll-spy.service';
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { ReflectiveInjector } from '@angular/core';
|
import { ReflectiveInjector } from '@angular/core';
|
||||||
import { PlatformLocation } from '@angular/common';
|
import { PlatformLocation } from '@angular/common';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/common';
|
||||||
|
|
||||||
import { ScrollService, topMargin } from './scroll.service';
|
import { ScrollService, topMargin } from './scroll.service';
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Injectable, Inject } from '@angular/core';
|
import { Injectable, Inject } from '@angular/core';
|
||||||
import { PlatformLocation } from '@angular/common';
|
import { PlatformLocation } from '@angular/common';
|
||||||
import { DOCUMENT } from '@angular/platform-browser';
|
import { DOCUMENT } from '@angular/common';
|
||||||
import { fromEvent } from 'rxjs';
|
import { fromEvent } from 'rxjs';
|
||||||
|
|
||||||
export const topMargin = 16;
|
export const topMargin = 16;
|
||||||
|
@ -25,14 +25,8 @@ module.exports = function (config) {
|
|||||||
colors: true,
|
colors: true,
|
||||||
logLevel: config.LOG_INFO,
|
logLevel: config.LOG_INFO,
|
||||||
autoWatch: true,
|
autoWatch: true,
|
||||||
browsers: ['CustomChrome'],
|
browsers: ['Chrome'],
|
||||||
browserNoActivityTimeout: 60000,
|
browserNoActivityTimeout: 60000,
|
||||||
singleRun: false,
|
singleRun: false,
|
||||||
customLaunchers: {
|
|
||||||
CustomChrome: {
|
|
||||||
base: 'Chrome',
|
|
||||||
flags: process.env.TRAVIS && ['--no-sandbox']
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -78,6 +78,14 @@ p, ol, ul, ol, li, input, a {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
margin: 14px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
p + ul {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
ol {
|
ol {
|
||||||
li, p {
|
li, p {
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
@ -123,8 +131,13 @@ td {
|
|||||||
padding: 8px 30px;
|
padding: 8px 30px;
|
||||||
letter-spacing: 0.30px;
|
letter-spacing: 0.30px;
|
||||||
|
|
||||||
p:first-child, p:last-child {
|
> p, ul {
|
||||||
margin: 0;
|
&:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7,4 +7,3 @@
|
|||||||
.cli-option-syntax {
|
.cli-option-syntax {
|
||||||
white-space: pre;
|
white-space: pre;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,11 +10,6 @@ exports.config = {
|
|||||||
suite: 'full',
|
suite: 'full',
|
||||||
capabilities: {
|
capabilities: {
|
||||||
browserName: 'chrome',
|
browserName: 'chrome',
|
||||||
// For Travis
|
|
||||||
chromeOptions: {
|
|
||||||
binary: process.env.CHROME_BIN,
|
|
||||||
args: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
framework: 'jasmine',
|
framework: 'jasmine',
|
||||||
|
@ -30,11 +30,11 @@ describe(browser.baseUrl, () => {
|
|||||||
it(`should redirect '${fromUrl}' to '${toUrl}' (${i + 1}/${page.legacyUrls.length})`, async () => {
|
it(`should redirect '${fromUrl}' to '${toUrl}' (${i + 1}/${page.legacyUrls.length})`, async () => {
|
||||||
await page.goTo(fromUrl);
|
await page.goTo(fromUrl);
|
||||||
|
|
||||||
const expectedUrl = stripTrailingSlash(/^http/.test(toUrl) ? toUrl : page.baseUrl + toUrl);
|
const expectedUrl = stripTrailingSlash(/^https?:/.test(toUrl) ? toUrl : page.baseUrl + toUrl);
|
||||||
const actualUrl = await getCurrentUrl();
|
const actualUrl = await getCurrentUrl();
|
||||||
|
|
||||||
expect(actualUrl).toBe(expectedUrl);
|
expect(actualUrl).toBe(expectedUrl);
|
||||||
});
|
}, 60000);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -10,11 +10,6 @@ exports.config = {
|
|||||||
],
|
],
|
||||||
capabilities: {
|
capabilities: {
|
||||||
browserName: 'chrome',
|
browserName: 'chrome',
|
||||||
// For Travis
|
|
||||||
chromeOptions: {
|
|
||||||
binary: process.env.CHROME_BIN,
|
|
||||||
args: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
baseUrl: 'http://localhost:4200/',
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
@ -21,7 +21,7 @@ See the [README.md](cli-patches/README.md) for more details.
|
|||||||
Many of the documentation pages contain snippets of code examples. We extract these snippets from real
|
Many of the documentation pages contain snippets of code examples. We extract these snippets from real
|
||||||
working example applications, which are stored in subfolders of the `/aio/content/examples` folder. Each
|
working example applications, which are stored in subfolders of the `/aio/content/examples` folder. Each
|
||||||
example can be built and run independently. Each example also provides e2e specs, which are run as part
|
example can be built and run independently. Each example also provides e2e specs, which are run as part
|
||||||
of our Travis build tasks, to verify that the examples continue to work as expected, as changes are made
|
of our CI build tasks, to verify that the examples continue to work as expected, as changes are made
|
||||||
to the core Angular libraries.
|
to the core Angular libraries.
|
||||||
|
|
||||||
In order to build, run and test these examples independently we need to install dependencies into their
|
In order to build, run and test these examples independently we need to install dependencies into their
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
Many of the documentation pages contain snippets of code examples. Extract these snippets from
|
Many of the documentation pages contain snippets of code examples. Extract these snippets from
|
||||||
real working example applications, which are stored in subfolders of the `/aio/content/examples`
|
real working example applications, which are stored in subfolders of the `/aio/content/examples`
|
||||||
folder. Each example can be built and run independently. Each example also provides e2e specs, which
|
folder. Each example can be built and run independently. Each example also provides e2e specs, which
|
||||||
are run as part of our Travis build tasks, to verify that the examples continue to work as expected,
|
are run as part of our CircleCI legacy build tasks, to verify that the examples continue to work as
|
||||||
as changes are made to the core Angular libraries.
|
expected, as changes are made to the core Angular libraries.
|
||||||
|
|
||||||
In order to build, run and test these examples independently you need to install dependencies into
|
In order to build, run and test these examples independently you need to install dependencies into
|
||||||
their sub-folder. Also there are a number of common boilerplate files that are needed to configure
|
their sub-folder. Also there are a number of common boilerplate files that are needed to configure
|
||||||
|
@ -61,6 +61,12 @@ BOILERPLATE_PATHS.i18n = [
|
|||||||
'package.json'
|
'package.json'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
BOILERPLATE_PATHS['service-worker'] = [
|
||||||
|
...cliRelativePath,
|
||||||
|
'angular.json',
|
||||||
|
'package.json'
|
||||||
|
];
|
||||||
|
|
||||||
BOILERPLATE_PATHS.testing = [
|
BOILERPLATE_PATHS.testing = [
|
||||||
...cliRelativePath,
|
...cliRelativePath,
|
||||||
'angular.json'
|
'angular.json'
|
||||||
|
@ -204,20 +204,22 @@ function runProtractorAoT(appDir, outputFile) {
|
|||||||
// CLI version
|
// CLI version
|
||||||
function runE2eTestsCLI(appDir, outputFile) {
|
function runE2eTestsCLI(appDir, outputFile) {
|
||||||
console.log(`\n\n=========== Running aio example tests for: ${appDir}`);
|
console.log(`\n\n=========== Running aio example tests for: ${appDir}`);
|
||||||
// `--preserve-symlinks` is needed due the symlinked `node_modules/` in each example.
|
|
||||||
// `--no-webdriver-update` is needed to preserve the ChromeDriver version already installed.
|
// `--no-webdriver-update` is needed to preserve the ChromeDriver version already installed.
|
||||||
const args = ['e2e', '--no-webdriver-update'];
|
const config = loadExampleConfig(appDir);
|
||||||
const e2eSpawn = spawnExt('yarn', args, { cwd: appDir });
|
const commands = config.e2e || [{ cmd: 'yarn', args: ['e2e', '--no-webdriver-update'] }];
|
||||||
return e2eSpawn.promise.then(
|
|
||||||
function () {
|
const e2eSpawnPromise = commands.reduce((prevSpawnPromise, { cmd, args }) => {
|
||||||
fs.appendFileSync(outputFile, `Passed: ${appDir}\n\n`);
|
return prevSpawnPromise.then(() => {
|
||||||
return finish(e2eSpawn.proc.pid, true);
|
const currSpawn = spawnExt(cmd, args, { cwd: appDir });
|
||||||
},
|
return currSpawn.promise.then(
|
||||||
function () {
|
() => Promise.resolve(finish(currSpawn.proc.pid, true)),
|
||||||
fs.appendFileSync(outputFile, `Failed: ${appDir}\n\n`);
|
() => Promise.reject(finish(currSpawn.proc.pid, false)));
|
||||||
return finish(e2eSpawn.proc.pid, false);
|
});
|
||||||
}
|
}, Promise.resolve());
|
||||||
);
|
|
||||||
|
return e2eSpawnPromise.then(
|
||||||
|
() => { fs.appendFileSync(outputFile, `Passed: ${appDir}\n\n`); return true; },
|
||||||
|
() => { fs.appendFileSync(outputFile, `Failed: ${appDir}\n\n`); return false; });
|
||||||
}
|
}
|
||||||
|
|
||||||
// Report final status.
|
// Report final status.
|
||||||
|
@ -10,11 +10,6 @@ exports.config = {
|
|||||||
],
|
],
|
||||||
capabilities: {
|
capabilities: {
|
||||||
'browserName': 'chrome',
|
'browserName': 'chrome',
|
||||||
// For Travis CI only
|
|
||||||
chromeOptions: {
|
|
||||||
binary: process.env.CHROME_BIN,
|
|
||||||
args: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
directConnect: true,
|
directConnect: true,
|
||||||
baseUrl: 'http://localhost:4200/',
|
baseUrl: 'http://localhost:4200/',
|
||||||
|
@ -0,0 +1,136 @@
|
|||||||
|
{
|
||||||
|
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||||
|
"version": 1,
|
||||||
|
"newProjectRoot": "projects",
|
||||||
|
"projects": {
|
||||||
|
"angular.io-example": {
|
||||||
|
"root": "",
|
||||||
|
"sourceRoot": "src",
|
||||||
|
"projectType": "application",
|
||||||
|
"prefix": "app",
|
||||||
|
"schematics": {},
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-angular:browser",
|
||||||
|
"options": {
|
||||||
|
"outputPath": "dist",
|
||||||
|
"index": "src/index.html",
|
||||||
|
"main": "src/main.ts",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"tsConfig": "src/tsconfig.app.json",
|
||||||
|
"assets": [
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
],
|
||||||
|
"styles": [
|
||||||
|
"src/styles.css"
|
||||||
|
],
|
||||||
|
"scripts": []
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"fileReplacements": [
|
||||||
|
{
|
||||||
|
"replace": "src/environments/environment.ts",
|
||||||
|
"with": "src/environments/environment.prod.ts"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"optimization": true,
|
||||||
|
"outputHashing": "all",
|
||||||
|
"sourceMap": false,
|
||||||
|
"extractCss": true,
|
||||||
|
"namedChunks": false,
|
||||||
|
"aot": true,
|
||||||
|
"extractLicenses": true,
|
||||||
|
"vendorChunk": false,
|
||||||
|
"buildOptimizer": true,
|
||||||
|
"serviceWorker": true,
|
||||||
|
"budgets": [
|
||||||
|
{
|
||||||
|
"type": "initial",
|
||||||
|
"maximumWarning": "2mb",
|
||||||
|
"maximumError": "5mb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"serve": {
|
||||||
|
"builder": "@angular-devkit/build-angular:dev-server",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "angular.io-example:build"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"browserTarget": "angular.io-example:build:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"extract-i18n": {
|
||||||
|
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||||
|
"options": {
|
||||||
|
"browserTarget": "angular.io-example:build"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "src/test.ts",
|
||||||
|
"polyfills": "src/polyfills.ts",
|
||||||
|
"tsConfig": "src/tsconfig.spec.json",
|
||||||
|
"karmaConfig": "src/karma.conf.js",
|
||||||
|
"styles": [
|
||||||
|
"src/styles.css"
|
||||||
|
],
|
||||||
|
"scripts": [],
|
||||||
|
"assets": [
|
||||||
|
"src/favicon.ico",
|
||||||
|
"src/assets"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"src/tsconfig.app.json",
|
||||||
|
"src/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"angular.io-example-e2e": {
|
||||||
|
"root": "e2e/",
|
||||||
|
"projectType": "application",
|
||||||
|
"prefix": "",
|
||||||
|
"architect": {
|
||||||
|
"e2e": {
|
||||||
|
"builder": "@angular-devkit/build-angular:protractor",
|
||||||
|
"options": {
|
||||||
|
"protractorConfig": "e2e/protractor.conf.js",
|
||||||
|
"devServerTarget": "angular.io-example:serve"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"devServerTarget": "angular.io-example:serve:production"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": "e2e/tsconfig.e2e.json",
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"defaultProject": "angular.io-example"
|
||||||
|
}
|
@ -0,0 +1,53 @@
|
|||||||
|
{
|
||||||
|
"name": "angular.io-example",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"license": "MIT",
|
||||||
|
"scripts": {
|
||||||
|
"ng": "ng",
|
||||||
|
"start": "ng serve",
|
||||||
|
"build": "ng build",
|
||||||
|
"test": "ng test",
|
||||||
|
"lint": "ng lint",
|
||||||
|
"e2e": "ng e2e"
|
||||||
|
},
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@angular/animations": "^7.0.0",
|
||||||
|
"@angular/common": "^7.0.0",
|
||||||
|
"@angular/compiler": "^7.0.0",
|
||||||
|
"@angular/core": "^7.0.0",
|
||||||
|
"@angular/forms": "^7.0.0",
|
||||||
|
"@angular/http": "^7.0.0",
|
||||||
|
"@angular/platform-browser": "^7.0.0",
|
||||||
|
"@angular/platform-browser-dynamic": "^7.0.0",
|
||||||
|
"@angular/router": "^7.0.0",
|
||||||
|
"@angular/service-worker": "^7.0.0",
|
||||||
|
"angular-in-memory-web-api": "^0.6.0",
|
||||||
|
"core-js": "^2.5.4",
|
||||||
|
"rxjs": "^6.3.0",
|
||||||
|
"web-animations-js": "^2.3.1",
|
||||||
|
"zone.js": "~0.8.26"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@angular-devkit/build-angular": "^0.10.0",
|
||||||
|
"@angular/cli": "^7.0.0",
|
||||||
|
"@angular/compiler-cli": "^7.0.0",
|
||||||
|
"@angular/language-service": "^7.0.0",
|
||||||
|
"@types/jasmine": "~2.8.8",
|
||||||
|
"@types/jasminewd2": "~2.0.3",
|
||||||
|
"@types/node": "~8.9.4",
|
||||||
|
"codelyzer": "~4.3.0",
|
||||||
|
"jasmine-core": "~2.99.1",
|
||||||
|
"jasmine-marbles": "^0.4.0",
|
||||||
|
"jasmine-spec-reporter": "~4.2.1",
|
||||||
|
"karma": "~3.0.0",
|
||||||
|
"karma-chrome-launcher": "~2.2.0",
|
||||||
|
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||||
|
"karma-jasmine": "~1.1.2",
|
||||||
|
"karma-jasmine-html-reporter": "^0.2.2",
|
||||||
|
"protractor": "~5.4.0",
|
||||||
|
"ts-node": "~7.0.0",
|
||||||
|
"tslint": "~5.11.0",
|
||||||
|
"typescript": "~3.1.1"
|
||||||
|
}
|
||||||
|
}
|
@ -21,11 +21,6 @@ exports.config = {
|
|||||||
// Capabilities to be passed to the webdriver instance.
|
// Capabilities to be passed to the webdriver instance.
|
||||||
capabilities: {
|
capabilities: {
|
||||||
'browserName': 'chrome',
|
'browserName': 'chrome',
|
||||||
// For Travis
|
|
||||||
chromeOptions: {
|
|
||||||
binary: process.env.CHROME_BIN,
|
|
||||||
args: ['--no-sandbox']
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Framework to use. Jasmine is recommended.
|
// Framework to use. Jasmine is recommended.
|
||||||
|
@ -95,6 +95,13 @@
|
|||||||
{% if method.shortDescription %}<tr>
|
{% if method.shortDescription %}<tr>
|
||||||
<td class="short-description">
|
<td class="short-description">
|
||||||
{$ method.shortDescription | marked $}
|
{$ method.shortDescription | marked $}
|
||||||
|
{%- if method.see.length %}
|
||||||
|
<p>See also:</p>
|
||||||
|
<ul>
|
||||||
|
{% for see in method.see %}
|
||||||
|
<li>{$ see | marked $}</li>{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>{% endif %}
|
</tr>{% endif %}
|
||||||
{% if method.overloads.length == 0 %}
|
{% if method.overloads.length == 0 %}
|
||||||
@ -203,10 +210,17 @@
|
|||||||
<td>
|
<td>
|
||||||
{%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}<span class='read-only-property'>Read-only.</span>{% endif %}
|
{%- if (property.isGetAccessor or property.isReadonly) and not property.isSetAccessor %}<span class='read-only-property'>Read-only.</span>{% endif %}
|
||||||
{%- if property.isSetAccessor and not property.isGetAccessor %}<span class='write-only-property'>Write-only.</span>{% endif %}
|
{%- if property.isSetAccessor and not property.isGetAccessor %}<span class='write-only-property'>Write-only.</span>{% endif %}
|
||||||
|
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
|
||||||
{% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %}
|
{% if property.shortDescription %}{$ property.shortDescription | marked $}{% endif %}
|
||||||
{$ (property.description or property.constructorParamDoc.description) | marked $}
|
{$ (property.description or property.constructorParamDoc.description) | marked $}
|
||||||
{% if property.constructorParamDoc %} <span class='from-constructor'>Declared in constructor.</span>{% endif %}
|
{%- if property.see.length %}
|
||||||
</td>
|
<p>See also:</p>
|
||||||
|
<ul>
|
||||||
|
{% for see in property.see %}
|
||||||
|
<li>{$ see | marked $}</li>{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</tbody>
|
</tbody>
|
||||||
|
@ -53,9 +53,16 @@
|
|||||||
{% for option in options %}
|
{% for option in options %}
|
||||||
<tr class="cli-option">
|
<tr class="cli-option">
|
||||||
<td>
|
<td>
|
||||||
<code class="cli-option-syntax no-auto-link">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
|
<code class="cli-option-syntax no-auto-link{% if option.deprecated %} deprecated-api-item{% endif %}">{$ renderOption(option.name, option.type, option.default, option.enum) $}</code>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
{% if option.deprecated %}
|
||||||
|
{% if option.deprecated === true %}
|
||||||
|
<p><strong>Deprecated</strong></p>
|
||||||
|
{% else %}
|
||||||
|
{$ ('**Deprecated:** ' + option.deprecated) | marked $}
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
{$ option.description | marked $}
|
{$ option.description | marked $}
|
||||||
{% if option.default !== undefined %}<p><span class="cli-default">Default:</span> <code class="no-auto-link">{$ option.default $}</code></p>{% endif %}
|
{% if option.default !== undefined %}<p><span class="cli-default">Default:</span> <code class="no-auto-link">{$ option.default $}</code></p>{% endif %}
|
||||||
{% if option.aliases.length %}<p><span class="cli-aliases">Aliases:</span> {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
{% if option.aliases.length %}<p><span class="cli-aliases">Aliases:</span> {% for alias in option.aliases %}{$ renderOptionName(alias) $}{% if not loop.last %}, {% endif %}{% endfor %}</p>{% endif %}
|
||||||
|
@ -2722,10 +2722,10 @@ devtools-timeline-model@1.1.6:
|
|||||||
chrome-devtools-frontend "1.0.401423"
|
chrome-devtools-frontend "1.0.401423"
|
||||||
resolve "1.1.7"
|
resolve "1.1.7"
|
||||||
|
|
||||||
dgeni-packages@^0.27.0:
|
dgeni-packages@^0.27.1:
|
||||||
version "0.27.0"
|
version "0.27.1"
|
||||||
resolved "https://registry.yarnpkg.com/dgeni-packages/-/dgeni-packages-0.27.0.tgz#99ddf4c97f75bb1f8deb5658ed7d60f6894e9b9d"
|
resolved "https://registry.yarnpkg.com/dgeni-packages/-/dgeni-packages-0.27.1.tgz#f23d78fd3e222910106e45186e1c2e64649464fc"
|
||||||
integrity sha512-BFWJGZTpLb1xAc/iHq7SOcbkyEoxD57NqVG84azfNu63wAVLxoez/9n8VISWNJkrOIT1ITQS7nacgcGxfl0MIw==
|
integrity sha512-zM2HgMni9FvfBFHv2uhWrWRUV0CpaWl4ggoajbGLMT+TEqxkSPKRkCkCQMHek7ZYSXbPdpVb8DuoEKEem74X4g==
|
||||||
dependencies:
|
dependencies:
|
||||||
canonical-path "^1.0.0"
|
canonical-path "^1.0.0"
|
||||||
catharsis "^0.8.1"
|
catharsis "^0.8.1"
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "angular",
|
|
||||||
"dependencies": {
|
|
||||||
"polymer": "Polymer/polymer#^1.6.0"
|
|
||||||
}
|
|
||||||
}
|
|
@ -10,7 +10,7 @@
|
|||||||
// and BrowserStack (BS).
|
// and BrowserStack (BS).
|
||||||
// If the target is set to null, then the browser is not run anywhere during CI.
|
// If the target is set to null, then the browser is not run anywhere during CI.
|
||||||
// If a category becomes empty (e.g. BS and required), then the corresponding job must be commented
|
// If a category becomes empty (e.g. BS and required), then the corresponding job must be commented
|
||||||
// out in Travis configuration.
|
// out in the CI configuration.
|
||||||
var CIconfiguration = {
|
var CIconfiguration = {
|
||||||
'Chrome': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
|
'Chrome': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
|
||||||
'Firefox': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
|
'Firefox': {unitTest: {target: 'SL', required: true}, e2e: {target: null, required: true}},
|
||||||
|
557
build.sh
557
build.sh
@ -1,557 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -u -e -o pipefail
|
|
||||||
|
|
||||||
readonly currentDir=$(cd $(dirname $0); pwd)
|
|
||||||
source ${currentDir}/scripts/ci/_travis-fold.sh
|
|
||||||
|
|
||||||
# TODO(i): wrap into subshell, so that we don't pollute CWD, but not yet to minimize diff collision with Jason
|
|
||||||
cd ${currentDir}
|
|
||||||
|
|
||||||
PACKAGES=(compiler
|
|
||||||
core
|
|
||||||
common
|
|
||||||
animations
|
|
||||||
platform-browser
|
|
||||||
platform-browser-dynamic
|
|
||||||
forms
|
|
||||||
http
|
|
||||||
platform-server
|
|
||||||
platform-webworker
|
|
||||||
platform-webworker-dynamic
|
|
||||||
upgrade
|
|
||||||
router
|
|
||||||
compiler-cli
|
|
||||||
language-service
|
|
||||||
benchpress
|
|
||||||
service-worker
|
|
||||||
elements)
|
|
||||||
|
|
||||||
TSC_PACKAGES=(compiler
|
|
||||||
compiler-cli
|
|
||||||
language-service
|
|
||||||
benchpress)
|
|
||||||
|
|
||||||
NODE_PACKAGES=(compiler-cli
|
|
||||||
benchpress)
|
|
||||||
|
|
||||||
SCOPED_PACKAGES=$(
|
|
||||||
for P in ${PACKAGES[@]}; do echo \\@angular/${P}; done
|
|
||||||
)
|
|
||||||
NG_UPDATE_PACKAGE_GROUP=$(
|
|
||||||
# The first sed creates an array of strings
|
|
||||||
# The second sed is to allow it to be run in the perl expression so forward slashes don't end
|
|
||||||
# the regular expression.
|
|
||||||
echo \[\"${SCOPED_PACKAGES[@]}\"] \
|
|
||||||
| sed 's/ /", "/g' \
|
|
||||||
| sed 's/\//\\\//g'
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
BUILD_ALL=true
|
|
||||||
BUNDLE=true
|
|
||||||
VERSION_PREFIX=$(node -p "require('./package.json').version")
|
|
||||||
VERSION_SUFFIX="-$(git log --oneline -1 | awk '{print $1}')"
|
|
||||||
REMOVE_BENCHPRESS=false
|
|
||||||
BUILD_EXAMPLES=true
|
|
||||||
COMPILE_SOURCE=true
|
|
||||||
TYPECHECK_ALL=true
|
|
||||||
BUILD_TOOLS=true
|
|
||||||
export NODE_PATH=${NODE_PATH:-}:${currentDir}/dist/tools
|
|
||||||
|
|
||||||
for ARG in "$@"; do
|
|
||||||
case "$ARG" in
|
|
||||||
--quick-bundle=*)
|
|
||||||
COMPILE_SOURCE=false
|
|
||||||
TYPECHECK_ALL=false
|
|
||||||
BUILD_EXAMPLES=false
|
|
||||||
BUILD_TOOLS=false
|
|
||||||
;;
|
|
||||||
--packages=*)
|
|
||||||
PACKAGES_STR=${ARG#--packages=}
|
|
||||||
PACKAGES=( ${PACKAGES_STR//,/ } )
|
|
||||||
BUILD_ALL=false
|
|
||||||
;;
|
|
||||||
--bundle=*)
|
|
||||||
BUNDLE=( "${ARG#--bundle=}" )
|
|
||||||
;;
|
|
||||||
--publish)
|
|
||||||
VERSION_SUFFIX=""
|
|
||||||
REMOVE_BENCHPRESS=true
|
|
||||||
;;
|
|
||||||
--examples=*)
|
|
||||||
BUILD_EXAMPLES=${ARG#--examples=}
|
|
||||||
;;
|
|
||||||
--compile=*)
|
|
||||||
COMPILE_SOURCE=${ARG#--compile=}
|
|
||||||
;;
|
|
||||||
--typecheck=*)
|
|
||||||
TYPECHECK_ALL=${ARG#--typecheck=}
|
|
||||||
;;
|
|
||||||
--tools=*)
|
|
||||||
BUILD_TOOLS=${ARG#--tools=}
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Unknown option $ARG."
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Verifies a directory isn't in the ignored list
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Path to check
|
|
||||||
# Returns:
|
|
||||||
# Boolean
|
|
||||||
#######################################
|
|
||||||
isIgnoredDirectory() {
|
|
||||||
name=$(basename ${1})
|
|
||||||
if [[ -f "${1}" || "${name}" == "src" || "${name}" == "test" || "${name}" == "integrationtest" || "${name}" == "locales" ]]; then
|
|
||||||
return 0
|
|
||||||
else
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Check if array contains an element
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Element to check
|
|
||||||
# param2 - Array to look for element in
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
containsElement () {
|
|
||||||
local e
|
|
||||||
for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Rollup index files recursively, ignoring blacklisted directories
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Base source folder
|
|
||||||
# param2 - Destination directory
|
|
||||||
# param3 - Package name
|
|
||||||
# param4 - Is sub directory
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
rollupIndex() {
|
|
||||||
# Iterate over the files in this directory, rolling up each into ${2} directory
|
|
||||||
in_file="${1}/${3}.js"
|
|
||||||
if [ ${4:-} ]; then
|
|
||||||
out_file="$(dropLast ${2})/${3}.js"
|
|
||||||
else
|
|
||||||
out_file="${2}/${3}.js"
|
|
||||||
fi
|
|
||||||
|
|
||||||
BANNER_TEXT=`cat ${LICENSE_BANNER}`
|
|
||||||
if [[ -f ${in_file} ]]; then
|
|
||||||
echo "=========== $ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner BANNER_TEXT >/dev/null 2>&1"
|
|
||||||
$ROLLUP -i ${in_file} -o ${out_file} --sourcemap -f es --banner "$BANNER_TEXT" >/dev/null 2>&1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Recurse for sub directories
|
|
||||||
for DIR in ${1}/* ; do
|
|
||||||
local sub_package=$(basename "${DIR}")
|
|
||||||
isIgnoredDirectory ${DIR} && continue
|
|
||||||
local regex=".+/(.+)/${sub_package}.js"
|
|
||||||
if [[ "${DIR}/${sub_package}.js" =~ $regex ]]; then
|
|
||||||
|
|
||||||
rollupIndex ${DIR} ${2}/${BASH_REMATCH[1]} ${sub_package} true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Recursively runs rollup on any entry point that has a "rollup.config.js" file
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Base source folder containing rollup.config.js
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
runRollup() {
|
|
||||||
if [[ -f "${1}/rollup.config.js" ]]; then
|
|
||||||
cd ${1}
|
|
||||||
|
|
||||||
echo "====== $ROLLUP -c ${1}/rollup.config.js --sourcemap"
|
|
||||||
$ROLLUP -c rollup.config.js --sourcemap >/dev/null 2>&1
|
|
||||||
|
|
||||||
# Recurse for sub directories
|
|
||||||
for DIR in ${1}/* ; do
|
|
||||||
isIgnoredDirectory ${DIR} && continue
|
|
||||||
runRollup ${DIR}
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Adds banners to all files in a directory
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Directory to add license banners to
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
addBanners() {
|
|
||||||
for file in ${1}/*; do
|
|
||||||
if [[ -f ${file} && "${file##*.}" != "map" ]]; then
|
|
||||||
cat ${LICENSE_BANNER} > ${file}.tmp
|
|
||||||
cat ${file} >> ${file}.tmp
|
|
||||||
mv ${file}.tmp ${file}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Minifies files in a directory
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Directory to minify
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
minify() {
|
|
||||||
# Iterate over the files in this directory, rolling up each into ${2} directory
|
|
||||||
regex="(.+).js"
|
|
||||||
files=(${1}/*)
|
|
||||||
echo "${files[@]}"
|
|
||||||
for file in "${files[@]}"; do
|
|
||||||
echo "${file}"
|
|
||||||
base_file=$( basename "${file}" )
|
|
||||||
if [[ "${base_file}" =~ $regex && "${base_file##*.}" != "map" ]]; then
|
|
||||||
local out_file=$(dirname "${file}")/${BASH_REMATCH[1]}.min.js
|
|
||||||
echo "====== $UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}"
|
|
||||||
$UGLIFY -c --comments -o ${out_file} --source-map "includeSources=true,content='${file}.map',filename='${out_file}.map'" ${file}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Recursively compile package
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Source directory
|
|
||||||
# param2 - Out dir
|
|
||||||
# param3 - Package Name
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
compilePackage() {
|
|
||||||
# For TSC_PACKAGES items
|
|
||||||
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
|
|
||||||
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json"
|
|
||||||
local package_name=$(basename "${2}")
|
|
||||||
$TSC -p ${1}/tsconfig-build.json
|
|
||||||
if [[ "${3}" = "compiler" ]]; then
|
|
||||||
if [[ "${package_name}" = "testing" ]]; then
|
|
||||||
echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/${package_name}'" > ${2}/../${package_name}.d.ts
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json"
|
|
||||||
local package_name=$(basename "${2}")
|
|
||||||
$NGC -p ${1}/tsconfig-build.json
|
|
||||||
if [[ "${package_name}" != "locales" ]]; then
|
|
||||||
echo "====== Create ${1}/../${package_name}.d.ts re-export file for tsickle"
|
|
||||||
echo "$(cat ${LICENSE_BANNER}) ${N} export * from './${package_name}/${package_name}'" > ${2}/../${package_name}.d.ts
|
|
||||||
echo "{\"__symbolic\":\"module\",\"version\":3,\"metadata\":{},\"exports\":[{\"from\":\"./${package_name}/${package_name}\"}],\"flatModuleIndexRedirect\":true}" > ${2}/../${package_name}.metadata.json
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Build subpackages
|
|
||||||
for DIR in ${1}/* ; do
|
|
||||||
[ -d "${DIR}" ] || continue
|
|
||||||
BASE_DIR=$(basename "${DIR}")
|
|
||||||
# Skip over directories that are not nested entry points
|
|
||||||
[[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue
|
|
||||||
compilePackage ${DIR} ${2}/${BASE_DIR} ${3}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Recursively compile package
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Source directory
|
|
||||||
# param2 - Out dir
|
|
||||||
# param3 - Package Name
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
compilePackageES5() {
|
|
||||||
if containsElement "${3}" "${TSC_PACKAGES[@]}"; then
|
|
||||||
echo "====== [${3}]: COMPILING: ${TSC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
|
|
||||||
local package_name=$(basename "${2}")
|
|
||||||
$TSC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
|
|
||||||
else
|
|
||||||
echo "====== [${3}]: COMPILING: ${NGC} -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap"
|
|
||||||
local package_name=$(basename "${2}")
|
|
||||||
$NGC -p ${1}/tsconfig-build.json --target es5 -d false --outDir ${2} --importHelpers true --sourceMap
|
|
||||||
fi
|
|
||||||
|
|
||||||
for DIR in ${1}/* ; do
|
|
||||||
[ -d "${DIR}" ] || continue
|
|
||||||
BASE_DIR=$(basename "${DIR}")
|
|
||||||
# Skip over directories that are not nested entry points
|
|
||||||
[[ -e ${DIR}/tsconfig-build.json && "${BASE_DIR}" != "integrationtest" ]] || continue
|
|
||||||
compilePackageES5 ${DIR} ${2} ${3}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Adds a package.json in directories where needed (secondary entry point typings).
|
|
||||||
# This is read by NGC to be able to find the flat module index.
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Source directory of typings files
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
addNgcPackageJson() {
|
|
||||||
for DIR in ${1}/* ; do
|
|
||||||
[ -d "${DIR}" ] || continue
|
|
||||||
# Confirm there is an ${PACKAGE}.d.ts and ${PACKAGE}.metadata.json file. If so, create
|
|
||||||
# the package.json and recurse.
|
|
||||||
if [[ -f ${DIR}/${PACKAGE}.d.ts && -f ${DIR}/${PACKAGE}.metadata.json ]]; then
|
|
||||||
echo '{"typings": "${PACKAGE}.d.ts"}' > ${DIR}/package.json
|
|
||||||
addNgcPackageJson ${DIR}
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
updateVersionReferences() {
|
|
||||||
NPM_DIR="$1"
|
|
||||||
(
|
|
||||||
echo "====== VERSION: Updating version references in ${NPM_DIR}"
|
|
||||||
cd ${NPM_DIR}
|
|
||||||
echo "====== EXECUTE: perl -p -i -e \"s/0\.0\.0\-PLACEHOLDER/${VERSION}/g\" $""(grep -ril 0\.0\.0\-PLACEHOLDER .)"
|
|
||||||
perl -p -i -e "s/0\.0\.0\-PLACEHOLDER/${VERSION}/g" $(grep -ril 0\.0\.0\-PLACEHOLDER .) < /dev/null 2> /dev/null
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
#######################################
|
|
||||||
# Drops the last entry of a path. Similar to normalizing a path such as
|
|
||||||
# /parent/child/.. to /parent.
|
|
||||||
# Arguments:
|
|
||||||
# param1 - Directory on which to drop the last item
|
|
||||||
# Returns:
|
|
||||||
# None
|
|
||||||
#######################################
|
|
||||||
|
|
||||||
dropLast() {
|
|
||||||
local last_item=$(basename ${1})
|
|
||||||
local regex=local regex="(.+)/${last_item}"
|
|
||||||
if [[ "${1}" =~ $regex ]]; then
|
|
||||||
echo "${BASH_REMATCH[1]}"
|
|
||||||
else
|
|
||||||
echo "${1}"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
VERSION="${VERSION_PREFIX}${VERSION_SUFFIX}"
|
|
||||||
echo "====== BUILDING: Version ${VERSION}"
|
|
||||||
|
|
||||||
N="
|
|
||||||
"
|
|
||||||
TSC=`pwd`/node_modules/.bin/tsc
|
|
||||||
NGC="node --max-old-space-size=3000 `pwd`/dist/tools/@angular/compiler-cli/src/main"
|
|
||||||
UGLIFY=`pwd`/node_modules/.bin/uglifyjs
|
|
||||||
TSCONFIG=./tools/tsconfig.json
|
|
||||||
ROLLUP=`pwd`/node_modules/.bin/rollup
|
|
||||||
|
|
||||||
if [[ ${BUILD_TOOLS} == true ]]; then
|
|
||||||
travisFoldStart "build tools" "no-xtrace"
|
|
||||||
echo "====== (tools)COMPILING: \$(npm bin)/tsc -p ${TSCONFIG} ====="
|
|
||||||
rm -rf ./dist/tools/
|
|
||||||
mkdir -p ./dist/tools/
|
|
||||||
$(npm bin)/tsc -p ${TSCONFIG}
|
|
||||||
travisFoldEnd "build tools"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ ${BUILD_ALL} == true && ${TYPECHECK_ALL} == true ]]; then
|
|
||||||
travisFoldStart "clean dist" "no-xtrace"
|
|
||||||
rm -rf ./dist/all/
|
|
||||||
rm -rf ./dist/packages
|
|
||||||
travisFoldEnd "clean dist"
|
|
||||||
|
|
||||||
travisFoldStart "copy e2e files" "no-xtrace"
|
|
||||||
mkdir -p ./dist/all/
|
|
||||||
|
|
||||||
(
|
|
||||||
echo "====== Copying files needed for e2e tests ====="
|
|
||||||
cp -r ./modules/playground ./dist/all/
|
|
||||||
cp -r ./modules/playground/favicon.ico ./dist/
|
|
||||||
#rsync -aP ./modules/playground/* ./dist/all/playground/
|
|
||||||
mkdir ./dist/all/playground/vendor
|
|
||||||
cd ./dist/all/playground/vendor
|
|
||||||
ln -s ../../../../node_modules/core-js/client/core.js .
|
|
||||||
ln -s ../../../../node_modules/zone.js/dist/zone.js .
|
|
||||||
ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js .
|
|
||||||
ln -s ../../../../node_modules/systemjs/dist/system.src.js .
|
|
||||||
ln -s ../../../../node_modules/base64-js .
|
|
||||||
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
|
||||||
ln -s ../../../../node_modules/rxjs .
|
|
||||||
ln -s ../../../../node_modules/angular/angular.js .
|
|
||||||
ln -s ../../../../node_modules/hammerjs/hammer.js .
|
|
||||||
)
|
|
||||||
|
|
||||||
(
|
|
||||||
echo "====== Copying files needed for benchmarks ====="
|
|
||||||
cp -r ./modules/benchmarks ./dist/all/
|
|
||||||
cp -r ./modules/benchmarks/favicon.ico ./dist/
|
|
||||||
mkdir ./dist/all/benchmarks/vendor
|
|
||||||
cd ./dist/all/benchmarks/vendor
|
|
||||||
ln -s ../../../../node_modules/core-js/client/core.js .
|
|
||||||
ln -s ../../../../node_modules/zone.js/dist/zone.js .
|
|
||||||
ln -s ../../../../node_modules/zone.js/dist/long-stack-trace-zone.js .
|
|
||||||
ln -s ../../../../node_modules/systemjs/dist/system.src.js .
|
|
||||||
ln -s ../../../../node_modules/reflect-metadata/Reflect.js .
|
|
||||||
ln -s ../../../../node_modules/rxjs .
|
|
||||||
ln -s ../../../../node_modules/angular/angular.js .
|
|
||||||
ln -s ../../../../bower_components/polymer .
|
|
||||||
ln -s ../../../../node_modules/incremental-dom/dist/incremental-dom-cjs.js
|
|
||||||
)
|
|
||||||
travisFoldEnd "copy e2e files"
|
|
||||||
|
|
||||||
TSCONFIG="packages/tsconfig.json"
|
|
||||||
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
|
|
||||||
$TSC -p ${TSCONFIG}
|
|
||||||
travisFoldEnd "tsc -p ${TSCONFIG}"
|
|
||||||
TSCONFIG="packages/examples/tsconfig.json"
|
|
||||||
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
|
|
||||||
$TSC -p ${TSCONFIG}
|
|
||||||
travisFoldEnd "tsc -p ${TSCONFIG}"
|
|
||||||
TSCONFIG="modules/tsconfig.json"
|
|
||||||
travisFoldStart "tsc -p ${TSCONFIG}" "no-xtrace"
|
|
||||||
$TSC -p ${TSCONFIG}
|
|
||||||
travisFoldEnd "tsc -p ${TSCONFIG}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${BUILD_ALL} == true ]]; then
|
|
||||||
rm -rf ./dist/packages
|
|
||||||
if [[ ${BUNDLE} == true ]]; then
|
|
||||||
rm -rf ./dist/packages-dist
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${BUILD_TOOLS} == true || ${BUILD_ALL} == true ]]; then
|
|
||||||
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json"
|
|
||||||
$(npm bin)/tsc -p packages/compiler/tsconfig-tools.json
|
|
||||||
echo "====== (compiler)COMPILING: \$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json"
|
|
||||||
$(npm bin)/tsc -p packages/compiler-cli/tsconfig-tools.json
|
|
||||||
|
|
||||||
mkdir -p ./dist/packages-dist
|
|
||||||
rsync -a packages/bazel/ ./dist/packages-dist/bazel
|
|
||||||
echo "workspace(name=\"angular\")" > ./dist/packages-dist/bazel/WORKSPACE
|
|
||||||
# Remove BEGIN-INTERNAL...END-INTERAL blocks
|
|
||||||
# https://stackoverflow.com/questions/24175271/how-can-i-match-multi-line-patterns-in-the-command-line-with-perl-style-regex
|
|
||||||
perl -0777 -n -i -e "s/(?m)^.*BEGIN-INTERNAL[\w\W]*END-INTERNAL.*\n//g; print" $(grep -ril BEGIN-INTERNAL dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
|
||||||
# Re-host //packages/bazel/ which is just // in the public distro
|
|
||||||
perl -0777 -n -i -e "s#//packages/bazel/#//#g; print" $(grep -ril packages/bazel dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
|
||||||
perl -0777 -n -i -e "s#angular/packages/bazel/#angular/#g; print" $(grep -ril packages/bazel dist/packages-dist/bazel) < /dev/null 2> /dev/null
|
|
||||||
updateVersionReferences dist/packages-dist/bazel
|
|
||||||
fi
|
|
||||||
|
|
||||||
for PACKAGE in ${PACKAGES[@]}
|
|
||||||
do
|
|
||||||
travisFoldStart "build package: ${PACKAGE}" "no-xtrace"
|
|
||||||
PWD=`pwd`
|
|
||||||
ROOT_DIR=${PWD}/packages
|
|
||||||
SRC_DIR=${ROOT_DIR}/${PACKAGE}
|
|
||||||
ROOT_OUT_DIR=${PWD}/dist/packages
|
|
||||||
OUT_DIR=${ROOT_OUT_DIR}/${PACKAGE}
|
|
||||||
OUT_DIR_ESM5=${ROOT_OUT_DIR}/${PACKAGE}/esm5
|
|
||||||
NPM_DIR=${PWD}/dist/packages-dist/${PACKAGE}
|
|
||||||
ESM2015_DIR=${NPM_DIR}/esm2015
|
|
||||||
FESM2015_DIR=${NPM_DIR}/fesm2015
|
|
||||||
ESM5_DIR=${NPM_DIR}/esm5
|
|
||||||
FESM5_DIR=${NPM_DIR}/fesm5
|
|
||||||
BUNDLES_DIR=${NPM_DIR}/bundles
|
|
||||||
|
|
||||||
LICENSE_BANNER=${ROOT_DIR}/license-banner.txt
|
|
||||||
|
|
||||||
if [[ ${COMPILE_SOURCE} == true ]]; then
|
|
||||||
rm -rf ${OUT_DIR}
|
|
||||||
rm -f ${ROOT_OUT_DIR}/${PACKAGE}.js
|
|
||||||
compilePackage ${SRC_DIR} ${OUT_DIR} ${PACKAGE}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${BUNDLE} == true ]]; then
|
|
||||||
echo "====== BUNDLING ${PACKAGE}: ${SRC_DIR} ====="
|
|
||||||
rm -rf ${NPM_DIR} && mkdir -p ${NPM_DIR}
|
|
||||||
|
|
||||||
if ! containsElement "${PACKAGE}" "${NODE_PACKAGES[@]}"; then
|
|
||||||
|
|
||||||
echo "====== Copy ${PACKAGE} typings"
|
|
||||||
rsync -a --exclude=*.js --exclude=*.js.map ${OUT_DIR}/ ${NPM_DIR}
|
|
||||||
|
|
||||||
(
|
|
||||||
cd ${SRC_DIR}
|
|
||||||
echo "====== Copy ESM2015 for ${PACKAGE}"
|
|
||||||
rsync -a --exclude="locale/**" --exclude="**/*.d.ts" --exclude="**/*.metadata.json" ${OUT_DIR}/ ${ESM2015_DIR}
|
|
||||||
|
|
||||||
echo "====== Rollup ${PACKAGE}"
|
|
||||||
rollupIndex ${OUT_DIR} ${FESM2015_DIR} ${PACKAGE}
|
|
||||||
|
|
||||||
echo "====== Produce ESM5 version"
|
|
||||||
compilePackageES5 ${SRC_DIR} ${OUT_DIR_ESM5} ${PACKAGE}
|
|
||||||
rsync -a --exclude="locale/**" --exclude="**/*.d.ts" --exclude="**/*.metadata.json" ${OUT_DIR_ESM5}/ ${ESM5_DIR}
|
|
||||||
rollupIndex ${OUT_DIR_ESM5} ${FESM5_DIR} ${PACKAGE}
|
|
||||||
|
|
||||||
echo "====== Run rollup conversions on ${PACKAGE}"
|
|
||||||
runRollup ${SRC_DIR}
|
|
||||||
addBanners ${BUNDLES_DIR}
|
|
||||||
minify ${BUNDLES_DIR}
|
|
||||||
|
|
||||||
if [[ -e ${SRC_DIR}/build.sh ]]; then
|
|
||||||
echo "====== Custom build for ${PACKAGE}"
|
|
||||||
cd ${SRC_DIR} && ${SRC_DIR}/build.sh
|
|
||||||
fi
|
|
||||||
|
|
||||||
) 2>&1 | grep -v "as external dependency"
|
|
||||||
|
|
||||||
if [[ ${PACKAGE} == "common" ]]; then
|
|
||||||
echo "====== Copy i18n locale data"
|
|
||||||
rsync -a ${OUT_DIR}/locales/ ${NPM_DIR}/locales
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "====== Copy ${PACKAGE} node tool"
|
|
||||||
rsync -a ${OUT_DIR}/ ${NPM_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "====== Copy ${PACKAGE} package.json and .externs.js files"
|
|
||||||
rsync -am --include="package.json" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
|
|
||||||
rsync -am --include="*.externs.js" --include="*/" --exclude=* ${SRC_DIR}/ ${NPM_DIR}/
|
|
||||||
|
|
||||||
# Replace the NG_UPDATE_PACKAGE_GROUP value with the JSON array of packages.
|
|
||||||
perl -p -i -e "s/\"NG_UPDATE_PACKAGE_GROUP\"/${NG_UPDATE_PACKAGE_GROUP}/g" ${NPM_DIR}/package.json < /dev/null
|
|
||||||
|
|
||||||
cp ${ROOT_DIR}/README.md ${NPM_DIR}/
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
if [[ -d ${NPM_DIR} ]]; then
|
|
||||||
updateVersionReferences ${NPM_DIR}
|
|
||||||
fi
|
|
||||||
|
|
||||||
travisFoldEnd "build package: ${PACKAGE}"
|
|
||||||
done
|
|
||||||
|
|
||||||
if [[ ${BUILD_EXAMPLES} == true ]]; then
|
|
||||||
travisFoldStart "build examples" "no-xtrace"
|
|
||||||
echo "====== Building examples: ./packages/examples/build.sh ====="
|
|
||||||
./packages/examples/build.sh
|
|
||||||
travisFoldEnd "build examples"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${REMOVE_BENCHPRESS} == true ]]; then
|
|
||||||
travisFoldStart "remove benchpress" "no-xtrace"
|
|
||||||
echo ""
|
|
||||||
echo "==== Removing benchpress from publication"
|
|
||||||
rm -r dist/packages-dist/benchpress
|
|
||||||
travisFoldEnd "remove benchpress"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Print return arrows as a log separator
|
|
||||||
travisFoldReturnArrows
|
|
@ -8,7 +8,7 @@ Someone with committer access will do the rest.
|
|||||||
|
|
||||||
# Change approvals
|
# Change approvals
|
||||||
|
|
||||||
Change approvals in our monorepo are managed via [pullapprove.com](https://about.pullapprove.com/) and are configured via the `.pullapprove.yaml` file.
|
Change approvals in our monorepo are managed via [GitHub CODEOWNERS](https://help.github.com/articles/about-codeowners/) and are configured via the `.github/CODEOWNERS` file.
|
||||||
|
|
||||||
|
|
||||||
# Merging
|
# Merging
|
||||||
|
@ -5,55 +5,20 @@ The core packages are tested both in the browser (via Karma) and on the server (
|
|||||||
|
|
||||||
## Debugging in Karma
|
## Debugging in Karma
|
||||||
|
|
||||||
Run the unit tests as normal using via the `./test.sh` script. For example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./test.sh browserNoRouter
|
|
||||||
```
|
|
||||||
|
|
||||||
Once the initial build has completed and the Karma server has started up, you can go to the
|
|
||||||
Chrome browser that is automatically opened, usually pointing to `http://localhost:9876`.
|
|
||||||
The script will sit watching for code changes, recompiling the changed files and triggering
|
|
||||||
further runs of the unit tests in the browser.
|
|
||||||
|
|
||||||
In this browser there is a "DEBUG" link (in the top right corner). Clicking this link will
|
|
||||||
open up a new tab that will run the unit tests and will not timeout, giving you time to
|
|
||||||
step through the code.
|
|
||||||
|
|
||||||
Open up this tab's developer console to access the source code viewer where you can set
|
|
||||||
breakpoints and interrogate the current stack and variables.
|
|
||||||
|
|
||||||
It is useful to focus your debugging on one test at a time by changing that test to be
|
It is useful to focus your debugging on one test at a time by changing that test to be
|
||||||
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
|
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
|
||||||
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
|
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
|
||||||
it hits this test.
|
it hits this test.
|
||||||
|
|
||||||
|
Read more about starting the debugger for Karma with Bazel in the [BAZEL.md](./BAZEL.md)
|
||||||
|
document.
|
||||||
|
|
||||||
## Debugging in Node
|
## Debugging in Node
|
||||||
|
|
||||||
Run the unit tests as normal using the `./test.sh` script, but add the `--debug` flag to
|
|
||||||
the command. For example:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
./test.sh node --debug
|
|
||||||
```
|
|
||||||
|
|
||||||
Once the initial building has completed, the script will watch for code changes, recompiling
|
|
||||||
and running the unit tests via a tool call `cjs-jasmine`. Due to the `--debug` flag, each
|
|
||||||
test run will create a debugging server listening on a port (such as 9229), which can be
|
|
||||||
connected to by a debugger.
|
|
||||||
|
|
||||||
You can use Chrome as the debugger by navigating to `chrome://inspect` then clicking the
|
|
||||||
"Open dedicated DevTools for Node" link. This will open up a Developer console, which will
|
|
||||||
automatically connect to the debugging server.
|
|
||||||
|
|
||||||
It is useful to focus your debugging on one test at a time by changing that test to be
|
It is useful to focus your debugging on one test at a time by changing that test to be
|
||||||
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
|
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
|
||||||
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
|
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
|
||||||
it hits this test.
|
it hits this test.
|
||||||
|
|
||||||
**Problem with node 6:** at the time of writing, the node process does not tell the Chrome
|
Read more about starting the debugger for NodeJS tests with Bazel in the [BAZEL.md](./BAZEL.md)
|
||||||
debugger when it has completed, and so the debugger is not able to automatically disconnect
|
document.
|
||||||
from listening to the debugging server. To solve this, just close the developer tools window
|
|
||||||
after each run of the unit tests, before making changes to the code. This is fixed in node 8
|
|
||||||
and may be backported to node 6. This issue is tracked in
|
|
||||||
https://github.com/nodejs/node/pull/12814#issuecomment-309908579.
|
|
@ -82,33 +82,22 @@ Before submitting a PR, do not forget to remove them:
|
|||||||
To build Angular run:
|
To build Angular run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./build.sh
|
./scripts/build-packages-dist.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
* Results are put in the dist folder.
|
* Results are put in the `dist/packages-dist` folder.
|
||||||
|
|
||||||
## Running Tests Locally
|
## Running Tests Locally
|
||||||
|
|
||||||
To run tests:
|
Bazel is used as the primary tool for building and testing Angular. Building and testing is
|
||||||
|
incremental with Bazel, and it's possible to only run tests for an individual package instead
|
||||||
|
of for all packages.
|
||||||
|
|
||||||
```shell
|
Read more about this in the [BAZEL.md](./BAZEL.md) document. You should execute all test suites
|
||||||
$ ./test.sh node # Run all angular tests on node
|
before submitting a PR to Github.
|
||||||
|
|
||||||
$ ./test.sh browser # Run all angular tests in browser
|
All the tests are executed on our Continuous Integration infrastructure and a PR could only be
|
||||||
|
merged if the code is formatted properly and all tests are passing.
|
||||||
$ ./test.sh browserNoRouter # Optionally run all angular tests without router in browser
|
|
||||||
|
|
||||||
$ ./test.sh router # Optionally run only the router tests in browser
|
|
||||||
```
|
|
||||||
|
|
||||||
You should execute the 3 test suites before submitting a PR to github.
|
|
||||||
|
|
||||||
See [DEBUG.md](DEBUG.md) for information on debugging the code while running the unit tests.
|
|
||||||
|
|
||||||
All the tests are executed on our Continuous Integration infrastructure and a PR could only be merged once the tests pass.
|
|
||||||
|
|
||||||
- CircleCI fails if your code is not formatted properly,
|
|
||||||
- Travis CI fails if any of the test suites described above fails.
|
|
||||||
|
|
||||||
## <a name="clang-format"></a> Formatting your source code
|
## <a name="clang-format"></a> Formatting your source code
|
||||||
|
|
||||||
@ -147,13 +136,13 @@ http://github.com/angular/core-builds.
|
|||||||
|
|
||||||
You may find that your un-merged change needs some validation from external participants.
|
You may find that your un-merged change needs some validation from external participants.
|
||||||
Rather than requiring them to pull your Pull Request and build Angular locally, you can
|
Rather than requiring them to pull your Pull Request and build Angular locally, you can
|
||||||
publish the `*-builds` snapshots just like our Travis build does.
|
publish the `*-builds` snapshots just like our CircleCI build does.
|
||||||
|
|
||||||
First time, you need to create the github repositories:
|
First time, you need to create the github repositories:
|
||||||
|
|
||||||
``` shell
|
``` shell
|
||||||
$ export TOKEN=[get one from https://github.com/settings/tokens]
|
$ export TOKEN=[get one from https://github.com/settings/tokens]
|
||||||
$ CREATE_REPOS=1 TRAVIS= ./scripts/ci/publish-build-artifacts.sh [github username]
|
$ CREATE_REPOS=1 ./scripts/ci/publish-build-artifacts.sh [github username]
|
||||||
```
|
```
|
||||||
|
|
||||||
For subsequent snapshots, just run
|
For subsequent snapshots, just run
|
||||||
@ -185,7 +174,6 @@ and create it if it doesn't exist.
|
|||||||
"files.exclude": {
|
"files.exclude": {
|
||||||
"bazel-out": true,
|
"bazel-out": true,
|
||||||
".idea": true,
|
".idea": true,
|
||||||
".bowerrc": true,
|
|
||||||
".circleci": true,
|
".circleci": true,
|
||||||
".github": true,
|
".github": true,
|
||||||
"dist/**": true,
|
"dist/**": true,
|
||||||
|
@ -145,7 +145,7 @@ If a PR is missing the "PR target: *" label, or if the label is set to "TBD" whe
|
|||||||
|
|
||||||
Before a PR can be merged it must be approved by the appropriate reviewer(s).
|
Before a PR can be merged it must be approved by the appropriate reviewer(s).
|
||||||
|
|
||||||
To ensure that there right people review each change, we configured [PullApprove bot](https://about.pullapprove.com/) via (`.pullapprove.yaml`) to provide aggregate approval state via the GitHub PR Status API.
|
To ensure that the right people review each change, we configured [GitHub CODEOWNERS](https://help.github.com/articles/about-codeowners/) (via `.github/CODEOWNERS`) and require that each PR has at least one approval from the appropriate code owner.
|
||||||
|
|
||||||
Note that approved state does not mean a PR is ready to be merged.
|
Note that approved state does not mean a PR is ready to be merged.
|
||||||
For example, a reviewer might approve the PR but request a minor tweak that doesn't need further review, e.g., a rebase or small uncontroversial change.
|
For example, a reviewer might approve the PR but request a minor tweak that doesn't need further review, e.g., a rebase or small uncontroversial change.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"master": {
|
"master": {
|
||||||
"uncompressed": {
|
"uncompressed": {
|
||||||
"runtime": 1497,
|
"runtime": 1497,
|
||||||
"main": 185238,
|
"main": 187112,
|
||||||
"polyfills": 59608
|
"polyfills": 59608
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user