Compare commits
202 Commits
traducir-b
...
8.0.0
Author | SHA1 | Date | |
---|---|---|---|
38a7e2a775 | |||
c61c14a127 | |||
652b0959a8 | |||
002fbddcf1 | |||
4761d40a41 | |||
608e0f0d67 | |||
45718b3b21 | |||
b5756bcc39 | |||
60f0462049 | |||
9fd22959d3 | |||
d5dd907396 | |||
5a6bf7de0e | |||
d135bb5e6e | |||
8b9a3e49f2 | |||
44e55fe2e4 | |||
063cc308b6 | |||
c567135dd5 | |||
361f181c8c | |||
b40844523b | |||
c8af830ec8 | |||
e2c9ddb33e | |||
04196ec2d0 | |||
7323072c5c | |||
f0c5400cab | |||
3f2f937c9f | |||
256fe2421a | |||
e6f27bcb0c | |||
8abcf04a5e | |||
bf38df4eb9 | |||
79a025306a | |||
62c936aa49 | |||
77e1b34d91 | |||
26cb128b3c | |||
fdbe07982a | |||
c0e3209915 | |||
70880f0cea | |||
221a5ba634 | |||
68b08cf782 | |||
10560a0872 | |||
561e01ddfd | |||
d1345c78f0 | |||
276f9067c8 | |||
0e90a4263b | |||
e4cc1398aa | |||
8d1f993ceb | |||
df1ab49893 | |||
df03fec8a6 | |||
c01cae22e1 | |||
5a46f94987 | |||
5716605d52 | |||
8043e3131c | |||
54f7245081 | |||
5de24b6dfe | |||
4dc4d7f30a | |||
fcea1a3c22 | |||
8bc4da8665 | |||
a5a2d525ae | |||
4690dcecac | |||
722b2fa6ed | |||
124d1abf19 | |||
736d3ef820 | |||
9b0ad347e1 | |||
d2598ace0a | |||
4a25e4cf95 | |||
3f67bf208d | |||
d85476fd8c | |||
9763edf829 | |||
b6ae54c547 | |||
3de26a84ff | |||
8022d3691b | |||
581336a918 | |||
effc58086c | |||
766615c8a1 | |||
ede4246663 | |||
bb8a6abbf2 | |||
32daa930d0 | |||
b6aa99d3a7 | |||
e10b213784 | |||
a67cf99b0c | |||
04d04fd147 | |||
17361d2b2c | |||
9b88920aa9 | |||
b12e76d1d3 | |||
af001a8cbd | |||
db64b014f8 | |||
7e34975bb0 | |||
0fa48e8c00 | |||
fde3f467e2 | |||
7b378a6920 | |||
3136d9ff2e | |||
325e6cf557 | |||
381d7c4e44 | |||
1b6f3c1ead | |||
c38349127c | |||
a4817729a2 | |||
61c343e3eb | |||
24e6c1e80d | |||
42fc5c9b33 | |||
33e7b285ca | |||
74afdc37da | |||
3c1ffba0ad | |||
14c0017db8 | |||
4878f4890b | |||
b7edef0cd3 | |||
39fa937ab9 | |||
2977829c67 | |||
dbe845e048 | |||
e562acc884 | |||
e295c6a0ae | |||
10b43355f8 | |||
d4e7587bd8 | |||
cabe03cf6d | |||
0cefa9e342 | |||
e073daa48e | |||
994d48a96e | |||
806f8118c8 | |||
dd299f9eb2 | |||
49ec3f312c | |||
71eba450e6 | |||
192f108b0f | |||
dd8651db73 | |||
5bbbe3f684 | |||
a71d8a837b | |||
e8ceae14e1 | |||
c3246e6f16 | |||
685753361e | |||
6b07711f96 | |||
12fb639b7d | |||
644925fd0c | |||
bcc72b0924 | |||
e1091b2ba8 | |||
08841e31d9 | |||
d1fcc2bc13 | |||
fac00442d2 | |||
b8cbcbcf49 | |||
1ed45bd783 | |||
82fd1920b1 | |||
f6d7271ec7 | |||
c1f3faf1df | |||
97202278f9 | |||
132f01c5ca | |||
6a987f1b9c | |||
548b003ed3 | |||
48dc41de01 | |||
817c2b49bc | |||
fed07c735c | |||
390cac6874 | |||
8eb0b8bd40 | |||
d7283c6085 | |||
3fe3a84a4b | |||
28e4187bd6 | |||
7cbc69c890 | |||
1dc134bc6b | |||
6a61d37f95 | |||
8d2e92bcfe | |||
5038f5c909 | |||
6eeca70043 | |||
9f68c35fa9 | |||
21418ea109 | |||
02d8b4ed3c | |||
6748392edc | |||
d9fd301157 | |||
71c5d80ce7 | |||
9798229fde | |||
4b2fcfd5dc | |||
b4d291aa7a | |||
b0ecafdc2f | |||
6816bb62d7 | |||
4b05b8cea0 | |||
a0728aedf7 | |||
ea96f6112a | |||
b706800ea8 | |||
c6f95b1d70 | |||
d896126604 | |||
a20da5ddcc | |||
18878600ba | |||
d7e10f3f7e | |||
4d044ea5b2 | |||
e2d1e0cd98 | |||
4e056580bb | |||
e4c2e6a904 | |||
a50989832d | |||
525307b6a3 | |||
a3ab76b216 | |||
f2265d4b46 | |||
d3ac709b99 | |||
908d43a5bb | |||
71cdb0a08e | |||
c7fbbdfa99 | |||
10e4ab7712 | |||
5114c23c21 | |||
c3e585d7eb | |||
0776daec88 | |||
615e1a58b2 | |||
606758357e | |||
ba2a3595c6 | |||
a50bfe5054 | |||
c8983bc367 | |||
8d6d2c6704 | |||
6711f22e62 | |||
8dd9192fe3 | |||
870e0dab48 |
15
.bazelrc
15
.bazelrc
@ -116,16 +116,21 @@ build --define=compile=legacy
|
|||||||
# --config=remote
|
# --config=remote
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
# Load default settings for Remote Build Execution
|
# Load default settings for Remote Build Execution.
|
||||||
# When updating, the URLs of bazel_toolchains in packages/bazel/package.bzl
|
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/.bazelrc.notoolchain
|
||||||
# may also need to be updated (see https://github.com/angular/angular/pull/27935)
|
|
||||||
import %workspace%/third_party/github.com/bazelbuild/bazel-toolchains/bazelrc/bazel-0.24.0.bazelrc
|
|
||||||
|
|
||||||
# Increase the default number of jobs by 50% because our build has lots of
|
# Increase the default number of jobs by 50% because our build has lots of
|
||||||
# parallelism
|
# parallelism
|
||||||
build:remote --jobs=150
|
build:remote --jobs=150
|
||||||
|
|
||||||
# Point to our custom execution platform; see tools/BUILD.bazel
|
# Toolchain and platform related flags
|
||||||
|
build:remote --host_javabase=@rbe_ubuntu1604_angular//java:jdk
|
||||||
|
build:remote --javabase=@rbe_ubuntu1604_angular//java:jdk
|
||||||
|
build:remote --host_java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
||||||
|
build:remote --java_toolchain=@bazel_tools//tools/jdk:toolchain_hostjdk8
|
||||||
|
build:remote --crosstool_top=@rbe_ubuntu1604_angular//cc:toolchain
|
||||||
|
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
|
||||||
|
build:remote --extra_toolchains=@rbe_ubuntu1604_angular//config:cc-toolchain
|
||||||
build:remote --extra_execution_platforms=//tools:rbe_ubuntu1604-angular
|
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
|
||||||
|
@ -167,7 +167,8 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
|
# Enable remote/sibling docker which is needed by auto-selection of toolchain configs for RBE.
|
||||||
|
- setup_remote_docker
|
||||||
# Setup remote execution and run RBE-compatible tests.
|
# Setup remote execution and run RBE-compatible tests.
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
- run: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
|
- run: yarn bazel test //... --build_tag_filters=-ivy-only --test_tag_filters=-ivy-only
|
||||||
@ -180,6 +181,8 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
|
# Enable remote/sibling docker which is needed by auto-selection of toolchain configs for RBE.
|
||||||
|
- setup_remote_docker
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
|
|
||||||
# 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
|
||||||
@ -269,7 +272,7 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Deploy angular.io to production (if necessary)
|
# Deploy angular.io to production (if necessary)
|
||||||
- run: setPublicVar CI_STABLE_BRANCH "$(npm info @angular/core dist-tags.latest | sed -r 's/^\s*([0-9]+\.[0-9]+)\.[0-9]+.*$/\1.x/')"
|
- run: setPublicVar_CI_STABLE_BRANCH
|
||||||
- run: yarn --cwd aio deploy-production
|
- run: yarn --cwd aio deploy-production
|
||||||
|
|
||||||
test_aio_local:
|
test_aio_local:
|
||||||
@ -292,11 +295,21 @@ jobs:
|
|||||||
|
|
||||||
test_aio_local_ivy:
|
test_aio_local_ivy:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
|
docker:
|
||||||
|
# Needed because the AIO tests and the PWA score test depend on Chrome being available.
|
||||||
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
# Build aio with Ivy (using local Angular packages)
|
# Build aio with Ivy (using local Angular packages)
|
||||||
- run: yarn --cwd aio build-with-ivy --progress=false
|
- run: yarn --cwd aio build-with-ivy --progress=false
|
||||||
|
# Run PWA-score tests
|
||||||
|
# (Run before unit and e2e tests, which destroy the `dist/` directory.)
|
||||||
|
- run: yarn --cwd aio test-pwa-score-localhost $CI_AIO_MIN_PWA_SCORE
|
||||||
|
# Run unit tests
|
||||||
|
- run: yarn --cwd aio test --progress=false --watch=false
|
||||||
|
# Run e2e tests
|
||||||
|
- run: yarn --cwd aio e2e --configuration=ci
|
||||||
|
|
||||||
test_aio_tools:
|
test_aio_tools:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
@ -351,7 +364,7 @@ jobs:
|
|||||||
# Run examples tests with ivy. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
|
# Run examples tests with ivy. The "CIRCLE_NODE_INDEX" will be set if "parallelism" is enabled.
|
||||||
# Since the parallelism is set to "3", there will be three parallel CircleCI containers
|
# Since the parallelism is set to "3", there will be three parallel CircleCI containers
|
||||||
# with either "0", "1" or "2" as node index. This can be passed to the "--shard" argument.
|
# with either "0", "1" or "2" as node index. This can be passed to the "--shard" argument.
|
||||||
- run: yarn --cwd aio example-e2e --setup --local --ivy --cliSpecsConcurrency=5 --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
|
- run: yarn --cwd aio example-e2e --setup --local --ivy --shard=${CIRCLE_NODE_INDEX}/${CIRCLE_NODE_TOTAL}
|
||||||
|
|
||||||
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
# This job should only be run on PR builds, where `CI_PULL_REQUEST` is not `false`.
|
||||||
aio_preview:
|
aio_preview:
|
||||||
@ -399,6 +412,8 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
|
# Enable remote/sibling docker which is needed by auto-selection of toolchain configs for RBE.
|
||||||
|
- setup_remote_docker
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
|
|
||||||
- run: scripts/build-packages-dist.sh
|
- run: scripts/build-packages-dist.sh
|
||||||
@ -425,6 +440,8 @@ jobs:
|
|||||||
- *attach_workspace
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- *setup_circleci_bazel_config
|
- *setup_circleci_bazel_config
|
||||||
|
# Enable remote/sibling docker which is needed by auto-selection of toolchain configs for RBE.
|
||||||
|
- setup_remote_docker
|
||||||
- *setup_bazel_remote_execution
|
- *setup_bazel_remote_execution
|
||||||
|
|
||||||
- run: scripts/build-ivy-npm-packages.sh
|
- run: scripts/build-ivy-npm-packages.sh
|
||||||
@ -486,20 +503,43 @@ jobs:
|
|||||||
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
command: 'openssl aes-256-cbc -d -in .circleci/github_token -k "${KEY}" -out ~/.git_credentials'
|
||||||
- run: ./scripts/ci/publish-build-artifacts.sh
|
- run: ./scripts/ci/publish-build-artifacts.sh
|
||||||
|
|
||||||
aio_monitoring:
|
aio_monitoring_stable:
|
||||||
<<: *job_defaults
|
<<: *job_defaults
|
||||||
docker:
|
docker:
|
||||||
# This job needs Chrome to be globally installed because the tests run with Protractor
|
# This job needs Chrome to be globally installed because the tests run with Protractor
|
||||||
# which does not load the browser through the Bazel webtesting rules.
|
# which does not load the browser through the Bazel webtesting rules.
|
||||||
- image: *browsers_docker_image
|
- image: *browsers_docker_image
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- *attach_workspace
|
||||||
- *post_checkout
|
- *init_environment
|
||||||
- *restore_cache
|
- run: setPublicVar_CI_STABLE_BRANCH
|
||||||
|
- run:
|
||||||
|
name: Check out `aio/` from the stable branch
|
||||||
|
command: |
|
||||||
|
git fetch origin $CI_STABLE_BRANCH
|
||||||
|
git checkout --force origin/$CI_STABLE_BRANCH -- aio/
|
||||||
|
- run:
|
||||||
|
name: Run tests against https://angular.io/
|
||||||
|
command: ./aio/scripts/test-production.sh https://angular.io/ $CI_AIO_MIN_PWA_SCORE
|
||||||
|
- run:
|
||||||
|
name: Notify caretaker about failure
|
||||||
|
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
||||||
|
# The URL comes from https://angular-team.slack.com/apps/A0F7VRE7N-circleci.
|
||||||
|
command: 'curl --request POST --header "Content-Type: application/json" --data "{\"text\":\":x: \`$CIRCLE_JOB\` job failed on build $CIRCLE_BUILD_NUM: $CIRCLE_BUILD_URL :scream:\"}" $SLACK_CARETAKER_WEBHOOK_URL'
|
||||||
|
when: on_fail
|
||||||
|
|
||||||
|
aio_monitoring_next:
|
||||||
|
<<: *job_defaults
|
||||||
|
docker:
|
||||||
|
# This job needs Chrome to be globally installed because the tests run with Protractor
|
||||||
|
# which does not load the browser through the Bazel webtesting rules.
|
||||||
|
- image: *browsers_docker_image
|
||||||
|
steps:
|
||||||
|
- *attach_workspace
|
||||||
- *init_environment
|
- *init_environment
|
||||||
- run:
|
- run:
|
||||||
name: Run tests against the deployed apps
|
name: Run tests against https://next.angular.io/
|
||||||
command: ./aio/scripts/test-production.sh $CI_AIO_MIN_PWA_SCORE
|
command: ./aio/scripts/test-production.sh https://next.angular.io/ $CI_AIO_MIN_PWA_SCORE
|
||||||
- run:
|
- run:
|
||||||
name: Notify caretaker about failure
|
name: Notify caretaker about failure
|
||||||
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
# `$SLACK_CARETAKER_WEBHOOK_URL` is a secret env var defined in CircleCI project settings.
|
||||||
@ -689,19 +729,23 @@ workflows:
|
|||||||
cron: "0 * * * *"
|
cron: "0 * * * *"
|
||||||
filters: *publish_branches_filter
|
filters: *publish_branches_filter
|
||||||
|
|
||||||
# This job is currently disabled due to a version skew problem.
|
aio_monitoring:
|
||||||
# More info is available here: https://github.com/angular/angular/issues/30101
|
jobs:
|
||||||
# aio_monitoring:
|
- setup
|
||||||
# jobs:
|
- aio_monitoring_stable:
|
||||||
# - aio_monitoring
|
requires:
|
||||||
# triggers:
|
- setup
|
||||||
# - schedule:
|
- aio_monitoring_next:
|
||||||
# # Runs AIO monitoring job at 00:00AM every day.
|
requires:
|
||||||
# cron: "0 0 * * *"
|
- setup
|
||||||
# filters:
|
triggers:
|
||||||
# branches:
|
- schedule:
|
||||||
# only:
|
# Runs AIO monitoring jobs at 10:00AM every day.
|
||||||
# - master
|
cron: "0 10 * * *"
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# - don't build the g3 branch
|
# - don't build the g3 branch
|
||||||
|
@ -36,3 +36,38 @@ function setSecretVar() {
|
|||||||
# Restore original shell options.
|
# Restore original shell options.
|
||||||
eval "$originalShellOptions";
|
eval "$originalShellOptions";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Create a function to set an environment variable, when called.
|
||||||
|
#
|
||||||
|
# Use this function for creating setter for public environment variables that require expensive or
|
||||||
|
# time-consuming computaions and may not be needed. When needed, you can call this function to set
|
||||||
|
# the environment variable (which will be available through `$BASH_ENV` from that point onwards).
|
||||||
|
#
|
||||||
|
# Arguments:
|
||||||
|
# - `<name>`: The name of the environment variable. The generated setter function will be
|
||||||
|
# `setPublicVar_<name>`.
|
||||||
|
# - `<code>`: The code to run to compute the value for the variable. Since this code should be
|
||||||
|
# executed lazily, it must be properly escaped. For example:
|
||||||
|
# ```sh
|
||||||
|
# # DO NOT do this:
|
||||||
|
# createPublicVarSetter MY_VAR "$(whoami)"; # `whoami` will be evaluated eagerly
|
||||||
|
#
|
||||||
|
# # DO this isntead:
|
||||||
|
# createPublicVarSetter MY_VAR "\$(whoami)"; # `whoami` will NOT be evaluated eagerly
|
||||||
|
# ```
|
||||||
|
#
|
||||||
|
# Usage: `createPublicVarSetter <name> <code>`
|
||||||
|
#
|
||||||
|
# Example:
|
||||||
|
# ```sh
|
||||||
|
# createPublicVarSetter MY_VAR 'echo "FOO"';
|
||||||
|
# echo $MY_VAR; # Not defined
|
||||||
|
#
|
||||||
|
# setPublicVar_MY_VAR;
|
||||||
|
# source $BASH_ENV;
|
||||||
|
# echo $MY_VAR; # FOO
|
||||||
|
# ```
|
||||||
|
function createPublicVarSetter() {
|
||||||
|
echo "setPublicVar_$1() { setPublicVar $1 \"$2\"; }" >> $BASH_ENV;
|
||||||
|
}
|
||||||
|
@ -34,6 +34,13 @@ setPublicVar CI_REPO_NAME "$CIRCLE_PROJECT_REPONAME";
|
|||||||
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
setPublicVar CI_REPO_OWNER "$CIRCLE_PROJECT_USERNAME";
|
||||||
|
|
||||||
|
|
||||||
|
####################################################################################################
|
||||||
|
# Define "lazy" PUBLIC environment variables for CircleCI.
|
||||||
|
# (I.e. functions to set an environment variable when called.)
|
||||||
|
####################################################################################################
|
||||||
|
createPublicVarSetter CI_STABLE_BRANCH "\$(npm info @angular/core dist-tags.latest | sed -r 's/^\\s*([0-9]+\\.[0-9]+)\\.[0-9]+.*$/\\1.x/')";
|
||||||
|
|
||||||
|
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
# Define SECRET environment variables for CircleCI.
|
# Define SECRET environment variables for CircleCI.
|
||||||
####################################################################################################
|
####################################################################################################
|
||||||
|
@ -20,5 +20,7 @@ steps:
|
|||||||
# Add Bazel CI config
|
# Add Bazel CI config
|
||||||
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
|
- copy .codefresh\bazel.rc %ProgramData%\bazel.bazelrc
|
||||||
# Run tests
|
# Run tests
|
||||||
- yarn bazel test //tools/ts-api-guardian:all
|
- yarn bazel test //tools/ts-api-guardian:all //packages/language-service/test //packages/compiler/test //packages/compiler-cli/test:ngc //packages/compiler-cli/test/ngtsc:ngtsc
|
||||||
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
|
- yarn test-ivy-aot //packages/animations/test //packages/common/test //packages/forms/test //packages/http/test //packages/platform-browser/test //packages/platform-browser-dynamic/test //packages/router/test
|
||||||
|
- yarn bazel test //tools/public_api_guard/...
|
||||||
|
- yarn bazel test //packages/compiler-cli/integrationtest:integrationtest //packages/compiler-cli/test/compliance:compliance
|
||||||
|
22
.devcontainer/recommended-Dockerfile
Normal file
22
.devcontainer/recommended-Dockerfile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Image metadata and config.
|
||||||
|
FROM circleci/node:10-browsers
|
||||||
|
|
||||||
|
LABEL name="Angular dev environment" \
|
||||||
|
description="This image can be used to create a dev environment for building Angular." \
|
||||||
|
vendor="angular" \
|
||||||
|
version="1.0"
|
||||||
|
|
||||||
|
EXPOSE 4000 4200 4433 5000 8080 9876
|
||||||
|
|
||||||
|
|
||||||
|
# Switch to `root` (CircleCI images use `circleci` as the user).
|
||||||
|
USER root
|
||||||
|
|
||||||
|
|
||||||
|
# Configure `Node.js`/`npm` and install utilities.
|
||||||
|
RUN npm config --global set user root
|
||||||
|
RUN npm install --global yarn@1.13.0 # This needs to be in sync with what we use on CI.
|
||||||
|
|
||||||
|
|
||||||
|
# Go! (And keep going.)
|
||||||
|
CMD ["tail", "--follow", "/dev/null"]
|
16
.devcontainer/recommended-devcontainer.json
Normal file
16
.devcontainer/recommended-devcontainer.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Reference: https://code.visualstudio.com/docs/remote/containers#_devcontainerjson-reference
|
||||||
|
{
|
||||||
|
"name": "Angular dev container",
|
||||||
|
"dockerFile": "Dockerfile",
|
||||||
|
"appPort": [4000, 4200, 4433, 5000, 8080, 9876],
|
||||||
|
"postCreateCommand": "yarn install",
|
||||||
|
"extensions": [
|
||||||
|
"devondcarew.bazel-code",
|
||||||
|
"gkalpak.aio-docs-utils",
|
||||||
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
|
"xaver.clang-format",
|
||||||
|
// The following extensions are useful when working on angular.io (i.e. inside the `aio/` directory).
|
||||||
|
//"angular.ng-template",
|
||||||
|
//"dbaeumer.vscode-eslint",
|
||||||
|
],
|
||||||
|
}
|
3
.gitattributes
vendored
3
.gitattributes
vendored
@ -5,5 +5,8 @@
|
|||||||
*.js eol=lf
|
*.js eol=lf
|
||||||
*.ts eol=lf
|
*.ts eol=lf
|
||||||
|
|
||||||
|
# API guardian patch must always use LF for tests to work
|
||||||
|
*.patch eol=lf
|
||||||
|
|
||||||
# Must keep Windows line ending to be parsed correctly
|
# Must keep Windows line ending to be parsed correctly
|
||||||
scripts/windows/packages.txt eol=crlf
|
scripts/windows/packages.txt eol=crlf
|
||||||
|
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@ -218,6 +218,7 @@
|
|||||||
#
|
#
|
||||||
# - gkalpak
|
# - gkalpak
|
||||||
# - petebacondarwin
|
# - petebacondarwin
|
||||||
|
# - jasonaden
|
||||||
|
|
||||||
|
|
||||||
# ===========================================================
|
# ===========================================================
|
||||||
@ -657,8 +658,10 @@
|
|||||||
# ================================================
|
# ================================================
|
||||||
|
|
||||||
/packages/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/packages/common/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/packages/examples/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/packages/examples/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/guide/upgrade.md @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/guide/upgrade.md @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
|
/aio/content/examples/upgrade-lazy-load-ajs/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/upgrade-module/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/upgrade-module/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/images/guide/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/images/guide/upgrade/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
/aio/content/examples/upgrade-phonecat-1-typescript/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
/aio/content/examples/upgrade-phonecat-1-typescript/** @angular/fw-upgrade @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
|
||||||
@ -853,6 +856,7 @@ testing/** @angular/fw-test
|
|||||||
/.buildkite/** @angular/fw-dev-infra
|
/.buildkite/** @angular/fw-dev-infra
|
||||||
/.circleci/** @angular/fw-dev-infra
|
/.circleci/** @angular/fw-dev-infra
|
||||||
/.codefresh/** @angular/fw-dev-infra
|
/.codefresh/** @angular/fw-dev-infra
|
||||||
|
/.devcontainer/** @angular/fw-dev-infra
|
||||||
/.github/** @angular/fw-dev-infra
|
/.github/** @angular/fw-dev-infra
|
||||||
/.vscode/** @angular/fw-dev-infra
|
/.vscode/** @angular/fw-dev-infra
|
||||||
/docs/BAZEL.md @angular/fw-dev-infra
|
/docs/BAZEL.md @angular/fw-dev-infra
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,6 +11,9 @@ tools/gulp-tasks/cldr/cldr-data/
|
|||||||
pubspec.lock
|
pubspec.lock
|
||||||
.c9
|
.c9
|
||||||
.idea/
|
.idea/
|
||||||
|
.devcontainer/*
|
||||||
|
!.devcontainer/recommended-devcontainer.json
|
||||||
|
!.devcontainer/recommended-Dockerfile
|
||||||
.settings/
|
.settings/
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
@ -8,5 +8,8 @@
|
|||||||
"gkalpak.aio-docs-utils",
|
"gkalpak.aio-docs-utils",
|
||||||
"ms-vscode.vscode-typescript-tslint-plugin",
|
"ms-vscode.vscode-typescript-tslint-plugin",
|
||||||
"xaver.clang-format",
|
"xaver.clang-format",
|
||||||
|
// The following extensions are useful when working on angular.io (i.e. inside the `aio/` directory).
|
||||||
|
//"angular.ng-template",
|
||||||
|
//"dbaeumer.vscode-eslint",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
307
CHANGELOG.md
307
CHANGELOG.md
@ -1,3 +1,307 @@
|
|||||||
|
<a name="8.0.0"></a>
|
||||||
|
# [8.0.0](https://github.com/angular/angular/compare/8.0.0-rc.5...8.0.0) (2019-05-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* add support for TypeScript 3.3 (and drop older versions) ([#29004](https://github.com/angular/angular/issues/29004)) ([75748d6](https://github.com/angular/angular/commit/75748d6))
|
||||||
|
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([8022d36](https://github.com/angular/angular/commit/8022d36))
|
||||||
|
* **common:** stricter types for SlicePipe ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
|
||||||
|
* **bazel:** use rbe_autoconfig() and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
|
||||||
|
* **common:** add [@angular](https://github.com/angular)/common/upgrade package for $location-related APIs ([#30055](https://github.com/angular/angular/issues/30055)) ([152d99e](https://github.com/angular/angular/commit/152d99e))
|
||||||
|
* **common:** add ability to retrieve the state from Location service ([#30055](https://github.com/angular/angular/issues/30055)) ([b44b143](https://github.com/angular/angular/commit/b44b143))
|
||||||
|
* **common:** add ability to track all location changes ([#30055](https://github.com/angular/angular/issues/30055)) ([3a9cf3f](https://github.com/angular/angular/commit/3a9cf3f))
|
||||||
|
* **common:** add APIs to read component pieces of URL ([#30055](https://github.com/angular/angular/issues/30055)) ([b635fe8](https://github.com/angular/angular/commit/b635fe8))
|
||||||
|
* **common:** add MockPlatformLocation to enable more robust testing of Location services ([#30055](https://github.com/angular/angular/issues/30055)) ([d0672c2](https://github.com/angular/angular/commit/d0672c2))
|
||||||
|
* **common:** add UrlCodec type for use with upgrade applications ([#30055](https://github.com/angular/angular/issues/30055)) ([ec455e1](https://github.com/angular/angular/commit/ec455e1))
|
||||||
|
* **common:** provide replacement for AngularJS $location service ([#30055](https://github.com/angular/angular/issues/30055)) ([4277600](https://github.com/angular/angular/commit/4277600))
|
||||||
|
* remove deprecated DOCUMENT token from platform-browser ([#28117](https://github.com/angular/angular/issues/28117)) ([3a9d247](https://github.com/angular/angular/commit/3a9d247))
|
||||||
|
* **compiler:** support skipping leading trivia in template source-maps ([#30095](https://github.com/angular/angular/issues/30095)) ([304a12f](https://github.com/angular/angular/commit/304a12f))
|
||||||
|
* **core:** add missing ARIA attributes to html sanitizer ([#29685](https://github.com/angular/angular/issues/29685)) ([909557d](https://github.com/angular/angular/commit/909557d)), closes [#26815](https://github.com/angular/angular/issues/26815)
|
||||||
|
* **router:** deprecate loadChildren:string ([#30073](https://github.com/angular/angular/issues/30073)) ([c61df39](https://github.com/angular/angular/commit/c61df39))
|
||||||
|
* **service-worker:** allow configuring when the SW is registered ([#21842](https://github.com/angular/angular/issues/21842)) ([4cfba58](https://github.com/angular/angular/commit/4cfba58)), closes [#20970](https://github.com/angular/angular/issues/20970)
|
||||||
|
* **service-worker:** expose `SwRegistrationOptions` token to allow runtime config ([#21842](https://github.com/angular/angular/issues/21842)) ([39c0152](https://github.com/angular/angular/commit/39c0152))
|
||||||
|
* **service-worker:** support bypassing SW with specific header/query param ([#30010](https://github.com/angular/angular/issues/30010)) ([6200732](https://github.com/angular/angular/commit/6200732)), closes [#21191](https://github.com/angular/angular/issues/21191)
|
||||||
|
* **compiler-cli:** export tooling definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e1f51ea](https://github.com/angular/angular/commit/e1f51ea))
|
||||||
|
* **compiler-cli:** lower some exported expressions ([#30038](https://github.com/angular/angular/issues/30038)) ([8e73f9b](https://github.com/angular/angular/commit/8e73f9b))
|
||||||
|
* **core:** add schematics to move deprecated DOCUMENT import ([#29950](https://github.com/angular/angular/issues/29950)) ([645e305](https://github.com/angular/angular/commit/645e305))
|
||||||
|
* **bazel:** update the build to use the new architect api ([#29720](https://github.com/angular/angular/issues/29720)) ([902a53a](https://github.com/angular/angular/commit/902a53a))
|
||||||
|
* remove [@angular](https://github.com/angular)/http dependency from [@angular](https://github.com/angular)/platform-server ([#29408](https://github.com/angular/angular/issues/29408)) ([9745f55](https://github.com/angular/angular/commit/9745f55))
|
||||||
|
* **compiler-cli:** ngcc - make logging more configurable ([#29591](https://github.com/angular/angular/issues/29591)) ([8d3d75e](https://github.com/angular/angular/commit/8d3d75e))
|
||||||
|
* **core:** Add "AbstractType<T>" interface ([#29295](https://github.com/angular/angular/issues/29295)) ([afd4a4e](https://github.com/angular/angular/commit/afd4a4e)), closes [#26491](https://github.com/angular/angular/issues/26491)
|
||||||
|
* **core:** template-var-assignment update schematic ([#29608](https://github.com/angular/angular/issues/29608)) ([7c8f4e3](https://github.com/angular/angular/commit/7c8f4e3))
|
||||||
|
* **bazel:** Upgrade rules_nodejs and rules_sass ([#29388](https://github.com/angular/angular/issues/29388)) ([d6d081e](https://github.com/angular/angular/commit/d6d081e))
|
||||||
|
* **service-worker:** support multiple apps on different subpaths of a domain ([#27080](https://github.com/angular/angular/issues/27080)) ([e721c08](https://github.com/angular/angular/commit/e721c08)), closes [#21388](https://github.com/angular/angular/issues/21388)
|
||||||
|
* **bazel:** Eject Bazel ([#29167](https://github.com/angular/angular/issues/29167)) ([36a1550](https://github.com/angular/angular/commit/36a1550))
|
||||||
|
* **bazel:** Hide Bazel files in Bazel builder ([#29110](https://github.com/angular/angular/issues/29110)) ([7060d90](https://github.com/angular/angular/commit/7060d90))
|
||||||
|
* **forms:** clear (remove all) components from a FormArray ([#28918](https://github.com/angular/angular/issues/28918)) ([a68b1a1](https://github.com/angular/angular/commit/a68b1a1)), closes [#18531](https://github.com/angular/angular/issues/18531)
|
||||||
|
* **platform-server:** wait on returned BEFORE_APP_SERIALIZED promises ([#29120](https://github.com/angular/angular/issues/29120)) ([7102ea8](https://github.com/angular/angular/commit/7102ea8))
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
|
||||||
|
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([3de26a8](https://github.com/angular/angular/commit/3de26a8))
|
||||||
|
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([8bc4da8](https://github.com/angular/angular/commit/8bc4da8))
|
||||||
|
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([5a46f94](https://github.com/angular/angular/commit/5a46f94))
|
||||||
|
* **core:** require 'static' flag on queries in typings ([#30641](https://github.com/angular/angular/issues/30641)) ([c8af830](https://github.com/angular/angular/commit/c8af830))
|
||||||
|
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
|
||||||
|
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([32daa93](https://github.com/angular/angular/commit/32daa93))
|
||||||
|
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([d1fcc2b](https://github.com/angular/angular/commit/d1fcc2b))
|
||||||
|
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([71eba45](https://github.com/angular/angular/commit/71eba45)), closes [#29785](https://github.com/angular/angular/issues/29785)
|
||||||
|
* **bazel:** Use existing npm/yarn lock files ([#30438](https://github.com/angular/angular/issues/30438)) ([3136d9f](https://github.com/angular/angular/commit/3136d9f))
|
||||||
|
* **compiler:** ensure strict mode when evaluating in JIT ([#30122](https://github.com/angular/angular/issues/30122)) ([192f108](https://github.com/angular/angular/commit/192f108))
|
||||||
|
* **core:** migrations not always migrating all files ([#30269](https://github.com/angular/angular/issues/30269)) ([e8ceae1](https://github.com/angular/angular/commit/e8ceae1))
|
||||||
|
* **core:** static-query migration errors not printed properly ([#30458](https://github.com/angular/angular/issues/30458)) ([fde3f46](https://github.com/angular/angular/commit/fde3f46))
|
||||||
|
* **core:** static-query migration fails with default parameter values ([#30269](https://github.com/angular/angular/issues/30269)) ([c3246e6](https://github.com/angular/angular/commit/c3246e6))
|
||||||
|
* **core:** static-query migration should gracefully exit if AOT compiler throws ([#30269](https://github.com/angular/angular/issues/30269)) ([a71d8a8](https://github.com/angular/angular/commit/a71d8a8))
|
||||||
|
* **core:** static-query migration should handle queries on accessors ([#30327](https://github.com/angular/angular/issues/30327)) ([dd299f9](https://github.com/angular/angular/commit/dd299f9))
|
||||||
|
* **core:** static-query migration should not fallback to test strategy ([#30458](https://github.com/angular/angular/issues/30458)) ([0fa48e8](https://github.com/angular/angular/commit/0fa48e8))
|
||||||
|
* **core:** static-query migration should not prompt if no queries are used ([#30254](https://github.com/angular/angular/issues/30254)) ([12fb639](https://github.com/angular/angular/commit/12fb639))
|
||||||
|
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([e295c6a](https://github.com/angular/angular/commit/e295c6a))
|
||||||
|
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([9b88920](https://github.com/angular/angular/commit/9b88920)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
|
||||||
|
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([c383491](https://github.com/angular/angular/commit/c383491))
|
||||||
|
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
|
||||||
|
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([548b003](https://github.com/angular/angular/commit/548b003))
|
||||||
|
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([3fe3a84](https://github.com/angular/angular/commit/3fe3a84))
|
||||||
|
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([9720227](https://github.com/angular/angular/commit/9720227))
|
||||||
|
* **router:** fix a problem with router not responding to back button ([#30160](https://github.com/angular/angular/issues/30160)) ([132f01c](https://github.com/angular/angular/commit/132f01c))
|
||||||
|
* **language-service:** Remove tsserverlibrary from rollup globals ([#30123](https://github.com/angular/angular/issues/30123)) ([b706800](https://github.com/angular/angular/commit/b706800))
|
||||||
|
* disable injectable-pipe migration ([#30180](https://github.com/angular/angular/issues/30180)) ([4b2fcfd](https://github.com/angular/angular/commit/4b2fcfd))
|
||||||
|
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([6711f22](https://github.com/angular/angular/commit/6711f22))
|
||||||
|
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([6067583](https://github.com/angular/angular/commit/6067583))
|
||||||
|
* **bazel:** make name param in ng add optional ([#30074](https://github.com/angular/angular/issues/30074)) ([0b5f480](https://github.com/angular/angular/commit/0b5f480))
|
||||||
|
* **bazel:** Make sure only single copy of `[@angular](https://github.com/angular)/bazel` is installed ([#30072](https://github.com/angular/angular/issues/30072)) ([2905bf5](https://github.com/angular/angular/commit/2905bf5))
|
||||||
|
* **bazel:** transitive npm deps in ng_module ([#30065](https://github.com/angular/angular/issues/30065)) ([61365a9](https://github.com/angular/angular/commit/61365a9))
|
||||||
|
* **common:** add upgrade sub-package to ng_package rule for [@angular](https://github.com/angular)/common ([#30117](https://github.com/angular/angular/issues/30117)) ([6de4cbd](https://github.com/angular/angular/commit/6de4cbd)), closes [#30055](https://github.com/angular/angular/issues/30055) [#30116](https://github.com/angular/angular/issues/30116)
|
||||||
|
* **common:** adjust MockPlatformLocation to set state to new object ([#30055](https://github.com/angular/angular/issues/30055)) ([825efa8](https://github.com/angular/angular/commit/825efa8))
|
||||||
|
* **compiler:** Fix compiler crash due to isSkipSelf of null ([#30075](https://github.com/angular/angular/issues/30075)) ([28fd5ab](https://github.com/angular/angular/commit/28fd5ab))
|
||||||
|
* **upgrade:** do not break if `onMicrotaskEmpty` emits while a `$digest` is in progress ([#29794](https://github.com/angular/angular/issues/29794)) ([0ddf2e7](https://github.com/angular/angular/commit/0ddf2e7)), closes [#24680](https://github.com/angular/angular/issues/24680) [/github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts#L12](https://github.com//github.com/angular/angular/blob/78146c189/packages/core/src/util/ng_dev_mode.ts/issues/L12) [#24680](https://github.com/angular/angular/issues/24680)
|
||||||
|
* **bazel:** do not typecheck core schematic files ([#29876](https://github.com/angular/angular/issues/29876)) ([2ba799d](https://github.com/angular/angular/commit/2ba799d))
|
||||||
|
* **bazel:** restore ng build --prod ([#30005](https://github.com/angular/angular/issues/30005)) ([96a8289](https://github.com/angular/angular/commit/96a8289))
|
||||||
|
* **common:** prevent repeated application of HttpParams mutations ([#29045](https://github.com/angular/angular/issues/29045)) ([8e8e89a](https://github.com/angular/angular/commit/8e8e89a)), closes [#20430](https://github.com/angular/angular/issues/20430)
|
||||||
|
* **common:** async pipe will properly check when it recieves an NaN value from an observable ([#22305](https://github.com/angular/angular/issues/22305)) ([3f6bf6d](https://github.com/angular/angular/commit/3f6bf6d)), closes [#15721](https://github.com/angular/angular/issues/15721)
|
||||||
|
* **core:** don't include a local `EventListener` in typings ([#29809](https://github.com/angular/angular/issues/29809)) ([4bde40f](https://github.com/angular/angular/commit/4bde40f)), closes [/github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts#L32](https://github.com//github.com/angular/angular/blob/303eae918d997070a36b523ddc97e018f622c258/packages/core/src/debug/debug_node.ts/issues/L32) [#29806](https://github.com/angular/angular/issues/29806)
|
||||||
|
* **core:** use shakeable global definitions ([#29929](https://github.com/angular/angular/issues/29929)) ([e5905bb](https://github.com/angular/angular/commit/e5905bb)), closes [/github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts#L279-L282](https://github.com//github.com/angular/angular-cli/blob/5fc1f2499cbe57f9a95e4b0dfced130eb3a8046d/packages/angular_devkit/build_angular/src/angular-cli-files/models/webpack-configs/common.ts/issues/L279-L282)
|
||||||
|
* **language-service:** Use proper types instead of any ([#29942](https://github.com/angular/angular/issues/29942)) ([1a56cd5](https://github.com/angular/angular/commit/1a56cd5))
|
||||||
|
* **bazel:** Install packages after `ng add` when invoked independently ([#29852](https://github.com/angular/angular/issues/29852)) ([bd2ce9c](https://github.com/angular/angular/commit/bd2ce9c))
|
||||||
|
* **compiler-cli:** pass config path to ts.parseJsonConfigFileContent ([#29872](https://github.com/angular/angular/issues/29872)) ([86a3f90](https://github.com/angular/angular/commit/86a3f90)), closes [/github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts#L56-L57](https://github.com//github.com/Microsoft/TypeScript/blob/025d82633915b67003ea38ba40b9239a19721c13/src/compiler/emitter.ts/issues/L56-L57)
|
||||||
|
* **router:** support non-NgFactory promise in loadChildren typings ([#29832](https://github.com/angular/angular/issues/29832)) ([2bfb6a0](https://github.com/angular/angular/commit/2bfb6a0))
|
||||||
|
* **bazel:** add configuration_env_vars = ["compile"] to generated [@npm](https://github.com/npm)//[@angular](https://github.com/angular)/bazel/bin:ngc-wrapped nodejs_binary ([#29694](https://github.com/angular/angular/issues/29694)) ([2e66ddf](https://github.com/angular/angular/commit/2e66ddf))
|
||||||
|
* **bazel:** docs formatting ([#29817](https://github.com/angular/angular/issues/29817)) ([cc2e4b6](https://github.com/angular/angular/commit/cc2e4b6))
|
||||||
|
* **bazel:** remove karma-jasmine from ts_web_test_suite ([#29695](https://github.com/angular/angular/issues/29695)) ([2bd9214](https://github.com/angular/angular/commit/2bd9214))
|
||||||
|
* **bazel:** support running ng-add on minimal applications ([#29681](https://github.com/angular/angular/issues/29681)) ([9810c6c](https://github.com/angular/angular/commit/9810c6c)), closes [#29680](https://github.com/angular/angular/issues/29680)
|
||||||
|
* **common:** add `@Injectable()` to common pipes ([#29834](https://github.com/angular/angular/issues/29834)) ([387fbb8](https://github.com/angular/angular/commit/387fbb8))
|
||||||
|
* **compiler-cli:** ensure LogicalProjectPaths always start with a slash ([#29627](https://github.com/angular/angular/issues/29627)) ([e02684e](https://github.com/angular/angular/commit/e02684e))
|
||||||
|
* **core:** add missing migration to npm package ([#29705](https://github.com/angular/angular/issues/29705)) ([96b76dc](https://github.com/angular/angular/commit/96b76dc))
|
||||||
|
* **core:** call ngOnDestroy for tree-shakeable providers ([#28943](https://github.com/angular/angular/issues/28943)) ([30b0442](https://github.com/angular/angular/commit/30b0442)), closes [#28927](https://github.com/angular/angular/issues/28927)
|
||||||
|
* **core:** Deprecate TestBed.get(...):any ([#29290](https://github.com/angular/angular/issues/29290)) ([609024f](https://github.com/angular/angular/commit/609024f)), closes [#13785](https://github.com/angular/angular/issues/13785) [#26491](https://github.com/angular/angular/issues/26491)
|
||||||
|
* **core:** resolve ts compile issues due to lenient tsconfig ([#29843](https://github.com/angular/angular/issues/29843)) ([54058ba](https://github.com/angular/angular/commit/54058ba))
|
||||||
|
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([712d60e](https://github.com/angular/angular/commit/712d60e))
|
||||||
|
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([#29711](https://github.com/angular/angular/issues/29711)) ([9e33dc3](https://github.com/angular/angular/commit/9e33dc3))
|
||||||
|
* **platform-browser:** insert APP_ID in styles, contentAttr and hostAttr ([#17745](https://github.com/angular/angular/issues/17745)) ([ca14509](https://github.com/angular/angular/commit/ca14509))
|
||||||
|
* **bazel:** Update schematics to support routing ([#29548](https://github.com/angular/angular/issues/29548)) ([401b8ee](https://github.com/angular/angular/commit/401b8ee))
|
||||||
|
* **bazel:** use //:tsconfig.json as the default for ng_module ([#29670](https://github.com/angular/angular/issues/29670)) ([b14537a](https://github.com/angular/angular/commit/b14537a))
|
||||||
|
* **compiler-cli:** ngcc - cope with processing entry-points multiple times ([#29657](https://github.com/angular/angular/issues/29657)) ([6b39c9c](https://github.com/angular/angular/commit/6b39c9c))
|
||||||
|
* **core:** static-query schematic should detect static queries in getters. ([#29609](https://github.com/angular/angular/issues/29609)) ([33016b8](https://github.com/angular/angular/commit/33016b8))
|
||||||
|
* **common:** escape query selector used when anchor scrolling ([#29577](https://github.com/angular/angular/issues/29577)) ([7671c73](https://github.com/angular/angular/commit/7671c73)), closes [#28193](https://github.com/angular/angular/issues/28193)
|
||||||
|
* **router:** adjust setting navigationTransition when a new navigation cancels an existing one ([#29636](https://github.com/angular/angular/issues/29636)) ([e884c0c](https://github.com/angular/angular/commit/e884c0c)), closes [#29389](https://github.com/angular/angular/issues/29389) [#29590](https://github.com/angular/angular/issues/29590)
|
||||||
|
* **bazel:** allow ng_module users to set createExternalSymbolFactoryReexports ([#29459](https://github.com/angular/angular/issues/29459)) ([21be0fb](https://github.com/angular/angular/commit/21be0fb))
|
||||||
|
* **bazel:** workaround problem reading summary files from node_modules ([#29459](https://github.com/angular/angular/issues/29459)) ([769d960](https://github.com/angular/angular/commit/769d960))
|
||||||
|
* **compiler:** inherit param types when class has a constructor which takes no declared parameters and delegates up ([#29232](https://github.com/angular/angular/issues/29232)) ([0007564](https://github.com/angular/angular/commit/0007564))
|
||||||
|
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([dafbbf8](https://github.com/angular/angular/commit/dafbbf8)), closes [#29231](https://github.com/angular/angular/issues/29231)
|
||||||
|
* **core:** static-query schematic should detect queries in "ngDoCheck" and "ngOnChanges" ([#29492](https://github.com/angular/angular/issues/29492)) ([09fab58](https://github.com/angular/angular/commit/09fab58))
|
||||||
|
* **router:** support NgFactory promise in loadChildren typings ([#29392](https://github.com/angular/angular/issues/29392)) ([26a8c59](https://github.com/angular/angular/commit/26a8c59))
|
||||||
|
* **bazel:** correct regexp test for self-references in metadata ([#29346](https://github.com/angular/angular/issues/29346)) ([9d090cb](https://github.com/angular/angular/commit/9d090cb))
|
||||||
|
* **bazel:** don't produce self-references in metadata ([#29317](https://github.com/angular/angular/issues/29317)) ([3facdeb](https://github.com/angular/angular/commit/3facdeb)), closes [#29315](https://github.com/angular/angular/issues/29315)
|
||||||
|
* **bazel:** fix strict null checks compile error in packages/bazel/src/schematics/ng-add/index.ts ([#29282](https://github.com/angular/angular/issues/29282)) ([9a7f560](https://github.com/angular/angular/commit/9a7f560))
|
||||||
|
* **bazel:** Remove [@angular](https://github.com/angular)/upgrade from dev dependencies ([#29319](https://github.com/angular/angular/issues/29319)) ([1db8bf3](https://github.com/angular/angular/commit/1db8bf3))
|
||||||
|
* **bazel:** Support new e2e project layout ([#29318](https://github.com/angular/angular/issues/29318)) ([8ef690c](https://github.com/angular/angular/commit/8ef690c))
|
||||||
|
* **bazel:** turn off pure call tree shaking for ng_package ([#29210](https://github.com/angular/angular/issues/29210)) ([4990b93](https://github.com/angular/angular/commit/4990b93))
|
||||||
|
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([105cfaf](https://github.com/angular/angular/commit/105cfaf)), closes [/github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com//github.com/angular/material2/blob/master/tools/package-tools/build-release.ts/issues/L78-L85)
|
||||||
|
* **core:** don't wrap `<tr>` and `<col>` elements into a required parent ([#29219](https://github.com/angular/angular/issues/29219)) ([f2dc32e](https://github.com/angular/angular/commit/f2dc32e))
|
||||||
|
* **core:** parse incorrect ML open tag as text ([#29328](https://github.com/angular/angular/issues/29328)) ([4605df8](https://github.com/angular/angular/commit/4605df8)), closes [#29231](https://github.com/angular/angular/issues/29231)
|
||||||
|
* **compiler-cli:** incorrect metadata bundle for multiple unnamed re-exports ([#29360](https://github.com/angular/angular/issues/29360)) ([cf8d934](https://github.com/angular/angular/commit/cf8d934)), closes [github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85](https://github.com/angular/material2/blob/master/tools/package-tools/build-release.ts#L78-L85)
|
||||||
|
* **bazel:** add missing binary path for api-extractor ([#29202](https://github.com/angular/angular/issues/29202)) ([df354d1](https://github.com/angular/angular/commit/df354d1))
|
||||||
|
* **bazel:** ng build should produce prod bundle ([#29136](https://github.com/angular/angular/issues/29136)) ([14ce8a9](https://github.com/angular/angular/commit/14ce8a9))
|
||||||
|
* **compiler:** ensure template is updated if an output is transformed ([#29041](https://github.com/angular/angular/issues/29041)) ([c7e4931](https://github.com/angular/angular/commit/c7e4931))
|
||||||
|
|
||||||
|
|
||||||
|
### DEPRECATIONS
|
||||||
|
|
||||||
|
* **core:** deprecate integration with the Web Tracing Framework (WTF) ([#30642](https://github.com/angular/angular/issues/30642)) ([b408445](https://github.com/angular/angular/commit/b408445))
|
||||||
|
* **platform-webworker:** deprecate platform-webworker ([#30642](https://github.com/angular/angular/issues/30642)) ([361f181](https://github.com/angular/angular/commit/361f181))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* **bazel:** @bazel/typescript is now a peerDependency of @angular/bazel so user's of @angular/bazel must add @bazel/typescript to their package.json
|
||||||
|
* **bazel:** ng_module now depends on a minimum of build_bazel_rules_nodejs 0.27.12
|
||||||
|
* **core:** In Angular version 8, it's required that all @ViewChild and @ContentChild
|
||||||
|
queries have a 'static' flag specifying whether the query is 'static' or
|
||||||
|
'dynamic'. The compiler previously sorted queries automatically, but in
|
||||||
|
8.0 developers are required to explicitly specify which behavior is wanted.
|
||||||
|
This is a temporary requirement as part of a migration; see
|
||||||
|
https://v8.angular.io/guide/static-query-migration for more details.
|
||||||
|
|
||||||
|
@ViewChildren and @ContentChildren queries are always dynamic, and so are
|
||||||
|
unaffected.
|
||||||
|
|
||||||
|
* `TestBed.get()` has two signatures, one which is typed and another which accepts and returns `any`. The signature for `any` is deprecated; all usage of `TestBed.get()` should go through the typed API. This mainly affects string tokens
|
||||||
|
(which aren't supported) and abstract class tokens.
|
||||||
|
|
||||||
|
Before:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
providers: [{provide: "stringToken", useValue: new Service()}],
|
||||||
|
});
|
||||||
|
|
||||||
|
let service = TestBed.get("stringToken"); // type any
|
||||||
|
```
|
||||||
|
|
||||||
|
After:
|
||||||
|
|
||||||
|
```ts
|
||||||
|
const SERVICE_TOKEN = new InjectionToken<Service>("SERVICE_TOKEN");
|
||||||
|
|
||||||
|
TestBed.configureTestingModule({
|
||||||
|
providers: [{provide: SERVICE_TOKEN, useValue: new Service()}],
|
||||||
|
});
|
||||||
|
|
||||||
|
let service = TestBed.get(SERVICE_TOKEN); // type Service
|
||||||
|
```
|
||||||
|
|
||||||
|
* **core:** Certain elements (like `<tr>` or `<col>`) require parent elements to be of a certain type by the HTML specification
|
||||||
|
(ex. `<tr>` can only be inside `<tbody>` / `<thead>`). Before this change Angular template parser was auto-correcting
|
||||||
|
"invalid" HTML using the following rules:
|
||||||
|
- `<tr>` would be wrapped in `<tbody>` if not inside `<tbody>`, `<tfoot>` or `<thead>`;
|
||||||
|
- `<col>` would be wrapped in `<colgroup>` if not inside `<colgroup>`.
|
||||||
|
|
||||||
|
This meachanism of automatic wrapping / auto-correcting was problematic for several reasons:
|
||||||
|
- it is non-obvious and arbitrary (ex. there are more HTML elements that has rules for parent type);
|
||||||
|
- it is incorrect for cases where `<tr>` / `<col>` are at the root of a component's content, ex.:
|
||||||
|
|
||||||
|
```html
|
||||||
|
<projecting-tr-inside-tbody>
|
||||||
|
<tr>...</tr>
|
||||||
|
</projecting-tr-inside-tbody>
|
||||||
|
```
|
||||||
|
|
||||||
|
In the above example the `<projecting-tr-inside-tbody>` component could be "surprised" to see additional
|
||||||
|
`<tbody>` elements inserted by Angular HTML parser.
|
||||||
|
|
||||||
|
|
||||||
|
* TypeScript 3.1 and 3.2 are no longer supported.
|
||||||
|
|
||||||
|
Please update your TypeScript version to 3.3
|
||||||
|
|
||||||
|
|
||||||
|
<a name="8.0.0-rc.5"></a>
|
||||||
|
# [8.0.0-rc.5](https://github.com/angular/angular/compare/8.0.0-rc.4...8.0.0-rc.5) (2019-05-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **bazel:** allow ts_library interop with list-typed inputs ([#30600](https://github.com/angular/angular/issues/30600)) ([bf38df4](https://github.com/angular/angular/commit/bf38df4))
|
||||||
|
* **bazel:** Disable sandbox on Mac OS ([#30460](https://github.com/angular/angular/issues/30460)) ([3de26a8](https://github.com/angular/angular/commit/3de26a8))
|
||||||
|
* **bazel:** ng test should run specific ts_web_test_suite ([#30526](https://github.com/angular/angular/issues/30526)) ([8bc4da8](https://github.com/angular/angular/commit/8bc4da8))
|
||||||
|
* **core:** remove deprecated `TestBed.deprecatedOverrideProvider` API ([#30576](https://github.com/angular/angular/issues/30576)) ([5a46f94](https://github.com/angular/angular/commit/5a46f94))
|
||||||
|
* **core:** require 'static' flag on queries in typings ([#30641](https://github.com/angular/angular/issues/30641)) ([c8af830](https://github.com/angular/angular/commit/c8af830))
|
||||||
|
* **core:** temporarily remove [@deprecated](https://github.com/deprecated) jsdoc tag for a TextBed.get overload ([#30514](https://github.com/angular/angular/issues/30514)) ([561e01d](https://github.com/angular/angular/commit/561e01d)), closes [#29290](https://github.com/angular/angular/issues/29290) [#29905](https://github.com/angular/angular/issues/29905)
|
||||||
|
* **router:** type cast correctly for IE 11 bug breaking URL Unification when comparing objects ([#30464](https://github.com/angular/angular/issues/30464)) ([32daa93](https://github.com/angular/angular/commit/32daa93))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **common:** add ability to watch for AngularJS URL updates through `onUrlChange` hook ([#30466](https://github.com/angular/angular/issues/30466)) ([8022d36](https://github.com/angular/angular/commit/8022d36))
|
||||||
|
* **common:** stricter types for SlicePipe ([#30156](https://github.com/angular/angular/issues/30156)) ([722b2fa](https://github.com/angular/angular/commit/722b2fa))
|
||||||
|
|
||||||
|
|
||||||
|
### DEPRECATIONS
|
||||||
|
|
||||||
|
* **core:** deprecate integration with the Web Tracing Framework (WTF) ([#30642](https://github.com/angular/angular/issues/30642)) ([b408445](https://github.com/angular/angular/commit/b408445))
|
||||||
|
* **platform-webworker:** deprecate platform-webworker ([#30642](https://github.com/angular/angular/issues/30642)) ([361f181](https://github.com/angular/angular/commit/361f181))
|
||||||
|
|
||||||
|
|
||||||
|
### BREAKING CHANGES
|
||||||
|
|
||||||
|
* **core:** In Angular version 8, it's required that all @ViewChild and @ContentChild
|
||||||
|
queries have a 'static' flag specifying whether the query is 'static' or
|
||||||
|
'dynamic'. The compiler previously sorted queries automatically, but in
|
||||||
|
8.0 developers are required to explicitly specify which behavior is wanted.
|
||||||
|
This is a temporary requirement as part of a migration; see
|
||||||
|
https://v8.angular.io/guide/static-query-migration for more details.
|
||||||
|
|
||||||
|
@ViewChildren and @ContentChildren queries are always dynamic, and so are
|
||||||
|
unaffected.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="8.0.0-rc.4"></a>
|
||||||
|
# [8.0.0-rc.4](https://github.com/angular/angular/compare/8.0.0-rc.3...8.0.0-rc.4) (2019-05-15)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **bazel:** Directly spawn native Bazel binary ([#30306](https://github.com/angular/angular/issues/30306)) ([d1fcc2b](https://github.com/angular/angular/commit/d1fcc2b))
|
||||||
|
* **bazel:** pass correct arguments to http_server in Windows ([#30346](https://github.com/angular/angular/issues/30346)) ([71eba45](https://github.com/angular/angular/commit/71eba45)), closes [#29785](https://github.com/angular/angular/issues/29785)
|
||||||
|
* **bazel:** Use existing npm/yarn lock files ([#30438](https://github.com/angular/angular/issues/30438)) ([3136d9f](https://github.com/angular/angular/commit/3136d9f))
|
||||||
|
* **compiler:** ensure strict mode when evaluating in JIT ([#30122](https://github.com/angular/angular/issues/30122)) ([192f108](https://github.com/angular/angular/commit/192f108))
|
||||||
|
* **core:** migrations not always migrating all files ([#30269](https://github.com/angular/angular/issues/30269)) ([e8ceae1](https://github.com/angular/angular/commit/e8ceae1))
|
||||||
|
* **core:** static-query migration errors not printed properly ([#30458](https://github.com/angular/angular/issues/30458)) ([fde3f46](https://github.com/angular/angular/commit/fde3f46))
|
||||||
|
* **core:** static-query migration fails with default parameter values ([#30269](https://github.com/angular/angular/issues/30269)) ([c3246e6](https://github.com/angular/angular/commit/c3246e6))
|
||||||
|
* **core:** static-query migration should gracefully exit if AOT compiler throws ([#30269](https://github.com/angular/angular/issues/30269)) ([a71d8a8](https://github.com/angular/angular/commit/a71d8a8))
|
||||||
|
* **core:** static-query migration should handle queries on accessors ([#30327](https://github.com/angular/angular/issues/30327)) ([dd299f9](https://github.com/angular/angular/commit/dd299f9))
|
||||||
|
* **core:** static-query migration should not fallback to test strategy ([#30458](https://github.com/angular/angular/issues/30458)) ([0fa48e8](https://github.com/angular/angular/commit/0fa48e8))
|
||||||
|
* **core:** static-query migration should not prompt if no queries are used ([#30254](https://github.com/angular/angular/issues/30254)) ([12fb639](https://github.com/angular/angular/commit/12fb639))
|
||||||
|
* **core:** static-query usage migration strategy should detect ambiguous query usage ([#30215](https://github.com/angular/angular/issues/30215)) ([e295c6a](https://github.com/angular/angular/commit/e295c6a))
|
||||||
|
* **router:** ensure navigations start with the current URL value incase redirect is skipped ([#30344](https://github.com/angular/angular/issues/30344)) ([9b88920](https://github.com/angular/angular/commit/9b88920)), closes [#30340](https://github.com/angular/angular/issues/30340) [#30160](https://github.com/angular/angular/issues/30160)
|
||||||
|
* **router:** IE 11 bug can break URL unification when comparing objects ([#30393](https://github.com/angular/angular/issues/30393)) ([c383491](https://github.com/angular/angular/commit/c383491))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **bazel:** use rbe_autoconfig() and new container. ([#29336](https://github.com/angular/angular/issues/29336)) ([e562acc](https://github.com/angular/angular/commit/e562acc))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="8.0.0-rc.3"></a>
|
||||||
|
# [8.0.0-rc.3](https://github.com/angular/angular/compare/8.0.0-rc.2...8.0.0-rc.3) (2019-05-07)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **bazel:** Bump ibazel to 0.10.1 for windows fixes ([#30196](https://github.com/angular/angular/issues/30196)) ([9f68c35](https://github.com/angular/angular/commit/9f68c35))
|
||||||
|
* **compiler-cli:** log ngcc skipping messages as debug instead of info ([#30232](https://github.com/angular/angular/issues/30232)) ([548b003](https://github.com/angular/angular/commit/548b003))
|
||||||
|
* **core:** fix interpolate identifier in AOT ([#30243](https://github.com/angular/angular/issues/30243)) ([3fe3a84](https://github.com/angular/angular/commit/3fe3a84))
|
||||||
|
* **router:** ensure `history.state` is set in `eager` update mode ([#30154](https://github.com/angular/angular/issues/30154)) ([9720227](https://github.com/angular/angular/commit/9720227))
|
||||||
|
* **router:** fix a problem with router not responding to back button ([#30160](https://github.com/angular/angular/issues/30160)) ([132f01c](https://github.com/angular/angular/commit/132f01c))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="8.0.0-rc.2"></a>
|
||||||
|
# [8.0.0-rc.2](https://github.com/angular/angular/compare/8.0.0-rc.1...8.0.0-rc.2) (2019-04-29)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **language-service:** Remove tsserverlibrary from rollup globals ([#30123](https://github.com/angular/angular/issues/30123)) ([b706800](https://github.com/angular/angular/commit/b706800))
|
||||||
|
* disable injectable-pipe migration ([#30180](https://github.com/angular/angular/issues/30180)) ([4b2fcfd](https://github.com/angular/angular/commit/4b2fcfd))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a name="8.0.0-rc.1"></a>
|
||||||
|
# [8.0.0-rc.1](https://github.com/angular/angular/compare/8.0.0-rc.0...8.0.0-rc.1) (2019-04-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **bazel:** Exclude common/upgrade* in metadata.tsconfig.json ([#30133](https://github.com/angular/angular/issues/30133)) ([6711f22](https://github.com/angular/angular/commit/6711f22))
|
||||||
|
* **bazel:** update peerDep ranges ([#30155](https://github.com/angular/angular/issues/30155)) ([6067583](https://github.com/angular/angular/commit/6067583))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="8.0.0-rc.0"></a>
|
<a name="8.0.0-rc.0"></a>
|
||||||
# [8.0.0-rc.0](https://github.com/angular/angular/compare/8.0.0-beta.14...8.0.0-rc.0) (2019-04-25)
|
# [8.0.0-rc.0](https://github.com/angular/angular/compare/8.0.0-beta.14...8.0.0-rc.0) (2019-04-25)
|
||||||
|
|
||||||
@ -976,7 +1280,6 @@ To learn about the release highlights and our new CLI-powered update workflow fo
|
|||||||
|
|
||||||
* **bazel:** protractor rule should include *.e2e-spec.js ([#25701](https://github.com/angular/angular/issues/25701)) ([ed6b68b](https://github.com/angular/angular/commit/ed6b68b))
|
* **bazel:** protractor rule should include *.e2e-spec.js ([#25701](https://github.com/angular/angular/issues/25701)) ([ed6b68b](https://github.com/angular/angular/commit/ed6b68b))
|
||||||
* **core:** size regression with closure compiler ([#25531](https://github.com/angular/angular/issues/25531)) ([ebcf762](https://github.com/angular/angular/commit/ebcf762))
|
* **core:** size regression with closure compiler ([#25531](https://github.com/angular/angular/issues/25531)) ([ebcf762](https://github.com/angular/angular/commit/ebcf762))
|
||||||
* **docs-infra:** show "suggest edits" only for /guide and /tutorial dirs ([#24378](https://github.com/angular/angular/issues/24378)) ([66b7870](https://github.com/angular/angular/commit/66b7870))
|
|
||||||
* **upgrade:** trigger `$destroy` event on upgraded component element ([#25357](https://github.com/angular/angular/issues/25357)) ([82e0676](https://github.com/angular/angular/commit/82e0676)), closes [#25334](https://github.com/angular/angular/issues/25334)
|
* **upgrade:** trigger `$destroy` event on upgraded component element ([#25357](https://github.com/angular/angular/issues/25357)) ([82e0676](https://github.com/angular/angular/commit/82e0676)), closes [#25334](https://github.com/angular/angular/issues/25334)
|
||||||
* **router:** warn if navigation triggered outside Angular zone ([#24959](https://github.com/angular/angular/issues/24959)) ([23a96dc](https://github.com/angular/angular/commit/23a96dc)), closes [#15770](https://github.com/angular/angular/issues/15770) [#15946](https://github.com/angular/angular/issues/15946) [#24728](https://github.com/angular/angular/issues/24728)
|
* **router:** warn if navigation triggered outside Angular zone ([#24959](https://github.com/angular/angular/issues/24959)) ([23a96dc](https://github.com/angular/angular/commit/23a96dc)), closes [#15770](https://github.com/angular/angular/issues/15770) [#15946](https://github.com/angular/angular/issues/15946) [#24728](https://github.com/angular/angular/issues/24728)
|
||||||
|
|
||||||
@ -1068,7 +1371,6 @@ Note: the 6.1.5 release on npm accidentally glitched-out midway, so we cut 6.1.6
|
|||||||
* **core:** Injector correctly honors the @Self flag ([#24520](https://github.com/angular/angular/issues/24520)) ([ccbda9d](https://github.com/angular/angular/commit/ccbda9d))
|
* **core:** Injector correctly honors the @Self flag ([#24520](https://github.com/angular/angular/issues/24520)) ([ccbda9d](https://github.com/angular/angular/commit/ccbda9d))
|
||||||
* **core:** avoid eager providers re-initialization ([#23559](https://github.com/angular/angular/issues/23559)) ([0c6dc45](https://github.com/angular/angular/commit/0c6dc45))
|
* **core:** avoid eager providers re-initialization ([#23559](https://github.com/angular/angular/issues/23559)) ([0c6dc45](https://github.com/angular/angular/commit/0c6dc45))
|
||||||
* **core:** call ngOnDestroy on all services that have it ([#23755](https://github.com/angular/angular/issues/23755)) ([fc03427](https://github.com/angular/angular/commit/fc03427)), closes [#22466](https://github.com/angular/angular/issues/22466) [#22240](https://github.com/angular/angular/issues/22240) [#14818](https://github.com/angular/angular/issues/14818)
|
* **core:** call ngOnDestroy on all services that have it ([#23755](https://github.com/angular/angular/issues/23755)) ([fc03427](https://github.com/angular/angular/commit/fc03427)), closes [#22466](https://github.com/angular/angular/issues/22466) [#22240](https://github.com/angular/angular/issues/22240) [#14818](https://github.com/angular/angular/issues/14818)
|
||||||
* **docs-infra:** fix table header layout in API pages ([#24919](https://github.com/angular/angular/issues/24919)) ([3cd9645](https://github.com/angular/angular/commit/3cd9645))
|
|
||||||
* **elements:** always check to create strategy ([#23825](https://github.com/angular/angular/issues/23825)) ([b1cda36](https://github.com/angular/angular/commit/b1cda36))
|
* **elements:** always check to create strategy ([#23825](https://github.com/angular/angular/issues/23825)) ([b1cda36](https://github.com/angular/angular/commit/b1cda36))
|
||||||
* **elements:** prevent closure renaming of platform properties ([#23843](https://github.com/angular/angular/issues/23843)) ([d4b8b24](https://github.com/angular/angular/commit/d4b8b24))
|
* **elements:** prevent closure renaming of platform properties ([#23843](https://github.com/angular/angular/issues/23843)) ([d4b8b24](https://github.com/angular/angular/commit/d4b8b24))
|
||||||
* **forms:** properly handle special properties in FormGroup.get ([#22249](https://github.com/angular/angular/issues/22249)) ([9367e91](https://github.com/angular/angular/commit/9367e91)), closes [#17195](https://github.com/angular/angular/issues/17195)
|
* **forms:** properly handle special properties in FormGroup.get ([#22249](https://github.com/angular/angular/issues/22249)) ([9367e91](https://github.com/angular/angular/commit/9367e91)), closes [#17195](https://github.com/angular/angular/issues/17195)
|
||||||
@ -1185,7 +1487,6 @@ For example:
|
|||||||
|
|
||||||
* **animations:** always render end-state styles for orphaned DOM nodes ([#24236](https://github.com/angular/angular/issues/24236)) ([0139173](https://github.com/angular/angular/commit/0139173))
|
* **animations:** always render end-state styles for orphaned DOM nodes ([#24236](https://github.com/angular/angular/issues/24236)) ([0139173](https://github.com/angular/angular/commit/0139173))
|
||||||
* **bazel:** Allow ng_module to depend on targets w no deps ([#24446](https://github.com/angular/angular/issues/24446)) ([ea3669e](https://github.com/angular/angular/commit/ea3669e))
|
* **bazel:** Allow ng_module to depend on targets w no deps ([#24446](https://github.com/angular/angular/issues/24446)) ([ea3669e](https://github.com/angular/angular/commit/ea3669e))
|
||||||
* **docs-infra:** use script nomodule to load IE polyfills, skip other polyfills ([#24317](https://github.com/angular/angular/issues/24317)) ([e876535](https://github.com/angular/angular/commit/e876535)), closes [#23647](https://github.com/angular/angular/issues/23647)
|
|
||||||
* **router:** fix lazy loading of aux routes ([#23459](https://github.com/angular/angular/issues/23459)) ([d20877b](https://github.com/angular/angular/commit/d20877b)), closes [#10981](https://github.com/angular/angular/issues/10981)
|
* **router:** fix lazy loading of aux routes ([#23459](https://github.com/angular/angular/issues/23459)) ([d20877b](https://github.com/angular/angular/commit/d20877b)), closes [#10981](https://github.com/angular/angular/issues/10981)
|
||||||
* **service-worker:** fix `SwPush.unsubscribe()` ([#24162](https://github.com/angular/angular/issues/24162)) ([ea2987c](https://github.com/angular/angular/commit/ea2987c)), closes [#24095](https://github.com/angular/angular/issues/24095)
|
* **service-worker:** fix `SwPush.unsubscribe()` ([#24162](https://github.com/angular/angular/issues/24162)) ([ea2987c](https://github.com/angular/angular/commit/ea2987c)), closes [#24095](https://github.com/angular/angular/issues/24095)
|
||||||
|
|
||||||
|
22
WORKSPACE
22
WORKSPACE
@ -96,7 +96,7 @@ web_test_repositories()
|
|||||||
|
|
||||||
# Temporary work-around for https://github.com/angular/angular/issues/28681
|
# Temporary work-around for https://github.com/angular/angular/issues/28681
|
||||||
# TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories
|
# TODO(gregmagolan): go back to @io_bazel_rules_webtesting browser_repositories
|
||||||
load("@npm_bazel_karma//:browser_repositories.bzl", "browser_repositories")
|
load("//:browser_repositories.bzl", "browser_repositories")
|
||||||
|
|
||||||
browser_repositories()
|
browser_repositories()
|
||||||
|
|
||||||
@ -114,3 +114,23 @@ sass_repositories()
|
|||||||
load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")
|
load("@io_bazel_skydoc//skylark:skylark.bzl", "skydoc_repositories")
|
||||||
|
|
||||||
skydoc_repositories()
|
skydoc_repositories()
|
||||||
|
|
||||||
|
load("@bazel_toolchains//rules:environments.bzl", "clang_env")
|
||||||
|
load("@bazel_toolchains//rules:rbe_repo.bzl", "rbe_autoconfig")
|
||||||
|
|
||||||
|
rbe_autoconfig(
|
||||||
|
name = "rbe_ubuntu1604_angular",
|
||||||
|
# The sha256 of marketplace.gcr.io/google/rbe-ubuntu16-04 container that is
|
||||||
|
# used by rbe_autoconfig() to pair toolchain configs in the @bazel_toolchains repo.
|
||||||
|
base_container_digest = "sha256:677c1317f14c6fd5eba2fd8ec645bfdc5119f64b3e5e944e13c89e0525cc8ad1",
|
||||||
|
# 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>
|
||||||
|
# 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 @com_google_protobuf.
|
||||||
|
# Java is needed for the Bazel's test executor Java tool.
|
||||||
|
digest = "sha256:74a8e9dca4781d5f277a7bd8e7ea7ed0f5906c79c9cd996205b6d32f090c62f3",
|
||||||
|
env = clang_env(),
|
||||||
|
registry = "marketplace.gcr.io",
|
||||||
|
repository = "google/rbe-ubuntu16-04-webtest",
|
||||||
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<h1 class="no-toc">CLI Command Reference</h1>
|
# CLI Overview and Command Reference
|
||||||
|
|
||||||
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications. You can use the tool directly in a command shell, or indirectly through an interactive UI such as [Angular Console](https://angularconsole.com).
|
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications. You can use the tool directly in a command shell, or indirectly through an interactive UI such as [Angular Console](https://angularconsole.com).
|
||||||
|
|
||||||
|
3
aio/content/examples/.gitignore
vendored
3
aio/content/examples/.gitignore
vendored
@ -23,6 +23,9 @@
|
|||||||
**/bs-config.e2e.json
|
**/bs-config.e2e.json
|
||||||
**/bs-config.json
|
**/bs-config.json
|
||||||
**/package.json
|
**/package.json
|
||||||
|
**/tsconfig.json
|
||||||
|
**/tsconfig.app.json
|
||||||
|
**/tsconfig.spec.json
|
||||||
**/tslint.json
|
**/tslint.json
|
||||||
**/karma-test-shim.js
|
**/karma-test-shim.js
|
||||||
**/browser-test-shim.js
|
**/browser-test-shim.js
|
||||||
|
@ -67,8 +67,8 @@ describe('AngularJS to Angular Quick Reference Tests', function () {
|
|||||||
testFavoriteHero('Magneta', 'No movie, sorry!');
|
testFavoriteHero('Magneta', 'No movie, sorry!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display a movie for Mr. Nice', function () {
|
it('should display a movie for Dr Nice', function () {
|
||||||
testFavoriteHero('Mr. Nice', 'Excellent choice!');
|
testFavoriteHero('Dr Nice', 'Excellent choice!');
|
||||||
});
|
});
|
||||||
|
|
||||||
function testImagesAreDisplayed(isDisplayed: boolean) {
|
function testImagesAreDisplayed(isDisplayed: boolean) {
|
||||||
|
@ -18,12 +18,12 @@ export class MovieService {
|
|||||||
approvalRating: .97
|
approvalRating: .97
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
hero: 'Mr. Nice',
|
hero: 'Dr Nice',
|
||||||
imageurl: 'assets/images/villain.png',
|
imageurl: 'assets/images/villain.png',
|
||||||
movieId: 2,
|
movieId: 2,
|
||||||
mpaa: 'pg-13',
|
mpaa: 'pg-13',
|
||||||
releaseDate: '2015-12-18T00:00:00',
|
releaseDate: '2015-12-18T00:00:00',
|
||||||
title: 'No More Mr. Nice Guy',
|
title: 'No More Dr Nice',
|
||||||
price: 14.95,
|
price: 14.95,
|
||||||
starRating: 4.6,
|
starRating: 4.6,
|
||||||
approvalRating: .94
|
approvalRating: .94
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -31,7 +31,7 @@ describe('Architecture', () => {
|
|||||||
|
|
||||||
function heroTests() {
|
function heroTests() {
|
||||||
|
|
||||||
const targetHero: Hero = { id: 2, name: 'Mr. Nice' };
|
const targetHero: Hero = { id: 2, name: 'Dr Nice' };
|
||||||
|
|
||||||
it('has the right number of heroes', () => {
|
it('has the right number of heroes', () => {
|
||||||
let page = getPageElts();
|
let page = getPageElts();
|
||||||
|
@ -5,7 +5,7 @@ import { Hero } from './hero';
|
|||||||
|
|
||||||
const HEROES = [
|
const HEROES = [
|
||||||
new Hero('Windstorm', 'Weather mastery'),
|
new Hero('Windstorm', 'Weather mastery'),
|
||||||
new Hero('Mr. Nice', 'Killing them with kindness'),
|
new Hero('Dr Nice', 'Killing them with kindness'),
|
||||||
new Hero('Magneta', 'Manipulates metallic objects')
|
new Hero('Magneta', 'Manipulates metallic objects')
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -9,6 +9,6 @@ describe('feature-modules App', () => {
|
|||||||
|
|
||||||
it('should display message saying app works', () => {
|
it('should display message saying app works', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('app works!');
|
expect(page.getTitleText()).toEqual('app works!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"open": false,
|
|
||||||
"logLevel": "silent",
|
|
||||||
"port": 8080,
|
|
||||||
"server": {
|
|
||||||
"baseDir": "dist",
|
|
||||||
"middleware": {
|
|
||||||
"0": null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
'use strict'; // necessary for es6 output in node
|
|
||||||
|
|
||||||
import { browser, element, by } from 'protractor';
|
|
||||||
|
|
||||||
describe('cli-quickstart App', () => {
|
|
||||||
beforeEach(() => {
|
|
||||||
return browser.get('/');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('should display message saying app works', () => {
|
|
||||||
let pageTitle = element(by.css('app-root h1')).getText();
|
|
||||||
expect(pageTitle).toEqual('Welcome to My First Angular App!!');
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"build": "build:cli",
|
|
||||||
"run": "serve:cli"
|
|
||||||
}
|
|
@ -1,6 +0,0 @@
|
|||||||
/* #docregion */
|
|
||||||
h1 {
|
|
||||||
color: #369;
|
|
||||||
font-family: Arial, Helvetica, sans-serif;
|
|
||||||
font-size: 250%;
|
|
||||||
}
|
|
@ -1,19 +0,0 @@
|
|||||||
<!--The content below is only a placeholder and can be replaced.-->
|
|
||||||
<div style="text-align:center">
|
|
||||||
<h1>
|
|
||||||
Welcome to {{ title }}!
|
|
||||||
</h1>
|
|
||||||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
|
|
||||||
</div>
|
|
||||||
<h2>Here are some links to help you start: </h2>
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2>
|
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
@ -1,30 +0,0 @@
|
|||||||
import { TestBed, async } from '@angular/core/testing';
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
describe('AppComponent', () => {
|
|
||||||
beforeEach(async(() => {
|
|
||||||
TestBed.configureTestingModule({
|
|
||||||
declarations: [
|
|
||||||
AppComponent
|
|
||||||
],
|
|
||||||
}).compileComponents();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should create the app', async(() => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.debugElement.componentInstance;
|
|
||||||
expect(app).toBeTruthy();
|
|
||||||
}));
|
|
||||||
|
|
||||||
it(`should have as title 'app'`, async(() => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
const app = fixture.debugElement.componentInstance;
|
|
||||||
expect(app.title).toMatch(/app/i);
|
|
||||||
}));
|
|
||||||
|
|
||||||
it('should render title in a h1 tag', async(() => {
|
|
||||||
const fixture = TestBed.createComponent(AppComponent);
|
|
||||||
fixture.detectChanges();
|
|
||||||
const compiled = fixture.debugElement.nativeElement;
|
|
||||||
expect(compiled.querySelector('h1').textContent).toMatch(/app/i);
|
|
||||||
}));
|
|
||||||
});
|
|
@ -1,16 +0,0 @@
|
|||||||
// #docregion import
|
|
||||||
import { Component } from '@angular/core';
|
|
||||||
// #enddocregion import
|
|
||||||
|
|
||||||
// #docregion metadata, component
|
|
||||||
@Component({
|
|
||||||
selector: 'app-root',
|
|
||||||
templateUrl: './app.component.html',
|
|
||||||
styleUrls: ['./app.component.css']
|
|
||||||
})
|
|
||||||
// #enddocregion metadata
|
|
||||||
// #docregion title, class
|
|
||||||
export class AppComponent {
|
|
||||||
title = 'My First Angular App!';
|
|
||||||
}
|
|
||||||
// #enddocregion title, class, component
|
|
@ -1,16 +0,0 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
|
|
||||||
import { AppComponent } from './app.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
declarations: [
|
|
||||||
AppComponent
|
|
||||||
],
|
|
||||||
imports: [
|
|
||||||
BrowserModule
|
|
||||||
],
|
|
||||||
providers: [],
|
|
||||||
bootstrap: [AppComponent]
|
|
||||||
})
|
|
||||||
export class AppModule { }
|
|
@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
"files":[
|
|
||||||
"!**/*.d.ts",
|
|
||||||
"!**/*.js",
|
|
||||||
"!**/*.[0-9].*",
|
|
||||||
"angular.json",
|
|
||||||
"protractor.conf.js"
|
|
||||||
]
|
|
||||||
}
|
|
@ -13,7 +13,7 @@ describe('Component Communication Cookbook Tests', function () {
|
|||||||
describe('Parent-to-child communication', function() {
|
describe('Parent-to-child communication', function() {
|
||||||
// #docregion parent-to-child
|
// #docregion parent-to-child
|
||||||
// ...
|
// ...
|
||||||
let _heroNames = ['Mr. IQ', 'Magneta', 'Bombasto'];
|
let _heroNames = ['Dr IQ', 'Magneta', 'Bombasto'];
|
||||||
let _masterName = 'Master';
|
let _masterName = 'Master';
|
||||||
|
|
||||||
it('should pass properties to children properly', function () {
|
it('should pass properties to children properly', function () {
|
||||||
@ -36,7 +36,7 @@ describe('Component Communication Cookbook Tests', function () {
|
|||||||
// ...
|
// ...
|
||||||
it('should display trimmed, non-empty names', function () {
|
it('should display trimmed, non-empty names', function () {
|
||||||
let _nonEmptyNameIndex = 0;
|
let _nonEmptyNameIndex = 0;
|
||||||
let _nonEmptyName = '"Mr. IQ"';
|
let _nonEmptyName = '"Dr IQ"';
|
||||||
let parent = element.all(by.tagName('app-name-parent')).get(0);
|
let parent = element.all(by.tagName('app-name-parent')).get(0);
|
||||||
let hero = parent.all(by.tagName('app-name-child')).get(_nonEmptyNameIndex);
|
let hero = parent.all(by.tagName('app-name-child')).get(_nonEmptyNameIndex);
|
||||||
|
|
||||||
|
@ -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; }
|
||||||
|
@ -3,7 +3,7 @@ export class Hero {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const HEROES = [
|
export const HEROES = [
|
||||||
{name: 'Mr. IQ'},
|
{name: 'Dr IQ'},
|
||||||
{name: 'Magneta'},
|
{name: 'Magneta'},
|
||||||
{name: 'Bombasto'}
|
{name: 'Bombasto'}
|
||||||
];
|
];
|
||||||
|
@ -9,7 +9,7 @@ import { Component } from '@angular/core';
|
|||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class NameParentComponent {
|
export class NameParentComponent {
|
||||||
// Displays 'Mr. IQ', '<no name set>', 'Bombasto'
|
// Displays 'Dr IQ', '<no name set>', 'Bombasto'
|
||||||
names = ['Mr. IQ', ' ', ' Bombasto '];
|
names = ['Dr IQ', ' ', ' Bombasto '];
|
||||||
}
|
}
|
||||||
// #enddocregion
|
// #enddocregion
|
||||||
|
@ -15,7 +15,7 @@ import { Component } from '@angular/core';
|
|||||||
export class VoteTakerComponent {
|
export class VoteTakerComponent {
|
||||||
agreed = 0;
|
agreed = 0;
|
||||||
disagreed = 0;
|
disagreed = 0;
|
||||||
voters = ['Mr. IQ', 'Ms. Universe', 'Bombasto'];
|
voters = ['Narco', 'Celeritas', 'Bombasto'];
|
||||||
|
|
||||||
onVoted(agreed: boolean) {
|
onVoted(agreed: boolean) {
|
||||||
agreed ? this.agreed++ : this.disagreed++;
|
agreed ? this.agreed++ : this.disagreed++;
|
||||||
|
@ -23,8 +23,8 @@ describe('Dependency Injection Cookbook', function () {
|
|||||||
expect(sortedHeroes).toBeDefined();
|
expect(sortedHeroes).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Mr. Nice should be in sorted heroes', function () {
|
it('Dr Nice should be in sorted heroes', function () {
|
||||||
let sortedHero = element.all(by.xpath('//sorted-heroes/[text()="Mr. Nice" and position()=2]')).get(0);
|
let sortedHero = element.all(by.xpath('//sorted-heroes/[text()="Dr Nice" and position()=2]')).get(0);
|
||||||
expect(sortedHero).toBeDefined();
|
expect(sortedHero).toBeDefined();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ describe('Dependency Injection Cookbook', function () {
|
|||||||
|
|
||||||
it('should render Hero-of-the-Month runner-ups', function () {
|
it('should render Hero-of-the-Month runner-ups', function () {
|
||||||
let runnersUp = element(by.id('rups1')).getText();
|
let runnersUp = element(by.id('rups1')).getText();
|
||||||
expect(runnersUp).toContain('RubberMan, Mr. Nice');
|
expect(runnersUp).toContain('RubberMan, Dr Nice');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render DateLogger log entry in Hero-of-the-Month', function () {
|
it('should render DateLogger log entry in Hero-of-the-Month', function () {
|
||||||
|
@ -11,7 +11,7 @@ export class HeroService {
|
|||||||
private heroes: Array<Hero> = [
|
private heroes: Array<Hero> = [
|
||||||
new Hero(1, 'RubberMan', 'Hero of many talents', '123-456-7899'),
|
new Hero(1, 'RubberMan', 'Hero of many talents', '123-456-7899'),
|
||||||
new Hero(2, 'Magma', 'Hero of all trades', '555-555-5555'),
|
new Hero(2, 'Magma', 'Hero of all trades', '555-555-5555'),
|
||||||
new Hero(3, 'Mr. Nice', 'The name says it all', '111-222-3333')
|
new Hero(3, 'Dr Nice', 'The name says it all', '111-222-3333')
|
||||||
];
|
];
|
||||||
|
|
||||||
getHeroById(id: number): Hero {
|
getHeroById(id: number): Hero {
|
||||||
|
@ -29,10 +29,10 @@ export class StorageComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setSession() {
|
setSession() {
|
||||||
this.sessionStorageService.set('hero', 'Mr. Nice - Session');
|
this.sessionStorageService.set('hero', 'Dr Nice - Session');
|
||||||
}
|
}
|
||||||
|
|
||||||
setLocal() {
|
setLocal() {
|
||||||
this.localStorageService.set('hero', 'Mr. Nice - Local');
|
this.localStorageService.set('hero', 'Dr Nice - Local');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ describe('Dependency Injection Tests', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('Hero displays as expected', function () {
|
it('Hero displays as expected', function () {
|
||||||
expectedMsg = 'Mr. Nice';
|
expectedMsg = 'Dr Nice';
|
||||||
expect(element(by.css('#hero')).getText()).toEqual(expectedMsg);
|
expect(element(by.css('#hero')).getText()).toEqual(expectedMsg);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, isSecret: false, name: 'Mr. Nice' },
|
{ id: 11, isSecret: false, name: 'Dr Nice' },
|
||||||
{ id: 12, isSecret: false, name: 'Narco' },
|
{ id: 12, isSecret: false, name: 'Narco' },
|
||||||
{ id: 13, isSecret: false, name: 'Bombasto' },
|
{ id: 13, isSecret: false, name: 'Bombasto' },
|
||||||
{ id: 14, isSecret: false, name: 'Celeritas' },
|
{ id: 14, isSecret: false, name: 'Celeritas' },
|
||||||
|
@ -4,7 +4,7 @@ export class Hero {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' }
|
{ id: 14, name: 'Celeritas' }
|
||||||
|
@ -20,7 +20,7 @@ import { AdComponent } from './ad.component';
|
|||||||
export class AdBannerComponent implements OnInit, OnDestroy {
|
export class AdBannerComponent implements OnInit, OnDestroy {
|
||||||
@Input() ads: AdItem[];
|
@Input() ads: AdItem[];
|
||||||
currentAdIndex = -1;
|
currentAdIndex = -1;
|
||||||
@ViewChild(AdDirective) adHost: AdDirective;
|
@ViewChild(AdDirective, {static: true}) adHost: AdDirective;
|
||||||
interval: any;
|
interval: any;
|
||||||
|
|
||||||
constructor(private componentFactoryResolver: ComponentFactoryResolver) { }
|
constructor(private componentFactoryResolver: ComponentFactoryResolver) { }
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
"projectType": "elements"
|
|
||||||
}
|
|
||||||
|
@ -21,7 +21,7 @@ export class ItemDetailComponent {
|
|||||||
@Output() deleteRequest = new EventEmitter<Item>();
|
@Output() deleteRequest = new EventEmitter<Item>();
|
||||||
|
|
||||||
delete() {
|
delete() {
|
||||||
this.deleteRequest.emit(this.item.name);
|
this.deleteRequest.emit(this.item);
|
||||||
this.displayNone = this.displayNone ? '' : 'none';
|
this.displayNone = this.displayNone ? '' : 'none';
|
||||||
this.lineThrough = this.lineThrough ? '' : 'line-through';
|
this.lineThrough = this.lineThrough ? '' : 'line-through';
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ describe('feature-modules App', () => {
|
|||||||
|
|
||||||
it('should display message saying app works', () => {
|
it('should display message saying app works', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('app works!');
|
expect(page.getTitleText()).toEqual('app works!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ describe('Http Tests', function() {
|
|||||||
describe('Heroes', () => {
|
describe('Heroes', () => {
|
||||||
it('retrieves the list of heroes at startup', () => {
|
it('retrieves the list of heroes at startup', () => {
|
||||||
expect(page.heroesListItems.count()).toBe(4);
|
expect(page.heroesListItems.count()).toBe(4);
|
||||||
expect(page.heroesListItems.get(0).getText()).toContain('Mr. Nice');
|
expect(page.heroesListItems.get(0).getText()).toContain('Dr Nice');
|
||||||
checkLogForMessage('GET "api/heroes"');
|
checkLogForMessage('GET "api/heroes"');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@ import { InMemoryDbService } from 'angular-in-memory-web-api';
|
|||||||
export class InMemoryDataService implements InMemoryDbService {
|
export class InMemoryDataService implements InMemoryDbService {
|
||||||
createDb() {
|
createDb() {
|
||||||
const heroes = [
|
const heroes = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -15,7 +15,7 @@ describe('providers App', () => {
|
|||||||
|
|
||||||
it('should display message saying app works', () => {
|
it('should display message saying app works', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('Lazy loading feature modules');
|
expect(page.getTitleText()).toEqual('Lazy loading feature modules');
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Customers list', function() {
|
describe('Customers list', function() {
|
||||||
|
@ -8,11 +8,11 @@ import { Routes, RouterModule } from '@angular/router';
|
|||||||
const routes: Routes = [
|
const routes: Routes = [
|
||||||
{
|
{
|
||||||
path: 'customers',
|
path: 'customers',
|
||||||
loadChildren: './customers/customers.module#CustomersModule'
|
loadChildren: () => import('./customers/customers.module').then(mod => mod.CustomersModule)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'orders',
|
path: 'orders',
|
||||||
loadChildren: './orders/orders.module#OrdersModule'
|
loadChildren: () => import('./orders/orders.module').then(mod => mod.OrdersModule)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
|
@ -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();
|
||||||
|
@ -6,7 +6,7 @@ export class Hero {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const heroes: Hero[] = [
|
export const heroes: Hero[] = [
|
||||||
{ id: 1, name: 'Mr. Nice', emotion: 'happy' },
|
{ id: 1, name: 'Dr Nice', emotion: 'happy' },
|
||||||
{ id: 2, name: 'Narco', emotion: 'sad' },
|
{ id: 2, name: 'Narco', emotion: 'sad' },
|
||||||
{ id: 3, name: 'Windstorm', emotion: 'confused' },
|
{ id: 3, name: 'Windstorm', emotion: 'confused' },
|
||||||
{ id: 4, name: 'Magneta' }
|
{ id: 4, name: 'Magneta' }
|
||||||
|
@ -3,8 +3,8 @@ import { Routes, RouterModule } from '@angular/router';
|
|||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
{ path: '', redirectTo: 'contact', pathMatch: 'full'},
|
||||||
{ path: 'items', loadChildren: './items/items.module#ItemsModule' },
|
{ path: 'items', loadChildren: () => import('./items/items.module').then(mod => mod.ItemsModule) },
|
||||||
{ path: 'customers', loadChildren: './customers/customers.module#CustomersModule' }
|
{ path: 'customers', loadChildren: () => import('./customers/customers.module').then(mod => mod.CustomersModule) }
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@ -11,8 +11,7 @@ import { Pipe, PipeTransform } from '@angular/core';
|
|||||||
*/
|
*/
|
||||||
@Pipe({name: 'exponentialStrength'})
|
@Pipe({name: 'exponentialStrength'})
|
||||||
export class ExponentialStrengthPipe implements PipeTransform {
|
export class ExponentialStrengthPipe implements PipeTransform {
|
||||||
transform(value: number, exponent: string): number {
|
transform(value: number, exponent?: number): number {
|
||||||
let exp = parseFloat(exponent);
|
return Math.pow(value, isNaN(exponent) ? 1 : exponent);
|
||||||
return Math.pow(value, isNaN(exp) ? 1 : exp);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,7 +23,7 @@ describe('providers App', () => {
|
|||||||
|
|
||||||
it('should display header that says Users list', () => {
|
it('should display header that says Users list', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('Users list');
|
expect(page.getTitleText()).toEqual('Users list');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ const appRoutes: Routes = [
|
|||||||
// #docregion admin, admin-1
|
// #docregion admin, admin-1
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
loadChildren: './admin/admin.module#AdminModule',
|
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||||
// #enddocregion admin-1
|
// #enddocregion admin-1
|
||||||
canLoad: [AuthGuard]
|
canLoad: [AuthGuard]
|
||||||
// #docregion admin-1
|
// #docregion admin-1
|
||||||
|
@ -21,12 +21,12 @@ const appRoutes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
loadChildren: './admin/admin.module#AdminModule',
|
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||||
canLoad: [AuthGuard]
|
canLoad: [AuthGuard]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'crisis-center',
|
path: 'crisis-center',
|
||||||
loadChildren: './crisis-center/crisis-center.module#CrisisCenterModule'
|
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule)
|
||||||
},
|
},
|
||||||
{ path: '', redirectTo: '/heroes', pathMatch: 'full' },
|
{ path: '', redirectTo: '/heroes', pathMatch: 'full' },
|
||||||
{ path: '**', component: PageNotFoundComponent }
|
{ path: '**', component: PageNotFoundComponent }
|
||||||
|
@ -17,13 +17,13 @@ const appRoutes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'admin',
|
path: 'admin',
|
||||||
loadChildren: './admin/admin.module#AdminModule',
|
loadChildren: () => import('./admin/admin.module').then(mod => mod.AdminModule),
|
||||||
canLoad: [AuthGuard]
|
canLoad: [AuthGuard]
|
||||||
},
|
},
|
||||||
// #docregion preload-v2
|
// #docregion preload-v2
|
||||||
{
|
{
|
||||||
path: 'crisis-center',
|
path: 'crisis-center',
|
||||||
loadChildren: './crisis-center/crisis-center.module#CrisisCenterModule',
|
loadChildren: () => import('./crisis-center/crisis-center.module').then(mod => mod.CrisisCenterModule),
|
||||||
data: { preload: true }
|
data: { preload: true }
|
||||||
},
|
},
|
||||||
// #enddocregion preload-v2
|
// #enddocregion preload-v2
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -11,7 +11,7 @@ describe('sw-example App', () => {
|
|||||||
|
|
||||||
it('should display welcome message', () => {
|
it('should display welcome message', () => {
|
||||||
page.navigateTo();
|
page.navigateTo();
|
||||||
expect(page.getParagraphText()).toEqual('Welcome to Service Workers!');
|
expect(page.getTitleText()).toEqual('Welcome to Service Workers!');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should display the Angular logo', () => {
|
it('should display the Angular logo', () => {
|
||||||
|
@ -10,12 +10,12 @@ describe('Structural Directives', function () {
|
|||||||
|
|
||||||
it('first div should show hero name with *ngIf', function () {
|
it('first div should show hero name with *ngIf', function () {
|
||||||
const allDivs = element.all(by.tagName('div'));
|
const allDivs = element.all(by.tagName('div'));
|
||||||
expect(allDivs.get(0).getText()).toEqual('Mr. Nice');
|
expect(allDivs.get(0).getText()).toEqual('Dr Nice');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('first li should show hero name with *ngFor', function () {
|
it('first li should show hero name with *ngFor', function () {
|
||||||
const allLis = element.all(by.tagName('li'));
|
const allLis = element.all(by.tagName('li'));
|
||||||
expect(allLis.get(0).getText()).toEqual('Mr. Nice');
|
expect(allLis.get(0).getText()).toEqual('Dr Nice');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('ngSwitch have two <happy-hero> instances', function () {
|
it('ngSwitch have two <happy-hero> instances', function () {
|
||||||
|
@ -6,7 +6,7 @@ export class Hero {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const heroes: Hero[] = [
|
export const heroes: Hero[] = [
|
||||||
{ id: 1, name: 'Mr. Nice', emotion: 'happy'},
|
{ id: 1, name: 'Dr Nice', emotion: 'happy'},
|
||||||
{ id: 2, name: 'Narco', emotion: 'sad' },
|
{ id: 2, name: 'Narco', emotion: 'sad' },
|
||||||
{ id: 3, name: 'Windstorm', emotion: 'confused' },
|
{ id: 3, name: 'Windstorm', emotion: 'confused' },
|
||||||
{ id: 4, name: 'Magneta'}
|
{ id: 4, name: 'Magneta'}
|
||||||
|
@ -13,7 +13,7 @@ import { Hero } from './hero';
|
|||||||
})
|
})
|
||||||
export class HeroFormComponent {
|
export class HeroFormComponent {
|
||||||
@Input() hero: Hero;
|
@Input() hero: Hero;
|
||||||
@ViewChild('heroForm') form: NgForm;
|
@ViewChild('heroForm', {static: false}) form: NgForm;
|
||||||
|
|
||||||
private _submitMessage = '';
|
private _submitMessage = '';
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ export class Hero {
|
|||||||
'http://www.imdb.com/title/tt0065832/',
|
'http://www.imdb.com/title/tt0065832/',
|
||||||
325
|
325
|
||||||
),
|
),
|
||||||
new Hero(1, 'Mr. Nice', 'happy'),
|
new Hero(1, 'Dr Nice', 'happy'),
|
||||||
new Hero(2, 'Narco', 'sad' ),
|
new Hero(2, 'Narco', 'sad' ),
|
||||||
new Hero(3, 'Windstorm', 'confused' ),
|
new Hero(3, 'Windstorm', 'confused' ),
|
||||||
new Hero(4, 'Magneta')
|
new Hero(4, 'Magneta')
|
||||||
|
@ -8,7 +8,7 @@ import { AboutComponent } from './about/about.component';
|
|||||||
RouterModule.forRoot([
|
RouterModule.forRoot([
|
||||||
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
{ path: '', redirectTo: 'dashboard', pathMatch: 'full'},
|
||||||
{ path: 'about', component: AboutComponent },
|
{ path: 'about', component: AboutComponent },
|
||||||
{ path: 'heroes', loadChildren: './hero/hero.module#HeroModule'}
|
{ path: 'heroes', loadChildren: () => import('./hero/hero.module').then(mod => mod.HeroModule)}
|
||||||
])
|
])
|
||||||
],
|
],
|
||||||
exports: [ RouterModule ] // re-export the module declarations
|
exports: [ RouterModule ] // re-export the module declarations
|
||||||
|
@ -9,7 +9,7 @@ const maxQuotes = Infinity; // 0;
|
|||||||
export class InMemoryDataService implements InMemoryDbService {
|
export class InMemoryDataService implements InMemoryDbService {
|
||||||
createDb() {
|
createDb() {
|
||||||
const heroes = [
|
const heroes = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -1 +1 @@
|
|||||||
export * from './fake-hero.service';
|
export * from './test-hero.service';
|
||||||
|
@ -6,7 +6,7 @@ import { Component, AfterViewInit, ViewChild } from '@angular/core';
|
|||||||
})
|
})
|
||||||
export class CanvasComponent implements AfterViewInit {
|
export class CanvasComponent implements AfterViewInit {
|
||||||
blobSize: number;
|
blobSize: number;
|
||||||
@ViewChild('sampleCanvas') sampleCanvas;
|
@ViewChild('sampleCanvas', {static: false}) sampleCanvas;
|
||||||
|
|
||||||
constructor() { }
|
constructor() { }
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -9,7 +9,7 @@ import { Injectable } from '@angular/core';
|
|||||||
export class InMemoryDataService implements InMemoryDbService {
|
export class InMemoryDataService implements InMemoryDbService {
|
||||||
createDb() {
|
createDb() {
|
||||||
const heroes = [
|
const heroes = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -41,7 +41,6 @@
|
|||||||
"no-switch-case-fall-through": true,
|
"no-switch-case-fall-through": true,
|
||||||
"no-trailing-whitespace": true,
|
"no-trailing-whitespace": true,
|
||||||
"no-unused-expression": true,
|
"no-unused-expression": true,
|
||||||
"no-use-before-declare": false,
|
|
||||||
"no-var-keyword": true,
|
"no-var-keyword": true,
|
||||||
"object-literal-sort-keys": false,
|
"object-literal-sort-keys": false,
|
||||||
"one-line": [
|
"one-line": [
|
||||||
|
@ -3,7 +3,7 @@ import { InMemoryDbService } from 'angular-in-memory-web-api';
|
|||||||
export class InMemoryDataService implements InMemoryDbService {
|
export class InMemoryDataService implements InMemoryDbService {
|
||||||
createDb() {
|
createDb() {
|
||||||
const heroes = [
|
const heroes = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Hero } from './hero';
|
import { Hero } from './hero';
|
||||||
|
|
||||||
export const HEROES: Hero[] = [
|
export const HEROES: Hero[] = [
|
||||||
{ id: 11, name: 'Mr. Nice' },
|
{ id: 11, name: 'Dr Nice' },
|
||||||
{ id: 12, name: 'Narco' },
|
{ id: 12, name: 'Narco' },
|
||||||
{ id: 13, name: 'Bombasto' },
|
{ id: 13, name: 'Bombasto' },
|
||||||
{ id: 14, name: 'Celeritas' },
|
{ id: 14, name: 'Celeritas' },
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"extends": "../tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"outDir": "../out-tsc/app",
|
"outDir": "../out-tsc/app",
|
||||||
"baseUrl": "./",
|
"baseUrl": "./",
|
||||||
@ -11,6 +11,6 @@
|
|||||||
"**/*.spec.ts"
|
"**/*.spec.ts"
|
||||||
],
|
],
|
||||||
"angularCompilerOptions": {
|
"angularCompilerOptions": {
|
||||||
"entryModule": "app/app.server.module#AppServerModule"
|
"entryModule": "src/app/app.server.module#AppServerModule"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
import { Component, OnInit, ElementRef } from '@angular/core';
|
||||||
|
import { LazyLoaderService } from '../lazy-loader.service';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-angular-js',
|
||||||
|
template: '<div ng-view></div>'
|
||||||
|
})
|
||||||
|
export class AngularJSComponent implements OnInit {
|
||||||
|
constructor(private lazyLoader: LazyLoaderService, private elRef: ElementRef) {}
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
this.lazyLoader.load(this.elRef.nativeElement);
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,29 @@
|
|||||||
|
import * as angular from 'angular';
|
||||||
|
import 'angular-route';
|
||||||
|
|
||||||
|
const appName = 'myApp';
|
||||||
|
|
||||||
|
angular.module(appName, [
|
||||||
|
'ngRoute'
|
||||||
|
])
|
||||||
|
.config(['$routeProvider', '$locationProvider',
|
||||||
|
function config($routeProvider, $locationProvider) {
|
||||||
|
$locationProvider.html5Mode(true);
|
||||||
|
|
||||||
|
$routeProvider.
|
||||||
|
when('/users', {
|
||||||
|
template: `
|
||||||
|
<p>
|
||||||
|
Users Page
|
||||||
|
</p>
|
||||||
|
`
|
||||||
|
}).
|
||||||
|
otherwise({
|
||||||
|
template: ''
|
||||||
|
});
|
||||||
|
}]
|
||||||
|
);
|
||||||
|
|
||||||
|
export function bootstrap(el: HTMLElement) {
|
||||||
|
return angular.bootstrap(el, [appName]);
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
// #docplaster
|
||||||
|
// #docregion
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
import { Routes, RouterModule, UrlSegment } from '@angular/router';
|
||||||
|
import { AngularJSComponent } from './angular-js/angular-js.component';
|
||||||
|
import { HomeComponent } from './home/home.component';
|
||||||
|
import { App404Component } from './app404/app404.component';
|
||||||
|
|
||||||
|
// Match any URL that starts with `users`
|
||||||
|
// #docregion matcher
|
||||||
|
export function isAngularJSUrl(url: UrlSegment[]) {
|
||||||
|
return url.length > 0 && url[0].path.startsWith('users') ? ({consumed: url}) : null;
|
||||||
|
}
|
||||||
|
// #enddocregion matcher
|
||||||
|
|
||||||
|
export const routes: Routes = [
|
||||||
|
// Routes rendered by Angular
|
||||||
|
{ path: '', component: HomeComponent },
|
||||||
|
|
||||||
|
// AngularJS routes
|
||||||
|
{ matcher: isAngularJSUrl, component: AngularJSComponent },
|
||||||
|
|
||||||
|
// Catch-all route
|
||||||
|
{ path: '**', component: App404Component }
|
||||||
|
];
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
imports: [RouterModule.forRoot(routes)],
|
||||||
|
exports: [RouterModule]
|
||||||
|
})
|
||||||
|
export class AppRoutingModule { }
|
@ -0,0 +1,9 @@
|
|||||||
|
Lazy Loading AngularJS
|
||||||
|
|
||||||
|
<nav>
|
||||||
|
<a routerLink="/">Home</a>
|
||||||
|
<a routerLink="/users">Users</a>
|
||||||
|
<a routerLink="/notfound">404 Page</a>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<router-outlet></router-outlet>
|
@ -0,0 +1,8 @@
|
|||||||
|
import { Component } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-root',
|
||||||
|
templateUrl: './app.component.html',
|
||||||
|
styleUrls: ['./app.component.css']
|
||||||
|
})
|
||||||
|
export class AppComponent { }
|
@ -0,0 +1,25 @@
|
|||||||
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
|
import { NgModule } from '@angular/core';
|
||||||
|
|
||||||
|
import { AppRoutingModule } from './app-routing.module';
|
||||||
|
import { AppComponent } from './app.component';
|
||||||
|
import { AngularJSComponent } from './angular-js/angular-js.component';
|
||||||
|
import { HomeComponent } from './home/home.component';
|
||||||
|
import { App404Component } from './app404/app404.component';
|
||||||
|
|
||||||
|
|
||||||
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
AppComponent,
|
||||||
|
AngularJSComponent,
|
||||||
|
HomeComponent,
|
||||||
|
App404Component
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
BrowserModule,
|
||||||
|
AppRoutingModule
|
||||||
|
],
|
||||||
|
providers: [],
|
||||||
|
bootstrap: [AppComponent]
|
||||||
|
})
|
||||||
|
export class AppModule { }
|
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
Angular 404
|
||||||
|
</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-app404',
|
||||||
|
templateUrl: './app404.component.html',
|
||||||
|
styleUrls: ['./app404.component.css']
|
||||||
|
})
|
||||||
|
export class App404Component implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,3 @@
|
|||||||
|
<p>
|
||||||
|
Angular Home
|
||||||
|
</p>
|
@ -0,0 +1,15 @@
|
|||||||
|
import { Component, OnInit } from '@angular/core';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-home',
|
||||||
|
templateUrl: './home.component.html',
|
||||||
|
styleUrls: ['./home.component.css']
|
||||||
|
})
|
||||||
|
export class HomeComponent implements OnInit {
|
||||||
|
|
||||||
|
constructor() { }
|
||||||
|
|
||||||
|
ngOnInit() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,23 @@
|
|||||||
|
import { Injectable } from '@angular/core';
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class LazyLoaderService {
|
||||||
|
bootstrapped = false;
|
||||||
|
|
||||||
|
load(el: HTMLElement): void {
|
||||||
|
if (this.bootstrapped) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
import('./angularjs-app').then(app => {
|
||||||
|
try {
|
||||||
|
app.bootstrap(el);
|
||||||
|
this.bootstrapped = true;
|
||||||
|
} catch (e) {
|
||||||
|
console.error(e);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>MyApp</title>
|
<title>AngularJS Hybrid</title>
|
||||||
<base href="/">
|
<base href="/">
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
@ -8,4 +8,5 @@ if (environment.production) {
|
|||||||
enableProdMode();
|
enableProdMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||||
|
.catch(err => console.error(err));
|
7
aio/content/examples/upgrade-lazy-load-ajs/zipper.json
Normal file
7
aio/content/examples/upgrade-lazy-load-ajs/zipper.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"files": [
|
||||||
|
"!**/*.d.ts",
|
||||||
|
"!**/*.js",
|
||||||
|
"!**/*.[1,2].*"
|
||||||
|
]
|
||||||
|
}
|
@ -125,7 +125,7 @@ The third argument, `easing`, controls how the animation [accelerates and decele
|
|||||||
|
|
||||||
* Run for 200ms, with no delay. Use a standard curve to start slow, accelerate in the middle, and then decelerate slowly at the end: `'0.2s ease-in-out'`
|
* Run for 200ms, with no delay. Use a standard curve to start slow, accelerate in the middle, and then decelerate slowly at the end: `'0.2s ease-in-out'`
|
||||||
|
|
||||||
* Start immediately, run for 200ms. Use a acceleration curve to start slow and end at full velocity: `'0.2s ease-in'`
|
* Start immediately, run for 200ms. Use an acceleration curve to start slow and end at full velocity: `'0.2s ease-in'`
|
||||||
|
|
||||||
<div class="alert is-helpful">
|
<div class="alert is-helpful">
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ Notice how custom components like this mix seamlessly with native HTML in the sa
|
|||||||
|
|
||||||
### Data binding
|
### Data binding
|
||||||
|
|
||||||
Without a framework, you would be responsible for pushing data values into the HTML controls and turning user responses into actions and value updates. Writing such push and pull logic by hand is tedious, error-prone, and a nightmare to read, as any experienced jQuery programmer can attest.
|
Without a framework, you would be responsible for pushing data values into the HTML controls and turning user responses into actions and value updates. Writing such push and pull logic by hand is tedious, error-prone, and a nightmare to read, as any experienced front-end JavaScript programmer can attest.
|
||||||
|
|
||||||
Angular supports *two-way data binding*, a mechanism for coordinating the parts of a template with the parts of a component. Add binding markup to the template HTML to tell Angular how to connect both sides.
|
Angular supports *two-way data binding*, a mechanism for coordinating the parts of a template with the parts of a component. Add binding markup to the template HTML to tell Angular how to connect both sides.
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user