mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
Compare commits
106 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b79ad226b2 | |||
| bc97322641 | |||
| 4cfb06086b | |||
| 933d481a0e | |||
| edea15f2c6 | |||
| a1b6610c3d | |||
| 945432e3fa | |||
| 629ebad8eb | |||
| 154ca82f7b | |||
| 0c0550b536 | |||
| 449d29b701 | |||
| 6a9b1e11c2 | |||
| 6ab9f03baf | |||
| 37a25486cf | |||
| 28f289b825 | |||
| 54d0981871 | |||
| 2efcc26bb6 | |||
| a93a1a5759 | |||
| ae29f98c20 | |||
| 02918c9b5a | |||
| 2625dc1312 | |||
| 3e490fab1b | |||
| 76b64f659c | |||
| fb7318cb86 | |||
| 08ee9b4b26 | |||
| 46c0576efe | |||
| b8a6f7491b | |||
| 8f38bbaf26 | |||
| 80dff09134 | |||
| e7b48da713 | |||
| fe0075bdea | |||
| 1d02e6ad68 | |||
| b4706cf3e8 | |||
| cc4f5e6663 | |||
| f35c46a894 | |||
| f9888d928e | |||
| c097c5fbcb | |||
| a016508768 | |||
| 164a1713d5 | |||
| 604d89eef9 | |||
| 83cec3de51 | |||
| 7a33d395b3 | |||
| 8a19bc63ea | |||
| 173dde7681 | |||
| d4b3c0b47c | |||
| e63574774e | |||
| d5cd79f885 | |||
| e683298be6 | |||
| 99597c8c57 | |||
| f99cc40c5d | |||
| 623602fc3a | |||
| b3ea67e8a7 | |||
| 31a7ce1268 | |||
| c7bc47c509 | |||
| 96c0e42e61 | |||
| f24da6baad | |||
| ea7ff35b30 | |||
| 603194ee20 | |||
| 5dadec56e6 | |||
| d75e3da429 | |||
| ebd2ddbbd1 | |||
| df36537bfd | |||
| ed48887068 | |||
| 2908eba59c | |||
| a8ce8f7fc4 | |||
| 66eb1425e2 | |||
| 61f8522410 | |||
| c0903acbd4 | |||
| 588cd3ed50 | |||
| a99d9d67f3 | |||
| 6471eafde6 | |||
| d1840419d1 | |||
| a014ca1760 | |||
| fb273f6461 | |||
| 3a18398d83 | |||
| 44c1770fc9 | |||
| 79e9e8ab77 | |||
| 3d5df576d1 | |||
| 074b794c50 | |||
| 4f52d4e474 | |||
| 716352c1b0 | |||
| 6e19a12f6d | |||
| 5d3bae283c | |||
| 6476f158aa | |||
| 420d6b3054 | |||
| c2c96639e2 | |||
| fa4798095e | |||
| 6f1a4b8217 | |||
| 23f210c0ab | |||
| a2f41703d1 | |||
| 4d61d8900d | |||
| cf17a8096d | |||
| 309b2cde51 | |||
| d366664007 | |||
| b9553882b8 | |||
| 334a740ec0 | |||
| 0a87176b74 | |||
| b6fd814542 | |||
| 4c95484c0a | |||
| b6e9a50d22 | |||
| 874f3fc4d3 | |||
| 0457b58dfe | |||
| e13d97cf7e | |||
| 955edf2afd | |||
| 1b48e65e89 | |||
| 93cc5b2210 |
@@ -22,7 +22,7 @@ merge:
|
||||
# the g3 status will be added to your pull requests if they include files that match the patterns
|
||||
g3Status:
|
||||
# set to true to disable
|
||||
disabled: false
|
||||
disabled: true
|
||||
# the name of the status
|
||||
context: 'google3'
|
||||
# text to show when the status is pending, {{PRNumber}} will be replaced by the PR number
|
||||
@@ -32,64 +32,8 @@ merge:
|
||||
# link to use for the details
|
||||
url: 'http://go/angular/g3sync'
|
||||
# list of patterns to check for the files changed by the PR
|
||||
# this list must be manually kept in sync with google3/third_party/javascript/angular2/copy.bara.sky
|
||||
include:
|
||||
- 'LICENSE'
|
||||
- 'modules/benchmarks/**'
|
||||
- 'modules/system.d.ts'
|
||||
- 'packages/**'
|
||||
# list of patterns to ignore for the files changed by the PR
|
||||
exclude:
|
||||
- 'packages/*'
|
||||
- 'packages/bazel/*'
|
||||
- 'packages/bazel/src/*'
|
||||
- 'packages/bazel/src/api-extractor/**'
|
||||
- 'packages/bazel/src/builders/**'
|
||||
- 'packages/bazel/src/ng_module/**'
|
||||
- 'packages/bazel/src/ng_package/**'
|
||||
- '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/**'
|
||||
# 'private' mostly contains entrypoints for 3P Angular.
|
||||
# Note that 'private/migrations' _is_ used.
|
||||
- 'packages/compiler-cli/private/bazel.ts'
|
||||
- 'packages/compiler-cli/private/localize.ts'
|
||||
- 'packages/compiler-cli/private/tooling.ts'
|
||||
- 'packages/compiler-cli/private/babel.d.ts'
|
||||
# google3 defines its own binary entrypoints.
|
||||
- 'packages/compiler-cli/src/bin/**'
|
||||
- 'packages/docs/**'
|
||||
- 'packages/elements/schematics/**'
|
||||
- 'packages/examples/**'
|
||||
- 'packages/language-service/**'
|
||||
- 'packages/localize/**'
|
||||
- 'packages/private/**'
|
||||
- 'packages/service-worker/**'
|
||||
- 'packages/common/locales/generate-locales-tool/**'
|
||||
- 'packages/common/locales/index.bzl'
|
||||
- 'packages/http/**'
|
||||
- '**/.gitignore'
|
||||
- '**/.gitkeep'
|
||||
- '**/yarn.lock'
|
||||
- '**/package.json'
|
||||
- '**/third_party/**'
|
||||
- '**/tsconfig-build.json'
|
||||
- '**/tsconfig-tsec.json'
|
||||
- '**/tsconfig.json'
|
||||
- '**/rollup.config.js'
|
||||
- '**/BUILD.bazel'
|
||||
- '**/*.md'
|
||||
- 'packages/**/integrationtest/**'
|
||||
- 'packages/**/test/**'
|
||||
- 'packages/zone.js/*'
|
||||
- 'packages/zone.js/dist/**'
|
||||
- 'packages/zone.js/doc/**'
|
||||
- 'packages/zone.js/example/**'
|
||||
- 'packages/zone.js/scripts/**'
|
||||
|
||||
# comment that will be added to a PR when there is a conflict, leave empty or set to false to disable
|
||||
mergeConflictComment: "Hi @{{PRAuthor}}! This PR has merge conflicts due to recent upstream merges.\nPlease help to unblock it by resolving these conflicts. Thanks!"
|
||||
@@ -127,7 +71,7 @@ merge:
|
||||
- 'ci/circleci: build'
|
||||
- 'ci/circleci: lint'
|
||||
- 'ci/angular: size'
|
||||
- 'google3'
|
||||
- 'google-internal-tests'
|
||||
- 'pullapprove'
|
||||
|
||||
# the comment that will be added when the merge label is added despite failing checks, leave empty or set to false to disable
|
||||
|
||||
@@ -13,13 +13,13 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@c9b2ff083a50d0eac742da1e69e0cbdb98bf53dd
|
||||
- uses: angular/dev-infra/github-actions/commit-message-based-labels@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
post_approval_changes:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@c9b2ff083a50d0eac742da1e69e0cbdb98bf53dd
|
||||
- uses: angular/dev-infra/github-actions/post-approval-changes@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
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@a64f3515ea822a8b228ebaab1c52e76e557a580c
|
||||
- uses: angular/dev-infra/github-actions/feature-request@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
with:
|
||||
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
name: Google Internal Tests Enforcement
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, reopened, synchronize]
|
||||
|
||||
permissions:
|
||||
pull-requests: read
|
||||
statuses: write
|
||||
|
||||
jobs:
|
||||
trigger:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
|
||||
- uses: angular/dev-infra/github-actions/google-internal-tests@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
with:
|
||||
run-tests-guide-url: http://go/angular/g3sync
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
sync-config: ./.ng-dev/google-sync-config.json
|
||||
@@ -14,6 +14,6 @@ jobs:
|
||||
if: github.repository == 'angular/angular'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: angular/dev-infra/github-actions/lock-closed@c9b2ff083a50d0eac742da1e69e0cbdb98bf53dd
|
||||
- uses: angular/dev-infra/github-actions/lock-closed@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
with:
|
||||
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
|
||||
|
||||
@@ -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@c9b2ff083a50d0eac742da1e69e0cbdb98bf53dd
|
||||
uses: angular/dev-infra/github-actions/create-pr-for-changes@d87b1b56a970132f90301624cea6b6d70b6d9489
|
||||
with:
|
||||
branch-prefix: docs-update-events
|
||||
pr-title: 'docs: update events'
|
||||
|
||||
@@ -2,6 +2,7 @@ import {CaretakerConfig} from '@angular/ng-dev';
|
||||
|
||||
/** The configuration for `ng-dev caretaker` commands. */
|
||||
export const caretaker: CaretakerConfig = {
|
||||
g3SyncConfigPath: './.ng-dev/google-sync-config.json',
|
||||
githubQueries: [
|
||||
{
|
||||
name: 'Merge Queue',
|
||||
@@ -9,7 +10,7 @@ export const caretaker: CaretakerConfig = {
|
||||
},
|
||||
{
|
||||
name: 'Merge Assistance Queue',
|
||||
query: `is:pr is:open label:"action: merge-assistance"`,
|
||||
query: `is:pr is:open label:"merge: caretaker note" label:"action: merge"`,
|
||||
},
|
||||
{
|
||||
name: 'Initial Triage Queue',
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
{
|
||||
"syncedFilePatterns": ["LICENSE", "modules/benchmarks/**", "modules/system.d.ts", "packages/**"],
|
||||
"alwaysExternalFilePatterns": [
|
||||
"packages/*",
|
||||
"packages/bazel/*",
|
||||
"packages/bazel/src/*",
|
||||
"packages/bazel/src/api-extractor/**",
|
||||
"packages/bazel/src/builders/**",
|
||||
"packages/bazel/src/ng_module/**",
|
||||
"packages/bazel/src/ng_package/**",
|
||||
"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/private/bazel.ts",
|
||||
"packages/compiler-cli/private/localize.ts",
|
||||
"packages/compiler-cli/private/tooling.ts",
|
||||
"packages/compiler-cli/private/babel.d.ts",
|
||||
"packages/compiler-cli/src/bin/**",
|
||||
"packages/docs/**",
|
||||
"packages/elements/schematics/**",
|
||||
"packages/examples/**",
|
||||
"packages/language-service/**",
|
||||
"packages/localize/**",
|
||||
"packages/private/**",
|
||||
"packages/service-worker/**",
|
||||
"packages/common/locales/generate-locales-tool/**",
|
||||
"packages/common/locales/index.bzl",
|
||||
"packages/http/**",
|
||||
"**/.gitignore",
|
||||
"**/.gitkeep",
|
||||
"**/yarn.lock",
|
||||
"**/package.json",
|
||||
"**/third_party/**",
|
||||
"**/tsconfig-build.json",
|
||||
"**/tsconfig-tsec.json",
|
||||
"**/tsconfig.json",
|
||||
"**/rollup.config.js",
|
||||
"**/BUILD.bazel",
|
||||
"**/*.md",
|
||||
"packages/**/integrationtest/**",
|
||||
"packages/**/test/**",
|
||||
"packages/zone.js/*",
|
||||
"packages/zone.js/dist/**",
|
||||
"packages/zone.js/doc/**",
|
||||
"packages/zone.js/example/**",
|
||||
"packages/zone.js/scripts/**"
|
||||
]
|
||||
}
|
||||
@@ -6,9 +6,6 @@ import {PullRequestConfig} from '@angular/ng-dev';
|
||||
*/
|
||||
export const pullRequest: PullRequestConfig = {
|
||||
githubApiMerge: false,
|
||||
mergeReadyLabel: 'action: merge',
|
||||
caretakerNoteLabel: 'action: caretaker note',
|
||||
commitMessageFixupLabel: 'merge: fix commit message',
|
||||
requiredBaseCommits: {
|
||||
// PRs that target either `main` or the patch branch, need to be rebased
|
||||
// on top of the latest commit message validation fix.
|
||||
|
||||
+25
-3
@@ -61,9 +61,8 @@
|
||||
|
||||
version: 3
|
||||
|
||||
availability:
|
||||
users_unavailable:
|
||||
- atscott
|
||||
# availability:
|
||||
# users_unavailable:
|
||||
|
||||
# Meta field that goes unused by PullApprove to allow for defining aliases to be
|
||||
# used throughout the config.
|
||||
@@ -326,6 +325,7 @@ groups:
|
||||
'aio/content/guide/two-way-binding.md',
|
||||
'aio/content/examples/two-way-binding/**/{*,.*}',
|
||||
'aio/content/guide/built-in-directives.md',
|
||||
'aio/content/guide/directive-composition-api.md',
|
||||
'aio/content/examples/built-in-directives/**/{*,.*}',
|
||||
'aio/content/images/guide/built-in-directives/**/{*,.*}',
|
||||
'aio/content/guide/template-reference-variables.md',
|
||||
@@ -1083,6 +1083,28 @@ groups:
|
||||
'aio/content/guide/reviewing-content.md',
|
||||
'aio/content/guide/updating-content-github-ui.md',
|
||||
'aio/content/guide/updating-search-keywords.md',
|
||||
'aio/content/guide/doc-build-test.md',
|
||||
'aio/content/guide/doc-edit-finish.md',
|
||||
'aio/content/guide/doc-editing.md',
|
||||
'aio/content/guide/doc-github-tasks.md',
|
||||
'aio/content/guide/doc-pr-open.md',
|
||||
'aio/content/guide/doc-pr-prep.md',
|
||||
'aio/content/guide/doc-pr-update.md',
|
||||
'aio/content/guide/doc-prepare-to-edit.md',
|
||||
'aio/content/guide/doc-select-issue.md',
|
||||
'aio/content/guide/doc-tasks.md',
|
||||
'aio/content/guide/doc-update-overview.md',
|
||||
'aio/content/guide/doc-update-start.md',
|
||||
'aio/content/guide/docs-lint-errors.md',
|
||||
'aio/content/images/guide/preparing-to-edit-docs/**/{*,.*}',
|
||||
'aio/content/images/guide/github-for-docs/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-update-start/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-update-overview/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-pr-update/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-pr-prep/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-pr-open/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-github-tasks/**/{*,.*}',
|
||||
'aio/content/images/guide/doc-prepare-to-edit/**/{*,.*}',
|
||||
])
|
||||
reviewers:
|
||||
users:
|
||||
|
||||
Vendored
+9
-21
@@ -16,7 +16,7 @@
|
||||
"remoteRoot": "${workspaceRoot}",
|
||||
"stopOnEntry": false,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/bazel-out/**/angular/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "Attach to bazel test ... --config=debug (no source maps)",
|
||||
@@ -30,58 +30,46 @@
|
||||
"remoteRoot": "${workspaceRoot}",
|
||||
"stopOnEntry": false,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/bazel-out/**/angular/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test/acceptance",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test/acceptance",
|
||||
"--config=debug"
|
||||
],
|
||||
"args": ["test", "packages/core/test/acceptance", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/bazel-out/**/angular/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test/render3",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test/render3",
|
||||
"--config=debug"
|
||||
],
|
||||
"args": ["test", "packages/core/test/render3", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/bazel-out/**/angular/**/*.js"],
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
},
|
||||
{
|
||||
"name": "IVY:packages/core/test",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/node_modules/.bin/bazelisk",
|
||||
"args": [
|
||||
"test",
|
||||
"packages/core/test",
|
||||
"--config=debug"
|
||||
],
|
||||
"args": ["test", "packages/core/test", "--config=debug"],
|
||||
"port": 9229,
|
||||
"address": "localhost",
|
||||
"restart": true,
|
||||
"sourceMaps": true,
|
||||
"timeout": 600000,
|
||||
"outFiles": ["${workspaceFolder}/bazel-out/**/angular/**/*.js"],
|
||||
},
|
||||
"outFiles": ["${workspaceFolder}/dist/out/**/packages/**/*.js"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
+124
-127
@@ -1,17 +1,5 @@
|
||||
<a name="14.2.6"></a>
|
||||
# 14.2.6 (2022-10-12)
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [3fd176a905](https://github.com/angular/angular/commit/3fd176a9054bea6f6c4cd22e8ff3b8f63b86b637) | fix | add missing period to error message ([#47744](https://github.com/angular/angular/pull/47744)) |
|
||||
| [c3821f5ab5](https://github.com/angular/angular/commit/c3821f5ab5bf54b2c9d7868da79a742d4e4b7667) | perf | minimize filesystem calls when generating shims ([#47682](https://github.com/angular/angular/pull/47682)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charles Lyding, Joey Perrott, Joshua Morony, Mathew Berg, Paul Gschwendtner, Peter Dickten, Renan Ferro, Sri Ram, WD Snoeijer, markostanimirovic and Álvaro Martínez
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.5"></a>
|
||||
# 15.0.0-next.5 (2022-10-05)
|
||||
<a name="15.0.0"></a>
|
||||
# 15.0.0 (2022-11-16)
|
||||
## Breaking Changes
|
||||
### compiler
|
||||
- Keyframes names are now prefixed with the component's "scope name".
|
||||
@@ -31,6 +19,32 @@ Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charl
|
||||
- change the component's view encapsulation to the `None` or `ShadowDom`
|
||||
- define keyframes rules in global stylesheets (e.g styles.css)
|
||||
- define keyframes rules programmatically in code.
|
||||
### compiler-cli
|
||||
- Invalid constructors for DI may now report compilation errors
|
||||
|
||||
When a class inherits its constructor from a base class, the compiler may now
|
||||
report an error when that constructor cannot be used for DI purposes. This may
|
||||
either be because the base class is missing an Angular decorator such as
|
||||
`@Injectable()` or `@Directive()`, or because the constructor contains parameters
|
||||
which do not have an associated token (such as primitive types like `string`).
|
||||
These situations used to behave unexpectedly at runtime, where the class may be
|
||||
constructed without any of its constructor parameters, so this is now reported
|
||||
as an error during compilation.
|
||||
|
||||
Any new errors that may be reported because of this change can be resolved either
|
||||
by decorating the base class from which the constructor is inherited, or by adding
|
||||
an explicit constructor to the class for which the error is reported.
|
||||
- Angular compiler option `enableIvy` has been removed as Ivy is the only rendering engine.
|
||||
### core
|
||||
- Angular no longer supports Node.js versions `14.[15-19].x` and `16.[10-12].x`. Current supported versions of Node.js are `14.20.x`, `16.13.x` and `18.10.x`.
|
||||
- TypeScript versions older than 4.8 are no longer supported.
|
||||
- Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.
|
||||
- Existing iframe usages may have `src` or `srcdoc` preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.
|
||||
### forms
|
||||
- setDisabledState will always be called when a `ControlValueAccessor` is attached. You can opt-out with `FormsModule.withConfig` or `ReactiveFormsModule.withConfig`.
|
||||
### localize
|
||||
- - `canParse` method has been removed from all translation parsers in `@angular/localize/tools`. `analyze` should be used instead.
|
||||
- the `hint` parameter in the`parse` methods is now mandatory.
|
||||
### router
|
||||
- Previously, the `RouterOutlet` would immediately
|
||||
instantiate the component being activated during navigation. Now the
|
||||
@@ -38,7 +52,15 @@ Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charl
|
||||
could affect tests which do not trigger change detection after a router
|
||||
navigation. In rarer cases, this can affect production code that relies
|
||||
on the exact timing of component availability.
|
||||
- The title property is now required on ActivatedRouteSnapshot
|
||||
- `relativeLinkResolution` is no longer configurable in
|
||||
the Router. This option was used as a means to opt out of a bug fix.
|
||||
## Deprecations
|
||||
### common
|
||||
- The `DATE_PIPE_DEFAULT_TIMEZONE` token is now deprecated in favor
|
||||
of the `DATE_PIPE_DEFAULT_OPTIONS` token, which accepts an object
|
||||
as a value and the timezone can be defined as a field (called `timezone`)
|
||||
on that object.
|
||||
### core
|
||||
- - The ability to pass an `NgModule` to the `providedIn` option for
|
||||
`@Injectable` and `InjectionToken` is now deprecated.
|
||||
@@ -54,29 +76,116 @@ Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charl
|
||||
|
||||
`providedIn: 'any'` is an option with confusing semantics and is almost
|
||||
never used apart from a handful of esoteric cases internal to the framework.
|
||||
- The bit field signature of `Injector.get()` has been deprecated, in favor of the new options object.
|
||||
- The bit field signature of `TestBed.inject()` has been deprecated, in favor of the new options object.
|
||||
### router
|
||||
- The `RouterLinkWithHref` directive is deprecated, use the `RouterLink` directive instead. The `RouterLink` contains the code from the `RouterLinkWithHref` to handle elements with `href` attributes.
|
||||
### common
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [c0c7efaf7c](https://github.com/angular/angular/commit/c0c7efaf7c8a53c1a6f137aac960757cc804f263) | feat | add `provideLocationMocks()` function to provide Location mocks ([#47674](https://github.com/angular/angular/pull/47674)) |
|
||||
| [75e6297f09](https://github.com/angular/angular/commit/75e6297f0901cc98aea1626a138a820e68d026ec) | feat | add <link> preload tag on server for priority img ([#47343](https://github.com/angular/angular/pull/47343)) |
|
||||
| [4fde292bb5](https://github.com/angular/angular/commit/4fde292bb58f5d5bc3cf6e634f7cff9eb0d13d84) | feat | Add automatic srcset generation to ngOptimizedImage ([#47547](https://github.com/angular/angular/pull/47547)) |
|
||||
| [9483343ebf](https://github.com/angular/angular/commit/9483343ebf958297ebcb81ef313d356296a41f41) | feat | Add fill mode to NgOptimizedImage ([#47738](https://github.com/angular/angular/pull/47738)) |
|
||||
| [bdb5371033](https://github.com/angular/angular/commit/bdb5371033d8e9a110619861323e8383a32d5900) | feat | add injection token for default DatePipe configuration ([#47157](https://github.com/angular/angular/pull/47157)) |
|
||||
| [449d29b701](https://github.com/angular/angular/commit/449d29b701ee5a50e7279d44f4c3888a5d6f7e96) | fix | Add fetchpriority to ngOptimizedImage preloads ([#48010](https://github.com/angular/angular/pull/48010)) |
|
||||
| [4f52d4e474](https://github.com/angular/angular/commit/4f52d4e47416494b4054e43a0d96383bde7813ca) | fix | don't generate srcset if noopImageLoader is used ([#47804](https://github.com/angular/angular/pull/47804)) |
|
||||
| [3a18398d83](https://github.com/angular/angular/commit/3a18398d8303fb4ae1923b3a182e6abb92e3117b) | fix | Don't warn about image distortion is fill mode is enabled ([#47824](https://github.com/angular/angular/pull/47824)) |
|
||||
| [edea15f2c6](https://github.com/angular/angular/commit/edea15f2c63675e86248a25649008a10e1384334) | fix | export the IMAGE_CONFIG token ([#48051](https://github.com/angular/angular/pull/48051)) |
|
||||
| [8abf1c844c](https://github.com/angular/angular/commit/8abf1c844c656b41a604098889db76e8c63da720) | fix | fix formatting on oversized image error ([#47188](https://github.com/angular/angular/pull/47188)) |
|
||||
| [ca7bf65933](https://github.com/angular/angular/commit/ca7bf6593380fa760891d29fba5c9f61c6e9bf8b) | fix | rename `rawSrc` -> `ngSrc` in NgOptimizedImage directive ([#47362](https://github.com/angular/angular/pull/47362)) |
|
||||
| [b3879dbf14](https://github.com/angular/angular/commit/b3879dbf1470ab4f31e676f1f8909cd50d963844) | fix | support density descriptors with 2+ decimals ([#47197](https://github.com/angular/angular/pull/47197)) |
|
||||
| [fa4798095e](https://github.com/angular/angular/commit/fa4798095e3820087c4a3bccc9638c5e979315da) | fix | update size error to mention 'fill' mode ([#47797](https://github.com/angular/angular/pull/47797)) |
|
||||
| [23f210c0ab](https://github.com/angular/angular/commit/23f210c0abfb6104f4aa2f39d0efd096c2b7574d) | fix | warn if using supported CDN but not built-in loader ([#47330](https://github.com/angular/angular/pull/47330)) |
|
||||
| [945432e3fa](https://github.com/angular/angular/commit/945432e3fa2cb22ff911eda2a8ad3302a8adba5a) | fix | Warn on fill ngOptimizedImage without height ([#48036](https://github.com/angular/angular/pull/48036)) |
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [051f75648d](https://github.com/angular/angular/commit/051f75648d6065949796ac1c7ea67e71e31b011e) | fix | scope css keyframes in emulated view encapsulation ([#42608](https://github.com/angular/angular/pull/42608)) |
|
||||
| [39b72e208b](https://github.com/angular/angular/commit/39b72e208b46d80f1d9a802cebf043c2ccf3c5f2) | fix | update element schema ([#47552](https://github.com/angular/angular/pull/47552)) |
|
||||
| [48b354a83e](https://github.com/angular/angular/commit/48b354a83e6d94735a03eebb3a52c5698e7a0f44) | fix | update element schema ([#47552](https://github.com/angular/angular/pull/47552)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [bc54687c7b](https://github.com/angular/angular/commit/bc54687c7b91efe451aa744d2d3a15ca3524231e) | fix | exclude abstract classes from `strictInjectionParameters` requirement ([#44615](https://github.com/angular/angular/pull/44615)) |
|
||||
| [309b2cde51](https://github.com/angular/angular/commit/309b2cde51d1577d6561e826be01e2b5fce43c49) | fix | implement more host directive validations as diagnostics ([#47768](https://github.com/angular/angular/pull/47768)) |
|
||||
| [2e1dddec45](https://github.com/angular/angular/commit/2e1dddec45fef8291b1f3abce2a937e28bb75a87) | fix | support hasInvalidatedResolutions. ([#47585](https://github.com/angular/angular/pull/47585)) |
|
||||
| [19ad4987f9](https://github.com/angular/angular/commit/19ad4987f9070222bb2fb8bd07a43ed7995f602a) | fix | use @ts-ignore. ([#47636](https://github.com/angular/angular/pull/47636)) |
|
||||
| [8fcadaad48](https://github.com/angular/angular/commit/8fcadaad48b2b1328f47b7603b230445a26f95a8) | perf | cache source file for reporting type-checking diagnostics ([#47471](https://github.com/angular/angular/pull/47471)) |
|
||||
| [16f96eeabf](https://github.com/angular/angular/commit/16f96eeabf77964092b4b6a830e29f2761ffaeec) | refactor | remove `enableIvy` options ([#47346](https://github.com/angular/angular/pull/47346)) |
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [e3cef4a784](https://github.com/angular/angular/commit/e3cef4a7843d22fd004f1e27afcc42d0fbbef74a) | docs | deprecate `providedIn: NgModule` and `providedIn: 'any'` ([#47616](https://github.com/angular/angular/pull/47616)) |
|
||||
| [1b9fd46d14](https://github.com/angular/angular/commit/1b9fd46d14ed46f78b6d761b3917ded1f0d51e0d) | feat | add support for Node.js version 18 ([#47730](https://github.com/angular/angular/pull/47730)) |
|
||||
| [ed11a13c3c](https://github.com/angular/angular/commit/ed11a13c3c5cccb0094c1a4ff9c60ea741a42067) | feat | drop support for TypeScript 4.6 and 4.7 ([#47690](https://github.com/angular/angular/pull/47690)) |
|
||||
| [db28badfe6](https://github.com/angular/angular/commit/db28badfe67f404e81dacd7c3131af105feb3412) | feat | enable the new directive composition API ([#47642](https://github.com/angular/angular/pull/47642)) |
|
||||
| [7de1469be6](https://github.com/angular/angular/commit/7de1469be62b08037681ee9e75614fb800700ef8) | feat | introduce EnvironmentProviders wrapper type ([#47669](https://github.com/angular/angular/pull/47669)) |
|
||||
| [841c8e5138](https://github.com/angular/angular/commit/841c8e51386645d7fd26642f41952ed8f0a2dbe5) | feat | support object-based DI flags in Injector.get() ([#46761](https://github.com/angular/angular/pull/46761)) |
|
||||
| [120555a626](https://github.com/angular/angular/commit/120555a626d66523e46ce01681b11a0f38e3a40a) | feat | support object-based DI flags in TestBed.inject() ([#46761](https://github.com/angular/angular/pull/46761)) |
|
||||
| [96c0e42e61](https://github.com/angular/angular/commit/96c0e42e61b8a4fced1354da0162c06e7b029cf3) | fix | allow readonly arrays for standalone imports ([#47851](https://github.com/angular/angular/pull/47851)) |
|
||||
| [28f289b825](https://github.com/angular/angular/commit/28f289b825be7f4bf6dc5db69197741867b8ea23) | fix | hardening attribute and property binding rules for <iframe> elements ([#47964](https://github.com/angular/angular/pull/47964)) |
|
||||
| [d4b3c0b47c](https://github.com/angular/angular/commit/d4b3c0b47c32a9a664d3073164d04c0385058008) | fix | hardening rules related to the attribute order on iframe elements ([#47935](https://github.com/angular/angular/pull/47935)) |
|
||||
| [85330f3fd9](https://github.com/angular/angular/commit/85330f3fd9ac6381ce3aa18479ed8195d2ac215e) | fix | update `isDevMode` to rely on `ngDevMode` ([#47475](https://github.com/angular/angular/pull/47475)) |
|
||||
### forms
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [a8569e3802](https://github.com/angular/angular/commit/a8569e38029724a7d77935bccce99117a7e1aefa) | feat | export forms utility functions: isFormArray, isFormGroup… ([#47718](https://github.com/angular/angular/pull/47718)) |
|
||||
| [96b7fe93af](https://github.com/angular/angular/commit/96b7fe93af361a1cf2ea5477970f64ba6f3d8cd5) | fix | call `setDisabledState` on `ControlValueAcessor` when control is enabled ([#47576](https://github.com/angular/angular/pull/47576)) |
|
||||
| [a99d9d67f3](https://github.com/angular/angular/commit/a99d9d67f382c18b46c4c1c6765bbda445ca0b8c) | fix | don't mutate validators array ([#47830](https://github.com/angular/angular/pull/47830)) |
|
||||
| [2625dc1312](https://github.com/angular/angular/commit/2625dc13127da9f8d5fa79f1b32ad132d6656c63) | fix | Improve a very commonly viewed error message by adding a guide. ([#47969](https://github.com/angular/angular/pull/47969)) |
|
||||
| [ae29f98c20](https://github.com/angular/angular/commit/ae29f98c20390abbf84d2df312ee5e8766195d60) | fix | Runtime error pages must begin with leading zero ([#47991](https://github.com/angular/angular/pull/47991)) |
|
||||
### http
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [3ba99e286a](https://github.com/angular/angular/commit/3ba99e286a166d122fb334171b6a9a1e6461a724) | feat | allow for child `HttpClient`s to request via parents ([#47502](https://github.com/angular/angular/pull/47502)) |
|
||||
| [84d0d33c35](https://github.com/angular/angular/commit/84d0d33c3537f0da927e0ce449ede78ef9bebc6b) | feat | introduce `provideHttpClientTesting` provider function ([#47502](https://github.com/angular/angular/pull/47502)) |
|
||||
| [62c7a7a16e](https://github.com/angular/angular/commit/62c7a7a16e035c3a5346270dc4c5c6de85bf9137) | feat | introduce functional interceptors ([#47502](https://github.com/angular/angular/pull/47502)) |
|
||||
| [e47b129070](https://github.com/angular/angular/commit/e47b129070655f2e9eeac58bc2d0ea5648f41045) | feat | introduce the `provideHttpClient()` API ([#47502](https://github.com/angular/angular/pull/47502)) |
|
||||
| [ea16a98dfe](https://github.com/angular/angular/commit/ea16a98dfef0de33c192e328f151cca39749a488) | fix | better handle unexpected `undefined` XSRF tokens ([#47683](https://github.com/angular/angular/pull/47683)) |
|
||||
| [e7b48da713](https://github.com/angular/angular/commit/e7b48da713f32c02c096f1342ab8b0d7ec696ca5) | fix | rename `withLegacyInterceptors` to `withInterceptorsFromDi` ([#47901](https://github.com/angular/angular/pull/47901)) |
|
||||
### language-service
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [bebef5fb43](https://github.com/angular/angular/commit/bebef5fb43dcf54a109499d0d9dd701786c33f60) | feat | Quick fix to import a component when its selector is used ([#47088](https://github.com/angular/angular/pull/47088)) |
|
||||
| [e7ee53c541](https://github.com/angular/angular/commit/e7ee53c541da0a1f85c217354ec9901010ae0de9) | feat | support to fix invalid banana in box ([#47393](https://github.com/angular/angular/pull/47393)) |
|
||||
### localize
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [400a6b5e37](https://github.com/angular/angular/commit/400a6b5e3707f3939d84c659a115b75ef15d2c09) | fix | add polyfill in polyfills array instead of polyfills.ts ([#47569](https://github.com/angular/angular/pull/47569)) |
|
||||
| [b6fd814542](https://github.com/angular/angular/commit/b6fd81454207bd256a48d5726f3bd7e6ce6a489b) | fix | update ng add schematic to support Angular CLI version 15 ([#47763](https://github.com/angular/angular/pull/47763)) |
|
||||
| [d36fd3d9e4](https://github.com/angular/angular/commit/d36fd3d9e41984818af5e1aad5e3004574d837bb) | refactor | remove deprecated `canParse` method from TranslationParsers ([#47275](https://github.com/angular/angular/pull/47275)) |
|
||||
### platform-server
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [2908eba59c](https://github.com/angular/angular/commit/2908eba59c25e9a1fc5aa257b4a8a247db82079e) | fix | align server renderer interface with base renderer ([#47868](https://github.com/angular/angular/pull/47868)) |
|
||||
### router
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [7bee28d037](https://github.com/angular/angular/commit/7bee28d037a8a21a7440293b3e8c118cc93ec8c1) | feat | add a migration to remove `relativeLinkResolution` usages ([#47604](https://github.com/angular/angular/pull/47604)) |
|
||||
| [5163e3d876](https://github.com/angular/angular/commit/5163e3d876cdfd6d309d7e35aefa6f07ef62715e) | feat | Add UrlTree constructor to public API ([#47186](https://github.com/angular/angular/pull/47186)) |
|
||||
| [da58801f95](https://github.com/angular/angular/commit/da58801f95c66c201e332189af25702bdd722f3f) | feat | auto-unwrap default exports when lazy loading ([#47586](https://github.com/angular/angular/pull/47586)) |
|
||||
| [c3f857975d](https://github.com/angular/angular/commit/c3f857975d56cac6ad3939d64f76a51455159c23) | feat | make RouterOutlet name an Input so it can be set dynamically ([#46569](https://github.com/angular/angular/pull/46569)) |
|
||||
| [f73ef21442](https://github.com/angular/angular/commit/f73ef2144279b6b26902510f90ca1fccb8e166b2) | feat | merge `RouterLinkWithHref` into `RouterLink` ([#47630](https://github.com/angular/angular/pull/47630)) |
|
||||
| [16c8f55663](https://github.com/angular/angular/commit/16c8f55663c30270fcd647b1a8a20ddbc8923349) | feat | migrate `RouterLinkWithHref` references to `RouterLink` ([#47599](https://github.com/angular/angular/pull/47599)) |
|
||||
| [07017a7bd3](https://github.com/angular/angular/commit/07017a7bd30c6bb7bd1b94a9fd1b112ee68c9ced) | feat | prevent `provideRouter()` from usage in @Component ([#47669](https://github.com/angular/angular/pull/47669)) |
|
||||
| [79e9e8ab77](https://github.com/angular/angular/commit/79e9e8ab779d230f6a1df25c4ccff94b13129305) | fix | Delay router scroll event until navigated components have rendered ([#47563](https://github.com/angular/angular/pull/47563)) |
|
||||
| [6a88bad019](https://github.com/angular/angular/commit/6a88bad0192516f26a5a008c0634b73456b9447c) | fix | Ensure ActivatedRouteSnapshot#title has correct value ([#47481](https://github.com/angular/angular/pull/47481)) |
|
||||
| [7b89d95c0e](https://github.com/angular/angular/commit/7b89d95c0e7370d33f006aba8e67bafb53a2fd4f) | fix | Remove deprecated relativeLinkResolution ([#47623](https://github.com/angular/angular/pull/47623)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Alex Rickabaugh, Alexander Wiebe, Andrew Kushnir, Andrew Scott, Ciprian Sauliuc, Dmytro Mezhenskyi, Dylan Hunn, George Kalpakas, Joe Martin (Crowdstaffing), Jordan, Kristiyan Kostadinov, Martin Probst, Ole M, Paul Gschwendtner, Pawel Kozlowski, dario-piotrowicz and mgechev
|
||||
Alan Agius, AleksanderBodurri, Alex Castle, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Charles Lyding, Dylan Hunn, Ferdinand Malcher, George Kalpakas, Jeremy Elbourn, Jessica Janiuk, JiaLiPassion, Joey Perrott, JoostK, Kara Erickson, Kristiyan Kostadinov, Martin Probst, Matthias Weiß, Matthieu Riegler, Paul Gschwendtner, Pawel Kozlowski, Sabareesh Kappagantu, WD Snoeijer, angular-robot[bot], arturovt, ced, dario-piotrowicz, ivanwonder and jaybell
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.6"></a>
|
||||
# 14.2.6 (2022-10-12)
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [3fd176a905](https://github.com/angular/angular/commit/3fd176a9054bea6f6c4cd22e8ff3b8f63b86b637) | fix | add missing period to error message ([#47744](https://github.com/angular/angular/pull/47744)) |
|
||||
| [c3821f5ab5](https://github.com/angular/angular/commit/c3821f5ab5bf54b2c9d7868da79a742d4e4b7667) | perf | minimize filesystem calls when generating shims ([#47682](https://github.com/angular/angular/pull/47682)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Andrew Kushnir, Andrew Scott, Aristeidis Bampakos, Bob Watson, Charles Lyding, Joey Perrott, Joshua Morony, Mathew Berg, Paul Gschwendtner, Peter Dickten, Renan Ferro, Sri Ram, WD Snoeijer, markostanimirovic and Álvaro Martínez
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
@@ -90,35 +199,6 @@ Alexander Wiebe, Ciprian Sauliuc, Dmytro Mezhenskyi, George Kalpakas, Joe Martin
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.4"></a>
|
||||
# 15.0.0-next.4 (2022-09-28)
|
||||
## Breaking Changes
|
||||
### router
|
||||
- The title property is now required on ActivatedRouteSnapshot
|
||||
## Deprecations
|
||||
### core
|
||||
- The bit field signature of `Injector.get()` has been deprecated, in favor of the new options object.
|
||||
- The bit field signature of `TestBed.inject()` has been deprecated, in favor of the new options object.
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [841c8e5138](https://github.com/angular/angular/commit/841c8e51386645d7fd26642f41952ed8f0a2dbe5) | feat | support object-based DI flags in Injector.get() ([#46761](https://github.com/angular/angular/pull/46761)) |
|
||||
| [120555a626](https://github.com/angular/angular/commit/120555a626d66523e46ce01681b11a0f38e3a40a) | feat | support object-based DI flags in TestBed.inject() ([#46761](https://github.com/angular/angular/pull/46761)) |
|
||||
| [aef8d0bb02](https://github.com/angular/angular/commit/aef8d0bb020931e0b44e067b074a449fc66f6ff7) | fix | correctly check for `typeof` of undefined in `ngDevMode` check ([#47480](https://github.com/angular/angular/pull/47480)) |
|
||||
| [85330f3fd9](https://github.com/angular/angular/commit/85330f3fd9ac6381ce3aa18479ed8195d2ac215e) | fix | update `isDevMode` to rely on `ngDevMode` ([#47475](https://github.com/angular/angular/pull/47475)) |
|
||||
### language-service
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [e7ee53c541](https://github.com/angular/angular/commit/e7ee53c541da0a1f85c217354ec9901010ae0de9) | feat | support to fix invalid banana in box ([#47393](https://github.com/angular/angular/pull/47393)) |
|
||||
### router
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [6a88bad019](https://github.com/angular/angular/commit/6a88bad0192516f26a5a008c0634b73456b9447c) | fix | Ensure ActivatedRouteSnapshot#title has correct value ([#47481](https://github.com/angular/angular/pull/47481)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Ashley Hunter, Doug Parker, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Rokas Brazdžionis, Simona Cotin and ivanwonder
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.4"></a>
|
||||
# 14.2.4 (2022-09-28)
|
||||
### compiler-cli
|
||||
@@ -134,21 +214,6 @@ Alan Agius, Ashley Hunter, Doug Parker, Jessica Janiuk, JoostK, Kristiyan Kostad
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.3"></a>
|
||||
# 15.0.0-next.3 (2022-09-21)
|
||||
### animations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [d11b1d99b0](https://github.com/angular/angular/commit/d11b1d99b0af1bc6389ef0e0157c5bca8a7f951a) | fix | make sure that the useAnimation function delay is applied ([#47468](https://github.com/angular/angular/pull/47468)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [8fcadaad48](https://github.com/angular/angular/commit/8fcadaad48b2b1328f47b7603b230445a26f95a8) | perf | cache source file for reporting type-checking diagnostics ([#47471](https://github.com/angular/angular/pull/47471)) |
|
||||
## Special Thanks
|
||||
AleksanderBodurri, Andrew Kushnir, Andrew Scott, Bob Watson, George Kalpakas, JiaLiPassion, Joey Perrott, JoostK, Kristiyan Kostadinov, Mauro Mattos, Pawel Kozlowski, Sabareesh Kappagantu, angular-robot[bot], dario-piotrowicz, fabioemoutinho and famzila
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.3"></a>
|
||||
# 14.2.3 (2022-09-21)
|
||||
### animations
|
||||
@@ -160,29 +225,6 @@ AleksanderBodurri, Andrew Kushnir, Andrew Scott, Bob Watson, George Kalpakas, Jo
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.2"></a>
|
||||
# 15.0.0-next.2 (2022-09-14)
|
||||
### animations
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [7ec196e0fb](https://github.com/angular/angular/commit/7ec196e0fb7d73caada1f502758cab0950e3a272) | fix | make sure that the animation function delay is applied ([#47285](https://github.com/angular/angular/pull/47285)) |
|
||||
### common
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [ca7bf65933](https://github.com/angular/angular/commit/ca7bf6593380fa760891d29fba5c9f61c6e9bf8b) | fix | rename `rawSrc` -> `ngSrc` in NgOptimizedImage directive ([#47362](https://github.com/angular/angular/pull/47362)) |
|
||||
### core
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [4e10a74941](https://github.com/angular/angular/commit/4e10a7494130b9bb4772ee8f76b66675867b2145) | fix | imply @Optional flag when a default value is provided ([#47242](https://github.com/angular/angular/pull/47242)) |
|
||||
### forms
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [4a13210ecd](https://github.com/angular/angular/commit/4a13210ecd692aaace7f67fadf25741f3f0cc50b) | fix | don't prevent default behavior for forms with method="dialog" ([#47308](https://github.com/angular/angular/pull/47308)) |
|
||||
## Special Thanks
|
||||
Abhishek Rawat, Andrew Kushnir, Benjamin Chanudet, Bob Watson, Dylan Hunn, George Kalpakas, Ikko Ashimine, Joey Perrott, Kristiyan Kostadinov, Marc Wrobel, Mariia Subkov, Pawel Kozlowski, Sebastian, abergquist, dario-piotrowicz, onrails and vyom1611
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.2"></a>
|
||||
# 14.2.2 (2022-09-14)
|
||||
### animations
|
||||
@@ -206,41 +248,6 @@ Abhishek Rawat, Andrew Kushnir, Benjamin Chanudet, Bob Watson, George Kalpakas,
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.1"></a>
|
||||
# 15.0.0-next.1 (2022-09-07)
|
||||
## Breaking Changes
|
||||
### compiler-cli
|
||||
- Angular compiler option `enableIvy` has been removed as Ivy is the only rendering engine.
|
||||
### localize
|
||||
- - `canParse` method has been removed from all translation parsers in `@angular/localize/tools`. `analyze` should be used instead.
|
||||
- the `hint` parameter in the`parse` methods is now mandatory.
|
||||
### common
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [220d1203e6](https://github.com/angular/angular/commit/220d1203e66116bfcf69204ebac2092eb638bb75) | fix | improve formatting of image warnings ([#47299](https://github.com/angular/angular/pull/47299)) |
|
||||
| [93d7d9101e](https://github.com/angular/angular/commit/93d7d9101e56a51f1ce315b1d0e67fa02e8916d9) | fix | use DOCUMENT token to query for preconnect links ([#47353](https://github.com/angular/angular/pull/47353)) |
|
||||
### compiler
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [cf0c53aa1c](https://github.com/angular/angular/commit/cf0c53aa1c54bf747529a9f7899e68c71249fc9d) | fix | avoid errors for inputs with Object-builtin names ([#47220](https://github.com/angular/angular/pull/47220)) |
|
||||
### compiler-cli
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [16f96eeabf](https://github.com/angular/angular/commit/16f96eeabf77964092b4b6a830e29f2761ffaeec) | refactor | remove `enableIvy` options ([#47346](https://github.com/angular/angular/pull/47346)) |
|
||||
### localize
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [d36fd3d9e4](https://github.com/angular/angular/commit/d36fd3d9e41984818af5e1aad5e3004574d837bb) | refactor | remove deprecated `canParse` method from TranslationParsers ([#47275](https://github.com/angular/angular/pull/47275)) |
|
||||
### service-worker
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [e1bb638e0b](https://github.com/angular/angular/commit/e1bb638e0bc9cf2da4ba3aa8ad7b549164ad5c12) | fix | include headers in requests for assets ([#47260](https://github.com/angular/angular/pull/47260)) |
|
||||
| [a0c3326485](https://github.com/angular/angular/commit/a0c3326485548e8d9b193f5472a9b02a02d679a6) | fix | only consider GET requests as navigation requests ([#47263](https://github.com/angular/angular/pull/47263)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Andrew Kushnir, Aristeidis Bampakos, Asaf M, Bingo's Code, Bob Watson, Daniel Ostrovsky, George Kalpakas, Giovanni Alberto Rivas, Jeremy Elbourn, JiaLiPassion, Jobayer Hossain, Joe Martin (Crowdstaffing), Joey Perrott, JoostK, Kara Erickson, Kristiyan Kostadinov, Maina Wycliffe, Sabareesh Kappagantu, Simona Cotin, Sonu Sindhu, Yann Provoost, abergquist, angular-robot[bot], jaybell and vyom1611
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.1"></a>
|
||||
# 14.2.1 (2022-09-07)
|
||||
### common
|
||||
@@ -262,16 +269,6 @@ Aristeidis Bampakos, Asaf M, Bingo's Code, Bob Watson, Daniel Ostrovsky, George
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="15.0.0-next.0"></a>
|
||||
### router
|
||||
| Commit | Type | Description |
|
||||
| -- | -- | -- |
|
||||
| [5163e3d876](https://github.com/angular/angular/commit/5163e3d876cdfd6d309d7e35aefa6f07ef62715e) | feat | Add UrlTree constructor to public API ([#47186](https://github.com/angular/angular/pull/47186)) |
|
||||
## Special Thanks
|
||||
Alan Agius, Alex Rickabaugh, Andrew Scott, Joey Perrott, Kara Erickson, Kristiyan Kostadinov and Pawel Kozlowski
|
||||
|
||||
<!-- CHANGELOG SPLIT MARKER -->
|
||||
|
||||
<a name="14.2.0"></a>
|
||||
# 14.2.0 (2022-08-25)
|
||||
### animations
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
@@ -1,62 +0,0 @@
|
||||
# Gathering and Viewing Usage Analytics
|
||||
|
||||
Users can opt in to share their Angular CLI usage data with [Google Analytics](https://support.google.com/analytics/answer/1008015?hl=en), using the [`ng analytics` CLI command](analytics).
|
||||
The data is also shared with the Angular team, and used to improve the CLI.
|
||||
|
||||
The gathering of CLI analytics data is disabled by default, and must be enabled at the project level by individual users.
|
||||
It cannot be enabled at the project level for all users.
|
||||
|
||||
Data gathered in this way can be viewed on the Google Analytics site, but is not automatically visible on your own organization's Analytics site.
|
||||
As an administrator for an Angular development group, you can configure your instance of Angular CLI to be able to see analytics data for your own team's usage of the Angular CLI.
|
||||
This configuration option is separate from and in addition to other usage analytics that your users may be sharing with Google.
|
||||
|
||||
## Enable access to CLI usage data
|
||||
|
||||
To configure access to your own users' CLI usage data, use the `ng config` command to add a key to your global [`angular.json` workspace configuration file](guide/workspace-config).
|
||||
The key goes under `cli.analyticsSharing` at the top level of the file, outside the `projects` sections.
|
||||
The value of the key is your organization's tracking ID, as assigned by Google Analytics.
|
||||
This ID is a string that looks like `UA-123456-12`.
|
||||
|
||||
You can choose to use a descriptive string as the key value, or be assigned a random key when you run the CLI command.
|
||||
For example, the following command adds a configuration key named "tracking".
|
||||
|
||||
<code-example format="shell" language="shell">
|
||||
|
||||
ng config --global cli.analyticsSharing.tracking UA-123456-12
|
||||
|
||||
</code-example>
|
||||
|
||||
To turn off this feature, run the following command:
|
||||
|
||||
<code-example format="shell" language="shell">
|
||||
|
||||
ng config --global cli.analyticsSharing undefined
|
||||
|
||||
</code-example>
|
||||
|
||||
## Per user tracking
|
||||
|
||||
You can add a custom user ID to the global configuration, in order to identify unique usage of commands and flags.
|
||||
If that user enables CLI analytics for their own project, your analytics display tracks and labels their individual usage.
|
||||
|
||||
<code-example format="shell" language="shell">
|
||||
|
||||
ng config --global cli.analyticsSharing.uuid SOME_USER_NAME
|
||||
|
||||
</code-example>
|
||||
|
||||
To generate a new random user ID, run the following command:
|
||||
|
||||
<code-example format="shell" language="shell">
|
||||
|
||||
ng config --global cli.analyticsSharing.uuid ""
|
||||
|
||||
</code-example>
|
||||
|
||||
<!-- links -->
|
||||
|
||||
<!-- external links -->
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2022-02-28
|
||||
@@ -0,0 +1,28 @@
|
||||
@name Missing value accessor
|
||||
@category runtime
|
||||
@shortDescription You must register an `NgValueAccessor` with a custom form control
|
||||
|
||||
@description
|
||||
For all custom form controls, you must register a value accessor.
|
||||
|
||||
Here's an example of how to provide one:
|
||||
|
||||
```typescript
|
||||
providers: [
|
||||
{
|
||||
provide: NG_VALUE_ACCESSOR,
|
||||
useExisting: forwardRef(() => MyInputField),
|
||||
multi: true,
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
@debugging
|
||||
As described above, your control was expected to have a value accessor, but was missing one. However, there are many different reasons this can happen in practice. Here's a listing of some known problems leading to this error.
|
||||
|
||||
1. If you **defined** a custom form control, did you remember to provide a value accessor?
|
||||
1. Did you put `ngModel` on an element with no value, or an **invalid element** (e.g. `<div [(ngModel)]="foo">`)?
|
||||
1. Are you using a custom form control declared inside an `NgModule`? if so, make sure you are **importing** the `NgModule`.
|
||||
1. Are you using `ngModel` with a third-party custom form control? Check whether that control provides a value accessor. If not, use **`ngDefaultControl`** on the control's element.
|
||||
1. Are you **testing** a custom form control? Be sure to configure your testbed to know about the control. You can do so with `Testbed.configureTestingModule`.
|
||||
1. Are you using **Nx and Module Federation** with Webpack? Your `webpack.config.js` may require [extra configuration](https://github.com/angular/angular/issues/43821#issuecomment-1054845431) to ensure the forms package is shared.
|
||||
@@ -0,0 +1,71 @@
|
||||
@name Unsafe bindings on an iframe element
|
||||
@category runtime
|
||||
@shortDescription Unsafe bindings on an iframe element
|
||||
|
||||
@description
|
||||
You see this error when Angular detects an attribute binding or a property binding on an `<iframe>` element using the following property names:
|
||||
|
||||
* sandbox
|
||||
* allow
|
||||
* allowFullscreen
|
||||
* referrerPolicy
|
||||
* csp
|
||||
* fetchPriority
|
||||
|
||||
The mentioned attributes affect the security model setup for `<iframe>`s
|
||||
and it's important to apply them before setting the `src` or `srcdoc` attributes.
|
||||
To enforce that, Angular requires these attributes to be set on `<iframe>`s as
|
||||
static attributes, so the values are set at the element creation time and they
|
||||
remain the same throughout the lifetime of an `<iframe>` instance.
|
||||
|
||||
The error is thrown when a property binding with one of the mentioned attribute names is used:
|
||||
```html
|
||||
<iframe [sandbox]="'allow-scripts'" src="..."></iframe>
|
||||
```
|
||||
|
||||
or when it's an attribute bindings:
|
||||
|
||||
```html
|
||||
<iframe [attr.sandbox]="'allow-scripts'" src="..."></iframe>
|
||||
```
|
||||
|
||||
Also, the error is thrown when a similar pattern is used in Directive's host bindings:
|
||||
|
||||
```typescript
|
||||
@Directive({
|
||||
selector: 'iframe',
|
||||
host: {
|
||||
'[sandbox]': `'allow-scripts'`,
|
||||
'[attr.sandbox]': `'allow-scripts'`,
|
||||
}
|
||||
})
|
||||
class IframeDirective {}
|
||||
```
|
||||
|
||||
@debugging
|
||||
|
||||
The error message includes the name of the component with the template where
|
||||
an `<iframe>` element with unsafe bindings is located.
|
||||
|
||||
The recommended solution is to use the mentioned attributes as static ones, for example:
|
||||
|
||||
```html
|
||||
<iframe sandbox="allow-scripts" src="..."></iframe>
|
||||
```
|
||||
|
||||
If you need to have different values for these attributes (depending on various conditions),
|
||||
you can use an `*ngIf` or an `*ngSwitch` on an `<iframe>` element:
|
||||
|
||||
```html
|
||||
<iframe *ngIf="someConditionA" sandbox="allow-scripts" src="..."></iframe>
|
||||
<iframe *ngIf="someConditionB" sandbox="allow-forms" src="..."></iframe>
|
||||
<iframe *ngIf="someConditionC" sandbox="allow-popups" src="..."></iframe>
|
||||
```
|
||||
|
||||
<!-- links -->
|
||||
|
||||
<!-- external links -->
|
||||
|
||||
<!-- end links -->
|
||||
|
||||
@reviewed 2022-05-27
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -9,8 +9,7 @@
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
"src/main.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
@@ -42,4 +41,3 @@
|
||||
},
|
||||
}
|
||||
// #enddocregion angular-compiler-options-app
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,8 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,28 +1,37 @@
|
||||
// This tsconfig is used in the TypeScript
|
||||
// configuration guide (../guide/typescript-configuration.md)
|
||||
// configuration guide (../guide/typescript-configuration.md)
|
||||
// to display the latest default configuration
|
||||
// Note: Update with every major release to the latest default
|
||||
// #docregion
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitOverride": true,
|
||||
"noPropertyAccessFromIndexSignature": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2015",
|
||||
"typeRoots": [
|
||||
"node_modules/@types"
|
||||
],
|
||||
// #docregion lib
|
||||
"target": "ES2022",
|
||||
"module": "ES2022",
|
||||
"useDefineForClassFields": false,
|
||||
"lib": [
|
||||
"es2018",
|
||||
"ES2022",
|
||||
"dom"
|
||||
]
|
||||
// #enddocregion lib
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -8,11 +8,6 @@
|
||||
"angular.io-example": {
|
||||
// #enddocregion locale-config, i18n-baseHref
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:application": {
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
@@ -42,7 +37,7 @@
|
||||
"outputPath": "dist",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"polyfills": ["zone.js"],
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["src/styles.css"],
|
||||
@@ -68,12 +63,6 @@
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
@@ -124,10 +113,8 @@
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"polyfills": ["zone.js", "zone.js/testing"],
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": ["src/favicon.ico", "src/assets"],
|
||||
"styles": ["src/styles.css"],
|
||||
"scripts": []
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -4,7 +4,7 @@ import {NgModule} from '@angular/core';
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
|
||||
// #docregion admin-route
|
||||
import {AuthGuard} from '../auth/auth.guard';
|
||||
import {authGuard} from '../auth/auth.guard';
|
||||
|
||||
import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component';
|
||||
import {AdminComponent} from './admin/admin.component';
|
||||
@@ -14,11 +14,11 @@ import {ManageHeroesComponent} from './manage-heroes/manage-heroes.component';
|
||||
const adminRoutes: Routes = [{
|
||||
path: 'admin',
|
||||
component: AdminComponent,
|
||||
canActivate: [AuthGuard],
|
||||
canActivate: [authGuard],
|
||||
|
||||
// #enddocregion admin-route
|
||||
// #docregion can-match
|
||||
canMatch: [AuthGuard],
|
||||
canMatch: [authGuard],
|
||||
// #enddocregion can-match
|
||||
// #docregion admin-route
|
||||
children: [{
|
||||
@@ -29,7 +29,7 @@ const adminRoutes: Routes = [{
|
||||
{path: '', component: AdminDashboardComponent}
|
||||
],
|
||||
// #enddocregion admin-route
|
||||
canActivateChild: [AuthGuard]
|
||||
canActivateChild: [authGuard]
|
||||
// #docregion admin-route
|
||||
}]
|
||||
}];
|
||||
|
||||
@@ -8,18 +8,18 @@ import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.compo
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
import { authGuard } from '../auth/auth.guard';
|
||||
|
||||
// #docregion can-activate-child
|
||||
const adminRoutes: Routes = [
|
||||
{
|
||||
path: 'admin',
|
||||
component: AdminComponent,
|
||||
canActivate: [AuthGuard],
|
||||
canActivate: [authGuard],
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
canActivateChild: [AuthGuard],
|
||||
canActivateChild: [authGuard],
|
||||
children: [
|
||||
{ path: 'crises', component: ManageCrisesComponent },
|
||||
{ path: 'heroes', component: ManageHeroesComponent },
|
||||
|
||||
@@ -8,17 +8,17 @@ import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.compo
|
||||
import { ManageCrisesComponent } from './manage-crises/manage-crises.component';
|
||||
import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component';
|
||||
|
||||
import { AuthGuard } from '../auth/auth.guard';
|
||||
import { authGuard } from '../auth/auth.guard';
|
||||
|
||||
const adminRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
component: AdminComponent,
|
||||
canActivate: [AuthGuard],
|
||||
canActivate: [authGuard],
|
||||
children: [
|
||||
{
|
||||
path: '',
|
||||
canActivateChild: [AuthGuard],
|
||||
canActivateChild: [authGuard],
|
||||
children: [
|
||||
{ path: 'crises', component: ManageCrisesComponent },
|
||||
{ path: 'heroes', component: ManageHeroesComponent },
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import {Injectable, NgModule} from '@angular/core';
|
||||
import {Title} from '@angular/platform-browser';
|
||||
import {
|
||||
Resolve,
|
||||
ResolveFn,
|
||||
RouterModule,
|
||||
RouterStateSnapshot,
|
||||
Routes,
|
||||
@@ -18,7 +18,7 @@ const routes: Routes = [
|
||||
children: [
|
||||
{
|
||||
path: 'child-a', // child route path
|
||||
title: ResolvedChildATitle,
|
||||
title: resolvedChildATitle,
|
||||
component: ChildAComponent, // child route component that the router renders
|
||||
},
|
||||
{
|
||||
@@ -30,12 +30,7 @@ const routes: Routes = [
|
||||
},
|
||||
];
|
||||
|
||||
@Injectable({providedIn: 'root'})
|
||||
export class ResolvedChildATitle implements Resolve<string> {
|
||||
resolve() {
|
||||
return Promise.resolve('child a');
|
||||
}
|
||||
}
|
||||
const resolvedChildATitle: ResolveFn<string> = () => Promise.resolve('child a');
|
||||
// #enddocregion page-title
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RouterModule, Routes } from '@angular/router';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { authGuard } from './auth/auth.guard';
|
||||
|
||||
|
||||
const appRoutes: Routes = [
|
||||
@@ -20,7 +20,7 @@ const appRoutes: Routes = [
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
// #enddocregion admin-1
|
||||
canLoad: [AuthGuard]
|
||||
canLoad: [authGuard]
|
||||
// #docregion admin-1
|
||||
},
|
||||
// #enddocregion admin, admin-1
|
||||
|
||||
@@ -11,7 +11,7 @@ import {
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { authGuard } from './auth/auth.guard';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
@@ -22,7 +22,7 @@ const appRoutes: Routes = [
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
canLoad: [authGuard]
|
||||
},
|
||||
{
|
||||
path: 'crisis-center',
|
||||
|
||||
@@ -6,7 +6,7 @@ import { RouterModule, Routes } from '@angular/router';
|
||||
import { ComposeMessageComponent } from './compose-message/compose-message.component';
|
||||
import { PageNotFoundComponent } from './page-not-found/page-not-found.component';
|
||||
|
||||
import { AuthGuard } from './auth/auth.guard';
|
||||
import { authGuard } from './auth/auth.guard';
|
||||
import { SelectivePreloadingStrategyService } from './selective-preloading-strategy.service';
|
||||
|
||||
const appRoutes: Routes = [
|
||||
@@ -18,7 +18,7 @@ const appRoutes: Routes = [
|
||||
{
|
||||
path: 'admin',
|
||||
loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule),
|
||||
canLoad: [AuthGuard]
|
||||
canLoad: [authGuard]
|
||||
},
|
||||
// #docregion preload-v2
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// #docregion
|
||||
import { NgModule } from '@angular/core';
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { AuthGuard } from './auth.guard';
|
||||
import { authGuard } from './auth.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
|
||||
|
||||
@@ -1,15 +1,8 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
|
||||
import { CanActivateFn } from '@angular/router';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuard implements CanActivate {
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): boolean {
|
||||
console.log('AuthGuard#canActivate called');
|
||||
return true;
|
||||
}
|
||||
}
|
||||
export const authGuard: CanActivateFn = () => {
|
||||
console.log('authGuard#canActivate called');
|
||||
return true;
|
||||
};
|
||||
// #enddocregion
|
||||
|
||||
@@ -1,45 +1,22 @@
|
||||
// #docregion
|
||||
import {Injectable} from '@angular/core';
|
||||
import {inject} from '@angular/core';
|
||||
import {
|
||||
ActivatedRouteSnapshot, CanActivate, CanMatch,
|
||||
Route, Router, RouterStateSnapshot, UrlTree
|
||||
CanActivateFn, CanMatchFn,
|
||||
Router, UrlTree
|
||||
} from '@angular/router';
|
||||
|
||||
import {AuthService} from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuard implements CanActivate, CanMatch {
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
export const authGuard: CanMatchFn|CanActivateFn = () => {
|
||||
const authService = inject(AuthService);
|
||||
const router = inject(Router);
|
||||
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): true|UrlTree {
|
||||
const url: string = state.url;
|
||||
|
||||
return this.checkLogin(url);
|
||||
if (authService.isLoggedIn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// #enddocregion
|
||||
// #docregion can-match
|
||||
canMatch(route: Route) {
|
||||
const url = `/${route.path}`;
|
||||
return this.checkLogin(url) === true;
|
||||
}
|
||||
// #enddocregion can-match
|
||||
// #docregion
|
||||
// Redirect to the login page
|
||||
return router.parseUrl('/login');
|
||||
};
|
||||
|
||||
checkLogin(url: string): true|UrlTree {
|
||||
if (this.authService.isLoggedIn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
this.authService.redirectUrl = url;
|
||||
|
||||
// Redirect to the login page
|
||||
return this.router.parseUrl('/login');
|
||||
}
|
||||
}
|
||||
// #enddocregion
|
||||
|
||||
@@ -1,44 +1,20 @@
|
||||
// #docregion can-activate-child
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot,
|
||||
CanActivateChild,
|
||||
CanActivateFn, CanMatchFn, Router,
|
||||
CanActivateChildFn,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuard implements CanActivate, CanActivateChild {
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
export const authGuard: CanMatchFn|CanActivateFn|CanActivateChildFn = () => {
|
||||
const authService = inject(AuthService);
|
||||
const router = inject(Router);
|
||||
|
||||
canActivate(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): true|UrlTree {
|
||||
const url: string = state.url;
|
||||
|
||||
return this.checkLogin(url);
|
||||
if (authService.isLoggedIn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
canActivateChild(
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot): true|UrlTree {
|
||||
return this.canActivate(route, state);
|
||||
}
|
||||
|
||||
// #enddocregion can-activate-child
|
||||
checkLogin(url: string): true|UrlTree {
|
||||
if (this.authService.isLoggedIn) { return true; }
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
this.authService.redirectUrl = url;
|
||||
|
||||
// Redirect to the login page
|
||||
return this.router.parseUrl('/login');
|
||||
}
|
||||
// #docregion can-activate-child
|
||||
}
|
||||
// #enddocregion
|
||||
// Redirect to the login page
|
||||
return router.parseUrl('/login');
|
||||
};
|
||||
|
||||
@@ -1,49 +1,33 @@
|
||||
// #docplaster
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot,
|
||||
CanActivateChild,
|
||||
CanActivateFn, CanMatchFn, Router,
|
||||
CanActivateChildFn,
|
||||
NavigationExtras,
|
||||
UrlTree
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuard implements CanActivate, CanActivateChild {
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
export const authGuard: CanMatchFn|CanActivateFn|CanActivateChildFn = () => {
|
||||
const authService = inject(AuthService);
|
||||
const router = inject(Router);
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): true|UrlTree {
|
||||
const url: string = state.url;
|
||||
|
||||
return this.checkLogin(url);
|
||||
if (authService.isLoggedIn) {
|
||||
return true;
|
||||
}
|
||||
|
||||
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): true|UrlTree {
|
||||
return this.canActivate(route, state);
|
||||
}
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
checkLogin(url: string): true|UrlTree {
|
||||
if (this.authService.isLoggedIn) { return true; }
|
||||
// Set our navigation extras object
|
||||
// that contains our global query params and fragment
|
||||
const navigationExtras: NavigationExtras = {
|
||||
queryParams: { session_id: sessionId },
|
||||
fragment: 'anchor'
|
||||
};
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
this.authService.redirectUrl = url;
|
||||
// Redirect to the login page with extras
|
||||
return router.createUrlTree(['/login'], navigationExtras);
|
||||
};
|
||||
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
// Set our navigation extras object
|
||||
// that contains our global query params and fragment
|
||||
const navigationExtras: NavigationExtras = {
|
||||
queryParams: { session_id: sessionId },
|
||||
fragment: 'anchor'
|
||||
};
|
||||
|
||||
// Redirect to the login page with extras
|
||||
return this.router.createUrlTree(['/login'], navigationExtras);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,57 +1,33 @@
|
||||
// #docplaster
|
||||
import { Injectable } from '@angular/core';
|
||||
import { inject } from '@angular/core';
|
||||
import {
|
||||
CanActivate, Router,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot,
|
||||
CanActivateChild,
|
||||
CanActivateFn, CanMatchFn, Router,
|
||||
CanActivateChildFn,
|
||||
NavigationExtras,
|
||||
CanLoad, Route
|
||||
CanLoadFn, UrlTree
|
||||
} from '@angular/router';
|
||||
import { AuthService } from './auth.service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
|
||||
constructor(private authService: AuthService, private router: Router) {}
|
||||
|
||||
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||
const url: string = state.url;
|
||||
|
||||
return this.checkLogin(url);
|
||||
}
|
||||
|
||||
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {
|
||||
return this.canActivate(route, state);
|
||||
}
|
||||
|
||||
// #docregion, canLoad
|
||||
canLoad(route: Route): boolean {
|
||||
const url = `/${route.path}`;
|
||||
|
||||
return this.checkLogin(url);
|
||||
}
|
||||
// #docregion canLoad
|
||||
export const authGuard: CanMatchFn|CanActivateChildFn|CanActivateFn|CanLoadFn = () => {
|
||||
// #enddocregion canLoad
|
||||
const router = inject(Router);
|
||||
const authService = inject(AuthService);
|
||||
|
||||
checkLogin(url: string): boolean {
|
||||
if (this.authService.isLoggedIn) { return true; }
|
||||
|
||||
// Store the attempted URL for redirecting
|
||||
this.authService.redirectUrl = url;
|
||||
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
// Set our navigation extras object
|
||||
// that contains our global query params and fragment
|
||||
const navigationExtras: NavigationExtras = {
|
||||
queryParams: { session_id: sessionId },
|
||||
fragment: 'anchor'
|
||||
};
|
||||
|
||||
// Navigate to the login page with extras
|
||||
this.router.navigate(['/login'], navigationExtras);
|
||||
return false;
|
||||
if (authService.isLoggedIn) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// Create a dummy session id
|
||||
const sessionId = 123456789;
|
||||
|
||||
// Set our navigation extras object
|
||||
// that contains our global query params and fragment
|
||||
const navigationExtras: NavigationExtras = {
|
||||
queryParams: { session_id: sessionId },
|
||||
fragment: 'anchor'
|
||||
};
|
||||
|
||||
// Navigate to the login page with extras
|
||||
return router.createUrlTree(['/login'], navigationExtras);
|
||||
};
|
||||
|
||||
@@ -1,22 +1,16 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Observable } from 'rxjs';
|
||||
import { CanDeactivate,
|
||||
import { CanDeactivateFn,
|
||||
ActivatedRouteSnapshot,
|
||||
RouterStateSnapshot } from '@angular/router';
|
||||
|
||||
import { CrisisDetailComponent } from './crisis-center/crisis-detail/crisis-detail.component';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CanDeactivateGuard implements CanDeactivate<CrisisDetailComponent> {
|
||||
|
||||
canDeactivate(
|
||||
export const canDeactivateGuard: CanDeactivateFn<CrisisDetailComponent> = (
|
||||
component: CrisisDetailComponent,
|
||||
route: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
): Observable<boolean> | boolean {
|
||||
): Observable<boolean> | boolean => {
|
||||
// Get the Crisis Center ID
|
||||
console.log(route.paramMap.get('id'));
|
||||
|
||||
@@ -30,5 +24,4 @@ export class CanDeactivateGuard implements CanDeactivate<CrisisDetailComponent>
|
||||
// Otherwise ask the user with the dialog service and return its
|
||||
// observable which resolves to true or false when the user decides
|
||||
return component.dialogService.confirm('Discard changes?');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,17 +1,10 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import { CanDeactivate } from '@angular/router';
|
||||
import { CanDeactivateFn } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
export interface CanComponentDeactivate {
|
||||
canDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;
|
||||
canDeactivate?: () => Observable<boolean> | Promise<boolean> | boolean;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {
|
||||
canDeactivate(component: CanComponentDeactivate) {
|
||||
return component.canDeactivate ? component.canDeactivate() : true;
|
||||
}
|
||||
}
|
||||
export const canDeactivateGuard: CanDeactivateFn<CanComponentDeactivate> =
|
||||
(component: CanComponentDeactivate) => component.canDeactivate ? component.canDeactivate() : true;
|
||||
|
||||
@@ -6,8 +6,8 @@ import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { canDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { crisisDetailResolver} from './crisis-detail-resolver';
|
||||
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
@@ -22,9 +22,9 @@ const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
path: ':id',
|
||||
component: CrisisDetailComponent,
|
||||
canDeactivate: [CanDeactivateGuard],
|
||||
canDeactivate: [canDeactivateGuard],
|
||||
resolve: {
|
||||
crisis: CrisisDetailResolverService
|
||||
crisis: crisisDetailResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@ import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { canDeactivateGuard } from '../can-deactivate.guard';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
@@ -20,7 +20,7 @@ const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
path: ':id',
|
||||
component: CrisisDetailComponent,
|
||||
canDeactivate: [CanDeactivateGuard]
|
||||
canDeactivate: [canDeactivateGuard]
|
||||
},
|
||||
{
|
||||
path: '',
|
||||
|
||||
@@ -8,8 +8,8 @@ import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { canDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { crisisDetailResolver } from './crisis-detail-resolver';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
@@ -23,9 +23,9 @@ const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
path: ':id',
|
||||
component: CrisisDetailComponent,
|
||||
canDeactivate: [CanDeactivateGuard],
|
||||
canDeactivate: [canDeactivateGuard],
|
||||
resolve: {
|
||||
crisis: CrisisDetailResolverService
|
||||
crisis: crisisDetailResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -8,8 +8,8 @@ import { CrisisListComponent } from './crisis-list/crisis-list.component';
|
||||
import { CrisisCenterComponent } from './crisis-center/crisis-center.component';
|
||||
import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component';
|
||||
|
||||
import { CanDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { CrisisDetailResolverService } from './crisis-detail-resolver.service';
|
||||
import { canDeactivateGuard } from '../can-deactivate.guard';
|
||||
import { crisisDetailResolver } from './crisis-detail-resolver';
|
||||
|
||||
const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
@@ -23,9 +23,9 @@ const crisisCenterRoutes: Routes = [
|
||||
{
|
||||
path: ':id',
|
||||
component: CrisisDetailComponent,
|
||||
canDeactivate: [CanDeactivateGuard],
|
||||
canDeactivate: [canDeactivateGuard],
|
||||
resolve: {
|
||||
crisis: CrisisDetailResolverService
|
||||
crisis: crisisDetailResolver
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
// #docregion
|
||||
|
||||
export function crisisDetailResolver() {
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CrisisDetailResolverService {
|
||||
|
||||
constructor() { }
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
// #docregion
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
Router, Resolve,
|
||||
RouterStateSnapshot,
|
||||
ActivatedRouteSnapshot
|
||||
} from '@angular/router';
|
||||
import { Observable, of, EMPTY } from 'rxjs';
|
||||
import { mergeMap } from 'rxjs/operators';
|
||||
|
||||
import { CrisisService } from './crisis.service';
|
||||
import { Crisis } from './crisis';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root',
|
||||
})
|
||||
export class CrisisDetailResolverService implements Resolve<Crisis> {
|
||||
constructor(private cs: CrisisService, private router: Router) {}
|
||||
|
||||
resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<Crisis> | Observable<never> {
|
||||
const id = route.paramMap.get('id')!;
|
||||
|
||||
return this.cs.getCrisis(id).pipe(
|
||||
mergeMap(crisis => {
|
||||
if (crisis) {
|
||||
return of(crisis);
|
||||
} else { // id not found
|
||||
this.router.navigate(['/crisis-center']);
|
||||
return EMPTY;
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
// #docregion
|
||||
import {inject} from '@angular/core';
|
||||
import {ActivatedRouteSnapshot, ResolveFn, Router} from '@angular/router';
|
||||
import {EMPTY, of} from 'rxjs';
|
||||
import {mergeMap} from 'rxjs/operators';
|
||||
|
||||
import {Crisis} from './crisis';
|
||||
import {CrisisService} from './crisis.service';
|
||||
|
||||
export const crisisDetailResolver: ResolveFn<Crisis> = (route: ActivatedRouteSnapshot) => {
|
||||
const router = inject(Router);
|
||||
const cs = inject(CrisisService);
|
||||
const id = route.paramMap.get('id')!;
|
||||
|
||||
return cs.getCrisis(id).pipe(mergeMap(crisis => {
|
||||
if (crisis) {
|
||||
return of(crisis);
|
||||
} else { // id not found
|
||||
router.navigate(['/crisis-center']);
|
||||
return EMPTY;
|
||||
}
|
||||
}));
|
||||
};
|
||||
@@ -3,4 +3,5 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -3,4 +3,5 @@ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,13 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NgModule, isDevMode } from '@angular/core';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
import { environment } from '../environments/environment';
|
||||
|
||||
import { CheckForUpdateService } from './check-for-update.service';
|
||||
import { LogUpdateService } from './log-update.service';
|
||||
@@ -15,7 +14,7 @@ import { PromptUpdateService } from './prompt-update.service';
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: environment.production})
|
||||
ServiceWorkerModule.register('/ngsw-worker.js', {enabled: !isDevMode()})
|
||||
],
|
||||
providers: [
|
||||
CheckForUpdateService,
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.log(err));
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
// #docregion
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// #docregion
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
// main app entry point
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule);
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user