mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Compare commits
165 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e78a2a4a47 | |||
| 077f6b4674 | |||
| d201fc2dec | |||
| 6d6fc12c88 | |||
| 8ed4083a98 | |||
| 4c89a2497a | |||
| 0fecbabfd2 | |||
| ca5acadb78 | |||
| 978d37f324 | |||
| 656a38899a | |||
| 29c682ce5b | |||
| 3f8e4fb724 | |||
| c3cff35869 | |||
| a844435514 | |||
| 901353ec7a | |||
| 288156b06b | |||
| bf4d856834 | |||
| 3bb76768a6 | |||
| be2db59a55 | |||
| 9c57b656a1 | |||
| b293c6a77c | |||
| 951a3474d6 | |||
| b5e68e42c1 | |||
| a404587615 | |||
| 6c9886b1ca | |||
| 3c75f98117 | |||
| cd5d7b6615 | |||
| 97d58ec091 | |||
| 087f4412af | |||
| 0f0c0a9452 | |||
| bae6b5ceb1 | |||
| 868dcabdee | |||
| 8f6cbb66a2 | |||
| c807a324d1 | |||
| 2e37e2365b | |||
| bb2753decb | |||
| e6736c77a0 | |||
| 3d71d9ddd9 | |||
| c9816448ed | |||
| 589e76b7ef | |||
| bba3fcb30b | |||
| 6f139b4f0b | |||
| dfa7f648d6 | |||
| 5a3d121204 | |||
| e4516c75d2 | |||
| 32e98f7937 | |||
| 6c189ed0f1 | |||
| 2df92f7633 | |||
| 1535ab90da | |||
| c2726650f6 | |||
| a44224ce59 | |||
| 3c71e4846a | |||
| 43dff1fc27 | |||
| 7e23883b5d | |||
| 7efaf525a5 | |||
| f099df839e | |||
| c9e8804b5c | |||
| 2dee505582 | |||
| 75d5bfda1e | |||
| 993750815e | |||
| 88a0ff74ad | |||
| 75b2a265a9 | |||
| d0a73b24fe | |||
| e0be553abf | |||
| ffccb8e3a7 | |||
| b13e079bc7 | |||
| 84f45363eb | |||
| 980147555c | |||
| 182258520d | |||
| ac59054cd4 | |||
| b90b3299aa | |||
| 4ae753d84f | |||
| f859de3e60 | |||
| 5bb4407c01 | |||
| 5e85c138fa | |||
| b23fa5e977 | |||
| 05db4797e8 | |||
| 6b9ec0b830 | |||
| b0a9e67419 | |||
| f321e65c46 | |||
| 13e675ea87 | |||
| de48c99afb | |||
| 81e32f4283 | |||
| e20b6d98d9 | |||
| d42032a380 | |||
| ffc684381f | |||
| 8f7fbddb51 | |||
| bca3aed9e4 | |||
| 819b9f32b4 | |||
| 6207d6f1f0 | |||
| 174997150f | |||
| 439b4d3a89 | |||
| 377d0c9c1e | |||
| d60ea6ab5a | |||
| dafb765926 | |||
| 44d095a61c | |||
| 600fd12fda | |||
| d100ddfd6e | |||
| 1aadabb508 | |||
| d252187c45 | |||
| 6d6b76c59f | |||
| 5f2822ce1f | |||
| acc87a41ce | |||
| 7eec66c449 | |||
| 8fc02f56d0 | |||
| 313760b851 | |||
| 87252dcbbc | |||
| 785ab81a7b | |||
| 19a4cdec7d | |||
| 3062442728 | |||
| 138b4936b7 | |||
| af31adb8dd | |||
| f0e926074d | |||
| 7ec76dea5f | |||
| a852862ff9 | |||
| 6107d2ebbc | |||
| 56f7d1f61a | |||
| 6d912960b9 | |||
| 8542593c80 | |||
| d0fa598fe4 | |||
| 04d8b6c61a | |||
| 92b0bda9e4 | |||
| d7835e4f1a | |||
| e384c69b83 | |||
| aa10532458 | |||
| 7677963bd9 | |||
| 03fcb36cfd | |||
| 2f0856070b | |||
| 7b4d3c036d | |||
| c98c6a8452 | |||
| 630193543f | |||
| cff84d00cf | |||
| ba7a757cc5 | |||
| ecb309152f | |||
| 2fd81940d3 | |||
| 0950ef6a49 | |||
| e69ba26c55 | |||
| 61878883ed | |||
| 8ed653b93f | |||
| b76b176733 | |||
| f8a932afbb | |||
| d784986cd3 | |||
| 31a71a0f89 | |||
| 3d8efece03 | |||
| 345817f427 | |||
| 24b6eea0a9 | |||
| d457ffc408 | |||
| a378267117 | |||
| 11f8f8d8e4 | |||
| 4811850607 | |||
| 5d6440947a | |||
| 25e220a23a | |||
| c95766ed12 | |||
| 43e9301783 | |||
| e63fb8031a | |||
| 25bed17c5f | |||
| 117af7d8b5 | |||
| ee7a9248a8 | |||
| e1607cdbd4 | |||
| b06a1d0349 | |||
| a814ed1382 | |||
| 1a7444f99f | |||
| bf4ad38117 | |||
| 86d4016d23 | |||
| 440b51b7af |
+12
-11
@@ -11,29 +11,30 @@ aio/tools/examples/shared/node_modules
|
||||
aio/tools/examples/shared/example-scaffold
|
||||
|
||||
# All integration test node_modules folders
|
||||
integration/animations/node_modules
|
||||
integration/cli-elements-universal/node_modules
|
||||
integration/cli-hello-world/node_modules
|
||||
integration/cli-hello-world-ivy-compat/node_modules
|
||||
integration/cli-hello-world-ivy-i18n/node_modules
|
||||
integration/cli-hello-world-ivy-minimal/node_modules
|
||||
integration/cli-hello-world-lazy/node_modules
|
||||
integration/cli-hello-world-mocha/node_modules
|
||||
integration/cli-hello-world-ts-47/node_modules
|
||||
integration/dynamic-compiler/node_modules
|
||||
integration/forms/node_modules
|
||||
integration/hello_world__closure/node_modules
|
||||
integration/hello_world__systemjs_umd/node_modules
|
||||
integration/i18n/node_modules
|
||||
integration/injectable-def/node_modules
|
||||
integration/ivy-i18n/node_modules
|
||||
integration/ng-add-localize/node_modules
|
||||
integration/trusted-types/node_modules
|
||||
integration/forms/node_modules
|
||||
integration/ng_elements/node_modules
|
||||
integration/ng_elements_schematics/node_modules
|
||||
integration/ng_update/node_modules
|
||||
integration/ng_update_migrations/node_modules
|
||||
integration/nodenext_resolution/node_modules
|
||||
integration/npm_package_archives.bzl/node_modules
|
||||
integration/ngcc/node_modules
|
||||
integration/platform-server/node_modules
|
||||
integration/service-worker-schema/node_modules
|
||||
integration/side-effects/node_modules
|
||||
integration/standalone-bootstrap/node_modules
|
||||
integration/terser/node_modules
|
||||
integration/trusted-types/node_modules
|
||||
integration/typings_test_rxjs7/node_modules
|
||||
integration/typings_test_ts49/node_modules
|
||||
integration/typings_test_ts50/node_modules
|
||||
integration/typings_test_ts51/node_modules
|
||||
integration/typings_test_ts36/node_modules
|
||||
integration/typings_test_ts37/node_modules
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
# Enable debugging tests with --config=debug
|
||||
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
|
||||
|
||||
# Do not attempt to de-flake locally.
|
||||
# On CI we might set this to `3` to run with deflaking.
|
||||
test --flaky_test_attempts=1
|
||||
|
||||
###############################
|
||||
# Filesystem interactions #
|
||||
###############################
|
||||
@@ -112,10 +108,9 @@ build:remote --define=EXECUTOR=remote
|
||||
# Set a higher timeout value, just in case.
|
||||
build:remote --remote_timeout=600
|
||||
|
||||
# Bazel detects maximum number of jobs based on host resources.
|
||||
# Since we run remotely, we can increase this number significantly.
|
||||
common:remote --jobs=200
|
||||
|
||||
# Increase the default number of jobs by 50% because our build has lots of
|
||||
# parallelism
|
||||
build:remote --jobs=150
|
||||
build:remote --google_default_credentials
|
||||
|
||||
# Limit the number of test jobs for on an AIO local deps build. The example tests running
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
build --announce_rc
|
||||
|
||||
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
|
||||
# By default this is set in the project `.bazelrc` to `1`.
|
||||
test --flaky_test_attempts=3
|
||||
test --flaky_test_attempts=2
|
||||
|
||||
# More details on failures
|
||||
build --verbose_failures=true
|
||||
|
||||
# CI supports colors but Bazel does not detect it.
|
||||
common --color=yes
|
||||
|
||||
+25
-11
@@ -89,7 +89,7 @@ executors:
|
||||
type: string
|
||||
default: medium
|
||||
docker:
|
||||
- image: cimg/node:16.14.0
|
||||
- image: cimg/node:16.13.0
|
||||
resource_class: << parameters.resource_class >>
|
||||
working_directory: ~/ng
|
||||
|
||||
@@ -99,7 +99,7 @@ executors:
|
||||
type: string
|
||||
default: medium
|
||||
docker:
|
||||
- image: cimg/node:16.14.0-browsers
|
||||
- image: cimg/node:16.13.0-browsers
|
||||
resource_class: << parameters.resource_class >>
|
||||
working_directory: ~/ng
|
||||
|
||||
@@ -249,6 +249,21 @@ jobs:
|
||||
- ./ng
|
||||
- ./bazel_repository_cache
|
||||
|
||||
lint:
|
||||
executor: default-executor
|
||||
steps:
|
||||
- custom_attach_workspace
|
||||
- init_environment
|
||||
|
||||
- run: yarn -s tslint
|
||||
- run: yarn -s --cwd aio lint
|
||||
- run: yarn -s ng-dev format changed $CI_GIT_BASE_REVISION --check
|
||||
- run: yarn -s ts-circular-deps:check
|
||||
- run: yarn -s ng-dev pullapprove verify
|
||||
- run: yarn -s ng-dev ngbot verify
|
||||
- run: yarn -s ng-dev commit-message validate-range $CI_GIT_BASE_REVISION $CI_GIT_REVISION
|
||||
- run: yarn -s check-tooling-setup
|
||||
|
||||
test:
|
||||
executor:
|
||||
name: test-browser-executor
|
||||
@@ -260,6 +275,7 @@ jobs:
|
||||
steps:
|
||||
- custom_attach_workspace
|
||||
- init_environment
|
||||
- install_java
|
||||
- run:
|
||||
# We need to explicitly specify the --symlink_prefix option because otherwise we would
|
||||
# not be able to easily find the output bin directory when uploading artifacts for size
|
||||
@@ -284,8 +300,6 @@ jobs:
|
||||
- store_artifacts:
|
||||
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
|
||||
destination: core/todo/bundle.br
|
||||
- notify_webhook_on_fail:
|
||||
webhook_url_env_var: SLACK_REACTIVITY_CHANNEL_WEBHOOK_URL
|
||||
|
||||
# NOTE: This is currently limited to main builds only. See the `monitoring` configuration.
|
||||
saucelabs:
|
||||
@@ -295,21 +309,18 @@ jobs:
|
||||
# container for this job. This is necessary because we launch a lot of browsers concurrently
|
||||
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
|
||||
resource_class: xlarge
|
||||
environment:
|
||||
NUMBER_OF_PARALLEL_BROWSERS: 2
|
||||
steps:
|
||||
- custom_attach_workspace
|
||||
- init_environment
|
||||
- init_saucelabs_environment
|
||||
- run:
|
||||
name: Start Saucelabs daemon service
|
||||
command: yarn bazel run //tools/saucelabs-daemon/background-service -- ${NUMBER_OF_PARALLEL_BROWSERS}
|
||||
background: true
|
||||
- run:
|
||||
name: Run Bazel tests on Saucelabs
|
||||
# See /tools/saucelabs/README.md for more info
|
||||
command: |
|
||||
yarn bazel run //tools/saucelabs:sauce_service_setup
|
||||
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
|
||||
yarn bazel test --config=saucelabs --jobs=${NUMBER_OF_PARALLEL_BROWSERS} ${TESTS}
|
||||
yarn bazel test --config=saucelabs ${TESTS}
|
||||
yarn bazel run //tools/saucelabs:sauce_service_stop
|
||||
no_output_timeout: 40m
|
||||
- notify_webhook_on_fail:
|
||||
webhook_url_env_var: SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL
|
||||
@@ -655,6 +666,9 @@ workflows:
|
||||
filters:
|
||||
branches:
|
||||
ignore: g3
|
||||
- lint:
|
||||
requires:
|
||||
- setup
|
||||
- test:
|
||||
requires:
|
||||
- setup
|
||||
|
||||
@@ -4,7 +4,7 @@ description: 'Installs the dependencies using Yarn'
|
||||
runs:
|
||||
using: 'composite'
|
||||
steps:
|
||||
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
|
||||
- uses: actions/cache@940f3d7cf195ba83374c77632d1e2cbb2f24ae68 # v3
|
||||
with:
|
||||
path: |
|
||||
./node_modules/
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# Configuration for angular-robot
|
||||
|
||||
# options for the size plugin
|
||||
#options for the size plugin
|
||||
size:
|
||||
disabled: true
|
||||
disabled: false
|
||||
maxSizeIncrease: 2000
|
||||
circleCiStatusName: 'ci/circleci: test'
|
||||
|
||||
@@ -69,6 +69,8 @@ merge:
|
||||
# list of PR statuses that need to be successful
|
||||
requiredStatuses:
|
||||
- 'ci/circleci: build'
|
||||
- 'ci/circleci: lint'
|
||||
- 'ci/angular: size'
|
||||
- 'google-internal-tests'
|
||||
- 'pullapprove'
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ jobs:
|
||||
(github.event.action == 'labeled' && github.event.label.name == 'aio: preview') ||
|
||||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'aio: preview'))
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: ./.github/actions/yarn-install
|
||||
|
||||
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
bazelrc: ./.bazelrc.user
|
||||
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
# the number of concurrent actions is determined based on the host resources.
|
||||
- run: bazel build //aio:build --jobs=32 --announce_rc --verbose_failures
|
||||
|
||||
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
workflow-artifact-name: 'aio'
|
||||
pull-number: '${{github.event.pull_request.number}}'
|
||||
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
|
||||
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3
|
||||
|
||||
- name: Configure Firebase deploy target
|
||||
working-directory: aio/
|
||||
@@ -34,7 +34,7 @@ jobs:
|
||||
npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting aio
|
||||
npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting aio ${{env.PREVIEW_SITE}}
|
||||
|
||||
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
github-token: '${{secrets.GITHUB_TOKEN}}'
|
||||
workflow-artifact-name: 'aio'
|
||||
|
||||
@@ -13,9 +13,9 @@ jobs:
|
||||
assistant_to_the_branch_manager:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: angular/dev-infra/github-actions/branch-manager@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/branch-manager@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
name: Run benchmark comparison
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
benchmark-compare:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/benchmark-compare ')}}
|
||||
steps:
|
||||
- uses: TheModdingInquisition/actions-team-membership@a69636a92bc927f32c3910baac06bacc949c984c # v1.0
|
||||
with:
|
||||
team: 'team'
|
||||
organization: angular
|
||||
token: ${{secrets.BENCHMARK_COMPARE_MEMBERSHIP_GITHUB_TOKEN}}
|
||||
exit: true
|
||||
|
||||
# Indicate that the benchmark command was received.
|
||||
- uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
|
||||
with:
|
||||
comment-id: ${{github.event.comment.id}}
|
||||
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
|
||||
reactions: 'rocket'
|
||||
|
||||
- uses: alessbell/pull-request-comment-branch@aad01d65d6982b8eacabed5e9a684cd8ceb98da6 # v1.1
|
||||
id: comment-branch
|
||||
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
with:
|
||||
# Specify repository as the PR branch might be from a fork.
|
||||
repository: ${{steps.comment-branch.outputs.head_owner}}/${{steps.comment-branch.outputs.head_repo}}
|
||||
# Checkout the pull request and assume it being trusted given we've checked
|
||||
# that the action was triggered by a team member.
|
||||
ref: ${{steps.comment-branch.outputs.head_ref}}
|
||||
|
||||
- uses: ./.github/actions/yarn-install
|
||||
|
||||
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
with:
|
||||
bazelrc: ./.bazelrc.user
|
||||
|
||||
- name: Preparing benchmark for GitHub action
|
||||
id: info
|
||||
env:
|
||||
# Untrusted input used in an executable code, must be wrapped as an env var to prevent injections
|
||||
COMMENT_BODY: ${{ github.event.comment.body }}
|
||||
run: yarn benchmarks prepare-for-github-action "$COMMENT_BODY"
|
||||
|
||||
- run: yarn benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
|
||||
id: benchmark
|
||||
name: Running benchmark
|
||||
|
||||
- uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
|
||||
with:
|
||||
issue-number: ${{github.event.issue.number}}
|
||||
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
|
||||
body: |
|
||||
## Benchmark Test Results
|
||||
**Test**: `${{steps.info.outputs.benchmarkTarget}}`
|
||||
|
||||
### PR (${{steps.info.outputs.prHeadSha}})
|
||||
${{steps.benchmark.outputs.workingStageResultsText}}
|
||||
|
||||
### Compare Ref (${{steps.info.outputs.compareSha}})
|
||||
${{steps.benchmark.outputs.comparisonResultsText}}
|
||||
@@ -1,57 +0,0 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- '[0-9]+.[0-9]+.x'
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
shell: bash
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Initialize environment
|
||||
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@852c3d1898775ec9fbc87213e519f16e78805b57
|
||||
with:
|
||||
cache-node-modules: true
|
||||
node-module-directories: |
|
||||
./node_modules
|
||||
./aio/node_modules
|
||||
- name: Install node modules
|
||||
run: yarn install --frozen-lockfile
|
||||
- name: Install node modules in aio
|
||||
run: yarn install --frozen-lockfile --cwd aio
|
||||
- name: Check code lint
|
||||
run: yarn -s tslint
|
||||
- name: Check code lint in aio
|
||||
run: yarn -s --cwd aio lint
|
||||
- name: Check for circular dependencies
|
||||
run: yarn -s ts-circular-deps:check
|
||||
- name: Validate pull approve configuration
|
||||
run: yarn -s ng-dev pullapprove verify
|
||||
- name: Validate angular robot configuration
|
||||
run: yarn -s ng-dev ngbot verify
|
||||
- name: Confirm code builds with typescript as expected
|
||||
run: yarn -s check-tooling-setup
|
||||
- name: Check commit message
|
||||
# Commit message validation is only done on pull requests as its too late to validate once
|
||||
# it has been merged.
|
||||
if: github.event_name == 'pull_request'
|
||||
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
|
||||
- name: Check code format
|
||||
# Code formatting checks are only done on pull requests as its too late to validate once
|
||||
# it has been merged.
|
||||
if: github.event_name == 'pull_request'
|
||||
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
|
||||
@@ -12,14 +12,14 @@ jobs:
|
||||
labels:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
post_approval_changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -14,6 +14,6 @@ jobs:
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/feature-request@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/feature-request@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -12,9 +12,9 @@ jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
- uses: angular/dev-infra/github-actions/google-internal-tests@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
- uses: angular/dev-infra/github-actions/google-internal-tests@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
run-tests-guide-url: http://go/angular-g3sync-start
|
||||
run-tests-guide-url: http://go/angular/g3sync
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
sync-config: ./.ng-dev/google-sync-config.json
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Lock closed inactive issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# Run at 16:00 every day
|
||||
- cron: '0 16 * * *'
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lock_closed:
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/lock-closed@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
|
||||
@@ -9,6 +9,6 @@ jobs:
|
||||
status:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/unified-status-check@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
- uses: angular/dev-infra/github-actions/unified-status-check@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -25,12 +25,12 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: 'Checkout code'
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'Run analysis'
|
||||
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
|
||||
uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
@@ -47,6 +47,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: 'Upload to code-scanning'
|
||||
uses: github/codeql-action/upload-sarif@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
|
||||
uses: github/codeql-action/upload-sarif@168b99b3c22180941ae7dbdd5f5c9678ede476ba # v2.2.7
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
# Setting `persist-credentials: false` prevents the github-action account from being the
|
||||
# account that is attempted to be used for authentication, instead the remote is set to
|
||||
@@ -32,7 +32,7 @@ jobs:
|
||||
env:
|
||||
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
|
||||
- name: Create a PR (if necessary)
|
||||
uses: angular/dev-infra/github-actions/create-pr-for-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
uses: angular/dev-infra/github-actions/create-pr-for-changes@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
branch-prefix: update-cli-help
|
||||
pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]'
|
||||
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
||||
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
|
||||
with:
|
||||
# Setting `persist-credentials: false` prevents the github-action account from being the
|
||||
# account that is attempted to be used for authentication, instead the remote is set to
|
||||
@@ -35,7 +35,7 @@ jobs:
|
||||
- name: Generate `events.json`
|
||||
run: node aio/scripts/generate-events/index.mjs --ignore-invalid-dates
|
||||
- name: Create a PR (if necessary)
|
||||
uses: angular/dev-infra/github-actions/create-pr-for-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
|
||||
uses: angular/dev-infra/github-actions/create-pr-for-changes@462f716ef571b2b41fff90aaa5bb10897693efcc
|
||||
with:
|
||||
branch-prefix: docs-update-events
|
||||
pr-title: 'docs: update events'
|
||||
|
||||
@@ -25,10 +25,13 @@ export const commitMessage: CommitMessageConfig = {
|
||||
'language-service',
|
||||
'localize',
|
||||
'migrations',
|
||||
'ngcc',
|
||||
'packaging',
|
||||
'platform-browser',
|
||||
'platform-browser-dynamic',
|
||||
'platform-server',
|
||||
'platform-webworker',
|
||||
'platform-webworker-dynamic',
|
||||
'router',
|
||||
'service-worker',
|
||||
'upgrade',
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
"packages/bazel/src/protractor/**",
|
||||
"packages/bazel/src/schematics/**",
|
||||
"packages/bazel/src/types_bundle/**",
|
||||
"packages/compiler-cli/src/ngcc/**",
|
||||
"packages/compiler-cli/linker/**",
|
||||
"packages/compiler-cli/ngcc/**",
|
||||
"packages/compiler-cli/src/ngtsc/sourcemaps/**",
|
||||
"packages/compiler-cli/src/ngtsc/testing/**",
|
||||
"packages/compiler-cli/private/bazel.ts",
|
||||
|
||||
@@ -6,6 +6,7 @@ export const release: ReleaseConfig = {
|
||||
representativeNpmPackage: '@angular/core',
|
||||
npmPackages: [
|
||||
{name: '@angular/animations'},
|
||||
{name: '@angular/bazel'},
|
||||
{name: '@angular/common'},
|
||||
{name: '@angular/compiler'},
|
||||
{name: '@angular/compiler-cli'},
|
||||
|
||||
+46
-21
@@ -58,7 +58,7 @@ version: 3
|
||||
|
||||
availability:
|
||||
users_unavailable:
|
||||
- atscott
|
||||
- devversion
|
||||
|
||||
# Meta field that goes unused by PullApprove to allow for defining aliases to be
|
||||
# used throughout the config.
|
||||
@@ -150,7 +150,7 @@ groups:
|
||||
<<: *defaults
|
||||
conditions:
|
||||
- >
|
||||
contains_any_globs(files, [
|
||||
contains_any_globs(files.exclude('packages/compiler-cli/ngcc/*'), [
|
||||
'packages/compiler/**/{*,.*}',
|
||||
'packages/examples/compiler/**/{*,.*}',
|
||||
'aio/content/examples/angular-compiler-options/**/{*,.*}',
|
||||
@@ -158,15 +158,25 @@ groups:
|
||||
'aio/content/guide/angular-compiler-options.md',
|
||||
'aio/content/guide/aot-compiler.md',
|
||||
'aio/content/guide/aot-metadata-errors.md',
|
||||
'aio/content/guide/template-typecheck.md',
|
||||
'aio/content/extended-diagnostics/*.md'
|
||||
'aio/content/guide/template-typecheck.md'
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
- alxhub
|
||||
- AndrewKushnir
|
||||
- atscott
|
||||
- crisbeto
|
||||
- JoostK
|
||||
|
||||
# =========================================================
|
||||
# Framework: Compiler / ngcc
|
||||
# =========================================================
|
||||
fw-ngcc:
|
||||
<<: *defaults
|
||||
conditions:
|
||||
- files.include('packages/compiler-cli/ngcc/*')
|
||||
reviewers:
|
||||
users:
|
||||
- alxhub
|
||||
- JoostK
|
||||
|
||||
# =========================================================
|
||||
@@ -205,7 +215,6 @@ groups:
|
||||
'aio/content/guide/architecture-services.md',
|
||||
'aio/content/guide/architecture.md',
|
||||
'aio/content/examples/architecture/**/{*,.*}',
|
||||
'aio/content/guide/rxjs-interop.md',
|
||||
'aio/content/images/guide/architecture/**/{*,.*}',
|
||||
'aio/content/guide/attribute-directives.md',
|
||||
'aio/content/examples/attribute-directives/**/{*,.*}',
|
||||
@@ -219,12 +228,31 @@ groups:
|
||||
'aio/content/images/guide/change-detection/**/{*,.*}',
|
||||
'aio/content/guide/class-binding.md',
|
||||
'aio/content/guide/cheatsheet.md',
|
||||
'aio/content/guide/component/component-content-projection-complex.md',
|
||||
'aio/content/guide/component/component-content-projection-conditional.md',
|
||||
'aio/content/guide/component/component-content-projection-multi-slot.md',
|
||||
'aio/content/guide/component/component-content-projection-overview.md',
|
||||
'aio/content/guide/component/component-content-projection-single-slot.md',
|
||||
'aio/content/guide/component/component-create-cli.md',
|
||||
'aio/content/guide/component/component-create-manual.md',
|
||||
'aio/content/guide/component/component-example-dynamic-load.md',
|
||||
'aio/content/guide/component/component-example-interaction.md',
|
||||
'aio/content/guide/component/component-example.md',
|
||||
'aio/content/guide/component/component-exchange-data.md',
|
||||
'aio/content/guide/component/component-lifecycle-overview.md',
|
||||
'aio/content/guide/component/component-overview.md',
|
||||
'aio/content/guide/component/component-share-data-overview.md',
|
||||
'aio/content/guide/component/component-share-data-to-child.md',
|
||||
'aio/content/guide/component/component-share-data-to-parent.md',
|
||||
'aio/content/guide/component/component-structure.md',
|
||||
'aio/content/guide/component/component-style-overview.md',
|
||||
'aio/content/guide/component/component-style-view-encapsulate.md',
|
||||
'aio/content/guide/component/component-style.md',
|
||||
'aio/content/guide/component/component-use-overview.md',
|
||||
'aio/content/guide/component-interaction.md',
|
||||
'aio/content/examples/component-interaction/**/{*,.*}',
|
||||
'aio/content/images/guide/component-interaction/**/{*,.*}',
|
||||
'aio/content/guide/component-overview.md',
|
||||
'aio/content/errors/*.md',
|
||||
'aio/content/examples/errors/**/{*,.*}',
|
||||
'aio/content/examples/component-overview/**/{*,.*}',
|
||||
'aio/content/guide/component-styles.md',
|
||||
'aio/content/guide/developer-guide-overview.md',
|
||||
@@ -242,7 +270,6 @@ groups:
|
||||
'aio/content/images/guide/dependency-injection-in-action/**/{*,.*}',
|
||||
'aio/content/guide/dependency-injection-navtree.md',
|
||||
'aio/content/guide/dependency-injection-providers.md',
|
||||
'aio/content/guide/dependency-injection-context.md',
|
||||
'aio/content/guide/lightweight-injection-tokens.md',
|
||||
'aio/content/guide/displaying-data.md',
|
||||
'aio/content/examples/displaying-data/**/{*,.*}',
|
||||
@@ -251,6 +278,7 @@ groups:
|
||||
'aio/content/examples/dynamic-component-loader/**/{*,.*}',
|
||||
'aio/content/images/guide/dynamic-component-loader/**/{*,.*}',
|
||||
'aio/content/guide/example-apps-list.md',
|
||||
'aio/content/guide/entry-components.md',
|
||||
'aio/content/guide/feature-modules.md',
|
||||
'aio/content/examples/feature-modules/**/{*,.*}',
|
||||
'aio/content/images/guide/feature-modules/**/{*,.*}',
|
||||
@@ -265,6 +293,8 @@ groups:
|
||||
'aio/content/guide/lazy-loading-ngmodules.md',
|
||||
'aio/content/examples/lazy-loading-ngmodules/**/{*,.*}',
|
||||
'aio/content/images/guide/lazy-loading-ngmodules/**/{*,.*}',
|
||||
'aio/content/guide/lifecycle-hook/lifecycle-hook-example.md',
|
||||
'aio/content/guide/lifecycle-hook/lifecycle-hook-overview.md',
|
||||
'aio/content/guide/lifecycle-hooks.md',
|
||||
'aio/content/examples/lifecycle-hooks/**/{*,.*}',
|
||||
'aio/content/images/guide/lifecycle-hooks/**/{*,.*}',
|
||||
@@ -335,16 +365,13 @@ groups:
|
||||
'aio/content/guide/view-encapsulation.md',
|
||||
'aio/content/examples/view-encapsulation/**/{*,.*}',
|
||||
'aio/content/images/guide/view-encapsulation/**/{*,.*}',
|
||||
'aio/content/special-elements/**/{*,.*}',
|
||||
'aio/content/guide/hydration.md',
|
||||
'aio/content/guide/signals.md'
|
||||
'aio/content/special-elements/**/{*,.*}'
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
- alxhub
|
||||
- AndrewKushnir
|
||||
- atscott
|
||||
- crisbeto
|
||||
- dylhunn
|
||||
- jessicajaniuk
|
||||
- pkozlowski-opensource
|
||||
@@ -379,6 +406,7 @@ groups:
|
||||
contains_any_globs(files, [
|
||||
'packages/common/http/**/{*,.*}',
|
||||
'packages/examples/http/**/{*,.*}',
|
||||
'aio/content/guide/http.md',
|
||||
'aio/content/guide/understanding-communicating-with-http.md',
|
||||
'aio/content/guide/http-configure-http-url-parameters.md',
|
||||
'aio/content/guide/http-handle-request-errors.md',
|
||||
@@ -781,9 +809,8 @@ groups:
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
- devversion
|
||||
- alxhub
|
||||
- josephperrott
|
||||
- pkozlowski-opensource
|
||||
|
||||
# =========================================================
|
||||
# Integration Tests
|
||||
@@ -836,7 +863,6 @@ groups:
|
||||
'aio/content/images/guide/toh/**/{*,.*}',
|
||||
'aio/content/demos/first-app/**/{*,.*}',
|
||||
'aio/content/examples/first-app-*/**/{*,.*}',
|
||||
'aio/content/images/guide/faa/**/{*,.*}',
|
||||
'aio/content/examples/toh-pt0/**/{*,.*}',
|
||||
'aio/content/examples/toh-pt1/**/{*,.*}',
|
||||
'aio/content/examples/toh-pt2/**/{*,.*}',
|
||||
@@ -929,10 +955,8 @@ groups:
|
||||
'aio/content/guide/migration-module-with-providers.md',
|
||||
'aio/content/guide/static-query-migration.md',
|
||||
'aio/content/guide/update-to-latest-version.md',
|
||||
'aio/content/guide/versions.md',
|
||||
'aio/content/guide/update-to-version-14.md',
|
||||
'aio/content/guide/update-to-version-15.md',
|
||||
'aio/content/guide/update-to-version-16.md',
|
||||
'aio/content/guide/update-to-version-15.md'
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
@@ -1006,7 +1030,6 @@ groups:
|
||||
'aio/content/guide/workspace-config.md',
|
||||
'aio/content/guide/migration-solution-style-tsconfig.md',
|
||||
'aio/content/guide/migration-update-libraries-tslib.md',
|
||||
'aio/content/guide/esbuild.md',
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
@@ -1167,7 +1190,6 @@ groups:
|
||||
'tools/legacy-saucelabs/**/{*,.*}',
|
||||
'tools/rxjs/**/{*,.*}',
|
||||
'tools/saucelabs/**/{*,.*}',
|
||||
'tools/saucelabs-daemon/**/{*,.*}',
|
||||
'tools/symbol-extractor/**/{*,.*}',
|
||||
'tools/testing/**/{*,.*}',
|
||||
'tools/tslint/**/{*,.*}',
|
||||
@@ -1194,8 +1216,11 @@ groups:
|
||||
'goldens/public-api/**/{*,.*}',
|
||||
'docs/NAMING.md',
|
||||
'aio/content/guide/angular-package-format.md',
|
||||
'aio/content/errors/*.md',
|
||||
'aio/content/extended-diagnostics/*.md',
|
||||
'aio/content/guide/glossary.md',
|
||||
'aio/content/guide/styleguide.md',
|
||||
'aio/content/examples/errors/**/{*,.*}',
|
||||
'aio/content/examples/styleguide/**/{*,.*}',
|
||||
'aio/content/images/guide/styleguide/{*,.*}'
|
||||
])
|
||||
|
||||
+147520
File diff suppressed because one or more lines are too long
Vendored
-147529
File diff suppressed because one or more lines are too long
@@ -2,4 +2,4 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
yarn-path ".yarn/releases/yarn-1.22.19.cjs"
|
||||
yarn-path ".yarn/releases/yarn-1.22.17.cjs"
|
||||
|
||||
+2
-20
@@ -1,5 +1,4 @@
|
||||
load("//tools:defaults.bzl", "nodejs_binary")
|
||||
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
|
||||
load("//:yarn.bzl", "YARN_PATH")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
@@ -27,14 +26,6 @@ alias(
|
||||
actual = "//packages:tsconfig-build.json",
|
||||
)
|
||||
|
||||
js_library(
|
||||
name = "browser-providers",
|
||||
srcs = [
|
||||
"browser-providers.conf.d.ts",
|
||||
"browser-providers.conf.js",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "angularjs_scripts",
|
||||
srcs = [
|
||||
@@ -63,19 +54,10 @@ config_setting(
|
||||
|
||||
nodejs_binary(
|
||||
name = "yarn_vendored",
|
||||
data = [".yarn/releases/yarn-1.22.19.cjs"],
|
||||
entry_point = ".yarn/releases/yarn-1.22.19.cjs",
|
||||
data = [".yarn/releases/yarn-1.22.17.cjs"],
|
||||
entry_point = ".yarn/releases/yarn-1.22.17.cjs",
|
||||
visibility = [
|
||||
"//aio/tools/examples/shared:__pkg__",
|
||||
"//integration:__subpackages__",
|
||||
],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "sauce_connect",
|
||||
actual = select({
|
||||
"@npm//@angular/build-tooling/bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
|
||||
"@npm//@angular/build-tooling/bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
|
||||
"@npm//@angular/build-tooling/bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
|
||||
}),
|
||||
)
|
||||
|
||||
+2618
-649
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -65,14 +65,6 @@ Angular maintainers who do not follow or enforce the Code of Conduct in good
|
||||
faith may face temporary or permanent repercussions as determined by other
|
||||
members of the project's leadership.
|
||||
|
||||
### Appeal
|
||||
|
||||
If you are banned you may contest the decision. To do so email conduct@angular.io with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
|
||||
|
||||
* Why do you believe you did not violate the Code of Conduct?
|
||||
* Were other factors involved in this situation the leadership team may have been unaware of?
|
||||
* Why do you wish to be a part of the Angular community?
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
|
||||
|
||||
+5
-1
@@ -246,7 +246,7 @@ The `footer` is optional. The [Commit Message Footer](#commit-footer) format des
|
||||
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
|
||||
│ elements|forms|http|language-service|localize|platform-browser|
|
||||
│ platform-browser-dynamic|platform-server|router|service-worker|
|
||||
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|
|
||||
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
|
||||
│ devtools
|
||||
│
|
||||
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
|
||||
@@ -306,6 +306,10 @@ There are currently a few exceptions to the "use package name" rule:
|
||||
|
||||
* `migrations`: used for changes to the `ng update` migrations.
|
||||
|
||||
* `ngcc`: used for changes to the [Angular Compatibility Compiler](./packages/compiler-cli/ngcc/README.md)
|
||||
|
||||
* `ve`: used for changes specific to ViewEngine (legacy compiler/renderer).
|
||||
|
||||
* `devtools`: used for changes in the [browser extension](./devtools/README.md).
|
||||
|
||||
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
The MIT License
|
||||
|
||||
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
|
||||
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<h1 align="center">Angular - The modern web developer's platform</h1>
|
||||
<h1 align="center">Angular - The modern web developer's platform.</h1>
|
||||
|
||||
<p align="center">
|
||||
<img src="aio/src/assets/images/logos/angular/angular.png" alt="angular-logo" width="120px" height="120px"/>
|
||||
<br>
|
||||
<em>Angular is a development platform for building mobile and desktop web applications
|
||||
<br> using TypeScript/JavaScript and other languages.</em>
|
||||
<i>Angular is a development platform for building mobile and desktop web applications
|
||||
<br> using TypeScript/JavaScript and other languages.</i>
|
||||
<br>
|
||||
</p>
|
||||
|
||||
|
||||
@@ -26,10 +26,12 @@ http_archive(
|
||||
http_archive(
|
||||
name = "build_bazel_rules_nodejs",
|
||||
patches = [
|
||||
# TODO(devversion): remove when https://github.com/bazelbuild/rules_nodejs/pull/3605 is available.
|
||||
"//tools:bazel-repo-patches/rules_nodejs__#3605.patch",
|
||||
"//tools/esm-interop:patches/bazel/nodejs_binary_esm_support.patch",
|
||||
],
|
||||
sha256 = "5dd1e5dea1322174c57d3ca7b899da381d516220793d0adef3ba03b9d23baa8e",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.3/rules_nodejs-5.8.3.tar.gz"],
|
||||
sha256 = "c29944ba9b0b430aadcaf3bf2570fece6fc5ebfb76df145c6cdad40d65c20811",
|
||||
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.7.0/rules_nodejs-5.7.0.tar.gz"],
|
||||
)
|
||||
|
||||
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
|
||||
@@ -38,8 +40,6 @@ build_bazel_rules_nodejs_dependencies()
|
||||
|
||||
# The PKG rules are needed to build tar packages for integration tests. The builtin
|
||||
# rule in `@bazel_tools` is not Windows compatible and outdated.
|
||||
# NOTE: We cannot move past version 0.6.0 as pkg_tar no longer works on directories, which rules_nodejs
|
||||
# relies on for node_modules setup.
|
||||
http_archive(
|
||||
name = "rules_pkg",
|
||||
sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
|
||||
@@ -50,8 +50,6 @@ http_archive(
|
||||
)
|
||||
|
||||
# Fetch Aspect lib for utilities like write_source_files
|
||||
# NOTE: We cannot move past version 1.23.2 of aspect_bazel_lib because it requires us to move to bazel 6.0.0 which
|
||||
# breaks our usage of managed_directories
|
||||
http_archive(
|
||||
name = "aspect_bazel_lib",
|
||||
sha256 = "4b2e774387bae6242879820086b7b738d49bf3d0659522ea5d9363be01a27582",
|
||||
@@ -64,12 +62,7 @@ load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
|
||||
|
||||
nodejs_register_toolchains(
|
||||
name = "nodejs",
|
||||
node_version = "16.14.0",
|
||||
)
|
||||
|
||||
nodejs_register_toolchains(
|
||||
name = "node18",
|
||||
node_version = "18.10.0",
|
||||
node_version = "16.13.0",
|
||||
)
|
||||
|
||||
# Download npm dependencies.
|
||||
@@ -84,8 +77,8 @@ yarn_install(
|
||||
YARN_LABEL,
|
||||
"//:.yarnrc",
|
||||
"//tools:postinstall-patches.js",
|
||||
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-8d4803573edc70b90a1134ffa996303d1dcc18a9.patch",
|
||||
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.8.1.patch",
|
||||
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-e859696da7af56c811b6589f1ae888222d93d797.patch",
|
||||
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.7.1.patch",
|
||||
"//tools/esm-interop:patches/npm/@bazel+esbuild+5.7.1.patch",
|
||||
"//tools/esm-interop:patches/npm/@bazel+protractor+5.7.1.patch",
|
||||
"//tools/esm-interop:patches/npm/rxjs+6.6.7.patch",
|
||||
@@ -199,10 +192,10 @@ cldr_xml_data_repository(
|
||||
# sass rules
|
||||
http_archive(
|
||||
name = "io_bazel_rules_sass",
|
||||
sha256 = "4bb36a654166e1b629717e55a9c0cc30590f6615c122c054f38409c20ee5ec6f",
|
||||
strip_prefix = "rules_sass-f89fc59345a5074cf184ec215e9858152b7258e7",
|
||||
sha256 = "456df159ed48f7df4d40b2c5a41bf9dcb343cacbac561af4b0e5334c5eb14af1",
|
||||
strip_prefix = "rules_sass-3d2ad4702a9610e97dadbe345e3566cc19e72ad6",
|
||||
urls = [
|
||||
"https://github.com/bazelbuild/rules_sass/archive/f89fc59345a5074cf184ec215e9858152b7258e7.zip",
|
||||
"https://github.com/bazelbuild/rules_sass/archive/3d2ad4702a9610e97dadbe345e3566cc19e72ad6.zip",
|
||||
],
|
||||
)
|
||||
|
||||
@@ -220,20 +213,3 @@ register_toolchains(
|
||||
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
|
||||
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
|
||||
)
|
||||
|
||||
# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
|
||||
http_archive(
|
||||
name = "sauce_connect_linux_amd64",
|
||||
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
|
||||
sha256 = "26b9c3630f441b47854b6032f7eca6f1d88d3f62e50ee44c27015d71a5155c36",
|
||||
strip_prefix = "sc-4.8.2-linux",
|
||||
url = "https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz",
|
||||
)
|
||||
|
||||
http_archive(
|
||||
name = "sauce_connect_mac",
|
||||
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
|
||||
sha256 = "28277ce81ef9ab84f5b87b526258920a8ead44789a5034346e872629bbf38089",
|
||||
strip_prefix = "sc-4.8.2-osx",
|
||||
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
|
||||
)
|
||||
|
||||
+28
-181
@@ -13,213 +13,60 @@
|
||||
"createDefaultProgram": true
|
||||
},
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/ng-cli-compat",
|
||||
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"@angular-eslint",
|
||||
"eslint-plugin-jsdoc",
|
||||
"eslint-plugin-import",
|
||||
"eslint-plugin-jsdoc",
|
||||
"eslint-plugin-prefer-arrow"
|
||||
],
|
||||
"rules": {
|
||||
"@angular-eslint/component-class-suffix": "error",
|
||||
"@typescript-eslint/ban-types": "error",
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "element",
|
||||
"prefix": "aio",
|
||||
"style": "kebab-case",
|
||||
"type": "element"
|
||||
"style": "kebab-case"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/contextual-lifecycle": "error",
|
||||
"@angular-eslint/directive-class-suffix": "error",
|
||||
"@angular-eslint/directive-selector": [
|
||||
"error",
|
||||
{
|
||||
"type": "attribute",
|
||||
"prefix": "aio",
|
||||
"style": "camelCase",
|
||||
"type": "attribute"
|
||||
"style": "camelCase"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-conflicting-lifecycle": "error",
|
||||
"@angular-eslint/no-host-metadata-property": "off",
|
||||
"@angular-eslint/no-input-rename": "error",
|
||||
"@angular-eslint/no-inputs-metadata-property": "error",
|
||||
"@angular-eslint/no-output-native": "error",
|
||||
"@angular-eslint/no-output-on-prefix": "error",
|
||||
"@angular-eslint/no-output-rename": "error",
|
||||
"@angular-eslint/no-outputs-metadata-property": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/use-pipe-transform-interface": "error",
|
||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||
"@typescript-eslint/array-type": "off",
|
||||
"@typescript-eslint/ban-types": "error",
|
||||
"@typescript-eslint/consistent-type-assertions": "error",
|
||||
"@typescript-eslint/dot-notation": "error",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
"@typescript-eslint/interface-name-prefix": "off",
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
"error",
|
||||
{
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false
|
||||
}
|
||||
"dot-notation": "error",
|
||||
"indent": "off",
|
||||
"max-len": ["error", 120],
|
||||
"@typescript-eslint/member-delimiter-style": ["error", {
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false
|
||||
}
|
||||
],
|
||||
}],
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
{
|
||||
"ignoreParameters": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-non-null-assertion": "error",
|
||||
"@typescript-eslint/no-parameter-properties": "off",
|
||||
"@typescript-eslint/no-shadow": [
|
||||
"error"
|
||||
],
|
||||
"@typescript-eslint/no-unused-expressions": "error",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/prefer-for-of": "error",
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"single",
|
||||
{
|
||||
"avoidEscape": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/semi": [
|
||||
"error",
|
||||
"always"
|
||||
],
|
||||
"@typescript-eslint/triple-slash-reference": [
|
||||
"error",
|
||||
{
|
||||
"lib": "always",
|
||||
"path": "always",
|
||||
"types": "prefer-import"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": "off",
|
||||
"comma-dangle": "off",
|
||||
"complexity": "off",
|
||||
"constructor-super": "error",
|
||||
"curly": "error",
|
||||
"dot-notation": "error",
|
||||
"eol-last": "error",
|
||||
"eqeqeq": [
|
||||
"error",
|
||||
"smart"
|
||||
],
|
||||
"guard-for-in": "error",
|
||||
"id-denylist": [
|
||||
"error",
|
||||
"any",
|
||||
"Number",
|
||||
"number",
|
||||
"String",
|
||||
"string",
|
||||
"Boolean",
|
||||
"boolean",
|
||||
"Undefined",
|
||||
"undefined"
|
||||
],
|
||||
"id-match": "error",
|
||||
"import/no-deprecated": "warn",
|
||||
"indent": "off",
|
||||
"jsdoc/check-alignment": "error",
|
||||
"jsdoc/no-types": "error",
|
||||
"max-classes-per-file": "off",
|
||||
"max-len": [
|
||||
"error",
|
||||
120
|
||||
],
|
||||
"new-parens": "error",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-cond-assign": "error",
|
||||
"no-console": [
|
||||
"error",
|
||||
{
|
||||
"allow": [
|
||||
"log",
|
||||
"warn",
|
||||
"error"
|
||||
]
|
||||
}
|
||||
],
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
"no-console": ["error", {"allow": ["log", "warn", "error"]}],
|
||||
"no-empty-function": "off",
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-multiple-empty-lines": "off",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"message": "Please import directly from 'rxjs' instead",
|
||||
"name": "rxjs/Rx"
|
||||
}
|
||||
],
|
||||
"@angular-eslint/no-host-metadata-property": "off",
|
||||
"no-restricted-syntax": [
|
||||
"error",
|
||||
{
|
||||
"message": "Don't keep jasmine focus methods.",
|
||||
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]"
|
||||
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]",
|
||||
"message": "Don't keep jasmine focus methods."
|
||||
}
|
||||
],
|
||||
"no-shadow": "off",
|
||||
"@typescript-eslint/no-shadow": ["error"],
|
||||
"no-tabs": "error",
|
||||
"no-throw-literal": "error",
|
||||
"no-trailing-spaces": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-underscore-dangle": "off",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-unused-expressions": "off",
|
||||
"no-unused-labels": "error",
|
||||
"@typescript-eslint/no-unused-expressions": ["error"],
|
||||
"no-use-before-define": "off",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"one-var": [
|
||||
"error",
|
||||
"never"
|
||||
],
|
||||
"prefer-arrow/prefer-arrow-functions": "off",
|
||||
"prefer-const": "error",
|
||||
"quote-props": [
|
||||
"error",
|
||||
"as-needed"
|
||||
],
|
||||
"quotes": "off",
|
||||
"radix": "error",
|
||||
"sort-keys": "off",
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "never",
|
||||
"asyncArrow": "always",
|
||||
"named": "never"
|
||||
}
|
||||
],
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "off"
|
||||
"@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true}],
|
||||
"semi": "error"
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -230,11 +77,11 @@
|
||||
"plugin:@angular-eslint/template/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"@angular-eslint/template/alt-text": "error",
|
||||
"@angular-eslint/template/elements-content": "error",
|
||||
"@angular-eslint/template/label-has-associated-control": "error",
|
||||
"@angular-eslint/template/table-scope": "error",
|
||||
"@angular-eslint/template/valid-aria": "error",
|
||||
"@angular-eslint/template/accessibility-alt-text": "error",
|
||||
"@angular-eslint/template/accessibility-elements-content": "error",
|
||||
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
|
||||
"@angular-eslint/template/accessibility-table-scope": "error",
|
||||
"@angular-eslint/template/accessibility-valid-aria": "error",
|
||||
"@angular-eslint/template/click-events-have-key-events": "error",
|
||||
"@angular-eslint/template/eqeqeq": "off",
|
||||
"@angular-eslint/template/mouse-events-have-key-events": "error",
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@
|
||||
"outputPath": "dist",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": ["zone.js"],
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"ngswConfigPath": "src/generated/ngsw-config.json",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"webWorkerTsConfig": "tsconfig.worker.json",
|
||||
@@ -216,7 +216,7 @@
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": ["zone.js", "zone.js/testing"],
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"webWorkerTsConfig": "tsconfig.worker.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"branchName": "refs/heads/main",
|
||||
"sha": "d29cbad7e25ed9114be351b9582eb8723db14773"
|
||||
"sha": "21a0ade535aae3a717017cc537f13bc5fbc7f033"
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
{
|
||||
"name": "version",
|
||||
"type": "string",
|
||||
"description": "The version of Angular to use for the documentation. If not provided, the command uses your current Angular core version."
|
||||
"description": "Contains the version of Angular to use for the documentation. If not provided, the command uses your current Angular core version."
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -52,7 +52,6 @@
|
||||
{
|
||||
"name": "app-id",
|
||||
"type": "string",
|
||||
"deprecated": "This option is no longer used.",
|
||||
"default": "serverApp",
|
||||
"description": "The application ID to use in withServerTransition()."
|
||||
},
|
||||
@@ -76,7 +75,7 @@
|
||||
{
|
||||
"name": "root-module-file-name",
|
||||
"type": "string",
|
||||
"default": "app.module.server.ts",
|
||||
"default": "app.server.module.ts",
|
||||
"description": "The name of the root module file"
|
||||
},
|
||||
{
|
||||
@@ -163,12 +162,6 @@
|
||||
"default": false,
|
||||
"description": "Do not create \"spec.ts\" test files for the application."
|
||||
},
|
||||
{
|
||||
"name": "standalone",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Creates an application based upon the standalone API, without NgModules."
|
||||
},
|
||||
{
|
||||
"name": "strict",
|
||||
"type": "boolean",
|
||||
@@ -539,7 +532,7 @@
|
||||
{
|
||||
"name": "functional",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"description": "Specifies whether to generate a guard as a function."
|
||||
},
|
||||
{
|
||||
@@ -692,12 +685,6 @@
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Do not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
|
||||
},
|
||||
{
|
||||
"name": "standalone",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Creates a library based upon the standalone API, without NgModules."
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
@@ -836,7 +823,7 @@
|
||||
{
|
||||
"name": "functional",
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"default": false,
|
||||
"description": "Creates the resolver as a `ResolveFn`."
|
||||
},
|
||||
{
|
||||
|
||||
@@ -146,12 +146,6 @@
|
||||
"default": false,
|
||||
"description": "Do not generate \"spec.ts\" test files for the new project."
|
||||
},
|
||||
{
|
||||
"name": "standalone",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Creates an application based upon the standalone API, without NgModules."
|
||||
},
|
||||
{
|
||||
"name": "strict",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
{
|
||||
"name": "target",
|
||||
"type": "string",
|
||||
"description": "The Architect target to run provided in the following format `project:target[:configuration]`.",
|
||||
"description": "The Architect target to run provided in the the following format `project:target[:configuration]`.",
|
||||
"positional": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -31,12 +31,6 @@
|
||||
"default": false,
|
||||
"description": "Don't verify connected clients are part of allowed hosts."
|
||||
},
|
||||
{
|
||||
"name": "force-esbuild",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system."
|
||||
},
|
||||
{
|
||||
"name": "help",
|
||||
"type": "boolean",
|
||||
|
||||
@@ -20,12 +20,12 @@ For details about changes between versions, and information about updating from
|
||||
|
||||
Invoke the tool on the command line through the `ng` executable.
|
||||
Online help is available on the command line.
|
||||
Enter the following to list commands or options for a given command \(such as [new](cli/new)\) with a short description.
|
||||
Enter the following to list commands or options for a given command \(such as [generate](cli/generate)\) with a short description.
|
||||
|
||||
<code-example format="shell" language="shell">
|
||||
|
||||
ng --help
|
||||
ng new --help
|
||||
ng help
|
||||
ng generate --help
|
||||
|
||||
</code-example>
|
||||
|
||||
|
||||
@@ -23,13 +23,16 @@
|
||||
],
|
||||
"styles": [
|
||||
],
|
||||
"scripts": [],
|
||||
"polyfills": [
|
||||
"zone.js"
|
||||
]
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
@@ -39,14 +42,6 @@
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -58,12 +53,8 @@
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "addOneButton:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "addOneButton:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
@@ -83,19 +74,18 @@
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"polyfills": [
|
||||
"zone.js",
|
||||
"zone.js/testing"
|
||||
]
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-eslint/builder:lint",
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"src/**/*.ts",
|
||||
"src/**/*.html"
|
||||
"tsConfig": [
|
||||
"src/tsconfig.app.json",
|
||||
"src/tsconfig.spec.json"
|
||||
],
|
||||
"exclude": [
|
||||
"**/node_modules/**"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,15 @@
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/common": "^16.0.0",
|
||||
"@angular/compiler": "^16.0.0",
|
||||
"@angular/core": "^16.0.0",
|
||||
"@angular/platform-browser": "^16.0.0",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.3",
|
||||
"zone.js": "^0.13.0"
|
||||
"@angular/animations": "~15.2.0",
|
||||
"@angular/common": "~15.2.0",
|
||||
"@angular/compiler": "~15.2.0",
|
||||
"@angular/core": "~15.2.0",
|
||||
"@angular/platform-browser": "~15.2.0",
|
||||
"@angular/platform-browser-dynamic": "~15.2.0",
|
||||
"rxjs": "^7.5.2",
|
||||
"tslib": "^2.3.1",
|
||||
"zone.js": "^0.12.0"
|
||||
},
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
@@ -20,18 +22,12 @@
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^16.0.0",
|
||||
"@angular-eslint/builder": "16.0.3",
|
||||
"@angular-eslint/eslint-plugin": "16.0.3",
|
||||
"@angular-eslint/eslint-plugin-template": "16.0.3",
|
||||
"@angular-eslint/schematics": "16.0.3",
|
||||
"@angular-eslint/template-parser": "16.0.3",
|
||||
"@angular/cli": "^16.0.0",
|
||||
"@angular/compiler-cli": "^16.0.0",
|
||||
"@angular-devkit/build-angular": "~15.2.0",
|
||||
"@angular/cli": "~15.2.0",
|
||||
"@angular/compiler-cli": "~15.2.0",
|
||||
"@types/jasmine": "~4.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "5.59.7",
|
||||
"@typescript-eslint/parser": "5.59.7",
|
||||
"eslint": "^8.40.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~4.5.0",
|
||||
"jasmine-spec-reporter": "~7.0.0",
|
||||
"karma": "~6.4.1",
|
||||
@@ -39,6 +35,9 @@
|
||||
"karma-coverage": "~2.2.0",
|
||||
"karma-jasmine": "~5.1.0",
|
||||
"karma-jasmine-html-reporter": "^2.0.0",
|
||||
"typescript": "~5.0.0"
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~10.9.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.9.3"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// import required packages
|
||||
import 'zone.js';
|
||||
import 'zone.js/dist/zone';
|
||||
import { Component } from '@angular/core';
|
||||
import { bootstrapApplication } from '@angular/platform-browser';
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import 'zone.js/dist/zone';
|
||||
@@ -10,7 +10,7 @@
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2022",
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
|
||||
+1635
-2659
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,10 @@
|
||||
@name `inject()` must be called from an injection context
|
||||
@category runtime
|
||||
@shortDescription `inject()` must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`.
|
||||
@shortDescription `inject()` must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `EnvironmentInjector#runInContext`.
|
||||
|
||||
@description
|
||||
You see this error when you try to use the [`inject`](api/core/inject) function outside of the allowed [injection context](guide/dependency-injection-context). The injection context is available during the class creation and initialization. It is also available to functions
|
||||
used with `runInInjectionContext`.
|
||||
You see this error when you try to use the `inject()` function outside of the allowed injection context. The injection context is available during the class creation and initialization. It is also available to functions
|
||||
used with `EnvironmentInjector#runInContext`.
|
||||
|
||||
In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a field initializer:
|
||||
|
||||
@@ -23,7 +23,7 @@ export class Car {
|
||||
}
|
||||
```
|
||||
|
||||
It is also legal to call [`inject`](api/core/inject) from a provider's factory:
|
||||
It is also legal to call `inject` from a provider's factory:
|
||||
|
||||
```typescript
|
||||
providers: [
|
||||
@@ -35,7 +35,7 @@ providers: [
|
||||
]
|
||||
```
|
||||
|
||||
Calls to the [`inject`](api/core/inject) function outside of the class creation or `runInInjectionContext` will result in error. Most notably, calls to `inject()` are disallowed after a class instance was created, in methods (including lifecycle hooks):
|
||||
Calls to the `inject()` function outside of the class creation or `runInContext` will result in error. Most notably, calls to `inject()` are disallowed after a class instance was created, in methods (including lifecycle hooks):
|
||||
|
||||
```typescript
|
||||
@Component({ ... })
|
||||
@@ -52,15 +52,7 @@ export class CarComponent {
|
||||
|
||||
Work backwards from the stack trace of the error to identify a place where the disallowed call to `inject()` is located.
|
||||
|
||||
To fix the error move the [`inject`](api/core/inject) call to an allowed place (usually a class constructor or a field initializer).
|
||||
|
||||
**Note:** If you are running in a test context, `TestBed.runInInjectionContext` will enable `inject()` to succeed.
|
||||
|
||||
```typescript
|
||||
TestBed.runInInjectionContext(() => {
|
||||
// ...
|
||||
});
|
||||
```
|
||||
To fix the error move the `inject()` call to an allowed place (usually a class constructor or a field initializer).
|
||||
|
||||
<!-- links -->
|
||||
|
||||
@@ -68,4 +60,4 @@ TestBed.runInInjectionContext(() => {
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2023-04-11
|
||||
@reviewed 2022-05-27
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
@name JSONP support in HttpClient configuration
|
||||
@category runtime
|
||||
@shortDescription Missing JSONP support in HttpClient configuration
|
||||
|
||||
@description
|
||||
Angular produces this error when you attempt a `JSONP` request without providing the necessary support for it in the `HttpClient` configuration.
|
||||
To enable `JSONP` support, you can do one of the following:
|
||||
- add the `withJsonpSupport()` as an argument during the `provideHttpClient` function call (e.g. `provideHttpClient(withJsonpSupport())`) when `bootstrapApplication` is used
|
||||
- import the `HttpClientJsonpModule` in your root AppModule, when NgModule-based bootstrap is used.
|
||||
|
||||
|
||||
@debugging
|
||||
Make sure that the JSONP support is added into your application either by calling the `withJsonpSupport()` function (when the `provideHttpClient()` is used) or importing the `HttpClientJsonpModule` module as described above.
|
||||
|
||||
See [Make a JSONP request](/guide/http-make-jsonp-request) for more info.
|
||||
|
||||
<!-- links -->
|
||||
|
||||
<!-- external links -->
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2023-05-02
|
||||
@@ -1,44 +0,0 @@
|
||||
@name Hydration Node Mismatch
|
||||
@category runtime
|
||||
@shortDescription During hydration, Angular expected a DOM node, but either the actual DOM was different or was not found.
|
||||
|
||||
@description
|
||||
This error means that during the hydration process, Angular expected a DOM structure as rendered and annotated during server side rendering. However, on the client, the DOM tree was different than the server rendered DOM tree.
|
||||
|
||||
This error typically happens due to direct DOM manipulation using native browser APIs that alter the DOM structure outside of what Angular produced. It will also occur if you use `innerHTML` or `outerHTML` to set HTML content, which similarly alters the DOM structure outside of what Angular produced. You can resolve this by refactoring the component to use native Angular APIs instead of native APIs. If that's not possible, you can add the `ngSkipHydration` attribute to your component's host node, which will disable hydration for the component and its children. `ngSkipHydration` should only be used as a last resort and should be considered a bug that needs to be fixed.
|
||||
|
||||
More information about hydration can be found in [this guide](guide/hydration).
|
||||
|
||||
The following example will trigger the error.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'example-cmp',
|
||||
template: '<div><span>world</span></div>',
|
||||
})
|
||||
export class ExampleCmp {
|
||||
hostElement = inject(ElementRef).nativeElement;
|
||||
|
||||
ngOnInit() {
|
||||
// Create a new <p> element with the `Hello` text inside
|
||||
const newNode = document.createElement('p');
|
||||
newNode.innerHTML = 'Hello';
|
||||
|
||||
// Insert the <p> before the first element. Since Angular has no information
|
||||
// about the <p> element, it will be looking for the <div> element at the first
|
||||
// element position instead. As a result, a hydration mismatch error would be
|
||||
// thrown. Instead, update component's template to create the <p> element.
|
||||
this.hostElement.insertBefore(newNode, this.hostElement.firstChild);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@debugging
|
||||
The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs.
|
||||
|
||||
Check that your template has valid HTML structure. See more information in the [hydration guide](guide/hydration#valid-html-structure).
|
||||
|
||||
You can add the `ngSkipHydration` attribute to your component host node as a possible workaround.
|
||||
|
||||
If your application works in development environment, but you see hydration errors in production builds, make sure that the generated HTML that is delivered to a browser contains comment nodes produced by Angular during the rendering on the server. Those comment nodes are used by Angular runtime as anchors for view containers (with and without hydration) and hydration process expects them to be present at their original locations. If you have a custom logic to remove comment nodes from the HTML generated by the server-side rendering or you've configured your CDN to remove them before serving the content - disable the comment nodes removal and check if hydration errors are gone.
|
||||
@@ -1,9 +0,0 @@
|
||||
@name Hydration Missing Siblings
|
||||
@category runtime
|
||||
@shortDescription During hydration, Angular expected more sibling DOM nodes to be present than what was found.
|
||||
|
||||
@description
|
||||
This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected more siblings present in the DOM structure at a particular location. Please refer to the [error NG0500](errors/NG0500) page for additional information.
|
||||
|
||||
@debugging
|
||||
See the [error NG0500](errors/NG0500) for more information on how to debug this error.
|
||||
@@ -1,9 +0,0 @@
|
||||
@name Hydration Missing Node
|
||||
@category runtime
|
||||
@shortDescription During hydration, Angular expected to find a DOM node, but it did not exist.
|
||||
|
||||
@description
|
||||
This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected a node to be present in the DOM structure at a particular location and none was found. Please refer to the [error NG0500](errors/NG0500) page for additional information.
|
||||
|
||||
@debugging
|
||||
See the [error NG0500](errors/NG0500) for more information on how to debug this error.
|
||||
@@ -1,49 +0,0 @@
|
||||
@name Hydration Unsupported Projection of DOM Nodes
|
||||
@category runtime
|
||||
@shortDescription During serialization, Angular detected DOM nodes that were created outside of Angular's context and used for content projection.
|
||||
|
||||
@description
|
||||
This error means that during the server side serialization process, Angular encountered nodes that were created outside of Angular's context (i.e. using native DOM APIs) and found those nodes were provided as projectible nodes. They were likely provided using `ViewContainerRef.createComponent` or `createComponent` APIs. Angular hydration does not support this use case.
|
||||
|
||||
More information about hydration can be found in [this guide](guide/hydration).
|
||||
|
||||
The following examples will trigger the error.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'dynamic',
|
||||
template: `
|
||||
<ng-content />
|
||||
`,
|
||||
})
|
||||
class DynamicComponent {
|
||||
}
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app',
|
||||
template: `<div #target></div>`,
|
||||
})
|
||||
class SimpleComponent {
|
||||
@ViewChild('target', {read: ViewContainerRef}) vcr!: ViewContainerRef;
|
||||
envInjector = inject(EnvironmentInjector);
|
||||
|
||||
ngAfterViewInit() {
|
||||
const div = document.createElement('div');
|
||||
const p = document.createElement('p');
|
||||
// In this test we create DOM nodes outside of Angular context
|
||||
// (i.e. not using Angular APIs) and try to content-project them.
|
||||
// This is an unsupported pattern and an exception will be thrown.
|
||||
const compRef = createComponent(DynamicComponent, {
|
||||
environmentInjector: this.envInjector,
|
||||
projectableNodes: [[div, p]]
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@debugging
|
||||
The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs.
|
||||
|
||||
You can add the `ngSkipHydration` attribute to your component host node as a possible workaround.
|
||||
@@ -1,55 +0,0 @@
|
||||
@name Skip hydration flag is applied to an invalid node
|
||||
@category runtime
|
||||
@shortDescription The ngSkipHydration attribute was added to an element that is not a component host.
|
||||
|
||||
@description
|
||||
This error occurs when the `ngSkipHydration` attribute was added to an inappropriate DOM node. The `ngSkipHydration` attribute can only be applied to component host nodes either directly in the template or via a host binding. It cannot be applied to other DOM nodes and will have no effect if done so other than causing this error.
|
||||
|
||||
More information about hydration can be found in [this guide](guide/hydration).
|
||||
|
||||
The following examples will trigger the error.
|
||||
|
||||
**Example 1**
|
||||
|
||||
In this example, the `ngSkipHydration` attribute is applied to a `<div>` using host bindings of a directive. Since the `<div>` doesn't act as a component host node, Angular will throw an error.
|
||||
|
||||
```typescript
|
||||
@Directive({
|
||||
standalone: true,
|
||||
selector: '[dir]',
|
||||
host: {ngSkipHydration: 'true'},
|
||||
})
|
||||
class Dir {
|
||||
}
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app',
|
||||
imports: [Dir],
|
||||
template: `
|
||||
<div dir></div>
|
||||
`,
|
||||
})
|
||||
class SimpleComponent {
|
||||
}
|
||||
```
|
||||
|
||||
**Example 2**
|
||||
|
||||
In this example, the `ngSkipHydration` is applied to a `<div>` as an attribute via a template.
|
||||
Since the `<div>` doesn't act as a component host node, Angular will throw an error.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app',
|
||||
template: `
|
||||
<div ngSkipHydration></div>
|
||||
`,
|
||||
})
|
||||
class SimpleComponent {
|
||||
}
|
||||
```
|
||||
|
||||
@debugging
|
||||
Remove the `ngSkipHydration` attribute from any invalid DOM nodes. Alternatively, move the `ngSkipHydration` attribute to the component host node either in a template or via a host binding.
|
||||
@@ -1,26 +0,0 @@
|
||||
@name No hydration info in server response
|
||||
@category runtime
|
||||
@shortDescription No hydration info is present in server response.
|
||||
|
||||
@description
|
||||
This error occurs when hydration is enabled on the client, but the server response
|
||||
doesn't contain special serialized information about the application that hydration
|
||||
logic relies on.
|
||||
|
||||
This can happen when the `provideClientHydration()` function is included in the client
|
||||
part of the application configuration, but is missing in the server part of the configuration.
|
||||
|
||||
In applications with the default project structure (generated by the `ng new`),
|
||||
the `provideClientHydration()` call is added either into the `providers` array of
|
||||
the main `AppModule` (which is imported into the server module) or into a set of
|
||||
providers that are included into both client and server configurations.
|
||||
|
||||
If you have a custom setup where client and server configuration are independent
|
||||
and do not share common set of providers, make sure that the `provideClientHydration()`
|
||||
is also included into the set of providers used to bootstrap an application on the server.
|
||||
|
||||
More information about hydration can be found in [this guide](guide/hydration).
|
||||
|
||||
@debugging
|
||||
Verify that the `provideClientHydration()` call is included into a set of providers
|
||||
that is used to bootstrap an application on the server.
|
||||
@@ -1,53 +0,0 @@
|
||||
@name NgZone remains unstable
|
||||
@category runtime
|
||||
@shortDescription NgZone remains unstable after a long period of time
|
||||
|
||||
@description
|
||||
This warning occurs when hydration is enabled on the client but the NgZone remains unstable for a long period of time.
|
||||
|
||||
The {@link ApplicationRef#isStable} API uses NgZone to report when an application becomes `stable` and `unstable`. An application is considered stable when there are no pending microtasks or macrotasks.
|
||||
|
||||
Angular Hydration relies on a signal from Zone.js when it becomes stable inside an application:
|
||||
|
||||
* during the server-side rendering (SSR) to start the serialization process
|
||||
* in a browser this signal is used to start the post-hydration cleanup to remove DOM nodes that remained unclaimed
|
||||
|
||||
This warning is displayed when the `ApplicationRef.isStable()` doesn't emit `true` within 10 seconds. If this is intentional and your application becomes stable later, you can ignore this warning.
|
||||
|
||||
**Macrotasks**
|
||||
|
||||
Macrotasks include functions like `setInterval`, `setTimeout`, `requestAnimationFrame` etc.
|
||||
If one of these functions is called in the initialization phase of the app or the bootstrapped components, the application will remain unstable.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
standalone: true,
|
||||
selector: 'app',
|
||||
template: ``,
|
||||
})
|
||||
class SimpleComponent {
|
||||
constructor() {
|
||||
setInterval(() => { ... }, 1000)
|
||||
|
||||
// or
|
||||
|
||||
setTimeout(() => { ... }, 10_000)
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
If these functions need to be called in the initialization phase, invoking them outside the angular zone solves the issue.
|
||||
|
||||
```typescript
|
||||
class SimpleComponent {
|
||||
constructor() {
|
||||
inject(NgZone).runOutsideAngular(() => {
|
||||
setInterval(() => {}, 1000);
|
||||
})
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
@debugging
|
||||
|
||||
Verify that you don't have any long standing microtask or macrotasks.
|
||||
@@ -1,33 +0,0 @@
|
||||
@name Root element was not found.
|
||||
@category runtime
|
||||
@shortDescription Root element was not found during bootstrap.
|
||||
|
||||
@description
|
||||
Boostraped components are defined in the `bootstrap` property of an `@NgModule` decorator or as the first parameter of `boopstrapApplication` for standalone components.
|
||||
|
||||
This error happens when Angular tries to boostrap one of these components but cannot find its corresponing node in the DOM.
|
||||
|
||||
@debugging
|
||||
|
||||
This issue occurs when the selector mismatches the tag
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
selector: 'my-app',
|
||||
...
|
||||
})
|
||||
class AppComponent {}
|
||||
```
|
||||
|
||||
```html
|
||||
<html>
|
||||
<app-root></app-root> <!-- Doesn't match the selector -->
|
||||
</html>
|
||||
```
|
||||
Replace the tag with the correct one:
|
||||
|
||||
```html
|
||||
<html>
|
||||
<my-app></my-app> <!-- OK -->
|
||||
</html>
|
||||
```
|
||||
@@ -1,65 +0,0 @@
|
||||
@name Component ID generation collision
|
||||
@category runtime
|
||||
@shortDescription Component ID generation collision detected
|
||||
|
||||
@description
|
||||
When creating components, Angular generates a unique component ID for each component. This is generated using the Angular component metadata, including but not limited: selectors, the number of host bindings, class property names, view and content queries. When two components metadata are identical (often times sharing the same selector), an ID generation collision will occur.
|
||||
|
||||
Component IDs are used in Angular internally:
|
||||
- for extra annotations of DOM nodes for style encapsulation
|
||||
- during [hydration](guide/hydration) to restore an application state after [server-side rendering](guide/universal).
|
||||
|
||||
To avoid issues that might be caused by the component ID collision, it's recommended to resolve them as described below.
|
||||
|
||||
** Example of a Component ID collision **
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
selector: 'my-component',
|
||||
template: 'complex-template',
|
||||
})
|
||||
class SomeComponent {}
|
||||
|
||||
@Component({
|
||||
selector: 'my-component',
|
||||
template: 'empty-template',
|
||||
})
|
||||
class SomeMockedComponent {}
|
||||
```
|
||||
Having these two components defined will trigger an ID generation collision and during development a warning will be displayed.
|
||||
|
||||
@debugging
|
||||
|
||||
The warning message includes the class name of the two components whose IDs are colliding.
|
||||
|
||||
The problem can be resolved using one of the solutions below:
|
||||
|
||||
1. Change the selector of one of the two components. For example by using a pseudo-selector with no effect like `:not()` and a different tag name.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
selector: 'my-component:not(p)',
|
||||
template: 'empty-template',
|
||||
})
|
||||
class SomeMockedComponent {}
|
||||
```
|
||||
|
||||
2. Add an extra host attribute to one of the components.
|
||||
|
||||
```typescript
|
||||
@Component({
|
||||
selector: 'my-component',
|
||||
template: 'complex-template',
|
||||
host: {'some-binding': 'some-value'},
|
||||
})
|
||||
class SomeComponent {}
|
||||
```
|
||||
|
||||
|
||||
<!-- links -->
|
||||
|
||||
<!-- external links -->
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2023-04-25
|
||||
@@ -1,14 +0,0 @@
|
||||
@name Hydration with unsupported Zone.js instance.
|
||||
@category runtime
|
||||
@shortDescription Hydration was enabled with unsupported Zone.js instance.
|
||||
|
||||
@description
|
||||
This warning means that the hydration was enabled for an application that was configured to use an unsupported version of Zone.js: either a custom or a "noop" one (see more info [here](api/core/BootstrapOptions#ngZone)).
|
||||
|
||||
Hydration relies on a signal from Zone.js when it becomes stable inside an application, so that Angular can start the serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).
|
||||
|
||||
Providing a custom or a "noop" Zone.js implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.
|
||||
|
||||
If you use a custom Zone.js implementation, make sure that the "onStable" event is emitted at the right time and does not result in incorrect application behavior with hydration.
|
||||
|
||||
More information about hydration can be found in the [hydration guide](guide/hydration).
|
||||
@@ -1,16 +1,23 @@
|
||||
{
|
||||
"root": true,
|
||||
"ignorePatterns": ["*.js", "styleguide/**/*.avoid.ts"],
|
||||
"ignorePatterns": [
|
||||
"*.js",
|
||||
"styleguide/**/*.avoid.ts"
|
||||
],
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.html"],
|
||||
"extends": ["plugin:@angular-eslint/template/recommended"],
|
||||
"files": [
|
||||
"*.html"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/template/recommended"
|
||||
],
|
||||
"rules": {
|
||||
"@angular-eslint/template/alt-text": "error",
|
||||
"@angular-eslint/template/elements-content": "error",
|
||||
"@angular-eslint/template/label-has-associated-control": "error",
|
||||
"@angular-eslint/template/table-scope": "error",
|
||||
"@angular-eslint/template/valid-aria": "error",
|
||||
"@angular-eslint/template/accessibility-alt-text": "error",
|
||||
"@angular-eslint/template/accessibility-elements-content": "error",
|
||||
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
|
||||
"@angular-eslint/template/accessibility-table-scope": "error",
|
||||
"@angular-eslint/template/accessibility-valid-aria": "error",
|
||||
"@angular-eslint/template/click-events-have-key-events": "error",
|
||||
"@angular-eslint/template/eqeqeq": "off",
|
||||
"@angular-eslint/template/mouse-events-have-key-events": "error",
|
||||
@@ -20,135 +27,19 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"files": ["*.ts"],
|
||||
"files": [
|
||||
"*.ts"
|
||||
],
|
||||
"extends": [
|
||||
"plugin:@angular-eslint/ng-cli-compat",
|
||||
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
|
||||
"plugin:@angular-eslint/template/process-inline-templates"
|
||||
],
|
||||
"parserOptions": {
|
||||
"createDefaultProgram": false,
|
||||
"project": "content/examples/tsconfig.eslint.json"
|
||||
},
|
||||
"plugins": [
|
||||
"@typescript-eslint",
|
||||
"@angular-eslint", "eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow"],
|
||||
"rules": {
|
||||
"@typescript-eslint/interface-name-prefix": "off",
|
||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||
"sort-keys": "off",
|
||||
"@angular-eslint/component-class-suffix": "error",
|
||||
|
||||
"@angular-eslint/contextual-lifecycle": "error",
|
||||
"@angular-eslint/directive-class-suffix": "error",
|
||||
|
||||
"@angular-eslint/no-conflicting-lifecycle": "error",
|
||||
"@angular-eslint/no-host-metadata-property": "error",
|
||||
"@angular-eslint/no-input-rename": "error",
|
||||
"@angular-eslint/no-inputs-metadata-property": "error",
|
||||
"@angular-eslint/no-output-native": "error",
|
||||
"@angular-eslint/no-output-on-prefix": "error",
|
||||
"@angular-eslint/no-output-rename": "error",
|
||||
"@angular-eslint/no-outputs-metadata-property": "error",
|
||||
"@angular-eslint/use-lifecycle-interface": "error",
|
||||
"@angular-eslint/use-pipe-transform-interface": "error",
|
||||
"@typescript-eslint/adjacent-overload-signatures": "error",
|
||||
"@typescript-eslint/array-type": "off",
|
||||
|
||||
"@typescript-eslint/consistent-type-assertions": "error",
|
||||
"@typescript-eslint/no-empty-function": "off",
|
||||
"@typescript-eslint/no-empty-interface": "error",
|
||||
"@typescript-eslint/no-explicit-any": "off",
|
||||
"@typescript-eslint/no-inferrable-types": [
|
||||
"error",
|
||||
{
|
||||
"ignoreParameters": true
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/no-misused-new": "error",
|
||||
"@typescript-eslint/no-namespace": "error",
|
||||
"@typescript-eslint/no-parameter-properties": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"@typescript-eslint/no-var-requires": "off",
|
||||
"@typescript-eslint/prefer-for-of": "error",
|
||||
"@typescript-eslint/prefer-function-type": "error",
|
||||
"@typescript-eslint/prefer-namespace-keyword": "error",
|
||||
"@typescript-eslint/triple-slash-reference": [
|
||||
"error",
|
||||
{
|
||||
"path": "always",
|
||||
"types": "prefer-import",
|
||||
"lib": "always"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/unified-signatures": "error",
|
||||
"complexity": "off",
|
||||
"constructor-super": "error",
|
||||
"eqeqeq": ["error", "smart"],
|
||||
"guard-for-in": "error",
|
||||
"id-blacklist": [
|
||||
"error",
|
||||
"any",
|
||||
"Number",
|
||||
"number",
|
||||
"String",
|
||||
"string",
|
||||
"Boolean",
|
||||
"boolean",
|
||||
"Undefined",
|
||||
"undefined"
|
||||
],
|
||||
"id-match": "error",
|
||||
"import/no-deprecated": "warn",
|
||||
"jsdoc/no-types": "error",
|
||||
"max-classes-per-file": "off",
|
||||
"no-bitwise": "error",
|
||||
"no-caller": "error",
|
||||
"no-cond-assign": "error",
|
||||
|
||||
"no-debugger": "error",
|
||||
"no-empty": "off",
|
||||
"no-eval": "error",
|
||||
"no-fallthrough": "error",
|
||||
"no-invalid-this": "off",
|
||||
"no-new-wrappers": "error",
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
"name": "rxjs/Rx",
|
||||
"message": "Please import directly from 'rxjs' instead"
|
||||
}
|
||||
],
|
||||
"no-throw-literal": "error",
|
||||
"no-undef-init": "error",
|
||||
"no-unsafe-finally": "error",
|
||||
"no-unused-labels": "error",
|
||||
"no-var": "error",
|
||||
"object-shorthand": "error",
|
||||
"one-var": ["error", "never"],
|
||||
"prefer-const": "error",
|
||||
"radix": "error",
|
||||
"use-isnan": "error",
|
||||
"valid-typeof": "off",
|
||||
"arrow-body-style": "error",
|
||||
"arrow-parens": "off",
|
||||
"comma-dangle": "off",
|
||||
"curly": "error",
|
||||
"eol-last": "error",
|
||||
"jsdoc/check-alignment": "error",
|
||||
"new-parens": "error",
|
||||
"no-multiple-empty-lines": "off",
|
||||
"no-trailing-spaces": "error",
|
||||
"quote-props": ["error", "as-needed"],
|
||||
"space-before-function-paren": [
|
||||
"error",
|
||||
{
|
||||
"anonymous": "never",
|
||||
"asyncArrow": "always",
|
||||
"named": "never"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/semi": ["error", "always"],
|
||||
"@typescript-eslint/type-annotation-spacing": "error",
|
||||
|
||||
"@typescript-eslint/ban-types": "error",
|
||||
"@angular-eslint/component-selector": [
|
||||
"error",
|
||||
@@ -170,15 +61,12 @@
|
||||
"@typescript-eslint/dot-notation": ["error", {"allowIndexSignaturePropertyAccess": true}],
|
||||
"indent": "off",
|
||||
"max-len": ["error", {"code": 120, "ignoreUrls": true}],
|
||||
"@typescript-eslint/member-delimiter-style": [
|
||||
"error",
|
||||
{
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false
|
||||
}
|
||||
"@typescript-eslint/member-delimiter-style": ["error", {
|
||||
"singleline": {
|
||||
"delimiter": "comma",
|
||||
"requireLast": false
|
||||
}
|
||||
],
|
||||
}],
|
||||
"@typescript-eslint/member-ordering": "off",
|
||||
"@typescript-eslint/naming-convention": "off",
|
||||
"no-console": ["error", {"allow": ["log", "warn", "error"]}],
|
||||
@@ -200,11 +88,7 @@
|
||||
"no-use-before-define": "off",
|
||||
"prefer-arrow/prefer-arrow-functions": "off",
|
||||
"quotes": "off",
|
||||
"@typescript-eslint/quotes": [
|
||||
"error",
|
||||
"single",
|
||||
{"avoidEscape": true, "allowTemplateLiterals": true}
|
||||
],
|
||||
"@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true, "allowTemplateLiterals": true }],
|
||||
"semi": "error"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Accessibility Example</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// #docplaster ...
|
||||
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
// #docregion angular-compiler-options-app
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// #docplaster ...
|
||||
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
// #docregion angular-compiler-options
|
||||
{
|
||||
"compileOnSave": false,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- #docregion -->
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<base href="/">
|
||||
<title>Angular binding syntax example</title>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>NgmoduleDemo</title>
|
||||
|
||||
@@ -150,14 +150,14 @@
|
||||
|
||||
|
||||
<h4 id="ngFor-index">*ngFor with index</h4>
|
||||
<p>with <em>semi-colon</em> separator</p>
|
||||
<p>with <i>semi-colon</i> separator</p>
|
||||
<div class="box">
|
||||
<!-- #docregion NgFor-3 -->
|
||||
<div *ngFor="let item of items; let i=index">{{i + 1}} - {{item.name}}</div>
|
||||
<!-- #enddocregion NgFor-3 -->
|
||||
</div>
|
||||
|
||||
<p>with <em>comma</em> separator</p>
|
||||
<p>with <i>comma</i> separator</p>
|
||||
<div class="box">
|
||||
<div *ngFor="let item of items, let i=index">{{i + 1}} - {{item.name}}</div>
|
||||
</div>
|
||||
@@ -167,7 +167,7 @@
|
||||
<button type="button" (click)="changeIds()">Change ids</button>
|
||||
<button type="button" (click)="clearTrackByCounts()">Clear counts</button>
|
||||
|
||||
<p><em>without</em> trackBy</p>
|
||||
<p><i>without</i> trackBy</p>
|
||||
<div class="box">
|
||||
<div #noTrackBy *ngFor="let item of items">({{item.id}}) {{item.name}}</div>
|
||||
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
<br><br><br>
|
||||
|
||||
<p>with trackBy and <em>semi-colon</em> separator</p>
|
||||
<p>with trackBy and <i>semi-colon</i> separator</p>
|
||||
<div class="box">
|
||||
<!-- #docregion trackBy -->
|
||||
<div *ngFor="let item of items; trackBy: trackByItems">
|
||||
@@ -196,17 +196,17 @@
|
||||
<!-- #enddocregion trackBy -->
|
||||
</div>
|
||||
|
||||
<p>with trackBy and <em>comma</em> separator</p>
|
||||
<p>with trackBy and <i>comma</i> separator</p>
|
||||
<div class="box">
|
||||
<div *ngFor="let item of items, trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
|
||||
</div>
|
||||
|
||||
<p>with trackBy and <em>space</em> separator</p>
|
||||
<p>with trackBy and <i>space</i> separator</p>
|
||||
<div class="box">
|
||||
<div *ngFor="let item of items trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
|
||||
</div>
|
||||
|
||||
<p>with <em>generic</em> trackById function</p>
|
||||
<p>with <i>generic</i> trackById function</p>
|
||||
<div class="box">
|
||||
<div *ngFor="let item of items, trackBy: trackById">({{item.id}}) {{item.name}}</div>
|
||||
</div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Built-in Template Functions Example</title>
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
<a href="#parent-to-child">Pass data from parent to child with input binding ("Heroes")</a><br/>
|
||||
<a href="#parent-to-child-setter">Intercept input property changes with a setter ("Master")</a><br/>
|
||||
<a href="#parent-to-child-on-changes">Intercept input property changes with <em>ngOnChanges</em> ("Source code version")</a><br/>
|
||||
<a href="#parent-to-child-on-changes">Intercept input property changes with <i>ngOnChanges</i> ("Source code version")</a><br/>
|
||||
<a href="#child-to-parent">Parent listens for child event ("Colonize Universe")</a><br/>
|
||||
<a href="#parent-to-child-local-var">Parent to child via <em>local variable</em>("Countdown to Liftoff")</a><br/>
|
||||
<a href="#parent-to-view-child">Parent calls <em>ViewChild</em>("Countdown to Liftoff")</a><br/>
|
||||
<a href="#parent-to-child-local-var">Parent to child via <i>local variable</i>("Countdown to Liftoff")</a><br/>
|
||||
<a href="#parent-to-view-child">Parent calls <i>ViewChild</i>("Countdown to Liftoff")</a><br/>
|
||||
<a href="#bidirectional-service">Parent and children communicate via a service ("Mission Control")</a><br/>
|
||||
|
||||
<div id="parent-to-child">
|
||||
|
||||
@@ -6,22 +6,24 @@ import { Component, OnDestroy } from '@angular/core';
|
||||
template: '<p>{{message}}</p>'
|
||||
})
|
||||
export class CountdownTimerComponent implements OnDestroy {
|
||||
|
||||
intervalId = 0;
|
||||
message = '';
|
||||
seconds = 11;
|
||||
|
||||
ngOnDestroy() { this.clearTimer?.(); }
|
||||
ngOnDestroy() { this.clearTimer(); }
|
||||
|
||||
start() { this.countDown(); }
|
||||
stop() {
|
||||
this.clearTimer?.();
|
||||
this.clearTimer();
|
||||
this.message = `Holding at T-${this.seconds} seconds`;
|
||||
}
|
||||
|
||||
private clearTimer: VoidFunction | undefined;
|
||||
private clearTimer() { clearInterval(this.intervalId); }
|
||||
|
||||
private countDown() {
|
||||
this.clearTimer?.();
|
||||
const interval = setInterval(() => {
|
||||
this.clearTimer();
|
||||
this.intervalId = window.setInterval(() => {
|
||||
this.seconds -= 1;
|
||||
if (this.seconds === 0) {
|
||||
this.message = 'Blast off!';
|
||||
@@ -30,6 +32,5 @@ export class CountdownTimerComponent implements OnDestroy {
|
||||
this.message = `T-${this.seconds} seconds and counting`;
|
||||
}
|
||||
}, 1000);
|
||||
this.clearTimer = () => clearInterval(interval);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,13 +18,16 @@ import { BROWSER_STORAGE, BrowserStorageService } from './storage.service';
|
||||
{ provide: BROWSER_STORAGE, useFactory: () => sessionStorage }
|
||||
]
|
||||
})
|
||||
export class StorageComponent {
|
||||
export class StorageComponent implements OnInit {
|
||||
|
||||
constructor(
|
||||
@Self() private sessionStorageService: BrowserStorageService,
|
||||
@SkipSelf() private localStorageService: BrowserStorageService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
setSession() {
|
||||
this.sessionStorageService.set('hero', 'Dr Nice - Session');
|
||||
}
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
// #docregion
|
||||
import { EnvironmentInjector, inject, Injectable, runInInjectionContext } from '@angular/core';
|
||||
|
||||
@Injectable({providedIn:
|
||||
'root'
|
||||
})
|
||||
export class SomeService {}
|
||||
|
||||
// #docregion run-in-context
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class HeroService {
|
||||
private environmentInjector = inject(EnvironmentInjector);
|
||||
|
||||
someMethod() {
|
||||
runInInjectionContext(this.environmentInjector, () => {
|
||||
inject(SomeService); // Do what you need with the injected service
|
||||
});
|
||||
}
|
||||
}
|
||||
// #enddocregion run-in-context
|
||||
@@ -1,5 +1,6 @@
|
||||
// #docplaster
|
||||
import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core';
|
||||
import { Component, ContentChild, Injector, Input, OnInit, StaticProvider, TemplateRef } from '@angular/core';
|
||||
import { ReflectiveInjector } from '@angular/core';
|
||||
import {
|
||||
FormControl,
|
||||
} from '@angular/forms';
|
||||
@@ -44,3 +45,16 @@ export class AppComponent implements OnInit {
|
||||
// #enddocregion reactive-form-example
|
||||
}
|
||||
}
|
||||
|
||||
class InjectorExample {}
|
||||
|
||||
const Provider = [InjectorExample];
|
||||
const providers: StaticProvider[] = [Provider];
|
||||
|
||||
// #docregion reflective-injector-deprecated-example
|
||||
ReflectiveInjector.resolveAndCreate(providers);
|
||||
// #enddocregion reflective-injector-deprecated-example
|
||||
|
||||
// #docregion static-injector-example
|
||||
Injector.create({providers});
|
||||
// #enddocregion static-injector-example
|
||||
|
||||
@@ -23,8 +23,7 @@ export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
currentAdIndex = -1;
|
||||
|
||||
@ViewChild(AdDirective, {static: true}) adHost!: AdDirective;
|
||||
|
||||
private clearTimer: VoidFunction | undefined;
|
||||
interval: number|undefined;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.loadComponent();
|
||||
@@ -32,7 +31,7 @@ export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.clearTimer?.();
|
||||
clearInterval(this.interval);
|
||||
}
|
||||
|
||||
loadComponent() {
|
||||
@@ -47,10 +46,9 @@ export class AdBannerComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
getAds() {
|
||||
const interval = setInterval(() => {
|
||||
this.interval = setInterval(() => {
|
||||
this.loadComponent();
|
||||
}, 3000);
|
||||
this.clearTimer = () => clearInterval(interval);
|
||||
}
|
||||
}
|
||||
// #enddocregion class
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
|
||||
import { ApplicationRef, createComponent, EnvironmentInjector, Injectable } from '@angular/core';
|
||||
import { ApplicationRef, ComponentFactoryResolver, Injectable, Injector } from '@angular/core';
|
||||
import { NgElement, WithProperties } from '@angular/elements';
|
||||
import { PopupComponent } from './popup.component';
|
||||
|
||||
|
||||
@Injectable()
|
||||
export class PopupService {
|
||||
constructor(private injector: EnvironmentInjector,
|
||||
private applicationRef: ApplicationRef) {}
|
||||
constructor(private injector: Injector,
|
||||
private applicationRef: ApplicationRef,
|
||||
private componentFactoryResolver: ComponentFactoryResolver) {}
|
||||
|
||||
// Previous dynamic-loading method required you to set up infrastructure
|
||||
// before adding the popup to the DOM.
|
||||
@@ -16,7 +17,8 @@ export class PopupService {
|
||||
const popup = document.createElement('popup-component');
|
||||
|
||||
// Create the component and wire it up with the element
|
||||
const popupComponentRef = createComponent(PopupComponent, {environmentInjector: this.injector, hostElement: popup});
|
||||
const factory = this.componentFactoryResolver.resolveComponentFactory(PopupComponent);
|
||||
const popupComponentRef = factory.create(this.injector, [], popup);
|
||||
|
||||
// Attach to the view so that the change detector knows to run
|
||||
this.applicationRef.attachView(popupComponentRef.hostView);
|
||||
|
||||
@@ -43,7 +43,6 @@ EXAMPLES = {
|
||||
"elements": {"stackblitz": True, "zip": True},
|
||||
"event-binding": {"stackblitz": True, "zip": True},
|
||||
"feature-modules": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-00": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-01": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-02": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-03": {"stackblitz": True, "zip": True},
|
||||
@@ -57,7 +56,6 @@ EXAMPLES = {
|
||||
"first-app-lesson-11": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-12": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-13": {"stackblitz": True, "zip": True},
|
||||
"first-app-lesson-14": {"stackblitz": True, "zip": True},
|
||||
"form-validation": {"stackblitz": True, "zip": True},
|
||||
"forms": {"stackblitz": True, "zip": True},
|
||||
"forms-overview": {"stackblitz": True, "zip": True},
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Feature Modules</title>
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
load("//aio/content/examples:examples.bzl", "docs_example")
|
||||
load("@aio_npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK")
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
docs_example(
|
||||
name = "first-app-lesson-00",
|
||||
# This example downloads fonts and images from googleapis.com
|
||||
test_exec_properties = ENABLE_NETWORK,
|
||||
test_tags = ["requires-network"],
|
||||
)
|
||||
@@ -1,18 +0,0 @@
|
||||
import { browser, element, by, logging } from 'protractor';
|
||||
|
||||
describe('first-app-lesson-00 app', () => {
|
||||
|
||||
beforeEach(() => browser.get(''));
|
||||
|
||||
it('should display correct title', async () => {
|
||||
expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Default');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
"useCommonBoilerplate": false,
|
||||
"overrideBoilerplate": [
|
||||
"src/styles.css"
|
||||
]
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
:host {
|
||||
--content-padding: 10px;
|
||||
}
|
||||
header {
|
||||
display: block;
|
||||
height: 60px;
|
||||
padding: var(--content-padding);
|
||||
box-shadow: 0px 5px 25px var(--shadow-color);
|
||||
}
|
||||
.content {
|
||||
padding: var(--content-padding);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
template: `<h1>Default</h1>`,
|
||||
styleUrls: ['./app.component.css'],
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'default';
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="20pt" height="20pt" version="1.1" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="m50 11.602c-15.398 0-27.898 12.5-27.898 27.898 0 5 1.3008 9.6992 3.6016 13.801l2.8984 4.1992 21.398 30.898 21.801-31.398 2.1992-3.1992c2.5-4.1992 3.8984-9 3.8984-14.199 0-15.5-12.5-28-27.898-28zm0 35.598c-4.1992 0-7.6992-3.3984-7.6992-7.6992s3.3984-7.6992 7.6992-7.6992 7.6992 3.3984 7.6992 7.6992-3.5 7.6992-7.6992 7.6992z" fill="#605cc8"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 502 B |
@@ -1,7 +0,0 @@
|
||||
<svg width="151" height="44" viewBox="0 0 151 44" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.15532 33.2946C5.25369 33.2946 4.58006 32.5707 4.58006 31.6701V24.0152C4.58006 19.5469 4.35206 20.6276 7.59585 17.4236C21.7317 4.06732 16.2425 4.24744 29.6149 18.054C32.0434 20.7627 31.9985 19.4534 31.9985 23.8316V31.6667C31.9985 32.5707 31.28 33.2912 30.3749 33.2912H6.15532V33.2946Z" fill="#605DC8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M30.896 35.1547L5.73676 35.2586C4.80059 35.2621 3.75042 35.8232 3.37388 36.5229L2.90061 37.4027L0.537726 41.7878L0.140457 42.529C-0.236085 43.2253 0.164639 43.7829 1.10081 43.7795L26.26 43.6756C27.1962 43.6721 28.2464 43.111 28.6229 42.4113L29.0962 41.5315L31.4591 37.1463L31.8563 36.4051C32.2329 35.7089 31.8321 35.1512 30.896 35.1547Z" fill="#605DC8"/>
|
||||
<path d="M2.54861 18.7156C2.23079 18.7156 1.90952 18.629 1.6228 18.4454C0.821352 17.9363 0.5899 16.859 1.09771 16.0554C1.46389 15.4701 2.70061 14.2231 5.50912 11.4659L6.39693 10.5931C8.73218 8.38318 10.5147 6.56817 11.9449 5.10646C15.1679 1.81587 16.7985 0.153263 18.9023 0.222538C20.9888 0.277958 22.4362 1.92325 25.3138 5.19651C26.7267 6.8037 28.4816 8.8023 30.8514 11.2477C30.8652 11.265 30.8825 11.2789 30.8963 11.2962C31.228 11.6634 31.715 12.2003 32.2401 12.7752C33.9743 14.6734 34.8206 15.6086 35.0763 15.9688C35.629 16.7413 35.4494 17.8185 34.679 18.3727C33.9087 18.9234 32.8343 18.7468 32.2816 17.9744C32.0639 17.6869 30.5889 16.0693 29.708 15.1064C29.1863 14.5348 28.6993 14.0014 28.3642 13.6308C25.9495 11.1369 24.1704 9.11057 22.7368 7.4826C21.0233 5.5325 19.4032 3.68977 18.809 3.67245H18.8021C18.1699 3.67245 16.3356 5.54289 14.3976 7.52417C12.9467 9.00666 11.14 10.8494 8.78054 13.0766L7.91001 13.9321C6.74929 15.0717 4.33804 17.4375 3.97877 17.9293C3.65405 18.4454 3.10824 18.7225 2.54515 18.7225L2.54861 18.7156Z" fill="#605DC8"/>
|
||||
<path fill-rule="evenodd" clip-rule="evenodd" d="M22.0976 33.2115V26.0588C22.0976 25.4665 21.6174 24.985 21.0267 24.985H15.1955C14.6047 24.985 14.1246 25.4665 14.1246 26.0588V33.2115C14.1246 33.2704 14.1142 33.3293 14.0969 33.3847H22.1252C22.1079 33.3293 22.0976 33.2739 22.0976 33.2115Z" fill="white"/>
|
||||
<path d="M58.9784 10.0512V32.2205H54.5319V22.7874H45.0353V32.2205H40.5887V10.0512H45.0353V19.1666H54.5319V10.0512H58.9784ZM70.8506 32.5063C69.1567 32.5063 67.6322 32.1358 66.277 31.3947C64.9219 30.6324 63.8526 29.5631 63.0692 28.1868C62.3069 26.8105 61.9258 25.2224 61.9258 23.4226C61.9258 21.6228 62.3175 20.0348 63.1009 18.6585C63.9055 17.2821 64.996 16.2234 66.3723 15.4823C67.7486 14.7201 69.2838 14.3389 70.9777 14.3389C72.6716 14.3389 74.2067 14.7201 75.5831 15.4823C76.9594 16.2234 78.0393 17.2821 78.8227 18.6585C79.6273 20.0348 80.0296 21.6228 80.0296 23.4226C80.0296 25.2224 79.6167 26.8105 78.7909 28.1868C77.9863 29.5631 76.8853 30.6324 75.4878 31.3947C74.1115 32.1358 72.5657 32.5063 70.8506 32.5063ZM70.8506 28.6315C71.6553 28.6315 72.4069 28.4409 73.1057 28.0597C73.8256 27.6574 74.3973 27.0646 74.8208 26.2811C75.2443 25.4977 75.456 24.5449 75.456 23.4226C75.456 21.7499 75.0114 20.4688 74.122 19.5795C73.2539 18.669 72.1846 18.2138 70.9142 18.2138C69.6437 18.2138 68.5744 18.669 67.7063 19.5795C66.8593 20.4688 66.4358 21.7499 66.4358 23.4226C66.4358 25.0954 66.8487 26.387 67.6745 27.2975C68.5215 28.1868 69.5802 28.6315 70.8506 28.6315ZM104.825 14.3707C106.985 14.3707 108.721 15.0377 110.034 16.3717C111.368 17.6844 112.035 19.5266 112.035 21.8981V32.2205H107.589V22.5016C107.589 21.1252 107.239 20.0771 106.54 19.3572C105.842 18.6161 104.889 18.2456 103.682 18.2456C102.475 18.2456 101.512 18.6161 100.792 19.3572C100.093 20.0771 99.7436 21.1252 99.7436 22.5016V32.2205H95.297V22.5016C95.297 21.1252 94.9477 20.0771 94.2489 19.3572C93.5502 18.6161 92.5974 18.2456 91.3904 18.2456C90.1623 18.2456 89.1883 18.6161 88.4684 19.3572C87.7697 20.0771 87.4203 21.1252 87.4203 22.5016V32.2205H82.9737V14.6248H87.4203V16.7528C87.992 16.0117 88.7225 15.4294 89.6118 15.0059C90.5223 14.5824 91.5175 14.3707 92.5974 14.3707C93.9737 14.3707 95.2018 14.6671 96.2816 15.26C97.3615 15.8317 98.1979 16.6575 98.7908 17.7374C99.3625 16.721 100.188 15.9058 101.268 15.2918C102.369 14.6777 103.555 14.3707 104.825 14.3707ZM132.294 23.0415C132.294 23.6767 132.252 24.2484 132.167 24.7566H119.304C119.41 26.027 119.854 27.0222 120.638 27.7421C121.421 28.4621 122.385 28.822 123.528 28.822C125.18 28.822 126.355 28.1127 127.053 26.694H131.849C131.341 28.3879 130.367 29.7854 128.927 30.8865C127.488 31.9664 125.72 32.5063 123.623 32.5063C121.929 32.5063 120.405 32.1358 119.05 31.3947C117.716 30.6324 116.668 29.5631 115.905 28.1868C115.164 26.8105 114.794 25.2224 114.794 23.4226C114.794 21.6017 115.164 20.003 115.905 18.6267C116.646 17.2504 117.684 16.1917 119.018 15.4506C120.352 14.7095 121.887 14.3389 123.623 14.3389C125.296 14.3389 126.789 14.6989 128.102 15.4188C129.436 16.1387 130.462 17.1657 131.182 18.4996C131.924 19.8124 132.294 21.3264 132.294 23.0415ZM127.689 21.771C127.668 20.6276 127.255 19.7172 126.45 19.0396C125.645 18.3408 124.661 17.9915 123.496 17.9915C122.395 17.9915 121.464 18.3303 120.701 19.0078C119.96 19.6642 119.505 20.5853 119.336 21.771H127.689ZM141.955 32.5063C140.516 32.5063 139.224 32.2522 138.081 31.744C136.937 31.2147 136.027 30.5054 135.349 29.616C134.693 28.7267 134.333 27.7421 134.269 26.6623H138.748C138.832 27.3398 139.16 27.9009 139.732 28.3456C140.325 28.7903 141.055 29.0126 141.924 29.0126C142.771 29.0126 143.427 28.8432 143.893 28.5044C144.38 28.1656 144.623 27.7316 144.623 27.2022C144.623 26.6305 144.327 26.207 143.734 25.9318C143.162 25.6353 142.241 25.3177 140.971 24.9789C139.658 24.6613 138.578 24.3331 137.731 23.9943C136.905 23.6555 136.185 23.1368 135.571 22.438C134.979 21.7393 134.682 20.797 134.682 19.6113C134.682 18.6373 134.957 17.748 135.508 16.9434C136.08 16.1387 136.884 15.5035 137.922 15.0377C138.98 14.5719 140.219 14.3389 141.638 14.3389C143.734 14.3389 145.407 14.8683 146.656 15.927C147.905 16.9645 148.593 18.3726 148.721 20.1512H144.465C144.401 19.4525 144.105 18.902 143.575 18.4996C143.067 18.0762 142.379 17.8644 141.511 17.8644C140.706 17.8644 140.081 18.0126 139.637 18.3091C139.213 18.6055 139.002 19.0184 139.002 19.5478C139.002 20.1406 139.298 20.5959 139.891 20.9135C140.484 21.2099 141.405 21.517 142.654 21.8346C143.925 22.1522 144.973 22.4804 145.798 22.8192C146.624 23.1579 147.334 23.6873 147.926 24.4072C148.541 25.106 148.858 26.0376 148.879 27.2022C148.879 28.2186 148.593 29.129 148.022 29.9337C147.471 30.7383 146.667 31.3735 145.608 31.8393C144.57 32.284 143.353 32.5063 141.955 32.5063Z" fill="#605DC8"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 6.5 KiB |
@@ -1,16 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Default</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,10 +0,0 @@
|
||||
/*
|
||||
* Protractor support is deprecated in Angular.
|
||||
* Protractor is used in this example for compatibility with Angular documentation tools.
|
||||
*/
|
||||
import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser';
|
||||
import { AppComponent } from './app/app.component';
|
||||
|
||||
bootstrapApplication(AppComponent,
|
||||
{providers: [provideProtractorTestingSupport()]})
|
||||
.catch(err => console.error(err));
|
||||
@@ -1,23 +0,0 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Be Vietnam Pro', sans-serif;
|
||||
}
|
||||
:root {
|
||||
--primary-color: #605DC8;
|
||||
--secondary-color: #8B89E6;
|
||||
--accent-color: #e8e7fa;
|
||||
--shadow-color: #E8E8E8;
|
||||
}
|
||||
|
||||
button.primary {
|
||||
padding: 10px;
|
||||
border: solid 1px var(--primary-color);
|
||||
background: var(--primary-color);
|
||||
color: white;
|
||||
border-radius: 8px;
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"description": "Angular - First App - Lesson 00",
|
||||
"files": [
|
||||
"!**/*.d.ts",
|
||||
"!**/*.js",
|
||||
"!**/*.[1,2].*"
|
||||
],
|
||||
"tags": [
|
||||
[
|
||||
"first",
|
||||
"angular",
|
||||
"app",
|
||||
"lesson",
|
||||
"00"
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -4,13 +4,9 @@ import { Component } from '@angular/core';
|
||||
selector: 'app-root',
|
||||
standalone: true,
|
||||
imports: [],
|
||||
// #docregion app-comp-template
|
||||
template: `<h1>Hello world!</h1>`,
|
||||
// #enddocregion
|
||||
styleUrls: ['./app.component.css'],
|
||||
})
|
||||
export class AppComponent {
|
||||
// #docregion app-comp-title
|
||||
title = 'homes';
|
||||
// #enddocregion
|
||||
}
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<!-- #docregion app-title -->
|
||||
<title>Homes</title>
|
||||
<!-- #enddocregion -->
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
import { Component } from '@angular/core';
|
||||
// #docregion import-home
|
||||
import { HomeComponent } from './home/home.component';
|
||||
// #enddocregion
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
standalone: true,
|
||||
// #docregion app-metadata-imports
|
||||
imports: [
|
||||
HomeComponent,
|
||||
],
|
||||
// #enddocregion
|
||||
// #docregion app-metadata-template
|
||||
template: `
|
||||
<main>
|
||||
<header class="brand-name">
|
||||
@@ -22,7 +17,6 @@ import { HomeComponent } from './home/home.component';
|
||||
</section>
|
||||
</main>
|
||||
`,
|
||||
// #enddocregion
|
||||
styleUrls: ['./app.component.css'],
|
||||
})
|
||||
export class AppComponent {
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
display: grid;
|
||||
column-gap: 14px;
|
||||
row-gap: 14px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(400px, 400px));
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin-top: 50px;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
border: solid 1px var(--primary-color);
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
@@ -28,13 +27,13 @@ button {
|
||||
.results {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 499px) {
|
||||
.results {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,6 @@ import { CommonModule } from '@angular/common';
|
||||
imports: [
|
||||
CommonModule,
|
||||
],
|
||||
// #docregion home-template
|
||||
template: `
|
||||
<section>
|
||||
<form>
|
||||
@@ -16,7 +15,6 @@ import { CommonModule } from '@angular/common';
|
||||
</form>
|
||||
</section>
|
||||
`,
|
||||
// #enddocregion
|
||||
styleUrls: ['./home.component.css'],
|
||||
})
|
||||
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
display: grid;
|
||||
column-gap: 14px;
|
||||
row-gap: 14px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(400px, 400px));
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin-top: 50px;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
border: solid 1px var(--primary-color);
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
@@ -28,13 +27,13 @@ button {
|
||||
.results {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 499px) {
|
||||
.results {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
// #docregion import-housingLocation
|
||||
import { HousingLocationComponent } from '../housing-location/housing-location.component';
|
||||
// #enddocregion
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
standalone: true,
|
||||
// #docregion add-housingLocation-to-array
|
||||
imports: [
|
||||
CommonModule,
|
||||
HousingLocationComponent
|
||||
],
|
||||
// #enddocregion
|
||||
// #docregion add-housingLocation-to-template
|
||||
template: `
|
||||
<section>
|
||||
<form>
|
||||
@@ -23,8 +19,7 @@ import { HousingLocationComponent } from '../housing-location/housing-location.c
|
||||
<section class="results">
|
||||
<app-housing-location></app-housing-location>
|
||||
</section>
|
||||
`,
|
||||
// #enddocregion
|
||||
`,
|
||||
styleUrls: ['./home.component.css'],
|
||||
})
|
||||
|
||||
|
||||
+5
-5
@@ -5,7 +5,7 @@
|
||||
}
|
||||
.listing-heading {
|
||||
color: var(--primary-color);
|
||||
padding: 10px 20px 0 20px;
|
||||
padding: 10px 10px 0 10px;
|
||||
}
|
||||
.listing-photo {
|
||||
height: 250px;
|
||||
@@ -14,18 +14,18 @@
|
||||
border-radius: 30px 30px 0 0;
|
||||
}
|
||||
.listing-location {
|
||||
padding: 10px 20px 20px 20px;
|
||||
padding: 10px 10px 20px 10px;
|
||||
}
|
||||
.listing-location::before {
|
||||
content: url("/assets/location-pin.svg") / "";
|
||||
content: url('/assets/location-pin.svg') / '';
|
||||
}
|
||||
|
||||
section.listing a {
|
||||
padding-left: 20px;
|
||||
padding-left: 10px;
|
||||
text-decoration: none;
|
||||
color: var(--primary-color);
|
||||
}
|
||||
section.listing a::after {
|
||||
content: "\203A";
|
||||
content: '\203A';
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
display: grid;
|
||||
column-gap: 14px;
|
||||
row-gap: 14px;
|
||||
grid-template-columns: repeat(auto-fill, minmax(400px, 400px));
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
margin-top: 50px;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
border: solid 1px var(--primary-color);
|
||||
padding: 10px;
|
||||
border-radius: 8px;
|
||||
@@ -28,13 +27,13 @@ button {
|
||||
.results {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
input[type="text"] {
|
||||
input[type='text'] {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 499px) {
|
||||
.results {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HousingLocationComponent } from '../housing-location/housing-location.component';
|
||||
// #docregion housing-location-import
|
||||
import { HousingLocation } from '../housinglocation';
|
||||
// #enddocregion
|
||||
|
||||
@Component({
|
||||
selector: 'app-home',
|
||||
@@ -25,19 +23,22 @@ import { HousingLocation } from '../housinglocation';
|
||||
`,
|
||||
styleUrls: ['./home.component.css'],
|
||||
})
|
||||
// #docregion only-house
|
||||
export class HomeComponent {
|
||||
readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa';
|
||||
|
||||
housingLocation: HousingLocation = {
|
||||
id: 9999,
|
||||
name: 'Test Home',
|
||||
city: 'Test city',
|
||||
state: 'ST',
|
||||
photo: `${this.baseUrl}/example-house.jpg`,
|
||||
availableUnits: 99,
|
||||
wifi: true,
|
||||
laundry: false,
|
||||
};
|
||||
export class HomeComponent {
|
||||
private img_server = 'https://storage.googleapis.com/angular-tutorial-assets/first-app/';
|
||||
onlyHouse: HousingLocation;
|
||||
|
||||
constructor() {
|
||||
this.onlyHouse = {
|
||||
id: 9999,
|
||||
name: 'Test Home',
|
||||
city: 'Test city',
|
||||
state: 'ST',
|
||||
photo: this.img_server + 'house_0.png',
|
||||
availableUnits: 99,
|
||||
wifi: true,
|
||||
laundry: false,
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
// #enddocregion
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user