Compare commits
271 Commits
9.0.0-rc.5
...
8.2.11
Author | SHA1 | Date | |
---|---|---|---|
8bc2f0647b | |||
b71ccc2954 | |||
2daa838a04 | |||
a2716acf4c | |||
7a0cc534df | |||
5f52e63857 | |||
9409dce93c | |||
2fa788c9e6 | |||
73e667f61f | |||
a7d5d33f0a | |||
7e511e78cd | |||
9e76a38073 | |||
242981963e | |||
970df9ebaf | |||
4c7e7fbd09 | |||
5f78456170 | |||
36fd063737 | |||
c1b7f0370e | |||
882a9e3856 | |||
362b3e4d03 | |||
2952ea57a5 | |||
3541e590f4 | |||
8ef0ae3561 | |||
c3ff66c1ba | |||
a1d9848456 | |||
a3482f7076 | |||
006af0b985 | |||
9dc4815e39 | |||
4263d9ea0d | |||
30253a7df3 | |||
16b83e8e2f | |||
e0c10632ea | |||
686b62129c | |||
dd2587d9e5 | |||
2742649a52 | |||
eb0461d2d4 | |||
e24393c35b | |||
8237e958a6 | |||
9ba898d588 | |||
cd1b0c1b1f | |||
06072e0062 | |||
288e0ef7b6 | |||
88ad5052bf | |||
7e6644a25a | |||
d533d15001 | |||
d0abf1bc54 | |||
56ac18ea8c | |||
11d3b19b32 | |||
d96167fc54 | |||
68fed2fc28 | |||
57457fb7c7 | |||
a2fc5774a7 | |||
c6041b985e | |||
b45d2e0fb1 | |||
42f7419522 | |||
32f5241598 | |||
06e72721ca | |||
3a80069f65 | |||
0818e2c799 | |||
7b8b2d4622 | |||
f6526a0872 | |||
0984022192 | |||
bb7603104f | |||
bdea243fed | |||
2397144e01 | |||
466c754cc8 | |||
45fee069d7 | |||
432f7ce2a0 | |||
e8c34c47af | |||
e81fc14da1 | |||
d5c210a2e1 | |||
7dbde6f570 | |||
78de6211e3 | |||
104c786b90 | |||
9680f4c991 | |||
e63390daf8 | |||
af99f9e98e | |||
8398f9d54c | |||
da5d91b97b | |||
ba1ef6b1a5 | |||
acebf6464e | |||
e367aa2ca5 | |||
0ee2b755e2 | |||
f213c7a643 | |||
947c076ff2 | |||
6600bea815 | |||
6cd61aeb1c | |||
581b991432 | |||
4014aab300 | |||
b523844966 | |||
8d322c89b7 | |||
08a7c6f0b5 | |||
31f06ee3f9 | |||
1c5b157f10 | |||
38fe47316c | |||
9488da0d0a | |||
5a8c560373 | |||
d8675c7e72 | |||
bf29bd95a6 | |||
1775498b40 | |||
1eea575dfc | |||
0c624b2ca7 | |||
8659451d13 | |||
2565f67956 | |||
38f4dcd5e1 | |||
6e380cff82 | |||
76a84706b6 | |||
39302ba923 | |||
1c71db846f | |||
48e4b0eb7f | |||
9fd63c3ef6 | |||
aaea3878d9 | |||
8838a1b54c | |||
e742edca78 | |||
8304343e94 | |||
2ec91443e9 | |||
be30f25da6 | |||
c426a2595f | |||
896a8a441e | |||
b1e7f4c952 | |||
d3ee9e3926 | |||
2b7116a4f3 | |||
8be20f3a3e | |||
5112669d29 | |||
3d453fe6df | |||
32a6972cdc | |||
2cd5d4c64b | |||
3248fe865f | |||
b3ea6981cd | |||
f698a6bd73 | |||
97d2673eae | |||
4e93c4f87a | |||
b5f85638f7 | |||
efd13d31fc | |||
3a45bef0e7 | |||
5b105544fc | |||
4c5cfecc56 | |||
9d2348b9af | |||
e7bca0751c | |||
45c909a237 | |||
5b76b939af | |||
261593aab1 | |||
c9ce735675 | |||
b7f95bec04 | |||
d02573d05f | |||
8ff6ed6aa3 | |||
6aaf4eac89 | |||
1d0c93622d | |||
acd6c195a0 | |||
53a9a28ec0 | |||
aa8dd74176 | |||
ed6dcce13b | |||
d170e45784 | |||
7033e7eb22 | |||
893123936b | |||
31fcb9e036 | |||
c303d44df6 | |||
73dd43170b | |||
514271ba9c | |||
8d18b49899 | |||
6b0b7d01bf | |||
079773f54e | |||
b5cb120db0 | |||
0fb78d6c94 | |||
a80a8636ba | |||
0878d67757 | |||
5e0890b3af | |||
43bac21301 | |||
4df415060b | |||
039d70efec | |||
2a71496791 | |||
617a329c24 | |||
a00eae0b62 | |||
e54dd741ef | |||
7b4c1cdbe4 | |||
5e4babeaa9 | |||
f661f460bb | |||
44f233c02c | |||
31e8a52722 | |||
e3c9f9d794 | |||
e7c4e94c9a | |||
26dc826821 | |||
287247ef05 | |||
af170d2ae9 | |||
a01ed0d7b4 | |||
a7b94783b5 | |||
789dd6a0da | |||
e5b18e810c | |||
b8f86ad7d5 | |||
6f2e8afaed | |||
699c705a8d | |||
adc869ff88 | |||
46f2dcc470 | |||
2d9c4c1d82 | |||
0757702d63 | |||
174777443d | |||
baf2d9ddbc | |||
da444984a8 | |||
84a3daf609 | |||
c88cdea9ac | |||
7b3bd219f7 | |||
dc76c14e31 | |||
0ffc1d0d21 | |||
3d1b82be67 | |||
dec7e5286f | |||
2f812f31d5 | |||
18bac15ddd | |||
a1fe52b41c | |||
033fc3e6e5 | |||
76854287e5 | |||
972550ee08 | |||
c67f490d28 | |||
edd6cb5865 | |||
7b2617f087 | |||
d9d06899f4 | |||
eccb60cd6e | |||
3420d2923a | |||
6ec91dd4ca | |||
90ddee7a71 | |||
3300331691 | |||
6f3414bd68 | |||
1b0bd6b706 | |||
cfaefa9964 | |||
a48376b26a | |||
e6d8274c38 | |||
40df016390 | |||
eee75c2eea | |||
96aefc5019 | |||
038d823943 | |||
19095835a4 | |||
b560207bf5 | |||
c5de1fb05f | |||
62a9843ed0 | |||
75a162575f | |||
5bf912599f | |||
afd76a80da | |||
bb4627786d | |||
83d67b4a83 | |||
6ba31b9b84 | |||
a1c43b39a2 | |||
af91c21fd9 | |||
c00e7ff128 | |||
3bf2f98c35 | |||
2cabced9fc | |||
b38e8674bc | |||
553f335705 | |||
dde0a32946 | |||
9789cb6507 | |||
bb1fdb6c0f | |||
44b5bf486f | |||
14bfcfb731 | |||
04ebd59961 | |||
6129cfa269 | |||
b8f269414e | |||
8ed83caa19 | |||
aebf65d0ef | |||
b667bd2224 | |||
03e8a31bf5 | |||
800e90e4ed | |||
7290053952 | |||
14890e9117 | |||
06c49b4a6b | |||
d269b111dd | |||
46b160e925 | |||
dcbc28f729 | |||
9bdffb1e5c | |||
155f40c175 | |||
8c446b05d0 | |||
2647f708b7 | |||
fa15814d75 | |||
7a62530ed1 |
@ -6,5 +6,4 @@ aio/node_modules
|
|||||||
aio/tools/examples/shared/node_modules
|
aio/tools/examples/shared/node_modules
|
||||||
integration/bazel
|
integration/bazel
|
||||||
integration/bazel-schematics/demo
|
integration/bazel-schematics/demo
|
||||||
integration/platform-server/node_modules
|
|
||||||
packages/bazel/node_modules
|
packages/bazel/node_modules
|
||||||
|
78
.bazelrc
78
.bazelrc
@ -18,8 +18,11 @@ test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test
|
|||||||
# See https://github.com/bazelbuild/bazel/issues/4603
|
# See https://github.com/bazelbuild/bazel/issues/4603
|
||||||
build --symlink_prefix=dist/
|
build --symlink_prefix=dist/
|
||||||
|
|
||||||
|
# Disable watchfs as it causes tests to be flaky on Windows
|
||||||
|
# https://github.com/angular/angular/issues/29541
|
||||||
|
build --nowatchfs
|
||||||
|
|
||||||
# Turn off legacy external runfiles
|
# Turn off legacy external runfiles
|
||||||
build --nolegacy_external_runfiles
|
|
||||||
run --nolegacy_external_runfiles
|
run --nolegacy_external_runfiles
|
||||||
test --nolegacy_external_runfiles
|
test --nolegacy_external_runfiles
|
||||||
|
|
||||||
@ -59,39 +62,27 @@ test --test_output=errors
|
|||||||
# Settings for CircleCI #
|
# Settings for CircleCI #
|
||||||
################################
|
################################
|
||||||
|
|
||||||
# Bazel flags for CircleCI are in /.circleci/bazel.linux.rc and /.circleci/bazel.windows.rc
|
# Bazel flags for CircleCI are in /.circleci/bazel.rc
|
||||||
|
|
||||||
################################
|
################################
|
||||||
# Temporary Settings for Ivy #
|
# Temporary Settings for Ivy #
|
||||||
################################
|
################################
|
||||||
# To determine if the compiler used should be Ivy instead of ViewEngine, one can use `--config=ivy`
|
# to determine if the compiler used should be Ivy or ViewEngine one can use `--define=compile=aot` on
|
||||||
# on any bazel target. This is a temporary flag until codebase is permanently switched to Ivy.
|
# any bazel target. This is a temporary flag until codebase is permanently switched to Ivy.
|
||||||
build --define=angular_ivy_enabled=False
|
build --define=compile=legacy
|
||||||
|
|
||||||
build:view-engine --define=angular_ivy_enabled=False
|
###############################
|
||||||
build:ivy --define=angular_ivy_enabled=True
|
# Remote Build Execution support
|
||||||
|
# Turn on these settings with
|
||||||
|
# --config=remote
|
||||||
|
###############################
|
||||||
|
|
||||||
##################################
|
# Load default settings for Remote Build Execution.
|
||||||
# Remote Build Execution support #
|
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/.bazelrc.notoolchain
|
||||||
# Turn on these settings with #
|
|
||||||
# --config=remote #
|
|
||||||
##################################
|
|
||||||
|
|
||||||
# The following --define=EXECUTOR=remote will be able to be removed
|
|
||||||
# once https://github.com/bazelbuild/bazel/issues/7254 is fixed
|
|
||||||
build:remote --define=EXECUTOR=remote
|
|
||||||
|
|
||||||
# Set a higher timeout value, just in case.
|
|
||||||
build:remote --remote_timeout=600
|
|
||||||
|
|
||||||
# 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
|
||||||
build:remote --jobs=150
|
build:remote --jobs=150
|
||||||
build:remote --google_default_credentials
|
|
||||||
|
|
||||||
# Force remote exeuctions to consider the entire run as linux
|
|
||||||
build:remote --cpu=k8
|
|
||||||
build:remote --host_cpu=k8
|
|
||||||
|
|
||||||
# Toolchain and platform related flags
|
# Toolchain and platform related flags
|
||||||
build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk
|
build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk
|
||||||
@ -105,11 +96,21 @@ build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
|
|||||||
build:remote --host_platform=//tools:rbe_ubuntu1604-angular
|
build:remote --host_platform=//tools:rbe_ubuntu1604-angular
|
||||||
build:remote --platforms=//tools:rbe_ubuntu1604-angular
|
build:remote --platforms=//tools:rbe_ubuntu1604-angular
|
||||||
|
|
||||||
# Remote instance and caching
|
# Remote instance.
|
||||||
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
|
build:remote --remote_instance_name=projects/internal-200822/instances/default_instance
|
||||||
build:remote --project_id=internal-200822
|
build:remote --project_id=internal-200822
|
||||||
|
|
||||||
|
# Remote caching
|
||||||
build:remote --remote_cache=remotebuildexecution.googleapis.com
|
build:remote --remote_cache=remotebuildexecution.googleapis.com
|
||||||
build:remote --remote_executor=remotebuildexecution.googleapis.com
|
# By default, do not accept remote cache, to be set to true for CI based on environment
|
||||||
|
build:remote --remote_accept_cached=false
|
||||||
|
# By default, do not upload local results to cache, to be set to true for CI based on environment
|
||||||
|
build:remote --remote_upload_local_results=false
|
||||||
|
|
||||||
|
# Build Event Service Configuration
|
||||||
|
build:remote --bes_backend=buildeventservice.googleapis.com
|
||||||
|
build:remote --bes_timeout=30s
|
||||||
|
build:remote --bes_results_url="https://source.cloud.google.com/results/invocations/"
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
# NodeJS rules settings
|
# NodeJS rules settings
|
||||||
@ -120,6 +121,31 @@ build:remote --remote_executor=remotebuildexecution.googleapis.com
|
|||||||
# This allows us to avoid installing a second copy of node_modules
|
# This allows us to avoid installing a second copy of node_modules
|
||||||
common --experimental_allow_incremental_repository_updates
|
common --experimental_allow_incremental_repository_updates
|
||||||
|
|
||||||
|
# This option is changed to true in Bazel 0.27 and exposes a possible
|
||||||
|
# regression in Bazel 0.27.0.
|
||||||
|
# Error observed is in npm_package target `//packages/common/locales:package`:
|
||||||
|
# ```
|
||||||
|
# ERROR: /home/circleci/ng/packages/common/locales/BUILD.bazel:13:1: Assembling
|
||||||
|
# npm package packages/common/locales/package failed: No usable spawn strategy found
|
||||||
|
# for spawn with mnemonic SkylarkAction. Your --spawn_strategyor --strategy flags
|
||||||
|
# are probably too strict. Visit https://github.com/bazelbuild/bazel/issues/7480 for
|
||||||
|
# migration advises
|
||||||
|
# ```
|
||||||
|
# Suspect is https://github.com/bazelbuild/rules_nodejs/blob/master/internal/npm_package/npm_package.bzl#L75-L82:
|
||||||
|
# ```
|
||||||
|
# execution_requirements = {
|
||||||
|
# # Never schedule this action remotely because it's not computationally expensive.
|
||||||
|
# # It just copies files into a directory; it's not worth copying inputs and outputs to a remote worker.
|
||||||
|
# # Also don't run it in a sandbox, because it resolves an absolute path to the bazel-out directory
|
||||||
|
# # allowing the .pack and .publish runnables to work with no symlink_prefix
|
||||||
|
# # See https://github.com/bazelbuild/rules_nodejs/issues/187
|
||||||
|
# "local": "1",
|
||||||
|
# },
|
||||||
|
# ```
|
||||||
|
build --incompatible_list_based_execution_strategy_selection=false
|
||||||
|
test --incompatible_list_based_execution_strategy_selection=false
|
||||||
|
run --incompatible_list_based_execution_strategy_selection=false
|
||||||
|
|
||||||
####################################################
|
####################################################
|
||||||
# User bazel configuration
|
# User bazel configuration
|
||||||
# NOTE: This needs to be the *last* entry in the config.
|
# NOTE: This needs to be the *last* entry in the config.
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# Settings in this file should be OS agnostic. Use the bazel.<OS>.rc files for OS specific settings.
|
|
||||||
|
|
||||||
# Don't be spammy in the logs
|
|
||||||
build --noshow_progress
|
|
||||||
|
|
||||||
# Print all the options that apply to the build.
|
|
||||||
# This helps us diagnose which options override others
|
|
||||||
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
|
||||||
build --announce_rc
|
|
||||||
|
|
||||||
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
|
||||||
test --flaky_test_attempts=2
|
|
||||||
|
|
||||||
# More details on failures
|
|
||||||
build --verbose_failures=true
|
|
@ -2,16 +2,29 @@
|
|||||||
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
|
# We do this by copying this file to /etc/bazel.bazelrc at the start of the build.
|
||||||
# See documentation in /docs/BAZEL.md
|
# See documentation in /docs/BAZEL.md
|
||||||
|
|
||||||
# Import config items common to both Linux and Windows setups.
|
|
||||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
|
||||||
import %workspace%/.circleci/bazel.common.rc
|
|
||||||
|
|
||||||
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
||||||
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
||||||
build --repository_cache=/home/circleci/bazel_repository_cache
|
build --repository_cache=/home/circleci/bazel_repository_cache
|
||||||
|
|
||||||
|
# Don't be spammy in the logs
|
||||||
|
# TODO(gmagolan): Hide progress again once build performance improves
|
||||||
|
# Presently, CircleCI can timeout during bazel test ... with the following
|
||||||
|
# error: Too long with no output (exceeded 10m0s)
|
||||||
|
# build --noshow_progress
|
||||||
|
|
||||||
|
# Print all the options that apply to the build.
|
||||||
|
# This helps us diagnose which options override others
|
||||||
|
# (e.g. /etc/bazel.bazelrc vs. tools/bazel.rc)
|
||||||
|
build --announce_rc
|
||||||
|
|
||||||
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
# Workaround https://github.com/bazelbuild/bazel/issues/3645
|
||||||
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
# Bazel doesn't calculate the memory ceiling correctly when running under Docker.
|
||||||
# Limit Bazel to consuming resources that fit in CircleCI "xlarge" class
|
# Limit Bazel to consuming resources that fit in CircleCI "xlarge" class
|
||||||
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
|
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
|
||||||
build --local_resources=14336,8.0,1.0
|
build --local_resources=14336,8.0,1.0
|
||||||
|
|
||||||
|
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
||||||
|
test --flaky_test_attempts=2
|
||||||
|
|
||||||
|
# More details on failures
|
||||||
|
build --verbose_failures=true
|
@ -1,17 +0,0 @@
|
|||||||
# These options are enabled when running on CI
|
|
||||||
# We do this by copying this file to $env:ProgramData\bazel.bazelrc at the start of the build.
|
|
||||||
# See documentation in /docs/BAZEL.md
|
|
||||||
|
|
||||||
# Import config items common to both Linux and Windows setups.
|
|
||||||
# https://docs.bazel.build/versions/master/guide.html#bazelrc-syntax-and-semantics
|
|
||||||
import %workspace%/.circleci/bazel.common.rc
|
|
||||||
|
|
||||||
# Save downloaded repositories in a location that can be cached by CircleCI. This helps us
|
|
||||||
# speeding up the analysis time significantly with Bazel managed node dependencies on the CI.
|
|
||||||
build --repository_cache=C:/Users/circleci/bazel_repository_cache
|
|
||||||
|
|
||||||
# All windows jobs run on master and should use http caching
|
|
||||||
build --remote_http_cache=https://storage.googleapis.com/angular-team-cache
|
|
||||||
build --remote_accept_cached=true
|
|
||||||
build --remote_upload_local_results=true
|
|
||||||
build --google_default_credentials
|
|
@ -18,19 +18,17 @@ version: 2.1
|
|||||||
# cache changes. For example:
|
# cache changes. For example:
|
||||||
# 1) yarn lock file changes --> cached "node_modules" are different.
|
# 1) yarn lock file changes --> cached "node_modules" are different.
|
||||||
# 2) bazel repository definitions change --> cached bazel repositories are different.
|
# 2) bazel repository definitions change --> cached bazel repositories are different.
|
||||||
# Windows needs its own cache key because binaries in node_modules are different.
|
|
||||||
# **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
|
# **NOTE 1 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
|
||||||
# **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
|
# **NOTE 2 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
|
||||||
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
|
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
|
||||||
var_3: &cache_key v3-angular-node-10.16-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
|
var_3: &cache_key v3-angular-node-10.16-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
|
||||||
var_4: &cache_key_fallback v3-angular-node-10.16-
|
var_4: &cache_key_fallback v3-angular-node-10.16-
|
||||||
var_3_win: &cache_key_win v5-angular-win-node-12.0-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "packages/bazel/package.bzl" }}-{{ checksum "aio/yarn.lock" }}
|
|
||||||
var_4_win: &cache_key_win_fallback v5-angular-win-node-12.0-
|
|
||||||
|
|
||||||
# Cache key for the Material unit tests job. **Note** when updating the SHA in the cache keys,
|
# Cache key for the Material unit tests job. **Note** when updating the SHA in the cache keys,
|
||||||
# also update the SHA for the "MATERIAL_REPO_COMMIT" environment variable.
|
# also update the SHA for the "MATERIAL_REPO_COMMIT" environment variable.
|
||||||
var_5: &material_unit_tests_cache_key v5-angular-material-a5cad10cf9ca5db84c307d38d5594c3f1d89ae2b
|
var_5: &material_unit_tests_cache_key v4-angular-material-18b9ef3f5529f0fa8f034944681486447af7b879
|
||||||
var_6: &material_unit_tests_cache_key_fallback v5-angular-material-
|
var_6: &material_unit_tests_cache_key_fallback v4-angular-material-
|
||||||
|
|
||||||
|
|
||||||
# Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and
|
# Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages` and
|
||||||
# `build-ivy-npm-packages`.
|
# `build-ivy-npm-packages`.
|
||||||
@ -38,27 +36,6 @@ var_6: &material_unit_tests_cache_key_fallback v5-angular-material-
|
|||||||
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
|
# https://circleci.com/blog/deep-diving-into-circleci-workspaces/
|
||||||
var_7: &workspace_location ~/
|
var_7: &workspace_location ~/
|
||||||
|
|
||||||
# Filter to run a job on builds for pull requests only.
|
|
||||||
var_8: &only_on_pull_requests
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- /pull\/\d+/
|
|
||||||
|
|
||||||
# Filter to skip a job on builds for pull requests.
|
|
||||||
var_9: &skip_on_pull_requests
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
ignore:
|
|
||||||
- /pull\/\d+/
|
|
||||||
|
|
||||||
# Filter to run a job on builds for the master branch only.
|
|
||||||
var_10: &only_on_master
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
# Executor Definitions
|
# Executor Definitions
|
||||||
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
|
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
|
||||||
# **NOTE 1**: Pin to exact images using an ID (SHA). See https://circleci.com/docs/2.0/circleci-images/#using-a-docker-image-id-to-pin-an-image-to-a-fixed-version.
|
# **NOTE 1**: Pin to exact images using an ID (SHA). See https://circleci.com/docs/2.0/circleci-images/#using-a-docker-image-id-to-pin-an-image-to-a-fixed-version.
|
||||||
@ -92,25 +69,6 @@ executors:
|
|||||||
resource_class: << parameters.resource_class >>
|
resource_class: << parameters.resource_class >>
|
||||||
working_directory: ~/ng
|
working_directory: ~/ng
|
||||||
|
|
||||||
windows-executor:
|
|
||||||
working_directory: ~/ng
|
|
||||||
resource_class: windows.medium
|
|
||||||
# CircleCI windows VMs do have the GitBash shell available:
|
|
||||||
# https://github.com/CircleCI-Public/windows-preview-docs#shells
|
|
||||||
# But in this specific case we really should not use it because Bazel must not be ran from
|
|
||||||
# GitBash. These issues discuss why:
|
|
||||||
# https://github.com/bazelbuild/bazel/issues/5751
|
|
||||||
# https://github.com/bazelbuild/bazel/issues/5724#issuecomment-410194038
|
|
||||||
# https://github.com/bazelbuild/bazel/issues/6339#issuecomment-441600879
|
|
||||||
shell: powershell.exe -ExecutionPolicy Bypass
|
|
||||||
machine:
|
|
||||||
# Windows preview image that includes the following:
|
|
||||||
# - Visual Studio 2019 build tools
|
|
||||||
# - Node 12
|
|
||||||
# - yarn 1.17
|
|
||||||
# - Python 3 3.7.4
|
|
||||||
image: windows-server-2019-vs2019:201908-02
|
|
||||||
|
|
||||||
# Command Definitions
|
# Command Definitions
|
||||||
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
|
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-commands
|
||||||
commands:
|
commands:
|
||||||
@ -144,44 +102,10 @@ commands:
|
|||||||
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
|
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
|
||||||
git config --global gc.auto 0 || true
|
git config --global gc.auto 0 || true
|
||||||
|
|
||||||
# Normally this would be an individual job instead of a command.
|
|
||||||
# But startup and setup time for each invidual windows job are high enough to discourage
|
|
||||||
# many small jobs, so instead we use a command for setup unless the gain becomes significant.
|
|
||||||
setup_win:
|
|
||||||
description: Setup windows node environment
|
|
||||||
steps:
|
|
||||||
# Use the Linux workspace directly, as it already has checkout, rebased and node modules.
|
|
||||||
- custom_attach_workspace
|
|
||||||
# Install Bazel pre-requisites that aren't in the preconfigured CircleCI Windows VM.
|
|
||||||
- run: ./.circleci/windows-env.ps1
|
|
||||||
- run: node --version
|
|
||||||
- run: yarn --version
|
|
||||||
- restore_cache:
|
|
||||||
keys:
|
|
||||||
- *cache_key_win
|
|
||||||
- *cache_key_win_fallback
|
|
||||||
# Reinstall to get windows binaries.
|
|
||||||
- run: yarn install --frozen-lockfile --non-interactive
|
|
||||||
- setup_circleci_bazel_config_win
|
|
||||||
# Install @bazel/bazel globally and use that for the first run.
|
|
||||||
# Workaround for https://github.com/bazelbuild/rules_nodejs/issues/894
|
|
||||||
- run: yarn global add @bazel/bazel@$env:BAZEL_VERSION
|
|
||||||
- run: bazel info
|
|
||||||
|
|
||||||
setup_circleci_bazel_config:
|
setup_circleci_bazel_config:
|
||||||
description: Set up CircleCI bazel configuration on Linux
|
description: Set up CircleCI bazel configuration
|
||||||
steps:
|
steps:
|
||||||
- run: sudo cp .circleci/bazel.linux.rc $HOME/.bazelrc
|
- run: sudo cp .circleci/bazel.rc /etc/bazel.bazelrc
|
||||||
|
|
||||||
setup_circleci_bazel_config_win:
|
|
||||||
description: Set up CircleCI bazel configuration on Windows
|
|
||||||
steps:
|
|
||||||
- run: copy .circleci\bazel.windows.rc $env:USERPROFILE\.bazelrc
|
|
||||||
- run: mkdir $env:APPDATA\gcloud
|
|
||||||
# We need ensure that the same default digest is used for encoding and decoding
|
|
||||||
# with openssl. Openssl versions might have different default digests which can
|
|
||||||
# cause decryption failures based on the openssl version. https://stackoverflow.com/a/39641378/4317734
|
|
||||||
- run: openssl aes-256-cbc -d -in .circleci\gcp_token -md md5 -out "$env:APPDATA\gcloud\application_default_credentials.json" -k "$env:CIRCLE_PROJECT_REPONAME"
|
|
||||||
|
|
||||||
setup_bazel_rbe:
|
setup_bazel_rbe:
|
||||||
description: Setup bazel RBE remote execution
|
description: Setup bazel RBE remote execution
|
||||||
@ -298,9 +222,7 @@ jobs:
|
|||||||
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
||||||
# not be able to easily find the output bin directory when uploading artifacts for size
|
# not be able to easily find the output bin directory when uploading artifacts for size
|
||||||
# measurements.
|
# measurements.
|
||||||
- run:
|
- run: yarn test-ivy-aot //... --symlink_prefix=dist/
|
||||||
command: yarn test-ivy-aot //... --symlink_prefix=dist/
|
|
||||||
no_output_timeout: 20m
|
|
||||||
|
|
||||||
# Publish bundle artifacts which will be used to calculate the size change. **Note**: Make
|
# Publish bundle artifacts which will be used to calculate the size change. **Note**: Make
|
||||||
# sure that the size plugin from the Angular robot fetches the artifacts from this CircleCI
|
# sure that the size plugin from the Angular robot fetches the artifacts from this CircleCI
|
||||||
@ -362,10 +284,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
# Compile dependencies to ivy
|
|
||||||
# Running `ngcc` here (instead of implicitly via `ng build`) allows us to take advantage of
|
|
||||||
# the parallel, async mode speed-up (~20-25s on CI).
|
|
||||||
- run: yarn --cwd aio ngcc --properties es2015
|
|
||||||
# Build aio
|
# Build aio
|
||||||
- run: yarn --cwd aio build --progress=false
|
- run: yarn --cwd aio build --progress=false
|
||||||
# Lint the code
|
# Lint the code
|
||||||
@ -395,7 +313,7 @@ jobs:
|
|||||||
|
|
||||||
test_aio_local:
|
test_aio_local:
|
||||||
parameters:
|
parameters:
|
||||||
viewengine:
|
ivy:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
||||||
@ -404,7 +322,7 @@ jobs:
|
|||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
# Build aio (with local Angular packages)
|
# Build aio (with local Angular packages)
|
||||||
- run: yarn --cwd aio build-local<<# parameters.viewengine >>-with-viewengine<</ parameters.viewengine >>-ci
|
- run: yarn --cwd aio build-local<<# parameters.ivy >>-with-ivy<</ parameters.ivy >>-ci
|
||||||
# Run unit tests
|
# Run unit tests
|
||||||
- run: yarn --cwd aio test --progress=false --watch=false
|
- run: yarn --cwd aio test --progress=false --watch=false
|
||||||
# Run e2e tests
|
# Run e2e tests
|
||||||
@ -412,7 +330,7 @@ jobs:
|
|||||||
# Run PWA-score tests
|
# Run PWA-score tests
|
||||||
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
||||||
# Check the bundle sizes.
|
# Check the bundle sizes.
|
||||||
- run: yarn --cwd aio payload-size aio-local<<# parameters.viewengine >>-viewengine<</ parameters.viewengine >>
|
- run: yarn --cwd aio payload-size aio-local<<# parameters.ivy >>-ivy<</ parameters.ivy >>
|
||||||
|
|
||||||
test_aio_tools:
|
test_aio_tools:
|
||||||
executor: default-executor
|
executor: default-executor
|
||||||
@ -502,14 +420,13 @@ jobs:
|
|||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
- setup_bazel_rbe
|
||||||
|
|
||||||
- run: node scripts/build-packages-dist.js
|
- run: scripts/build-packages-dist.sh
|
||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: *workspace_location
|
root: *workspace_location
|
||||||
paths:
|
paths:
|
||||||
- ng/dist/packages-dist
|
- ng/dist/packages-dist
|
||||||
- ng/dist/zone.js-dist
|
|
||||||
|
|
||||||
# Save dependencies and bazel repository cache to use on subsequent runs.
|
# Save dependencies and bazel repository cache to use on subsequent runs.
|
||||||
- save_cache:
|
- save_cache:
|
||||||
@ -530,7 +447,7 @@ jobs:
|
|||||||
- setup_circleci_bazel_config
|
- setup_circleci_bazel_config
|
||||||
- setup_bazel_rbe
|
- setup_bazel_rbe
|
||||||
|
|
||||||
- run: node scripts/build-ivy-npm-packages.js
|
- run: scripts/build-ivy-npm-packages.sh
|
||||||
|
|
||||||
# Save the npm packages from //packages/... for other workflow jobs to read
|
# Save the npm packages from //packages/... for other workflow jobs to read
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
@ -560,36 +477,6 @@ jobs:
|
|||||||
# amount of container nodes for this job is controlled by the "parallelism" option.
|
# amount of container nodes for this job is controlled by the "parallelism" option.
|
||||||
- run: ./integration/run_tests.sh ${CIRCLE_NODE_INDEX} ${CIRCLE_NODE_TOTAL}
|
- run: ./integration/run_tests.sh ${CIRCLE_NODE_INDEX} ${CIRCLE_NODE_TOTAL}
|
||||||
|
|
||||||
# This job creates compressed tarballs (`.tgz` files) for all Angular packages and stores them as
|
|
||||||
# build artifacts. This makes it easy to try out changes from a PR build for testing purposes.
|
|
||||||
# More info CircleCI build artifacts: https://circleci.com/docs/2.0/artifacts
|
|
||||||
#
|
|
||||||
# NOTE: Currently, this job only runs for PR builds. See `publish_snapshot` for non-PR builds.
|
|
||||||
publish_packages_as_artifacts:
|
|
||||||
executor: default-executor
|
|
||||||
environment:
|
|
||||||
NG_PACKAGES_DIR: &ng_packages_dir 'dist/packages-dist'
|
|
||||||
NG_PACKAGES_ARCHIVES_DIR: &ng_packages_archives_dir 'dist/packages-dist-archives'
|
|
||||||
ZONEJS_PACKAGES_DIR: &zonejs_packages_dir 'dist/zone.js-dist'
|
|
||||||
ZONEJS_PACKAGES_ARCHIVES_DIR: &zonejs_packages_archives_dir 'dist/zone.js-dist-archives'
|
|
||||||
steps:
|
|
||||||
- custom_attach_workspace
|
|
||||||
- init_environment
|
|
||||||
# Publish `@angular/*` packages.
|
|
||||||
- run:
|
|
||||||
name: Create artifacts for @angular/* packages
|
|
||||||
command: ./scripts/ci/create-package-archives.sh $CI_BRANCH $CI_COMMIT $NG_PACKAGES_DIR $NG_PACKAGES_ARCHIVES_DIR
|
|
||||||
- store_artifacts:
|
|
||||||
path: *ng_packages_archives_dir
|
|
||||||
destination: angular
|
|
||||||
# Publish `zone.js` package.
|
|
||||||
- run:
|
|
||||||
name: Create artifacts for zone.js package
|
|
||||||
command: ./scripts/ci/create-package-archives.sh $CI_BRANCH $CI_COMMIT $ZONEJS_PACKAGES_DIR $ZONEJS_PACKAGES_ARCHIVES_DIR
|
|
||||||
- store_artifacts:
|
|
||||||
path: *zonejs_packages_archives_dir
|
|
||||||
destination: zone.js
|
|
||||||
|
|
||||||
# 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.
|
||||||
publish_snapshot:
|
publish_snapshot:
|
||||||
@ -678,7 +565,6 @@ jobs:
|
|||||||
background: true
|
background: true
|
||||||
- run: yarn tsc -p packages
|
- run: yarn tsc -p packages
|
||||||
- run: yarn tsc -p modules
|
- run: yarn tsc -p modules
|
||||||
- run: yarn bazel build //packages/zone.js:npm_package
|
|
||||||
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
|
# Waits for the Saucelabs tunnel to be ready. This ensures that we don't run tests
|
||||||
# too early without Saucelabs not being ready.
|
# too early without Saucelabs not being ready.
|
||||||
- run: ./scripts/saucelabs/wait-for-tunnel.sh
|
- run: ./scripts/saucelabs/wait-for-tunnel.sh
|
||||||
@ -695,7 +581,7 @@ jobs:
|
|||||||
# the ESM5/ES2015 output. See: https://github.com/angular/angular/issues/27966
|
# the ESM5/ES2015 output. See: https://github.com/angular/angular/issues/27966
|
||||||
# - run: yarn gulp source-map-test
|
# - run: yarn gulp source-map-test
|
||||||
|
|
||||||
# Job to run unit tests from angular/components. Needs a browser since all
|
# Job to run unit tests from angular/material2. Needs a browser since all
|
||||||
# component unit tests assume they're running in the browser environment.
|
# component unit tests assume they're running in the browser environment.
|
||||||
material-unit-tests:
|
material-unit-tests:
|
||||||
executor:
|
executor:
|
||||||
@ -720,11 +606,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
# Run yarn install to fetch the Bazel binaries as used in the Material repo.
|
# Run yarn install to fetch the Bazel binaries as used in the Material repo.
|
||||||
name: Installing Material dependencies.
|
name: Installing Material dependencies.
|
||||||
# TODO: remove this once the repo has been updated to use NodeJS v12 and Yarn 1.19.1.
|
command: yarn --cwd ${MATERIAL_REPO_TMP_DIR} install --frozen-lockfile --non-interactive
|
||||||
# We temporarily ignore the "engines" because the Angular components repository has
|
|
||||||
# minimum dependency on NodeJS v12 and Yarn 1.19.1, but the framework repository uses
|
|
||||||
# older versions.
|
|
||||||
command: yarn --ignore-engines --cwd ${MATERIAL_REPO_TMP_DIR} install --frozen-lockfile --non-interactive
|
|
||||||
- save_cache:
|
- save_cache:
|
||||||
key: *material_unit_tests_cache_key
|
key: *material_unit_tests_cache_key
|
||||||
paths:
|
paths:
|
||||||
@ -746,8 +628,6 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- custom_attach_workspace
|
- custom_attach_workspace
|
||||||
- init_environment
|
- init_environment
|
||||||
- setup_circleci_bazel_config
|
|
||||||
- setup_bazel_rbe
|
|
||||||
# Install
|
# Install
|
||||||
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
- run: yarn --cwd packages/zone.js install --frozen-lockfile --non-interactive
|
||||||
# Run zone.js tools tests
|
# Run zone.js tools tests
|
||||||
@ -758,34 +638,6 @@ jobs:
|
|||||||
cp dist/bin/packages/zone.js/npm_package/dist/zone-patch-electron.js ./packages/zone.js/test/extra/ &&
|
cp dist/bin/packages/zone.js/npm_package/dist/zone-patch-electron.js ./packages/zone.js/test/extra/ &&
|
||||||
yarn --cwd packages/zone.js electrontest
|
yarn --cwd packages/zone.js electrontest
|
||||||
|
|
||||||
# Windows jobs
|
|
||||||
# Docs: https://circleci.com/docs/2.0/hello-world-windows/
|
|
||||||
test_win:
|
|
||||||
executor: windows-executor
|
|
||||||
steps:
|
|
||||||
- setup_win
|
|
||||||
- run:
|
|
||||||
# Ran into a command parsing problem where `-browser:chromium-local` was converted to
|
|
||||||
# `-browser: chromium-local` (a space was added) in https://circleci.com/gh/angular/angular/357511.
|
|
||||||
# Probably a powershell command parsing thing. There's no problem using a yarn script though.
|
|
||||||
command: yarn circleci-win-ve
|
|
||||||
no_output_timeout: 45m
|
|
||||||
# Save bazel repository cache to use on subsequent runs.
|
|
||||||
# We don't save node_modules because it's faster to use the linux workspace and reinstall.
|
|
||||||
- save_cache:
|
|
||||||
key: *cache_key_win
|
|
||||||
paths:
|
|
||||||
- "C:/Users/circleci/bazel_repository_cache"
|
|
||||||
|
|
||||||
test_ivy_aot_win:
|
|
||||||
executor: windows-executor
|
|
||||||
steps:
|
|
||||||
- setup_win
|
|
||||||
- run:
|
|
||||||
command: yarn circleci-win-ivy
|
|
||||||
no_output_timeout: 45m
|
|
||||||
|
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
default_workflow:
|
default_workflow:
|
||||||
@ -816,13 +668,15 @@ workflows:
|
|||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
- test_saucelabs_bazel:
|
- test_saucelabs_bazel:
|
||||||
|
requires:
|
||||||
|
- setup
|
||||||
# This job is currently a PoC and a subset of `legacy-unit-tests-saucelabs`. Running on
|
# This job is currently a PoC and a subset of `legacy-unit-tests-saucelabs`. Running on
|
||||||
# master only to avoid wasting resources.
|
# master only to avoid wasting resources.
|
||||||
#
|
#
|
||||||
# TODO: Run this job on all branches (including PRs) as soon as it is not a PoC.
|
# TODO: Run this job on all branches (including PRs) as soon as it is not a PoC.
|
||||||
<<: *only_on_master
|
filters:
|
||||||
requires:
|
branches:
|
||||||
- setup
|
only: master
|
||||||
- test_aio:
|
- test_aio:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
@ -833,8 +687,8 @@ workflows:
|
|||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_aio_local:
|
- test_aio_local:
|
||||||
name: test_aio_local_viewengine
|
name: test_aio_local_ivy
|
||||||
viewengine: true
|
ivy: true
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- test_aio_tools:
|
- test_aio_tools:
|
||||||
@ -849,19 +703,18 @@ workflows:
|
|||||||
requires:
|
requires:
|
||||||
- build-ivy-npm-packages
|
- build-ivy-npm-packages
|
||||||
- aio_preview:
|
- aio_preview:
|
||||||
# Only run on PR builds. (There can be no previews for non-PR builds.)
|
|
||||||
<<: *only_on_pull_requests
|
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
|
# Only run on PR builds. (There can be no previews for non-PR builds.)
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: /pull\/\d+/
|
||||||
- test_aio_preview:
|
- test_aio_preview:
|
||||||
requires:
|
requires:
|
||||||
- aio_preview
|
- aio_preview
|
||||||
- integration_test:
|
- integration_test:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-npm-packages
|
||||||
- publish_packages_as_artifacts:
|
|
||||||
requires:
|
|
||||||
- build-npm-packages
|
|
||||||
- publish_snapshot:
|
- publish_snapshot:
|
||||||
# Note: no filters on this job because we want it to run for all upstream branches
|
# Note: no filters on this job because we want it to run for all upstream branches
|
||||||
# We'd really like to filter out pull requests here, but not yet available:
|
# We'd really like to filter out pull requests here, but not yet available:
|
||||||
@ -874,7 +727,7 @@ 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_aio_local_viewengine
|
- test_aio_local_ivy
|
||||||
- test_docs_examples
|
- test_docs_examples
|
||||||
- test_docs_examples_ivy
|
- test_docs_examples_ivy
|
||||||
# Get the artifacts to publish from the build-packages-dist job
|
# Get the artifacts to publish from the build-packages-dist job
|
||||||
@ -885,24 +738,10 @@ workflows:
|
|||||||
- legacy-misc-tests
|
- legacy-misc-tests
|
||||||
- material-unit-tests:
|
- material-unit-tests:
|
||||||
requires:
|
requires:
|
||||||
- build-npm-packages
|
- build-ivy-npm-packages
|
||||||
- test_zonejs:
|
- test_zonejs:
|
||||||
requires:
|
requires:
|
||||||
- setup
|
- setup
|
||||||
# Windows Jobs
|
|
||||||
# These are very slow so we run them on non-PRs only for now.
|
|
||||||
# TODO: remove the filter when CircleCI makes Windows FS faster.
|
|
||||||
# The Windows jobs are only run after their non-windows counterparts finish successfully.
|
|
||||||
# This isn't strictly necessary as there is no artifact dependency, but helps economize
|
|
||||||
# CI resources by not attempting to build when we know should fail.
|
|
||||||
- test_win:
|
|
||||||
<<: *skip_on_pull_requests
|
|
||||||
requires:
|
|
||||||
- test
|
|
||||||
- test_ivy_aot_win:
|
|
||||||
<<: *skip_on_pull_requests
|
|
||||||
requires:
|
|
||||||
- test_ivy_aot
|
|
||||||
|
|
||||||
aio_monitoring:
|
aio_monitoring:
|
||||||
jobs:
|
jobs:
|
||||||
@ -915,6 +754,9 @@ workflows:
|
|||||||
- setup
|
- setup
|
||||||
triggers:
|
triggers:
|
||||||
- schedule:
|
- schedule:
|
||||||
<<: *only_on_master
|
|
||||||
# Runs AIO monitoring jobs at 10:00AM every day.
|
# Runs AIO monitoring jobs at 10:00AM every day.
|
||||||
cron: "0 10 * * *"
|
cron: "0 10 * * *"
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
@ -84,7 +84,7 @@ setPublicVar MATERIAL_REPO_TMP_DIR "/tmp/material2"
|
|||||||
setPublicVar MATERIAL_REPO_URL "https://github.com/angular/material2.git"
|
setPublicVar MATERIAL_REPO_URL "https://github.com/angular/material2.git"
|
||||||
setPublicVar MATERIAL_REPO_BRANCH "master"
|
setPublicVar MATERIAL_REPO_BRANCH "master"
|
||||||
# **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI "config.yml".
|
# **NOTE**: When updating the commit SHA, also update the cache key in the CircleCI "config.yml".
|
||||||
setPublicVar MATERIAL_REPO_COMMIT "a5cad10cf9ca5db84c307d38d5594c3f1d89ae2b"
|
setPublicVar MATERIAL_REPO_COMMIT "18b9ef3f5529f0fa8f034944681486447af7b879"
|
||||||
|
|
||||||
# Source `$BASH_ENV` to make the variables available immediately.
|
# Source `$BASH_ENV` to make the variables available immediately.
|
||||||
source $BASH_ENV;
|
source $BASH_ENV;
|
||||||
|
@ -1,41 +0,0 @@
|
|||||||
# Install Bazel pre-reqs on Windows
|
|
||||||
# https://docs.bazel.build/versions/master/install-windows.html
|
|
||||||
# https://docs.bazel.build/versions/master/windows.html
|
|
||||||
# Install MSYS2 and packages
|
|
||||||
choco install msys2 --version 20180531.0.0 --no-progress --package-parameters "/NoUpdate"
|
|
||||||
C:\tools\msys64\usr\bin\bash.exe -l -c "pacman --needed --noconfirm -S zip unzip patch diffutils git"
|
|
||||||
|
|
||||||
# Add PATH modifications to the Powershell profile. This is the win equivalent of .bash_profile.
|
|
||||||
# https://docs.microsoft.com/en-us/previous-versions//bb613488(v=vs.85)
|
|
||||||
new-item -path $profile -itemtype file -force
|
|
||||||
# Paths for nodejs, npm, yarn, and msys2. Use single quotes to prevent interpolation.
|
|
||||||
# Add before the original path to use msys2 instead of the installed gitbash.
|
|
||||||
Add-Content $profile '$Env:path = "${Env:ProgramFiles}\nodejs\;C:\Users\circleci\AppData\Roaming\npm\;${Env:ProgramFiles(x86)}\Yarn\bin\;C:\Users\circleci\AppData\Local\Yarn\bin\;C:\tools\msys64\usr\bin\;" + $Env:path'
|
|
||||||
# Environment variables for Bazel
|
|
||||||
Add-Content $profile '$Env:BAZEL_SH = "C:\tools\msys64\usr\bin\bash.exe"'
|
|
||||||
|
|
||||||
# Get the bazel version devdep and store it in a global var for use in the circleci job.
|
|
||||||
$bazelVersion = & ${Env:ProgramFiles}\nodejs\node.exe -e "console.log(require('./package.json').devDependencies['@bazel/bazel'])"
|
|
||||||
# This is a tricky situation: we want $bazelVersion to be evaluated but not $Env:BAZEL_VERSION.
|
|
||||||
# Formatting works https://stackoverflow.com/questions/32127583/expand-variable-inside-single-quotes
|
|
||||||
$bazelVersionGlobalVar = '$Env:BAZEL_VERSION = "{0}"' -f $bazelVersion
|
|
||||||
Add-Content $profile $bazelVersionGlobalVar
|
|
||||||
|
|
||||||
# Remove the CircleCI checkout SSH override, because it breaks cloning repositories through Bazel.
|
|
||||||
# See https://circleci.com/gh/angular/angular/401454 for an example.
|
|
||||||
# TODO: is this really needed? Maybe there's a better way. It doesn't happen on Linux or on Codefresh.
|
|
||||||
git config --global --unset url.ssh://git@github.com.insteadOf
|
|
||||||
|
|
||||||
|
|
||||||
# These Bazel prereqs aren't needed because the CircleCI image already includes them.
|
|
||||||
# choco install nodejs --version 10.16.0 --no-progress
|
|
||||||
# choco install yarn --version 1.16.0 --no-progress
|
|
||||||
# choco install vcredist2015 --version 14.0.24215.20170201
|
|
||||||
|
|
||||||
# We don't need VS Build Tools for the tested bazel targets.
|
|
||||||
# If it's needed again, uncomment these lines.
|
|
||||||
# VS Build Tools are needed for Bazel C++ targets (like com_google_protobuf)
|
|
||||||
# choco install visualstudio2019buildtools --version 16.1.2.0 --no-progress --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.Component.VC.Runtime.UCRTSDK --add Microsoft.VisualStudio.Component.Windows10SDK.17763"
|
|
||||||
# Add-Content $profile '$Env:BAZEL_VC = "${Env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\BuildTools\VC\"'
|
|
||||||
# Python is needed for Bazel Python targets
|
|
||||||
# choco install python --version 3.5.1 --no-progress
|
|
@ -1,31 +0,0 @@
|
|||||||
# VSCode Remote Development - Developing inside a Containers
|
|
||||||
|
|
||||||
This folder contains configuration files that can be used to opt into working on this repository in a [Docker container](https://www.docker.com/resources/what-container) via [VSCode](https://code.visualstudio.com/)'s Remote Development feature (see below).
|
|
||||||
|
|
||||||
Info on remote development and developing inside a container with VSCode:
|
|
||||||
- [VSCode: Remote Development](https://code.visualstudio.com/docs/remote/remote-overview)
|
|
||||||
- [VSCode: Developing inside a Container](https://code.visualstudio.com/docs/remote/containers)
|
|
||||||
- [VSCode: Remote Development FAQ](https://code.visualstudio.com/docs/remote/faq)
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
_Prerequisite: [Install Docker](https://docs.docker.com/install) on your local environment._
|
|
||||||
|
|
||||||
To get started, read and follow the instuctions in [Developing inside a Container](https://code.visualstudio.com/docs/remote/containers). The [.devcontainer/](.) directory contains pre-configured `devcontainer.json` and `Dockerfile` files, which you can use to set up remote development with a docker container.
|
|
||||||
|
|
||||||
In a nutshell, you need to:
|
|
||||||
- Install the [Remote - Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension.
|
|
||||||
- Copy [recommended-Dockerfile](./recommended-Dockerfile) to `Dockerfile` (and optionally tweak to suit your needs).
|
|
||||||
- Copy [recommended-devcontainer.json](./recommended-devcontainer.json) to `devcontainer.json` (and optionally tweak to suit your needs).
|
|
||||||
- Open VSCode and bring up the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
|
|
||||||
- Type `Remote-Containers: Open Folder in Container` and choose your local clone of [angular/angular](https://github.com/angular/angular).
|
|
||||||
|
|
||||||
The `.devcontainer/devcontainer.json` and `.devcontainer/Dockerfile` files are ignored by git, so you can have your own local versions. We may occasionally update the template files ([recommended-devcontainer.json](./recommended-devcontainer.json), [recommended-Dockerfile](./recommended-Dockerfile)), in which case you will need to manually update your local copies (if desired).
|
|
||||||
|
|
||||||
|
|
||||||
## Updating `recommended-devcontainer.json` and `recommended-Dockerfile`
|
|
||||||
|
|
||||||
You can update and commit the recommended config files (which people use as basis for their local configs), if you find that something is broken, out-of-date or can be improved.
|
|
||||||
|
|
||||||
Please, keep in mind that any changes you make will potentially be used by many people on different environments. Try to keep these config files cross-platform compatible and free of personal preferences.
|
|
@ -1,5 +1,5 @@
|
|||||||
# Image metadata and config.
|
# Image metadata and config.
|
||||||
FROM circleci/node:10-browsers # This needs to be in sync with what we use on CI.
|
FROM circleci/node:10-browsers
|
||||||
|
|
||||||
LABEL name="Angular dev environment" \
|
LABEL name="Angular dev environment" \
|
||||||
description="This image can be used to create a dev environment for building Angular." \
|
description="This image can be used to create a dev environment for building Angular." \
|
||||||
@ -15,7 +15,7 @@ USER root
|
|||||||
|
|
||||||
# Configure `Node.js`/`npm` and install utilities.
|
# Configure `Node.js`/`npm` and install utilities.
|
||||||
RUN npm config --global set user root
|
RUN npm config --global set user root
|
||||||
RUN npm install --global yarn@1.19.1 # This needs to be in sync with what we use on CI.
|
RUN npm install --global yarn@1.13.0 # This needs to be in sync with what we use on CI.
|
||||||
|
|
||||||
|
|
||||||
# Go! (And keep going.)
|
# Go! (And keep going.)
|
||||||
|
104
.github/CODEOWNERS
vendored
104
.github/CODEOWNERS
vendored
@ -50,7 +50,6 @@
|
|||||||
# gkalpak - George Kalpakas
|
# gkalpak - George Kalpakas
|
||||||
# IgorMinar - Igor Minar
|
# IgorMinar - Igor Minar
|
||||||
# JiaLiPassion - Jia Li
|
# JiaLiPassion - Jia Li
|
||||||
# JoostK - Joost Koehoorn
|
|
||||||
# josephperrott - Joey Perrott
|
# josephperrott - Joey Perrott
|
||||||
# kapunahelewong - Kapunahele Wong
|
# kapunahelewong - Kapunahele Wong
|
||||||
# kara - Kara Erickson
|
# kara - Kara Erickson
|
||||||
@ -132,9 +131,6 @@
|
|||||||
# ===========================================================
|
# ===========================================================
|
||||||
#
|
#
|
||||||
# - alxhub
|
# - alxhub
|
||||||
# - AndrewKushnir
|
|
||||||
# - kara
|
|
||||||
# - JoostK
|
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
@ -348,14 +344,6 @@
|
|||||||
# - josephperrott
|
# - josephperrott
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
|
||||||
# @angular/fw-size-tracking
|
|
||||||
# ===========================================================
|
|
||||||
#
|
|
||||||
# - IgorMinar
|
|
||||||
# - kara
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
######################################################################################################
|
######################################################################################################
|
||||||
@ -380,44 +368,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
|
||||||
# Build, CI & Dev-infra Owners
|
|
||||||
# ================================================
|
|
||||||
|
|
||||||
/* @angular/dev-infra-framework
|
|
||||||
/.buildkite/** @angular/dev-infra-framework
|
|
||||||
/.circleci/** @angular/dev-infra-framework
|
|
||||||
/.devcontainer/** @angular/dev-infra-framework
|
|
||||||
/.github/** @angular/dev-infra-framework
|
|
||||||
/.vscode/** @angular/dev-infra-framework
|
|
||||||
/docs/BAZEL.md @angular/dev-infra-framework
|
|
||||||
/packages/* @angular/dev-infra-framework
|
|
||||||
/packages/examples/test-utils/** @angular/dev-infra-framework
|
|
||||||
/packages/private/** @angular/dev-infra-framework
|
|
||||||
/scripts/** @angular/dev-infra-framework
|
|
||||||
/third_party/** @angular/dev-infra-framework
|
|
||||||
/tools/build/** @angular/dev-infra-framework
|
|
||||||
/tools/cjs-jasmine/** @angular/dev-infra-framework
|
|
||||||
/tools/gulp-tasks/** @angular/dev-infra-framework
|
|
||||||
/tools/ngcontainer/** @angular/dev-infra-framework
|
|
||||||
/tools/npm/** @angular/dev-infra-framework
|
|
||||||
/tools/npm_workspace/** @angular/dev-infra-framework
|
|
||||||
/tools/public_api_guard/** @angular/dev-infra-framework
|
|
||||||
/tools/rxjs/** @angular/dev-infra-framework
|
|
||||||
/tools/size-tracking/** @angular/dev-infra-framework
|
|
||||||
/tools/source-map-test/** @angular/dev-infra-framework
|
|
||||||
/tools/symbol-extractor/** @angular/dev-infra-framework
|
|
||||||
/tools/testing/** @angular/dev-infra-framework
|
|
||||||
/tools/ts-api-guardian/** @angular/dev-infra-framework
|
|
||||||
/tools/tslint/** @angular/dev-infra-framework
|
|
||||||
/tools/validate-commit-message/** @angular/dev-infra-framework
|
|
||||||
/tools/yarn/** @angular/dev-infra-framework
|
|
||||||
/tools/* @angular/dev-infra-framework
|
|
||||||
*.BAZEL @angular/dev-infra-framework
|
|
||||||
*.bzl @angular/dev-infra-framework
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# @angular/animations
|
# @angular/animations
|
||||||
# ================================================
|
# ================================================
|
||||||
@ -459,7 +409,6 @@
|
|||||||
/aio/content/guide/angular-compiler-options.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/angular-compiler-options.md @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
|
/aio/content/guide/aot-compiler.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/aot-metadata-errors.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/aot-metadata-errors.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/template-typecheck.md @angular/fw-compiler @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -468,7 +417,6 @@
|
|||||||
# ================================================
|
# ================================================
|
||||||
|
|
||||||
/packages/compiler-cli/ngcc/** @angular/fw-ngcc @angular/framework-global-approvers
|
/packages/compiler-cli/ngcc/** @angular/fw-ngcc @angular/framework-global-approvers
|
||||||
/aio/content/guide/ngcc.md @angular/fw-ngcc @angular/framework-global-approvers
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -484,6 +432,7 @@
|
|||||||
/aio/content/guide/web-worker.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/web-worker.md @angular/tools-cli @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# @angular/core
|
# @angular/core
|
||||||
# @angular/common (except @angular/common/http)
|
# @angular/common (except @angular/common/http)
|
||||||
@ -776,7 +725,6 @@ testing/** @angular/fw-test
|
|||||||
/packages/compiler/src/i18n/** @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/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
|
/packages/compiler-cli/src/extract_i18n.ts @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/packages/localize/** @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/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
|
/aio/content/examples/i18n/** @angular/fw-i18n @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
|
||||||
@ -893,15 +841,7 @@ testing/** @angular/fw-test
|
|||||||
/aio/content/guide/updating.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
|
||||||
/aio/content/guide/workspace-config.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/workspace-config.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/deprecations.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/deprecations.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/migration-renderer.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/migration-undecorated-classes.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/migration-dynamic-flag.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/migration-injectable.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/migration-localize.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/migration-module-with-providers.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/updating-to-version-9.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/ivy-compatibility.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
/aio/content/guide/ivy-compatibility-examples.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
@ -938,10 +878,38 @@ testing/** @angular/fw-test
|
|||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# Material CI
|
# Build, CI & Dev-infra Owners
|
||||||
# ================================================
|
# ================================================
|
||||||
|
|
||||||
/tools/material-ci/** @angular/fw-core @angular/framework-global-approvers
|
/* @angular/dev-infra-framework
|
||||||
|
/.buildkite/** @angular/dev-infra-framework
|
||||||
|
/.circleci/** @angular/dev-infra-framework
|
||||||
|
/.devcontainer/** @angular/dev-infra-framework
|
||||||
|
/.github/** @angular/dev-infra-framework
|
||||||
|
/.vscode/** @angular/dev-infra-framework
|
||||||
|
/docs/BAZEL.md @angular/dev-infra-framework
|
||||||
|
/packages/* @angular/dev-infra-framework
|
||||||
|
/packages/examples/test-utils/** @angular/dev-infra-framework
|
||||||
|
/packages/private/** @angular/dev-infra-framework
|
||||||
|
/scripts/** @angular/dev-infra-framework
|
||||||
|
/third_party/** @angular/dev-infra-framework
|
||||||
|
/tools/build/** @angular/dev-infra-framework
|
||||||
|
/tools/cjs-jasmine/** @angular/dev-infra-framework
|
||||||
|
/tools/gulp-tasks/** @angular/dev-infra-framework
|
||||||
|
/tools/ngcontainer/** @angular/dev-infra-framework
|
||||||
|
/tools/npm/** @angular/dev-infra-framework
|
||||||
|
/tools/npm_workspace/** @angular/dev-infra-framework
|
||||||
|
/tools/public_api_guard/** @angular/dev-infra-framework
|
||||||
|
/tools/rxjs/** @angular/dev-infra-framework
|
||||||
|
/tools/source-map-test/** @angular/dev-infra-framework
|
||||||
|
/tools/symbol-extractor/** @angular/dev-infra-framework
|
||||||
|
/tools/testing/** @angular/dev-infra-framework
|
||||||
|
/tools/ts-api-guardian/** @angular/dev-infra-framework
|
||||||
|
/tools/tslint/** @angular/dev-infra-framework
|
||||||
|
/tools/validate-commit-message/** @angular/dev-infra-framework
|
||||||
|
/tools/yarn/** @angular/dev-infra-framework
|
||||||
|
/tools/* @angular/dev-infra-framework
|
||||||
|
*.bzl @angular/dev-infra-framework
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -957,14 +925,6 @@ testing/** @angular/fw-test
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
|
||||||
# Size tracking
|
|
||||||
# ================================================
|
|
||||||
|
|
||||||
/aio/scripts/_payload-limits.json @angular/fw-size-tracking
|
|
||||||
/integration/_payload-limits.json @angular/fw-size-tracking
|
|
||||||
|
|
||||||
|
|
||||||
# ================================================
|
# ================================================
|
||||||
# Special cases
|
# Special cases
|
||||||
# ================================================
|
# ================================================
|
||||||
|
13
.github/ISSUE_TEMPLATE/7-angular-components.md
vendored
13
.github/ISSUE_TEMPLATE/7-angular-components.md
vendored
@ -1,13 +0,0 @@
|
|||||||
---
|
|
||||||
name: "\U0001F48EAngular Components"
|
|
||||||
about: Issues and feature requests for Angular Components
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
|
|
||||||
|
|
||||||
Please file any Angular Components issues at: https://github.com/angular/components/issues/new
|
|
||||||
|
|
||||||
For the time being, we keep Angular Components issues in a separate repository.
|
|
||||||
|
|
||||||
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
|
|
13
.github/ISSUE_TEMPLATE/7-angular-material.md
vendored
Normal file
13
.github/ISSUE_TEMPLATE/7-angular-material.md
vendored
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
---
|
||||||
|
name: "\U0001F48EAngular Material"
|
||||||
|
about: Issues and feature requests for Angular Material
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
|
||||||
|
|
||||||
|
Please file any Angular Material issues at: https://github.com/angular/material2/issues/new
|
||||||
|
|
||||||
|
For the time being, we keep Angular Material issues in a separate repository.
|
||||||
|
|
||||||
|
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
|
6
.github/angular-robot.yml
vendored
6
.github/angular-robot.yml
vendored
@ -52,7 +52,6 @@ merge:
|
|||||||
- "packages/elements/schematics/**"
|
- "packages/elements/schematics/**"
|
||||||
- "packages/examples/**"
|
- "packages/examples/**"
|
||||||
- "packages/language-service/**"
|
- "packages/language-service/**"
|
||||||
- "packages/localize/**"
|
|
||||||
- "packages/private/**"
|
- "packages/private/**"
|
||||||
- "packages/service-worker/**"
|
- "packages/service-worker/**"
|
||||||
- "**/.gitignore"
|
- "**/.gitignore"
|
||||||
@ -62,15 +61,10 @@ merge:
|
|||||||
- "**/third_party/**"
|
- "**/third_party/**"
|
||||||
- "**/tsconfig-build.json"
|
- "**/tsconfig-build.json"
|
||||||
- "**/tsconfig.json"
|
- "**/tsconfig.json"
|
||||||
- "**/rollup.config.js"
|
|
||||||
- "**/BUILD.bazel"
|
- "**/BUILD.bazel"
|
||||||
- "**/*.md"
|
- "**/*.md"
|
||||||
- "packages/**/integrationtest/**"
|
- "packages/**/integrationtest/**"
|
||||||
- "packages/**/test/**"
|
- "packages/**/test/**"
|
||||||
- "packages/zone.js/*"
|
|
||||||
- "packages/zone.js/doc/**"
|
|
||||||
- "packages/zone.js/example/**"
|
|
||||||
- "packages/zone.js/scripts/**"
|
|
||||||
|
|
||||||
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
|
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
|
||||||
mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges.
|
mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges.
|
||||||
|
14
.github/workflows/lock-closed.yml
vendored
14
.github/workflows/lock-closed.yml
vendored
@ -1,14 +0,0 @@
|
|||||||
name: Lock closed inactive issues
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
# Run at 16:00 every day
|
|
||||||
- cron: '0 16 * * *'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lock_closed:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: angular/dev-infra/github-actions/lock-closed@66462f6
|
|
||||||
with:
|
|
||||||
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
|
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -4,7 +4,6 @@
|
|||||||
/bazel-out
|
/bazel-out
|
||||||
/integration/bazel/bazel-*
|
/integration/bazel/bazel-*
|
||||||
e2e_test.*
|
e2e_test.*
|
||||||
*.log
|
|
||||||
node_modules
|
node_modules
|
||||||
tools/gulp-tasks/cldr/cldr-data/
|
tools/gulp-tasks/cldr/cldr-data/
|
||||||
|
|
||||||
@ -13,18 +12,14 @@ pubspec.lock
|
|||||||
.c9
|
.c9
|
||||||
.idea/
|
.idea/
|
||||||
.devcontainer/*
|
.devcontainer/*
|
||||||
!.devcontainer/README.md
|
|
||||||
!.devcontainer/recommended-devcontainer.json
|
!.devcontainer/recommended-devcontainer.json
|
||||||
!.devcontainer/recommended-Dockerfile
|
!.devcontainer/recommended-Dockerfile
|
||||||
.settings/
|
.settings/
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
.vscode/tasks.json
|
|
||||||
*.swo
|
*.swo
|
||||||
modules/.settings
|
modules/.settings
|
||||||
modules/.vscode
|
modules/.vscode
|
||||||
.vimrc
|
|
||||||
.nvimrc
|
|
||||||
|
|
||||||
# Don't check in secret files
|
# Don't check in secret files
|
||||||
*secret.js
|
*secret.js
|
||||||
@ -42,5 +37,3 @@ yarn-error.log
|
|||||||
# User specific bazel settings
|
# User specific bazel settings
|
||||||
.bazelrc.user
|
.bazelrc.user
|
||||||
|
|
||||||
.notes.md
|
|
||||||
baseline.json
|
|
||||||
|
18
.vscode/README.md
vendored
18
.vscode/README.md
vendored
@ -1,25 +1,23 @@
|
|||||||
# VSCode Configuration
|
# VSCode Configuration
|
||||||
|
|
||||||
This folder contains opt-in [Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings), [Tasks](https://code.visualstudio.com/docs/editor/tasks), [Launch Configurations](https://code.visualstudio.com/Docs/editor/debugging#_launch-configurations) and [Extension Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions) that the Angular team recommends using when working on this repository.
|
This folder contains opt-in [Workspace Settings](https://code.visualstudio.com/docs/getstarted/settings) and [Extension Recommendations](https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions) that the Angular team recommends using when working on this repository.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
To use the recommended configurations follow the steps below:
|
To use the recommended settings follow the steps below:
|
||||||
|
|
||||||
- install the recommneded extensions in `.vscode/extensions.json`
|
- install <https://marketplace.visualstudio.com/items?itemName=xaver.clang-format>
|
||||||
- copy (or link) `.vscode/recommended-settings.json` to `.vscode/settings.json`
|
- copy `.vscode/recommended-settings.json` to `.vscode/settings.json`
|
||||||
- copy (or link) `.vscode/recommended-launch.json` to `.vscode/launch.json`
|
|
||||||
- copy (or link) `.vscode/recommended-tasks.json` to `.vscode/tasks.json`
|
|
||||||
- restart the editor
|
- restart the editor
|
||||||
|
|
||||||
If you already have your custom workspace settings you should instead manually merge the file contents.
|
If you already have your custom workspace settings you should instead manually merge the file content.
|
||||||
|
|
||||||
This isn't an automatic process so you will need to repeat it when settings are updated.
|
This isn't an automatic process so you will need to repeat it when settings are updated.
|
||||||
|
|
||||||
To see the recommended extensions select "Extensions: Show Recommended Extensions" in the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
|
To see the recommended extensions select "Extensions: Show Recommended Extensions" in the [Command Palette](https://code.visualstudio.com/docs/getstarted/userinterface#_command-palette).
|
||||||
|
|
||||||
## Editing `.vscode/recommended-*.json` files
|
## Editing `.vscode/recommended-settings.json`
|
||||||
|
|
||||||
If you wish to add extra configuration items please keep in mind any modifications you make here will be used by many users.
|
If you wish to add extra configuration items please keep in mind any settings you add here will be used by many users.
|
||||||
|
|
||||||
Try to keep these settings/configuations to things that help facilitate the development process and avoid altering the user workflow whenever possible.
|
Try to keep these settings to things that help facilitate the development process and avoid altering the user workflow whenever possible.
|
||||||
|
85
.vscode/recommended-launch.json
vendored
85
.vscode/recommended-launch.json
vendored
@ -1,85 +0,0 @@
|
|||||||
{
|
|
||||||
// Use IntelliSense to learn about possible attributes.
|
|
||||||
// Hover to view descriptions of existing attributes.
|
|
||||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
||||||
"version": "0.2.0",
|
|
||||||
"configurations": [
|
|
||||||
{
|
|
||||||
"name": "Attach to bazel test ... --config=debug",
|
|
||||||
"type": "node",
|
|
||||||
"request": "attach",
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"restart": false,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"localRoot": "${workspaceRoot}",
|
|
||||||
"remoteRoot": "${workspaceRoot}",
|
|
||||||
"stopOnEntry": false,
|
|
||||||
"timeout": 600000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "Attach to bazel test ... --config=debug (no source maps)",
|
|
||||||
"type": "node",
|
|
||||||
"request": "attach",
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"restart": false,
|
|
||||||
"sourceMaps": false,
|
|
||||||
"localRoot": "${workspaceRoot}",
|
|
||||||
"remoteRoot": "${workspaceRoot}",
|
|
||||||
"stopOnEntry": false,
|
|
||||||
"timeout": 600000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "IVY:packages/core/test/acceptance",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test/acceptance",
|
|
||||||
"--config=debug"
|
|
||||||
],
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"restart": true,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"timeout": 600000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "IVY:packages/core/test/render3",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test/render3",
|
|
||||||
"--config=debug"
|
|
||||||
],
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"restart": true,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"timeout": 600000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "IVY:packages/core/test",
|
|
||||||
"type": "node",
|
|
||||||
"request": "launch",
|
|
||||||
"program": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test",
|
|
||||||
"--config=debug"
|
|
||||||
],
|
|
||||||
"port": 9229,
|
|
||||||
"address": "localhost",
|
|
||||||
"restart": true,
|
|
||||||
"sourceMaps": true,
|
|
||||||
"timeout": 600000,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
}
|
|
113
.vscode/recommended-tasks.json
vendored
113
.vscode/recommended-tasks.json
vendored
@ -1,113 +0,0 @@
|
|||||||
{
|
|
||||||
// See https://go.microsoft.com/fwlink/?LinkId=733558
|
|
||||||
// for the documentation about the tasks.json format
|
|
||||||
"version": "2.0.0",
|
|
||||||
"tasks": [
|
|
||||||
{
|
|
||||||
"label": "IVY:packages/core/test/...",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test",
|
|
||||||
"packages/core/test/acceptance",
|
|
||||||
"packages/core/test/render3",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "VE:packages/core/test/...",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"packages/core/test",
|
|
||||||
"packages/core/test/acceptance",
|
|
||||||
"packages/core/test/render3",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "IVY:packages/core/test/acceptance",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test/acceptance",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "VE:packages/core/test/acceptance",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"packages/core/test/acceptance",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "IVY:packages/core/test",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "VE:packages/core/test",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"packages/core/test",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "IVY:packages/core/test/render3",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "${workspaceFolder}/node_modules/.bin/bazel",
|
|
||||||
"args": [
|
|
||||||
"test",
|
|
||||||
"--config=ivy",
|
|
||||||
"packages/core/test/render3",
|
|
||||||
],
|
|
||||||
"group": "test",
|
|
||||||
"presentation": {
|
|
||||||
"reveal": "always",
|
|
||||||
"panel": "dedicated",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
}
|
|
@ -19,9 +19,9 @@ filegroup(
|
|||||||
# do not sort
|
# do not sort
|
||||||
srcs = [
|
srcs = [
|
||||||
"@npm//:node_modules/core-js/client/core.js",
|
"@npm//:node_modules/core-js/client/core.js",
|
||||||
"//packages/zone.js/dist:zone.js",
|
"@npm//:node_modules/zone.js/dist/zone.js",
|
||||||
"//packages/zone.js/dist:zone-testing.js",
|
"@npm//:node_modules/zone.js/dist/zone-testing.js",
|
||||||
"//packages/zone.js/dist:task-tracking.js",
|
"@npm//:node_modules/zone.js/dist/task-tracking.js",
|
||||||
"//:test-events.js",
|
"//:test-events.js",
|
||||||
"//:shims_for_IE.js",
|
"//:shims_for_IE.js",
|
||||||
# Including systemjs because it defines `__eval`, which produces correct stack traces.
|
# Including systemjs because it defines `__eval`, which produces correct stack traces.
|
||||||
|
1033
CHANGELOG.md
1033
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
49
WORKSPACE
49
WORKSPACE
@ -5,15 +5,28 @@ workspace(
|
|||||||
|
|
||||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||||
|
|
||||||
|
# Uncomment for local bazel rules development
|
||||||
|
#local_repository(
|
||||||
|
# name = "build_bazel_rules_nodejs",
|
||||||
|
# path = "../rules_nodejs",
|
||||||
|
#)
|
||||||
|
#local_repository(
|
||||||
|
# name = "npm_bazel_typescript",
|
||||||
|
# path = "../rules_typescript",
|
||||||
|
#)
|
||||||
|
|
||||||
# Fetch rules_nodejs so we can install our npm dependencies
|
# Fetch rules_nodejs so we can install our npm dependencies
|
||||||
http_archive(
|
http_archive(
|
||||||
name = "build_bazel_rules_nodejs",
|
name = "build_bazel_rules_nodejs",
|
||||||
sha256 = "c612d6b76eaa17540e8b8c806e02701ed38891460f9ba3303f4424615437887a",
|
patch_args = ["-p1"],
|
||||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.42.1/rules_nodejs-0.42.1.tar.gz"],
|
# Patch https://github.com/bazelbuild/rules_nodejs/pull/903
|
||||||
|
patches = ["//tools:rollup_bundle_commonjs_ignoreGlobal.patch"],
|
||||||
|
sha256 = "7c4a690268be97c96f04d505224ec4cb1ae53c2c2b68be495c9bd2634296a5cd",
|
||||||
|
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.34.0/rules_nodejs-0.34.0.tar.gz"],
|
||||||
)
|
)
|
||||||
|
|
||||||
# Check the bazel version and download npm dependencies
|
# Check the bazel version and download npm dependencies
|
||||||
load("@build_bazel_rules_nodejs//:index.bzl", "check_bazel_version", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "check_rules_nodejs_version", "node_repositories", "yarn_install")
|
||||||
|
|
||||||
# Bazel version must be at least the following version because:
|
# Bazel version must be at least the following version because:
|
||||||
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
|
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
|
||||||
@ -26,10 +39,22 @@ Try running `yarn bazel` instead.
|
|||||||
(If you did run that, check that you've got a fresh `yarn install`)
|
(If you did run that, check that you've got a fresh `yarn install`)
|
||||||
|
|
||||||
""",
|
""",
|
||||||
minimum_bazel_version = "1.1.0",
|
minimum_bazel_version = "0.27.0",
|
||||||
)
|
)
|
||||||
|
|
||||||
check_rules_nodejs_version(minimum_version_string = "0.42.1")
|
# The NodeJS rules version must be at least the following version because:
|
||||||
|
# - 0.15.2 Re-introduced the prod_only attribute on yarn_install
|
||||||
|
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
|
||||||
|
# - 0.16.8 Supports npm installed bazel workspaces
|
||||||
|
# - 0.26.0 Fix for data files in yarn_install and npm_install
|
||||||
|
# - 0.27.12 Adds NodeModuleSources provider for transtive npm deps support
|
||||||
|
# - 0.30.0 yarn_install now uses symlinked node_modules with new managed directories Bazel 0.26.0 feature
|
||||||
|
# - 0.31.1 entry_point attribute of nodejs_binary & rollup_bundle is now a label
|
||||||
|
# - 0.32.0 yarn_install and npm_install no longer puts build files under symlinked node_modules
|
||||||
|
# - 0.32.1 remove override of @bazel/tsetse & exclude typescript lib declarations in node_module_library transitive_declarations
|
||||||
|
# - 0.32.2 resolves bug in @bazel/hide-bazel-files postinstall step
|
||||||
|
# - 0.34.0 introduces protractor rule
|
||||||
|
check_rules_nodejs_version(minimum_version_string = "0.34.0")
|
||||||
|
|
||||||
# Setup the Node.js toolchain
|
# Setup the Node.js toolchain
|
||||||
node_repositories(
|
node_repositories(
|
||||||
@ -76,16 +101,18 @@ load("@npm_bazel_protractor//:package.bzl", "npm_bazel_protractor_dependencies")
|
|||||||
npm_bazel_protractor_dependencies()
|
npm_bazel_protractor_dependencies()
|
||||||
|
|
||||||
# Load karma dependencies
|
# Load karma dependencies
|
||||||
load("@npm_bazel_karma//:package.bzl", "npm_bazel_karma_dependencies")
|
load("@npm_bazel_karma//:package.bzl", "rules_karma_dependencies")
|
||||||
|
|
||||||
npm_bazel_karma_dependencies()
|
rules_karma_dependencies()
|
||||||
|
|
||||||
# Setup the rules_webtesting toolchain
|
# Setup the rules_webtesting toolchain
|
||||||
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
load("@io_bazel_rules_webtesting//web:repositories.bzl", "web_test_repositories")
|
||||||
|
|
||||||
web_test_repositories()
|
web_test_repositories()
|
||||||
|
|
||||||
load("//tools/browsers:browser_repositories.bzl", "browser_repositories")
|
# Temporary work-around for https://github.com/angular/angular/issues/28681
|
||||||
|
# TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories
|
||||||
|
load("//:browser_repositories.bzl", "browser_repositories")
|
||||||
|
|
||||||
browser_repositories()
|
browser_repositories()
|
||||||
|
|
||||||
@ -112,14 +139,14 @@ rbe_autoconfig(
|
|||||||
# Need to specify a base container digest in order to ensure that we can use the checked-in
|
# Need to specify a base container digest in order to ensure that we can use the checked-in
|
||||||
# platform configurations for the "ubuntu16_04" image. Otherwise the autoconfig rule would
|
# platform configurations for the "ubuntu16_04" image. Otherwise the autoconfig rule would
|
||||||
# need to pull the image and run it in order determine the toolchain configuration. See:
|
# need to pull the image and run it in order determine the toolchain configuration. See:
|
||||||
# https://github.com/bazelbuild/bazel-toolchains/blob/1.1.2/configs/ubuntu16_04_clang/versions.bzl
|
# https://github.com/bazelbuild/bazel-toolchains/blob/0.27.0/configs/ubuntu16_04_clang/versions.bzl
|
||||||
base_container_digest = "sha256:1ab40405810effefa0b2f45824d6d608634ccddbf06366760c341ef6fbead011",
|
base_container_digest = "sha256:94d7d8552902d228c32c8c148cc13f0effc2b4837757a6e95b73fdc5c5e4b07b",
|
||||||
# Note that if you change the `digest`, you might also need to update the
|
# Note that if you change the `digest`, you might also need to update the
|
||||||
# `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:<digest>
|
# `base_container_digest` to make sure marketplace.gcr.io/google/rbe-ubuntu16-04-webtest:<digest>
|
||||||
# and marketplace.gcr.io/google/rbe-ubuntu16-04:<base_container_digest> have
|
# and marketplace.gcr.io/google/rbe-ubuntu16-04:<base_container_digest> have
|
||||||
# the same Clang and JDK installed. Clang is needed because of the dependency on
|
# the same Clang and JDK installed. Clang is needed because of the dependency on
|
||||||
# @com_google_protobuf. Java is needed for the Bazel's test executor Java tool.
|
# @com_google_protobuf. Java is needed for the Bazel's test executor Java tool.
|
||||||
digest = "sha256:0b8fa87db4b8e5366717a7164342a029d1348d2feea7ecc4b18c780bc2507059",
|
digest = "sha256:76e2e4a894f9ffbea0a0cb2fbde741b5d223d40f265dbb9bca78655430173990",
|
||||||
env = clang_env(),
|
env = clang_env(),
|
||||||
registry = "marketplace.gcr.io",
|
registry = "marketplace.gcr.io",
|
||||||
# We can't use the default "ubuntu16_04" RBE image provided by the autoconfig because we need
|
# We can't use the default "ubuntu16_04" RBE image provided by the autoconfig because we need
|
||||||
|
@ -18,8 +18,8 @@ Here are the most important tasks you might need to use:
|
|||||||
|
|
||||||
* `yarn build` - create a production build of the application (after installing dependencies, boilerplate, etc).
|
* `yarn build` - create a production build of the application (after installing dependencies, boilerplate, etc).
|
||||||
* `yarn build-local` - same as `build`, but use `setup-local` instead of `setup`.
|
* `yarn build-local` - same as `build`, but use `setup-local` instead of `setup`.
|
||||||
* `yarn build-local-with-viewengine` - same as `build-local`, but in addition also turns on `ViewEngine` mode in aio.
|
* `yarn build-local-with-ivy` - same as `build-local`, but in addition also turns on `ivy` mode in aio.
|
||||||
(Note: Docs examples run in `ViewEngine` mode by default. To turn on `ivy` mode in examples, see `yarn boilerplate:add` below.)
|
(Note: To turn on `ivy` mode in examples, see `yarn boilerplate:add` below.)
|
||||||
|
|
||||||
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
|
* `yarn start` - run a development web server that watches the files; then builds the doc-viewer and reloads the page, as necessary.
|
||||||
* `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console.
|
* `yarn serve-and-sync` - run both the `docs-watch` and `start` in the same console.
|
||||||
@ -34,18 +34,17 @@ Here are the most important tasks you might need to use:
|
|||||||
* `yarn docs-test` - run the unit tests for the doc generation code.
|
* `yarn docs-test` - run the unit tests for the doc generation code.
|
||||||
|
|
||||||
* `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally.
|
* `yarn boilerplate:add` - generate all the boilerplate code for the examples, so that they can be run locally.
|
||||||
* `yarn boilerplate:add:ivy` - same as `boilerplate:add` but also turns on `ivy` mode.
|
- Add the option `--local` to use your local version of Angular contained in the "dist" folder.
|
||||||
|
- Add the option `--ivy` to turn on `ivy` mode.
|
||||||
|
|
||||||
* `yarn boilerplate:remove` - remove all the boilerplate code that was added via `yarn boilerplate:add`.
|
* `yarn boilerplate:remove` - remove all the boilerplate code that was added via `yarn boilerplate:add`.
|
||||||
* `yarn generate-stackblitz` - generate the stackblitz files that are used by the `live-example` tags in the docs.
|
* `yarn generate-stackblitz` - generate the stackblitz files that are used by the `live-example` tags in the docs.
|
||||||
* `yarn generate-zips` - generate the zip files from the examples. Zip available via the `live-example` tags in the docs.
|
* `yarn generate-zips` - generate the zip files from the examples. Zip available via the `live-example` tags in the docs.
|
||||||
|
|
||||||
* `yarn example-e2e` - run all e2e tests for examples. Available options:
|
* `yarn example-e2e` - run all e2e tests for examples
|
||||||
- `--setup`: generate boilerplate, force webdriver update & other setup, then run tests.
|
- `yarn example-e2e --setup` - force webdriver update & other setup, then run tests
|
||||||
- `--local`: run e2e tests with the local version of Angular contained in the "dist" folder.
|
- `yarn example-e2e --filter=foo` - limit e2e tests to those containing the word "foo"
|
||||||
_Requires `--setup` in order to take effect._
|
- `yarn example-e2e --setup --local` - run e2e tests with the local version of Angular contained in the "dist" folder
|
||||||
- `--ivy`: run e2e tests in `ivy` mode.
|
|
||||||
- `--filter=foo`: limit e2e tests to those containing the word "foo".
|
|
||||||
|
|
||||||
> **Note for Windows users**
|
> **Note for Windows users**
|
||||||
>
|
>
|
||||||
@ -104,7 +103,7 @@ You also want to see those changes displayed properly in the doc viewer
|
|||||||
with a quick, edit/view cycle time.
|
with a quick, edit/view cycle time.
|
||||||
|
|
||||||
For this purpose, use the `yarn docs-watch` task, which watches for changes to source files and only
|
For this purpose, use the `yarn docs-watch` task, which watches for changes to source files and only
|
||||||
re-processes the files necessary to generate the docs that are related to the file that has changed.
|
re-processes the the files necessary to generate the docs that are related to the file that has changed.
|
||||||
Since this task takes shortcuts, it is much faster (often less than 1 second) but it won't produce full
|
Since this task takes shortcuts, it is much faster (often less than 1 second) but it won't produce full
|
||||||
fidelity content. For example, links to other docs and code examples may not render correctly. This is
|
fidelity content. For example, links to other docs and code examples may not render correctly. This is
|
||||||
most particularly noticed in links to other docs and in the embedded examples, which may not always render
|
most particularly noticed in links to other docs and in the embedded examples, which may not always render
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
"shelljs": "^0.8.2",
|
"shelljs": "^0.8.2",
|
||||||
"source-map-support": "^0.5.9",
|
"source-map-support": "^0.5.9",
|
||||||
"tar-stream": "^1.6.1",
|
"tar-stream": "^1.6.1",
|
||||||
"tslib": "^1.10.0"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/body-parser": "^1.17.0",
|
"@types/body-parser": "^1.17.0",
|
||||||
|
@ -2444,12 +2444,7 @@ touch@^3.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
nopt "~1.0.10"
|
nopt "~1.0.10"
|
||||||
|
|
||||||
tslib@^1.10.0:
|
tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.3:
|
||||||
version "1.10.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
|
|
||||||
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
|
|
||||||
|
|
||||||
tslib@^1.8.0, tslib@^1.8.1:
|
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
|
||||||
|
|
||||||
|
@ -59,13 +59,7 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"src/styles.scss"
|
"src/styles.scss"
|
||||||
],
|
],
|
||||||
"scripts": [],
|
"scripts": []
|
||||||
"budgets": [
|
|
||||||
{
|
|
||||||
"type": "anyComponentStyle",
|
|
||||||
"maximumWarning": "6kb"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"fast": {
|
"fast": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,9 @@ import { transAnimation } from './animations';
|
|||||||
})
|
})
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
|
// #docregion runtime
|
||||||
|
],
|
||||||
|
// #enddocregion runtime
|
||||||
// #enddocregion reusable
|
// #enddocregion reusable
|
||||||
templateUrl: 'open-close.component.html',
|
templateUrl: 'open-close.component.html',
|
||||||
styleUrls: ['open-close.component.css']
|
styleUrls: ['open-close.component.css']
|
||||||
|
@ -4,7 +4,7 @@ import { protractor, browser, element, by, ElementFinder } from 'protractor';
|
|||||||
|
|
||||||
const nameSuffix = 'X';
|
const nameSuffix = 'X';
|
||||||
|
|
||||||
interface Hero {
|
class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { Component, ViewChild, ElementRef } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
|
|
||||||
@ViewChild('bindingInput') bindingInput: ElementRef;
|
@ViewChild('bindingInput', { static: false }) bindingInput: ElementRef;
|
||||||
|
|
||||||
isUnchanged = true;
|
isUnchanged = true;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ export class CountdownLocalVarParentComponent { }
|
|||||||
})
|
})
|
||||||
export class CountdownViewChildParentComponent implements AfterViewInit {
|
export class CountdownViewChildParentComponent implements AfterViewInit {
|
||||||
|
|
||||||
@ViewChild(CountdownTimerComponent)
|
@ViewChild(CountdownTimerComponent, {static: false})
|
||||||
private timerComponent: CountdownTimerComponent;
|
private timerComponent: CountdownTimerComponent;
|
||||||
|
|
||||||
seconds() { return 0; }
|
seconds() { return 0; }
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface Hero {
|
export class Hero {
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
isSecret: boolean;
|
isSecret = false;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -2,23 +2,21 @@
|
|||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
import { QuestionService } from './question.service';
|
import { QuestionService } from './question.service';
|
||||||
import { QuestionBase } from './question-base';
|
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-root',
|
selector: 'app-root',
|
||||||
template: `
|
template: `
|
||||||
<div>
|
<div>
|
||||||
<h2>Job Application for Heroes</h2>
|
<h2>Job Application for Heroes</h2>
|
||||||
<app-dynamic-form [questions]="questions$ | async"></app-dynamic-form>
|
<app-dynamic-form [questions]="questions"></app-dynamic-form>
|
||||||
</div>
|
</div>
|
||||||
`,
|
`,
|
||||||
providers: [QuestionService]
|
providers: [QuestionService]
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
questions$: Observable<QuestionBase<any>[]>;
|
questions: any[];
|
||||||
|
|
||||||
constructor(service: QuestionService) {
|
constructor(service: QuestionService) {
|
||||||
this.questions$ = service.getQuestions();
|
this.questions = service.getQuestions();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import { QuestionBase } from './question-base';
|
|||||||
templateUrl: './dynamic-form-question.component.html'
|
templateUrl: './dynamic-form-question.component.html'
|
||||||
})
|
})
|
||||||
export class DynamicFormQuestionComponent {
|
export class DynamicFormQuestionComponent {
|
||||||
@Input() question: QuestionBase<string>;
|
@Input() question: QuestionBase<any>;
|
||||||
@Input() form: FormGroup;
|
@Input() form: FormGroup;
|
||||||
get isValid() { return this.form.controls[this.question.key].valid; }
|
get isValid() { return this.form.controls[this.question.key].valid; }
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ import { QuestionControlService } from './question-control.service';
|
|||||||
})
|
})
|
||||||
export class DynamicFormComponent implements OnInit {
|
export class DynamicFormComponent implements OnInit {
|
||||||
|
|
||||||
@Input() questions: QuestionBase<string>[] = [];
|
@Input() questions: QuestionBase<any>[] = [];
|
||||||
form: FormGroup;
|
form: FormGroup;
|
||||||
payLoad = '';
|
payLoad = '';
|
||||||
|
|
||||||
@ -23,6 +23,6 @@ export class DynamicFormComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
this.payLoad = JSON.stringify(this.form.getRawValue());
|
this.payLoad = JSON.stringify(this.form.value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,8 +6,6 @@ export class QuestionBase<T> {
|
|||||||
required: boolean;
|
required: boolean;
|
||||||
order: number;
|
order: number;
|
||||||
controlType: string;
|
controlType: string;
|
||||||
type: string;
|
|
||||||
options: {key: string, value: string}[];
|
|
||||||
|
|
||||||
constructor(options: {
|
constructor(options: {
|
||||||
value?: T,
|
value?: T,
|
||||||
@ -15,8 +13,7 @@ export class QuestionBase<T> {
|
|||||||
label?: string,
|
label?: string,
|
||||||
required?: boolean,
|
required?: boolean,
|
||||||
order?: number,
|
order?: number,
|
||||||
controlType?: string,
|
controlType?: string
|
||||||
type?: string
|
|
||||||
} = {}) {
|
} = {}) {
|
||||||
this.value = options.value;
|
this.value = options.value;
|
||||||
this.key = options.key || '';
|
this.key = options.key || '';
|
||||||
@ -24,6 +21,5 @@ export class QuestionBase<T> {
|
|||||||
this.required = !!options.required;
|
this.required = !!options.required;
|
||||||
this.order = options.order === undefined ? 1 : options.order;
|
this.order = options.order === undefined ? 1 : options.order;
|
||||||
this.controlType = options.controlType || '';
|
this.controlType = options.controlType || '';
|
||||||
this.type = options.type || '';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { QuestionBase } from './question-base';
|
|||||||
export class QuestionControlService {
|
export class QuestionControlService {
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
toFormGroup(questions: QuestionBase<string>[] ) {
|
toFormGroup(questions: QuestionBase<any>[] ) {
|
||||||
let group: any = {};
|
let group: any = {};
|
||||||
|
|
||||||
questions.forEach(question => {
|
questions.forEach(question => {
|
||||||
|
@ -4,15 +4,15 @@ import { Injectable } from '@angular/core';
|
|||||||
import { DropdownQuestion } from './question-dropdown';
|
import { DropdownQuestion } from './question-dropdown';
|
||||||
import { QuestionBase } from './question-base';
|
import { QuestionBase } from './question-base';
|
||||||
import { TextboxQuestion } from './question-textbox';
|
import { TextboxQuestion } from './question-textbox';
|
||||||
import { of } from 'rxjs';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class QuestionService {
|
export class QuestionService {
|
||||||
|
|
||||||
// TODO: get from a remote source of question metadata
|
// TODO: get from a remote source of question metadata
|
||||||
|
// TODO: make asynchronous
|
||||||
getQuestions() {
|
getQuestions() {
|
||||||
|
|
||||||
let questions: QuestionBase<string>[] = [
|
let questions: QuestionBase<any>[] = [
|
||||||
|
|
||||||
new DropdownQuestion({
|
new DropdownQuestion({
|
||||||
key: 'brave',
|
key: 'brave',
|
||||||
@ -42,6 +42,6 @@ export class QuestionService {
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
return of(questions.sort((a, b) => a.order - b.order));
|
return questions.sort((a, b) => a.order - b.order);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
|
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
tid: string; // tax id
|
tid: string; // tax id
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"description": "Http Guide Testing",
|
"description": "Http Guide Testing",
|
||||||
"files":[
|
"files":[
|
||||||
"src/app/heroes/hero.ts",
|
|
||||||
"src/app/heroes/heroes.service.ts",
|
"src/app/heroes/heroes.service.ts",
|
||||||
"src/app/heroes/heroes.service.spec.ts",
|
"src/app/heroes/heroes.service.spec.ts",
|
||||||
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
import { enableProdMode } from '@angular/core';
|
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
import { AppModule } from './app/app.module';
|
import { AppModule } from './app/app.module';
|
||||||
import { environment } from './environments/environment';
|
|
||||||
|
|
||||||
if (environment.production) {
|
|
||||||
enableProdMode();
|
|
||||||
}
|
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||||
|
@ -67,7 +67,6 @@ describe('HttpClient testing', () => {
|
|||||||
httpTestingController.verify();
|
httpTestingController.verify();
|
||||||
});
|
});
|
||||||
// #enddocregion get-test
|
// #enddocregion get-test
|
||||||
|
|
||||||
it('can test HttpClient.get with matching header', () => {
|
it('can test HttpClient.get with matching header', () => {
|
||||||
const testData: Data = {name: 'Test Data'};
|
const testData: Data = {name: 'Test Data'};
|
||||||
|
|
||||||
|
@ -5,8 +5,7 @@
|
|||||||
"!**/*.js",
|
"!**/*.js",
|
||||||
|
|
||||||
"!src/testing/*.*",
|
"!src/testing/*.*",
|
||||||
"!src/index-specs.html",
|
"!src/index-specs.html"
|
||||||
"!src/main-specs.ts"
|
|
||||||
],
|
],
|
||||||
"tags": ["http"]
|
"tags": ["http"]
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
import { registerLocaleData } from '@angular/common';
|
import { registerLocaleData } from '@angular/common';
|
||||||
import localeFr from '@angular/common/locales/fr';
|
import localeFr from '@angular/common/locales/fr';
|
||||||
|
|
||||||
// the second parameter 'fr-FR' is optional
|
// the second parameter 'fr' is optional
|
||||||
registerLocaleData(localeFr, 'fr-FR');
|
registerLocaleData(localeFr, 'fr');
|
||||||
// #enddocregion import-locale
|
// #enddocregion import-locale
|
||||||
|
@ -18,26 +18,26 @@ describe('providers App', () => {
|
|||||||
expect(page.getTitleText()).toEqual('Lazy loading feature modules');
|
expect(page.getTitleText()).toEqual('Lazy loading feature modules');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Customers', function() {
|
describe('Customers list', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
customersButton.click();
|
customersButton.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show customers when the button is clicked', function() {
|
it('should show customers list when the button is clicked', function() {
|
||||||
let customersMessage = element(by.css('app-customers > p'));
|
let customersMessage = element(by.css('app-customer-list > p'));
|
||||||
expect(customersMessage.getText()).toBe('customers works!');
|
expect(customersMessage.getText()).toBe('customer-list works!');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Orders', function() {
|
describe('Orders list', function() {
|
||||||
beforeEach(function() {
|
beforeEach(function() {
|
||||||
ordersButton.click();
|
ordersButton.click();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should show orders when the button is clicked', function() {
|
it('should show orders list when the button is clicked', function() {
|
||||||
let ordersMessage = element(by.css('app-orders > p'));
|
let ordersMessage = element(by.css('app-order-list > p'));
|
||||||
expect(ordersMessage.getText()).toBe('orders works!');
|
expect(ordersMessage.getText()).toBe('order-list works!');
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -21,16 +21,16 @@ describe('AppComponent', () => {
|
|||||||
expect(app).toBeTruthy();
|
expect(app).toBeTruthy();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it(`should have as title 'customer-app'`, async(() => {
|
it(`should have as title 'app works!'`, async(() => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
const app = fixture.debugElement.componentInstance;
|
const app = fixture.debugElement.componentInstance;
|
||||||
expect(app.title).toEqual('customer-app');
|
expect(app.title).toEqual('app works!');
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should render title in a h1 tag', async(() => {
|
it('should render title in a h1 tag', async(() => {
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
const fixture = TestBed.createComponent(AppComponent);
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
const compiled = fixture.debugElement.nativeElement;
|
const compiled = fixture.debugElement.nativeElement;
|
||||||
expect(compiled.querySelector('h1').textContent).toContain('customer-app');
|
expect(compiled.querySelector('h1').textContent).toContain('app works!');
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
customer-list works!
|
||||||
|
</p>
|
@ -1,20 +1,20 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { CustomersComponent } from './customers.component';
|
import { CustomerListComponent } from './customer-list.component';
|
||||||
|
|
||||||
describe('CustomerListComponent', () => {
|
describe('CustomerListComponent', () => {
|
||||||
let component: CustomersComponent;
|
let component: CustomerListComponent;
|
||||||
let fixture: ComponentFixture<CustomersComponent>;
|
let fixture: ComponentFixture<CustomerListComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ CustomersComponent ]
|
declarations: [ CustomerListComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(CustomersComponent);
|
fixture = TestBed.createComponent(CustomerListComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-customer-list',
|
||||||
|
templateUrl: './customer-list.component.html',
|
||||||
|
styleUrls: ['./customer-list.component.css']
|
||||||
|
})
|
||||||
|
export class CustomerListComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -3,13 +3,13 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
import { CustomersComponent } from './customers.component';
|
import { CustomerListComponent } from './customer-list/customer-list.component';
|
||||||
|
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: CustomersComponent
|
component: CustomerListComponent
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<p>
|
|
||||||
customers works!
|
|
||||||
</p>
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-customers',
|
|
||||||
templateUrl: './customers.component.html',
|
|
||||||
styleUrls: ['./customers.component.css']
|
|
||||||
})
|
|
||||||
export class CustomersComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -3,14 +3,14 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CustomersRoutingModule } from './customers-routing.module';
|
import { CustomersRoutingModule } from './customers-routing.module';
|
||||||
import { CustomersComponent } from './customers.component';
|
import { CustomerListComponent } from './customer-list/customer-list.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
CustomersRoutingModule
|
CustomersRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [CustomersComponent]
|
declarations: [CustomerListComponent]
|
||||||
})
|
})
|
||||||
export class CustomersModule { }
|
export class CustomersModule { }
|
||||||
// #enddocregion customers-module
|
// #enddocregion customers-module
|
||||||
|
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
order-list works!
|
||||||
|
</p>
|
@ -1,20 +1,20 @@
|
|||||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
import { OrdersComponent } from './orders.component';
|
import { OrderListComponent } from './order-list.component';
|
||||||
|
|
||||||
describe('OrderListComponent', () => {
|
describe('OrderListComponent', () => {
|
||||||
let component: OrdersComponent;
|
let component: OrderListComponent;
|
||||||
let fixture: ComponentFixture<OrdersComponent>;
|
let fixture: ComponentFixture<OrderListComponent>;
|
||||||
|
|
||||||
beforeEach(async(() => {
|
beforeEach(async(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ OrdersComponent ]
|
declarations: [ OrderListComponent ]
|
||||||
})
|
})
|
||||||
.compileComponents();
|
.compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
fixture = TestBed.createComponent(OrdersComponent);
|
fixture = TestBed.createComponent(OrderListComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
});
|
});
|
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-order-list',
|
||||||
|
templateUrl: './order-list.component.html',
|
||||||
|
styleUrls: ['./order-list.component.css']
|
||||||
|
})
|
||||||
|
export class OrderListComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,12 +4,12 @@ import { NgModule } from '@angular/core';
|
|||||||
import { Routes, RouterModule } from '@angular/router';
|
import { Routes, RouterModule } from '@angular/router';
|
||||||
|
|
||||||
// #docregion orders-routing-module-detail
|
// #docregion orders-routing-module-detail
|
||||||
import { OrdersComponent } from './orders.component';
|
import { OrderListComponent } from './order-list/order-list.component';
|
||||||
|
|
||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: OrdersComponent
|
component: OrderListComponent
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
// #enddocregion orders-routing-module-detail
|
// #enddocregion orders-routing-module-detail
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
<p>
|
|
||||||
orders works!
|
|
||||||
</p>
|
|
@ -1,15 +0,0 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
|
||||||
|
|
||||||
@Component({
|
|
||||||
selector: 'app-orders',
|
|
||||||
templateUrl: './orders.component.html',
|
|
||||||
styleUrls: ['./orders.component.css']
|
|
||||||
})
|
|
||||||
export class OrdersComponent implements OnInit {
|
|
||||||
|
|
||||||
constructor() { }
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
@ -2,13 +2,13 @@ import { NgModule } from '@angular/core';
|
|||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
import { OrdersRoutingModule } from './orders-routing.module';
|
import { OrdersRoutingModule } from './orders-routing.module';
|
||||||
import { OrdersComponent } from './orders.component';
|
import { OrderListComponent } from './order-list/order-list.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
OrdersRoutingModule
|
OrdersRoutingModule
|
||||||
],
|
],
|
||||||
declarations: [OrdersComponent]
|
declarations: [OrderListComponent]
|
||||||
})
|
})
|
||||||
export class OrdersModule { }
|
export class OrdersModule { }
|
||||||
|
@ -34,7 +34,7 @@ export class AfterContentComponent implements AfterContentChecked, AfterContentI
|
|||||||
comment = '';
|
comment = '';
|
||||||
|
|
||||||
// Query for a CONTENT child of type `ChildComponent`
|
// Query for a CONTENT child of type `ChildComponent`
|
||||||
@ContentChild(ChildComponent) contentChild: ChildComponent;
|
@ContentChild(ChildComponent, {static: false}) contentChild: ChildComponent;
|
||||||
|
|
||||||
// #enddocregion hooks
|
// #enddocregion hooks
|
||||||
constructor(private logger: LoggerService) {
|
constructor(private logger: LoggerService) {
|
||||||
|
@ -35,7 +35,7 @@ export class AfterViewComponent implements AfterViewChecked, AfterViewInit {
|
|||||||
private prevHero = '';
|
private prevHero = '';
|
||||||
|
|
||||||
// Query for a VIEW child of type `ChildViewComponent`
|
// Query for a VIEW child of type `ChildViewComponent`
|
||||||
@ViewChild(ChildViewComponent) viewChild: ChildViewComponent;
|
@ViewChild(ChildViewComponent, {static: false}) viewChild: ChildViewComponent;
|
||||||
|
|
||||||
// #enddocregion hooks
|
// #enddocregion hooks
|
||||||
constructor(private logger: LoggerService) {
|
constructor(private logger: LoggerService) {
|
||||||
|
@ -81,7 +81,7 @@ export class DoCheckParentComponent {
|
|||||||
hero: Hero;
|
hero: Hero;
|
||||||
power: string;
|
power: string;
|
||||||
title = 'DoCheck';
|
title = 'DoCheck';
|
||||||
@ViewChild(DoCheckComponent) childView: DoCheckComponent;
|
@ViewChild(DoCheckComponent, {static: false}) childView: DoCheckComponent;
|
||||||
|
|
||||||
constructor() { this.reset(); }
|
constructor() { this.reset(); }
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ export class OnChangesParentComponent {
|
|||||||
hero: Hero;
|
hero: Hero;
|
||||||
power: string;
|
power: string;
|
||||||
title = 'OnChanges';
|
title = 'OnChanges';
|
||||||
@ViewChild(OnChangesComponent) childView: OnChangesComponent;
|
@ViewChild(OnChangesComponent, {static: false}) childView: OnChangesComponent;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
emotion?: string;
|
emotion?: string;
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* This example project is special in that it is not a cli app. To run tests appropriate for this
|
|
||||||
* project, the test command is overwritten in `aio/content/examples/observables-in-angular/example-config.json`.
|
|
||||||
*
|
|
||||||
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
|
|
||||||
* tests for this project.
|
|
||||||
*
|
|
||||||
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
|
|
||||||
*/
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"e2e": [
|
|
||||||
{
|
|
||||||
"cmd": "yarn",
|
|
||||||
"args": [ "tsc", "--project", "./" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -39,9 +39,9 @@ export class ZippyComponent {
|
|||||||
Time: {{ time | async }}</div>`
|
Time: {{ time | async }}</div>`
|
||||||
})
|
})
|
||||||
export class AsyncObservablePipeComponent {
|
export class AsyncObservablePipeComponent {
|
||||||
time = new Observable<string>(observer => {
|
time = new Observable(observer =>
|
||||||
setInterval(() => observer.next(new Date().toString()), 1000);
|
setInterval(() => observer.next(new Date().toString()), 1000)
|
||||||
});
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// #enddocregion pipe
|
// #enddocregion pipe
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* This example project is special in that it is not a cli app. To run tests appropriate for this
|
|
||||||
* project, the test command is overwritten in `aio/content/examples/observables/example-config.json`.
|
|
||||||
*
|
|
||||||
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
|
|
||||||
* tests for this project.
|
|
||||||
*
|
|
||||||
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
|
|
||||||
*/
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"e2e": [
|
|
||||||
{
|
|
||||||
"cmd": "yarn",
|
|
||||||
"args": [ "tsc", "--project", "./" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* This example project is special in that it is not a cli app. To run tests appropriate for this
|
|
||||||
* project, the test command is overwritten in `aio/content/examples/practical-observable-usage/example-config.json`.
|
|
||||||
*
|
|
||||||
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
|
|
||||||
* tests for this project.
|
|
||||||
*
|
|
||||||
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
|
|
||||||
*/
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"e2e": [
|
|
||||||
{
|
|
||||||
"cmd": "yarn",
|
|
||||||
"args": [ "tsc", "--project", "./" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
|
|
||||||
import { fromEvent } from 'rxjs';
|
import { fromEvent } from 'rxjs';
|
||||||
import { ajax } from 'rxjs/ajax';
|
import { ajax } from 'rxjs/ajax';
|
||||||
import { debounceTime, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators';
|
import { map, filter, debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators';
|
||||||
|
|
||||||
|
|
||||||
const searchBox = document.getElementById('search-box');
|
const searchBox = document.getElementById('search-box');
|
||||||
|
|
||||||
const typeahead = fromEvent(searchBox, 'input').pipe(
|
const typeahead = fromEvent(searchBox, 'input').pipe(
|
||||||
map((e: KeyboardEvent) => (e.target as HTMLInputElement).value),
|
map((e: KeyboardEvent) => e.target.value),
|
||||||
filter(text => text.length > 2),
|
filter(text => text.length > 2),
|
||||||
debounceTime(10),
|
debounceTime(10),
|
||||||
distinctUntilChanged(),
|
distinctUntilChanged(),
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
<div formArrayName="aliases">
|
<div formArrayName="aliases">
|
||||||
<h3>Aliases</h3> <button (click)="addAlias()">Add Alias</button>
|
<h3>Aliases</h3> <button (click)="addAlias()">Add Alias</button>
|
||||||
|
|
||||||
<div *ngFor="let alias of aliases.controls; let i=index">
|
<div *ngFor="let address of aliases.controls; let i=index">
|
||||||
<!-- The repeated alias template -->
|
<!-- The repeated alias template -->
|
||||||
<label>
|
<label>
|
||||||
Alias:
|
Alias:
|
||||||
|
@ -1,13 +1,8 @@
|
|||||||
// #docplaster
|
|
||||||
// #docregion
|
// #docregion
|
||||||
// #docregion remove-heroes
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { FormsModule } from '@angular/forms';
|
import { FormsModule } from '@angular/forms';
|
||||||
// #enddocregion remove-heroes
|
|
||||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
||||||
|
|
||||||
// #docregion remove-heroes
|
|
||||||
import { AppComponent } from './app.component';
|
import { AppComponent } from './app.component';
|
||||||
import { AppRoutingModule } from './app-routing.module';
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
import { HeroesModule } from './heroes/heroes.module';
|
import { HeroesModule } from './heroes/heroes.module';
|
||||||
@ -19,13 +14,6 @@ import { PageNotFoundComponent } from './page-not-found/page-not-found.component
|
|||||||
// #docregion module-imports
|
// #docregion module-imports
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
// #enddocregion module-imports
|
|
||||||
// #enddocregion remove-heroes
|
|
||||||
// #docregion animation-import
|
|
||||||
BrowserAnimationsModule,
|
|
||||||
// #enddocregion animation-import
|
|
||||||
// #docregion remove-heroes
|
|
||||||
// #docregion module-imports
|
|
||||||
FormsModule,
|
FormsModule,
|
||||||
HeroesModule,
|
HeroesModule,
|
||||||
AppRoutingModule
|
AppRoutingModule
|
||||||
@ -39,7 +27,6 @@ import { PageNotFoundComponent } from './page-not-found/page-not-found.component
|
|||||||
bootstrap: [ AppComponent ]
|
bootstrap: [ AppComponent ]
|
||||||
})
|
})
|
||||||
export class AppModule { }
|
export class AppModule { }
|
||||||
// #enddocregion remove-heroes
|
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
/*
|
|
||||||
* This example project is special in that it is not a cli app. To run tests appropriate for this
|
|
||||||
* project, the test command is overwritten in `aio/content/examples/rx-libary/example-config.json`.
|
|
||||||
*
|
|
||||||
* This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.js` runs
|
|
||||||
* tests for this project.
|
|
||||||
*
|
|
||||||
* TODO: Fix our infrastructure/tooling, so that this hack is not necessary.
|
|
||||||
*/
|
|
@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"e2e": [
|
|
||||||
{
|
|
||||||
"cmd": "yarn",
|
|
||||||
"args": [ "tsc", "--project", "./" ]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
@ -6,7 +6,7 @@ describe('MyLibService', () => {
|
|||||||
beforeEach(() => TestBed.configureTestingModule({}));
|
beforeEach(() => TestBed.configureTestingModule({}));
|
||||||
|
|
||||||
it('should be created', () => {
|
it('should be created', () => {
|
||||||
const service: MyLibService = TestBed.inject(MyLibService);
|
const service: MyLibService = TestBed.get(MyLibService);
|
||||||
expect(service).toBeTruthy();
|
expect(service).toBeTruthy();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
emotion?: string;
|
emotion?: string;
|
||||||
|
@ -4,7 +4,7 @@ import { Component, NgModule, OnInit } from '@angular/core';
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||||
|
|
||||||
interface Hero {
|
class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
// #docregion example
|
// #docregion example
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
name: string;
|
name: string;
|
||||||
power: string;
|
power: string;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
// #docregion example
|
// #docregion example
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
name: string;
|
name: string;
|
||||||
power: string;
|
power: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -10,11 +10,11 @@ import { Component, EventEmitter } from '@angular/core';
|
|||||||
'label'
|
'label'
|
||||||
],
|
],
|
||||||
outputs: [
|
outputs: [
|
||||||
'heroChange'
|
'change'
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
heroChange = new EventEmitter<any>();
|
change = new EventEmitter<any>();
|
||||||
label: string;
|
label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -7,7 +7,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
template: `<button>{{label}}</button>`
|
template: `<button>{{label}}</button>`
|
||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
@Output() heroChange = new EventEmitter<any>();
|
@Output() change = new EventEmitter<any>();
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
// Pointless aliases
|
// Pointless aliases
|
||||||
@Output('heroChangeEvent') heroChange = new EventEmitter<any>();
|
@Output('changeEvent') change = new EventEmitter<any>();
|
||||||
@Input('labelAttribute') label: string;
|
@Input('labelAttribute') label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -8,7 +8,7 @@ import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class HeroButtonComponent {
|
export class HeroButtonComponent {
|
||||||
// No aliases
|
// No aliases
|
||||||
@Output() heroChange = new EventEmitter<any>();
|
@Output() change = new EventEmitter<any>();
|
||||||
@Input() label: string;
|
@Input() label: string;
|
||||||
}
|
}
|
||||||
// #enddocregion example
|
// #enddocregion example
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// #docregion
|
// #docregion
|
||||||
export interface Hero {
|
export class Hero {
|
||||||
id: number;
|
id: number;
|
||||||
name: string;
|
name: string;
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ import { NgForm } from '@angular/forms';
|
|||||||
styleUrls: ['./app.component.css']
|
styleUrls: ['./app.component.css']
|
||||||
})
|
})
|
||||||
export class AppComponent {
|
export class AppComponent {
|
||||||
@ViewChild('itemForm') form: NgForm;
|
@ViewChild('itemForm', { static: false }) form: NgForm;
|
||||||
|
|
||||||
private _submitMessage = '';
|
private _submitMessage = '';
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user