diff --git a/.bazelignore b/.bazelignore index a733d1d5ef6..94034ac8db9 100644 --- a/.bazelignore +++ b/.bazelignore @@ -5,9 +5,6 @@ .git node_modules dist -aio/node_modules -aio/tools/examples/shared/node_modules -aio/tools/examples/shared/example-scaffold # All integration test node_modules folders integration/animations/node_modules diff --git a/.bazelrc b/.bazelrc index 7d49ef97303..d6e9d44a1b0 100644 --- a/.bazelrc +++ b/.bazelrc @@ -67,15 +67,6 @@ build:snapshot-build --stamp # exceeds the max source file size. To address this, we just *don't* stamp Firefox builds of Angular DevTools. build:snapshot-build-firefox --nostamp -########################################################## -# AIO architect build configuration # -# See aio/angular.json for available configurations. # -# To build with a partiular configuration: # -# bazel build //aio:build --aio_build_config= # -# Default config is `stable``. # -########################################################## -build --flag_alias=aio_build_config=//aio:flag_aio_build_config - ############################### # Output # ############################### diff --git a/.circleci/env-helpers.inc.sh b/.circleci/env-helpers.inc.sh index a51f67c7d8b..ff818d24b80 100644 --- a/.circleci/env-helpers.inc.sh +++ b/.circleci/env-helpers.inc.sh @@ -44,7 +44,7 @@ function setSecretVar() { # Create a function to set an environment variable, when called. # # Use this function for creating setter for public environment variables that require expensive or -# time-consuming computaions and may not be needed. When needed, you can call this function to set +# time-consuming computations and may not be needed. When needed, you can call this function to set # the environment variable (which will be available through `$BASH_ENV` from that point onwards). # # Arguments: diff --git a/.circleci/env.sh b/.circleci/env.sh index 3bfd556a448..9522f3c56a7 100755 --- a/.circleci/env.sh +++ b/.circleci/env.sh @@ -16,7 +16,6 @@ echo "source $envHelpersPath;" >> $BASH_ENV; #################################################################################################### setPublicVar CI "$CI" setPublicVar PROJECT_ROOT "$projectDir"; -setPublicVar CI_AIO_MIN_PWA_SCORE "95"; # This is the branch being built; e.g. `pull/12345` for PR builds. setPublicVar CI_BRANCH "$CIRCLE_BRANCH"; setPublicVar CI_BUILD_URL "$CIRCLE_BUILD_URL"; diff --git a/.devcontainer/recommended-devcontainer.json b/.devcontainer/recommended-devcontainer.json index d8ef6cc0cc4..32513341983 100644 --- a/.devcontainer/recommended-devcontainer.json +++ b/.devcontainer/recommended-devcontainer.json @@ -6,10 +6,6 @@ "postCreateCommand": "yarn install", "extensions": [ "devondcarew.bazel-code", - "gkalpak.aio-docs-utils", - "ms-vscode.vscode-typescript-tslint-plugin", - // The following extensions are useful when working on angular.io (i.e. inside the `aio/` directory). - //"angular.ng-template", - //"dbaeumer.vscode-eslint", + "ms-vscode.vscode-typescript-tslint-plugin" ], } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 95cfde7663d..4a2185f591b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,8 +26,6 @@ jobs: cache-node-modules: true - name: Install node modules run: yarn install --frozen-lockfile - - name: Install node modules in aio - run: yarn install --frozen-lockfile --cwd aio - name: Check code lint run: yarn -s tslint - name: Check for circular dependencies diff --git a/.github/workflows/monitoring.yml b/.github/workflows/monitoring.yml deleted file mode 100644 index 8fe4044764c..00000000000 --- a/.github/workflows/monitoring.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Monitoring - -on: - schedule: - # Run at 10:00AM every day. - - cron: '0 10 * * *' - -permissions: {} - -defaults: - run: - shell: bash - -jobs: - check_aio: - runs-on: ubuntu-latest - env: - MINIMUM_PWA_SCORE: 95 - strategy: - fail-fast: false - matrix: - version: ['https://next.angular.io/', 'https://angular.io/'] - steps: - - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@03b8a7dffd1205e061f0bee949024ebefc2a6592 - with: - cache-node-modules: true - node-module-directories: | - ./aio/node_modules - - name: Setup Bazel - uses: angular/dev-infra/github-actions/bazel/setup@03b8a7dffd1205e061f0bee949024ebefc2a6592 - - name: Setup Bazel RBE - uses: angular/dev-infra/github-actions/bazel/configure-remote@03b8a7dffd1205e061f0bee949024ebefc2a6592 - - name: Install node modules in aio - run: yarn install --frozen-lockfile --cwd aio - - name: Run basic e2e and deployment config tests. - run: yarn --cwd aio test-production-url --test_env=TARGET_URL="${{ matrix.version }}" - - name: Run PWA-score tests. - run: yarn --cwd aio test-pwa-score "${{ matrix.version }}" "${{ env.MINIMUM_PWA_SCORE }}" - - name: Run a11y tests. - run: yarn --cwd aio test-a11y-score "${{ matrix.version }}" - - check_contributor_links: - runs-on: ubuntu-latest - steps: - - name: Initialize environment - uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@03b8a7dffd1205e061f0bee949024ebefc2a6592 - with: - cache-node-modules: true - node-module-directories: | - ./aio/node_modules - - name: Install node modules in aio - run: yarn install --frozen-lockfile --cwd aio - - name: Check website provided in contributors.json file - run: node aio/scripts/test-external-urls.js diff --git a/.github/workflows/update-cli-help.yml b/.github/workflows/update-cli-help.yml index 3d7784bd90a..9c31063a807 100644 --- a/.github/workflows/update-cli-help.yml +++ b/.github/workflows/update-cli-help.yml @@ -1,4 +1,4 @@ -name: Update AIO Angular CLI help +name: Update ADEV Angular CLI help on: workflow_dispatch: diff --git a/.gitignore b/.gitignore index 5547fef11e3..1aaa2197307 100644 --- a/.gitignore +++ b/.gitignore @@ -56,7 +56,6 @@ baseline.json # Husky .husky/_ -aio/content/examples/.DS_Store # Ignore cache created with the Angular CLI. diff --git a/.ng-dev/format.mts b/.ng-dev/format.mts index 888bfc7fa18..89453c4ca84 100644 --- a/.ng-dev/format.mts +++ b/.ng-dev/format.mts @@ -22,8 +22,6 @@ export const format: FormatConfig = { '!packages/common/src/i18n/currencies.ts', // Test cases contain non valid code. '!packages/compiler-cli/test/compliance/test_cases/**/*.{js,ts}', - // Ignore AIO as its pending removal. - '!aio/**/*.{js,ts}', // Ignore generated javascript file(s) '!.github/actions/deploy-docs-site/main.js', diff --git a/.ng-dev/release.mts b/.ng-dev/release.mts index 34ea888cc5d..e17dbd93e79 100644 --- a/.ng-dev/release.mts +++ b/.ng-dev/release.mts @@ -28,7 +28,7 @@ export const release: ReleaseConfig = { return performNpmReleaseBuild(); }, releaseNotes: { - hiddenScopes: ['aio', 'bazel', 'dev-infra', 'docs-infra', 'zone.js', 'devtools'], + hiddenScopes: ['bazel', 'dev-infra', 'docs-infra', 'zone.js', 'devtools'], }, releasePrLabels: ['area: build & ci', 'action: merge', 'PullApprove: disable'], }; diff --git a/.pullapprove.yml b/.pullapprove.yml index 2a90359c380..d65cae5a3d6 100644 --- a/.pullapprove.yml +++ b/.pullapprove.yml @@ -121,19 +121,6 @@ groups: contains_any_globs(files, [ 'packages/animations/**/{*,.*}', 'packages/platform-browser/animations/**/{*,.*}', - 'aio/content/guide/animations.md', - 'aio/content/guide/add-an-animation.md', - 'aio/content/guide/animate-state-style.md', - 'aio/content/guide/animation-api-summary.md', - 'aio/content/guide/understanding-angular-animation.md', - 'aio/content/examples/animations/**/{*,.*}', - 'aio/content/images/guide/animations/**/{*,.*}', - 'aio/content/guide/complex-animation-sequences.md', - 'aio/content/guide/reusable-animations.md', - 'aio/content/guide/route-animations.md', - 'aio/content/guide/transition-and-triggers.md', - 'aio/content/guide/animations-attach-to-html-template.md', - 'aio/content/guide/animation-transition-timing.md' ]) reviewers: users: @@ -152,13 +139,7 @@ groups: contains_any_globs(files, [ 'packages/compiler/**/{*,.*}', 'packages/examples/compiler/**/{*,.*}', - 'aio/content/examples/angular-compiler-options/**/{*,.*}', 'packages/compiler-cli/**/{*,.*}', - 'aio/content/guide/angular-compiler-options.md', - 'aio/content/guide/aot-compiler.md', - 'aio/content/guide/aot-metadata-errors.md', - 'aio/content/guide/template-typecheck.md', - 'aio/content/extended-diagnostics/*.md' ]) reviewers: users: @@ -200,155 +181,6 @@ groups: 'packages/examples/platform-browser/**/{*,.*}', 'packages/platform-browser-dynamic/**/{*,.*}', 'packages/docs/**/{*,.*}', - 'aio/content/guide/accessibility.md', - 'aio/content/examples/accessibility/**/{*,.*}', - 'aio/content/guide/architecture-components.md', - 'aio/content/guide/architecture-modules.md', - 'aio/content/guide/architecture-next-steps.md', - 'aio/content/guide/architecture-services.md', - 'aio/content/guide/architecture.md', - 'aio/content/examples/architecture/**/{*,.*}', - 'aio/content/guide/rxjs-interop.md', - 'aio/content/images/guide/architecture/**/{*,.*}', - 'aio/content/guide/attribute-directives.md', - 'aio/content/examples/attribute-directives/**/{*,.*}', - 'aio/content/images/guide/attribute-directives/**/{*,.*}', - 'aio/content/guide/bootstrapping.md', - 'aio/content/examples/bootstrapping/**/{*,.*}', - 'aio/content/guide/change-detection.md', - 'aio/content/guide/change-detection-zone-pollution.md', - 'aio/content/guide/change-detection-slow-computations.md', - 'aio/content/guide/change-detection-skipping-subtrees.md', - 'aio/content/images/guide/change-detection/**/{*,.*}', - 'aio/content/guide/class-binding.md', - 'aio/content/guide/cheatsheet.md', - 'aio/content/guide/component-interaction.md', - 'aio/content/examples/component-interaction/**/{*,.*}', - 'aio/content/images/guide/component-interaction/**/{*,.*}', - 'aio/content/guide/component-overview.md', - 'aio/content/errors/*.md', - 'aio/content/examples/errors/**/{*,.*}', - 'aio/content/examples/component-overview/**/{*,.*}', - 'aio/content/guide/component-styles.md', - 'aio/content/guide/developer-guide-overview.md', - 'aio/content/guide/view-encapsulation.md', - 'aio/content/examples/component-styles/**/{*,.*}', - 'aio/content/examples/content-projection/**/{*,.*}', - 'aio/content/guide/content-projection.md', - 'aio/content/guide/creating-injectable-service.md', - 'aio/content/guide/dependency-injection-overview.md', - 'aio/content/guide/dependency-injection.md', - 'aio/content/examples/dependency-injection/**/{*,.*}', - 'aio/content/images/guide/dependency-injection/**/{*,.*}', - 'aio/content/guide/dependency-injection-in-action.md', - 'aio/content/examples/dependency-injection-in-action/**/{*,.*}', - 'aio/content/images/guide/dependency-injection-in-action/**/{*,.*}', - 'aio/content/guide/dependency-injection-navtree.md', - 'aio/content/guide/dependency-injection-providers.md', - 'aio/content/guide/dependency-injection-context.md', - 'aio/content/guide/lightweight-injection-tokens.md', - 'aio/content/guide/displaying-data.md', - 'aio/content/examples/displaying-data/**/{*,.*}', - 'aio/content/images/guide/displaying-data/**/{*,.*}', - 'aio/content/guide/dynamic-component-loader.md', - 'aio/content/examples/dynamic-component-loader/**/{*,.*}', - 'aio/content/images/guide/dynamic-component-loader/**/{*,.*}', - 'aio/content/guide/example-apps-list.md', - 'aio/content/guide/feature-modules.md', - 'aio/content/examples/feature-modules/**/{*,.*}', - 'aio/content/images/guide/feature-modules/**/{*,.*}', - 'aio/content/guide/frequent-ngmodules.md', - 'aio/content/images/guide/frequent-ngmodules/**/{*,.*}', - 'aio/content/guide/hierarchical-dependency-injection.md', - 'aio/content/examples/hierarchical-dependency-injection/**/{*,.*}', - 'aio/content/guide/image-directive.md', - 'aio/content/guide/image-directive-setup.md', - 'aio/content/examples/providers-viewproviders/**/{*,.*}', - 'aio/content/examples/resolution-modifiers/**/{*,.*}', - 'aio/content/guide/lazy-loading-ngmodules.md', - 'aio/content/examples/lazy-loading-ngmodules/**/{*,.*}', - 'aio/content/images/guide/lazy-loading-ngmodules/**/{*,.*}', - 'aio/content/guide/lifecycle-hooks.md', - 'aio/content/examples/lifecycle-hooks/**/{*,.*}', - 'aio/content/images/guide/lifecycle-hooks/**/{*,.*}', - 'aio/content/examples/ngcontainer/**/{*,.*}', - 'aio/content/guide/ngmodules.md', - 'aio/content/examples/ngmodules/**/{*,.*}', - 'aio/content/guide/ngmodule-api.md', - 'aio/content/guide/ngmodule-faq.md', - 'aio/content/guide/ngmodule-vs-jsmodule.md', - 'aio/content/guide/module-types.md', - 'aio/content/guide/template-overview.md', - 'aio/content/guide/template-syntax.md', - 'aio/content/guide/built-in-template-functions.md', - 'aio/content/examples/built-in-template-functions/**/{*,.*}', - 'aio/content/guide/event-binding.md', - 'aio/content/guide/event-binding-concepts.md', - 'aio/content/examples/event-binding/**/{*,.*}', - 'aio/content/guide/interpolation.md', - 'aio/content/examples/interpolation/**/{*,.*}', - 'aio/content/examples/template-syntax/**/{*,.*}', - 'aio/content/images/guide/template-syntax/**/{*,.*}', - 'aio/content/guide/binding-overview.md', - 'aio/content/guide/binding-syntax.md', - 'aio/content/examples/binding-syntax/**/{*,.*}', - 'aio/content/guide/property-binding.md', - 'aio/content/examples/property-binding/**/{*,.*}', - 'aio/content/guide/property-binding-best-practices.md', - 'aio/content/guide/attribute-binding.md', - 'aio/content/examples/attribute-binding/**/{*,.*}', - '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', - 'aio/content/examples/template-reference-variables/**/{*,.*}', - 'aio/content/guide/inputs-outputs.md', - 'aio/content/examples/inputs-outputs/**/{*,.*}', - 'aio/content/images/guide/inputs-outputs/**/{*,.*}', - 'aio/content/guide/understanding-template-expr-overview.md', - 'aio/content/guide/template-expression-operators.md', - 'aio/content/examples/template-expression-operators/**/{*,.*}', - 'aio/content/guide/pipes.md', - 'aio/content/guide/pipes-custom-data-trans.md', - 'aio/content/guide/pipes-overview.md', - 'aio/content/guide/pipe-precedence.md', - 'aio/content/guide/pipes-transform-data.md', - 'aio/content/guide/pipe-template.md', - 'aio/content/examples/pipes/**/{*,.*}', - 'aio/content/images/guide/pipes/**/{*,.*}', - 'aio/content/guide/providers.md', - 'aio/content/examples/providers/**/{*,.*}', - 'aio/content/images/guide/providers/**/{*,.*}', - 'aio/content/guide/signal-queries.md', - 'aio/content/guide/singleton-services.md', - 'aio/content/guide/signal-inputs.md', - 'aio/content/guide/sharing-ngmodules.md', - 'aio/content/guide/standalone-components.md', - 'aio/content/guide/standalone-migration.md', - 'aio/content/guide/structural-directives.md', - 'aio/content/examples/structural-directives/**/{*,.*}', - 'aio/content/guide/svg-in-templates.md', - 'aio/content/guide/style-precedence.md', - 'aio/content/images/guide/structural-directives/**/{*,.*}', - 'aio/content/guide/template-statements.md', - 'aio/content/guide/understanding-angular-overview.md', - 'aio/content/guide/user-input.md', - 'aio/content/examples/user-input/**/{*,.*}', - 'aio/content/images/guide/user-input/**/{*,.*}', - 'aio/content/guide/view-encapsulation.md', - 'aio/content/examples/view-encapsulation/**/{*,.*}', - 'aio/content/images/guide/view-encapsulation/**/{*,.*}', - 'aio/content/special-elements/**/{*,.*}', - 'aio/content/blocks/**/{*,.*}', - 'aio/content/guide/hydration.md', - 'aio/content/guide/defer.md', - 'aio/content/guide/signals.md', - 'aio/content/guide/control_flow.md', - 'aio/content/guide/model-inputs.md', - 'aio/content/examples/injection-token/**/{*,.*}', ]) reviewers: users: @@ -391,23 +223,6 @@ groups: contains_any_globs(files, [ 'packages/common/http/**/{*,.*}', 'packages/examples/http/**/{*,.*}', - 'aio/content/guide/understanding-communicating-with-http.md', - 'aio/content/guide/http-configure-http-url-parameters.md', - 'aio/content/guide/http-handle-request-errors.md', - 'aio/content/guide/http-intercept-requests-and-responses.md', - 'aio/content/guide/http-interceptor-use-cases.md', - 'aio/content/guide/http-make-jsonp-request.md', - 'aio/content/guide/http-optimize-server-interaction.md', - 'aio/content/guide/http-pass-metadata-to-interceptors.md', - 'aio/content/guide/http-request-data-from-server.md', - 'aio/content/guide/http-security-xsrf-protection.md', - 'aio/content/guide/http-send-data-to-server.md', - 'aio/content/guide/http-server-communication.md', - 'aio/content/guide/http-setup-server-communication.md', - 'aio/content/guide/http-test-requests.md', - 'aio/content/guide/http-track-show-request-progress.md', - 'aio/content/examples/http/**/{*,.*}', - 'aio/content/images/guide/http/**/{*,.*}' ]) reviewers: users: @@ -427,9 +242,6 @@ groups: - > contains_any_globs(files, [ 'packages/elements/**/{*,.*}', - 'aio/content/examples/elements/**/{*,.*}', - 'aio/content/images/guide/elements/**/{*,.*}', - 'aio/content/guide/elements.md' ]) reviewers: users: @@ -451,22 +263,6 @@ groups: contains_any_globs(files, [ 'packages/forms/**/{*,.*}', 'packages/examples/forms/**/{*,.*}', - 'aio/content/guide/forms.md', - 'aio/content/examples/forms/**/{*,.*}', - 'aio/content/images/guide/forms/**/{*,.*}', - 'aio/content/guide/forms-overview.md', - 'aio/content/examples/forms-overview/**/{*,.*}', - 'aio/content/images/guide/forms-overview/**/{*,.*}', - 'aio/content/guide/form-validation.md', - 'aio/content/guide/typed-forms.md', - 'aio/content/examples/form-validation/**/{*,.*}', - 'aio/content/images/guide/form-validation/**/{*,.*}', - 'aio/content/guide/dynamic-form.md', - 'aio/content/examples/dynamic-form/**/{*,.*}', - 'aio/content/images/guide/dynamic-form/**/{*,.*}', - 'aio/content/guide/reactive-forms.md', - 'aio/content/examples/reactive-forms/**/{*,.*}', - 'aio/content/images/guide/reactive-forms/**/{*,.*}' ]) reviewers: users: @@ -495,21 +291,6 @@ groups: 'packages/compiler/src/render3/view/i18n/**/{*,.*}', 'packages/compiler-cli/src/extract_i18n.ts', 'packages/localize/**/{*,.*}', - 'aio/content/guide/i18n-overview.md', - 'aio/content/guide/i18n-common-overview.md', - 'aio/content/guide/i18n-common-add-package.md', - 'aio/content/guide/i18n-common-locale-id.md', - 'aio/content/guide/i18n-common-format-data-locale.md', - 'aio/content/guide/i18n-common-prepare.md', - 'aio/content/guide/i18n-common-translation-files.md', - 'aio/content/guide/i18n-common-merge.md', - 'aio/content/guide/i18n-common-deploy.md', - 'aio/content/guide/i18n-example.md', - 'aio/content/guide/i18n-optional-overview.md', - 'aio/content/guide/i18n-optional-manual-runtime-locale.md', - 'aio/content/guide/i18n-optional-import-global-variants.md', - 'aio/content/guide/i18n-optional-manage-marked-text.md', - 'aio/content/examples/i18n/**/{*,.*}' ]) reviewers: users: @@ -525,9 +306,6 @@ groups: - > contains_any_globs(files, [ 'packages/platform-server/**/{*,.*}', - 'aio/content/guide/prerendering.md', - 'aio/content/guide/ssr.md', - 'aio/content/examples/ssr/**/{*,.*}', ]) reviewers: users: @@ -549,16 +327,6 @@ groups: contains_any_globs(files, [ 'packages/router/**/{*,.*}', 'packages/examples/router/**/{*,.*}', - 'aio/content/guide/router.md', - 'aio/content/guide/router-tutorial.md', - 'aio/content/guide/router-tutorial-toh.md', - 'aio/content/guide/routing-overview.md', - 'aio/content/guide/router-reference.md', - 'aio/content/examples/router-tutorial/**/{*,.*}', - 'aio/content/examples/router/**/{*,.*}', - 'aio/content/images/guide/router/**/{*,.*}', - 'aio/content/guide/routing-with-urlmatcher.md', - 'aio/content/examples/routing-with-urlmatcher/**/{*,.*}' ]) reviewers: users: @@ -575,15 +343,6 @@ groups: contains_any_globs(files, [ 'packages/service-worker/**/{*,.*}', 'packages/examples/service-worker/**/{*,.*}', - 'aio/content/guide/service-worker-getting-started.md', - 'aio/content/examples/service-worker-getting-started/**/{*,.*}', - 'aio/content/guide/app-shell.md', - 'aio/content/guide/service-worker-communications.md', - 'aio/content/guide/service-worker-config.md', - 'aio/content/guide/service-worker-devops.md', - 'aio/content/guide/service-worker-intro.md', - 'aio/content/guide/service-worker-notifications.md', - 'aio/content/images/guide/service-worker/**/{*,.*}' ]) reviewers: users: @@ -600,17 +359,6 @@ groups: 'packages/upgrade/**/{*,.*}', 'packages/common/upgrade/**/{*,.*}', 'packages/examples/upgrade/**/{*,.*}', - 'aio/content/guide/upgrade.md', - 'aio/content/examples/upgrade-lazy-load-ajs/**/{*,.*}', - 'aio/content/examples/upgrade-module/**/{*,.*}', - 'aio/content/images/guide/upgrade/**/{*,.*}', - 'aio/content/examples/upgrade-phonecat-1-typescript/**/{*,.*}', - 'aio/content/examples/upgrade-phonecat-2-hybrid/**/{*,.*}', - 'aio/content/examples/upgrade-phonecat-3-final/**/{*,.*}', - 'aio/content/guide/upgrade-performance.md', - 'aio/content/guide/upgrade-setup.md', - 'aio/content/guide/ajs-quick-reference.md', - 'aio/content/examples/ajs-quick-reference/**/{*,.*}' ]) reviewers: users: @@ -626,17 +374,6 @@ groups: - > contains_any_globs(files.exclude('packages/compiler-cli/*').exclude('packages/language-service/*').exclude('packages/service-worker/*'), [ 'packages/**/testing/**/{*,.*}', - 'aio/content/guide/testing.md', - 'aio/content/guide/test-debugging.md', - 'aio/content/guide/testing-attribute-directives.md', - 'aio/content/guide/testing-code-coverage.md', - 'aio/content/guide/testing-components-basics.md', - 'aio/content/guide/testing-components-scenarios.md', - 'aio/content/guide/testing-pipes.md', - 'aio/content/guide/testing-services.md', - 'aio/content/guide/testing-utility-apis.md', - 'aio/content/examples/testing/**/{*,.*}', - 'aio/content/images/guide/testing/**/{*,.*}' ]) reviewers: users: @@ -700,9 +437,6 @@ groups: 'packages/tsconfig-tsec-base.json', 'packages/tsec-exemption.json', 'tools/tsec.bzl', - 'aio/content/guide/security.md', - 'aio/content/examples/security/**/{*,.*}', - 'aio/content/images/guide/security/**/{*,.*}', ]) reviewers: users: @@ -739,8 +473,6 @@ groups: - > contains_any_globs(files, [ 'packages/language-service/**/{*,.*}', - 'aio/content/guide/language-service.md', - 'aio/content/images/guide/language-service/**/{*,.*}' ]) reviewers: users: @@ -756,7 +488,6 @@ groups: - > contains_any_globs(files, [ 'packages/zone.js/**/{*,.*}', - 'aio/content/guide/zone.md' ]) reviewers: users: @@ -815,106 +546,6 @@ groups: - dylhunn - thePunderWoman - josephperrott - - pkozlowski-opensource - - # ========================================================= - # Docs: Contributors - # ========================================================= - docs-contributors: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/marketing/contributors.json', - 'aio/content/images/bios/**/{*,.*}', - ]) - reviewers: - users: - - MarkTechson - - mgechev - - twerske - - # ========================================================= - # Docs: Gettings Started & Tutorial - # ========================================================= - docs-getting-started-and-tutorial: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/guide/setup-local.md', - 'aio/content/images/guide/setup-local/**/{*,.*}', - 'aio/content/tutorial/**/{*,.*}', - 'aio/content/images/guide/toh/**/{*,.*}', - 'aio/content/demos/first-app/**/{*,.*}', - 'aio/content/examples/first-app-*/**/{*,.*}', - 'aio/content/images/guide/faa/**/{*,.*}', - 'aio/content/examples/toh-pt0/**/{*,.*}', - 'aio/content/examples/toh-pt1/**/{*,.*}', - 'aio/content/examples/toh-pt2/**/{*,.*}', - 'aio/content/examples/toh-pt3/**/{*,.*}', - 'aio/content/examples/toh-pt4/**/{*,.*}', - 'aio/content/examples/toh-pt5/**/{*,.*}', - 'aio/content/examples/toh-pt6/**/{*,.*}', - 'aio/content/examples/getting-started-v0/**/{*,.*}', - 'aio/content/examples/getting-started/**/{*,.*}', - 'aio/content/start/**/{*,.*}', - 'aio/content/guide/quick-start.md', - 'aio/content/images/guide/start/**/{*,.*}', - 'aio/content/examples/what-is-angular/**/{*,.*}', - 'aio/content/guide/what-is-angular.md' - ]) - reviewers: - users: - - AndrewKushnir - - thePunderWoman - - # ========================================================= - # Docs: Marketing - # ========================================================= - docs-marketing: - <<: *defaults - conditions: - - > - contains_any_globs(files.exclude("aio/content/marketing/contributors.json"), [ - 'aio/content/examples/marketing-first-app/**/{*,.*}', - 'aio/content/guide/roadmap.md', - 'aio/content/marketing/**/{*,.*}', - 'aio/content/images/marketing/**/{*,.*}', - 'aio/content/file-not-found.md', - 'aio/content/license.md', - 'aio/content/navigation.json' - ]) - reviewers: - users: - - MarkTechson - - mgechev - - twerske - - # ========================================================= - # Docs: Observables - # ========================================================= - docs-observables: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/guide/observables.md', - 'aio/content/examples/observables/**/{*,.*}', - 'aio/content/guide/comparing-observables.md', - 'aio/content/examples/comparing-observables/**/{*,.*}', - 'aio/content/guide/observables-in-angular.md', - 'aio/content/examples/observables-in-angular/**/{*,.*}', - 'aio/content/guide/practical-observable-usage.md', - 'aio/content/examples/practical-observable-usage/**/{*,.*}', - 'aio/content/guide/rx-library.md', - 'aio/content/examples/rx-library/**/{*,.*}' - ]) - reviewers: - users: - - alxhub - - atscott - - dylhunn # ========================================================= # Docs: Packaging, Tooling, Releasing @@ -925,20 +556,6 @@ groups: - > contains_any_globs(files, [ 'contributing-docs/public-api-surface.md', - 'aio/content/guide/npm-packages.md', - 'aio/content/guide/browser-support.md', - 'aio/content/guide/releases.md', - 'aio/content/guide/updating.md', - 'aio/content/guide/deprecations.md', - 'aio/content/examples/deprecation-guide/**/{*,.*}', - 'aio/content/guide/migration-module-with-providers.md', - 'aio/content/guide/static-query-migration.md', - 'aio/content/guide/update-to-latest-version.md', - 'aio/content/guide/versions.md', - 'aio/content/guide/update-to-version-14.md', - 'aio/content/guide/update-to-version-15.md', - 'aio/content/guide/update-to-version-16.md', - 'aio/content/guide/update-to-version-17.md', ]) reviewers: users: @@ -948,23 +565,6 @@ groups: - thePunderWoman - jelbourn - # ========================================================= - # Docs: Angular DevTools - # ========================================================= - docs-devtools: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/guide/devtools.md', - 'aio/content/images/guide/devtools/**/{*,.*}' - ]) - reviewers: - users: - - MarkTechson - - mgechev - - twerske - # ========================================================= # Tooling: Compiler API shared with Angular CLI # @@ -988,80 +588,6 @@ groups: required: 2 # require at least 2 approvals reviewed_for: required - # ========================================================= - # Docs: CLI - # ========================================================= - docs-cli: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/cli/**/{*,.*}', - 'aio/content/guide/typescript-configuration.md', - 'aio/content/examples/setup/**/{*,.*}', - 'aio/content/guide/build.md', - 'aio/content/images/guide/build/**/{*,.*}', - 'aio/content/images/guide/cli/**/{*,.*}', - 'aio/content/guide/cli-builder.md', - 'aio/content/examples/cli-builder/**/{*,.*}', - 'aio/content/guide/deployment.md', - 'aio/content/images/guide/deployment/**/{*,.*}', - 'aio/content/guide/file-structure.md', - 'aio/content/guide/ivy.md', - 'aio/content/guide/strict-mode.md', - 'aio/content/guide/web-worker.md', - 'aio/content/guide/workspace-config.md', - 'aio/content/guide/migration-solution-style-tsconfig.md', - 'aio/content/guide/migration-update-libraries-tslib.md', - 'aio/content/guide/esbuild.md', - ]) - reviewers: - users: - - alan-agius4 - - clydin - - dgp1130 - - mgechev - - # ========================================================= - # Docs: CLI Libraries - # ========================================================= - docs-libraries: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/examples/angular-linker-plugin/webpack.config.mjs', - 'aio/content/guide/creating-libraries.md', - 'aio/content/guide/libraries.md', - 'aio/content/guide/using-libraries.md', - 'aio/content/guide/angular-package-format.md' - ]) - reviewers: - users: - - alan-agius4 - - alxhub - - mgechev - - # ========================================================= - # Docs: Schematics - # ========================================================= - docs-schematics: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/content/guide/schematics.md', - 'aio/content/guide/schematics-authoring.md', - 'aio/content/guide/schematics-for-libraries.md', - 'aio/content/images/guide/schematics/**/{*,.*}', - 'aio/content/examples/schematics-for-libraries/**/{*,.*}' - ]) - reviewers: - users: - - alan-agius4 - - dylhunn - - mgechev - # ========================================================= # Docs: Angular Dev Site # ========================================================= @@ -1087,65 +613,6 @@ groups: - pkozlowski-opensource - ~JeanMeche - # ========================================================= - # Docs-infra - # ========================================================= - docs-infra: - <<: *defaults - conditions: - - > - contains_any_globs(files, [ - 'aio/{*,.*}', - 'aio/aio-builds-setup/**/{*,.*}', - 'aio/content/cli-src/**/{*,.*}', - 'aio/content/examples/{*,.*}', - 'aio/scripts/**/{*,.*}', - 'aio/src/**/{*,.*}', - 'aio/tests/**/{*,.*}', - 'aio/tools/**/{*,.*}', - 'aio/tools/examples/shared/boilerplate/cli/.vscode/**/{*,.*}', - 'aio/content/BUILD.bazel', - 'aio/content/images/guide/contributors-guide/**/{*,.*}', - 'aio/content/guide/contributors-guide-overview.md', - 'aio/content/guide/docs-style-guide.md', - 'aio/content/examples/docs-style-guide/**/{*,.*}', - 'aio/content/images/guide/docs-style-guide/**/{*,.*}', - 'aio/content/guide/docs-lint-errors.md', - 'aio/content/images/guide/docs-lint-errors/**/{*,.*}', - 'aio/content/guide/localized-documentation.md', - 'aio/content/guide/localizing-angular.md', - '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: - - AndrewKushnir - - thePunderWoman - - josephperrott - # ========================================================= # Angular DevTools # ========================================================= @@ -1228,11 +695,6 @@ groups: - > contains_any_globs(files.exclude("goldens/public-api/manage.js"), [ 'goldens/public-api/**/{*,.*}', - 'aio/content/guide/angular-package-format.md', - 'aio/content/guide/glossary.md', - 'aio/content/guide/styleguide.md', - 'aio/content/examples/styleguide/**/{*,.*}', - 'aio/content/images/guide/styleguide/{*,.*}' ]) reviewers: users: diff --git a/.vscode/recommended-settings.json b/.vscode/recommended-settings.json index bb6ba27bea4..ba02b249b63 100644 --- a/.vscode/recommended-settings.json +++ b/.vscode/recommended-settings.json @@ -12,14 +12,12 @@ "**/node_modules/**": true, "**/bazel-out/**": true, "**/dist/**": true, - "**/aio/src/generated/**": true, }, "search.exclude": { "**/node_modules": true, "**/bower_components": true, "**/bazel-out": true, "**/dist": true, - "**/aio/src/generated": true, ".history": true, }, "git.ignoreLimitWarning": true, diff --git a/BUILD.bazel b/BUILD.bazel index 918b18fc01e..759eb4a593b 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -67,7 +67,6 @@ nodejs_binary( data = [".yarn/releases/yarn-1.22.19.cjs"], entry_point = ".yarn/releases/yarn-1.22.19.cjs", visibility = [ - "//aio/tools/examples/shared:__pkg__", "//integration:__subpackages__", ], ) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 44329c3b80b..abf6b14449e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -302,7 +302,7 @@ There are currently a few exceptions to the "use package name" rule: * `dev-infra`: used for dev-infra related changes within the directories /scripts and /tools -* `docs-infra`: used for docs-app (angular.io) related changes within the /aio directory of the repo +* `docs-infra`: used for docs-app (angular.dev) related changes within the /adev directory of the repo * `migrations`: used for changes to the `ng update` migrations. diff --git a/WORKSPACE b/WORKSPACE index 2555e049f51..6de86a0336a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -94,30 +94,6 @@ yarn_install( yarn_lock = "//:yarn.lock", ) -yarn_install( - name = "aio_example_deps", - # Rename the default js_library target from "node_modules" as this obscures the - # the source directory stamped as a filegroup in the manual BUILD contents below. - all_node_modules_target_name = "node_modules_all", - data = [ - YARN_LABEL, - "//:.yarnrc", - ], - # Disabled because, when False, yarn_install preserves the node_modules folder - # with bin symlinks in the external repository. This is needed to link the shared - # set of deps for example e2es. - exports_directories_only = False, - manual_build_file_contents = """\ -filegroup( - name = "node_modules_files", - srcs = ["node_modules"], -) -""", - package_json = "//aio/tools/examples/shared:package.json", - yarn = YARN_LABEL, - yarn_lock = "//aio/tools/examples/shared:yarn.lock", -) - load("@aspect_bazel_lib//lib:repositories.bzl", "aspect_bazel_lib_dependencies") aspect_bazel_lib_dependencies() diff --git a/adev/scripts/update-cli-help/index.mjs b/adev/scripts/update-cli-help/index.mjs index 30eb8206459..0731f3702a6 100644 --- a/adev/scripts/update-cli-help/index.mjs +++ b/adev/scripts/update-cli-help/index.mjs @@ -130,7 +130,7 @@ function httpGet(url, options = {}) { ] = `token ${process.env.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN}`; // User agent is required // https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#user-agent-required - options.headers['User-Agent'] = `AIO_Angular_CLI_Sources_Update`; + options.headers['User-Agent'] = `ADEV_Angular_CLI_Sources_Update`; return new Promise((resolve, reject) => { get(url, options, (res) => { diff --git a/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts b/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts index d4443df6230..540e3cb0224 100644 --- a/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts +++ b/adev/src/content/examples/injection-token/e2e/src/app.e2e-spec.ts @@ -1,8 +1,7 @@ /* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/injection-token/example-config.json`. + * This example project is special in that it is not a cli app. * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs + * This is an empty placeholder file to ensure that example tests correctly runs * tests for this project. * * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. diff --git a/adev/tools/BUILD.bazel b/adev/tools/BUILD.bazel index c81fe15ca4a..bed2194109d 100644 --- a/adev/tools/BUILD.bazel +++ b/adev/tools/BUILD.bazel @@ -2,7 +2,6 @@ load("@build_bazel_rules_nodejs//:index.bzl", "js_library") package(default_visibility = [ "//adev:__subpackages__", - "//aio:__subpackages__", ]) js_library( diff --git a/aio/.gitignore b/aio/.gitignore deleted file mode 100644 index ce6a4188e38..00000000000 --- a/aio/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# See https://help.github.com/ignore-files/ for more about ignoring files. - -# Compiled output -/dist -/tmp -/out-tsc -/bazel-out - -# Node -/node_modules -/tools/examples/shared/node_modules -npm-debug.log -yarn-error.log - -# IDEs and editors -.idea/ -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# Visual Studio Code -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -.history/* - -# Miscellaneous -/.angular/cache -/.firebase/ -.sass-cache/ -/connect.lock -/coverage -/libpeerconnection.log -firebase-debug.log -testem.log -/typings - -# e2e -protractor-results*.txt - -# Example playground -content/example-playground - -# System files -.DS_Store -Thumbs.db diff --git a/aio/BUILD.bazel b/aio/BUILD.bazel deleted file mode 100644 index 462a4bb8186..00000000000 --- a/aio/BUILD.bazel +++ /dev/null @@ -1,392 +0,0 @@ -load("@npm//@angular-devkit/architect-cli:index.bzl", "architect", "architect_test") -load("@build_bazel_rules_nodejs//:index.bzl", "copy_to_bin", "npm_package_bin") -load("//tools:defaults.bzl", "nodejs_binary") -load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") -load(":local_packages_util.bzl", "link_local_packages", "substitute_local_package_deps") -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag", "string_flag") -load("//aio/scripts:local_server_test.bzl", "local_server_test") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") -load(":aio_targets.bzl", "aio_test") -load("@bazel_skylib//lib:collections.bzl", "collections") - -exports_files([ - "firebase.json", - "ngsw-config.json", - "ngsw-config.template.json", - "tsconfig.json", -]) - -# If set will use first party angular deps for aio targets instead of their npm equivalent -bool_flag( - name = "flag_aio_local_deps", - build_setting_default = False, -) - -config_setting( - name = "aio_local_deps", - flag_values = { - ":flag_aio_local_deps": "true", - }, -) - -# Config setting controlling the AIO architect configuration to build with -string_flag( - name = "flag_aio_build_config", - build_setting_default = "stable", - values = [ - "stable", - "rc", - "next", - "archive", - ], -) - -config_setting( - name = "aio_build_config_stable", - flag_values = { - ":flag_aio_build_config": "stable", - }, -) - -config_setting( - name = "aio_build_config_rc", - flag_values = { - ":flag_aio_build_config": "rc", - }, -) - -config_setting( - name = "aio_build_config_next", - flag_values = { - ":flag_aio_build_config": "next", - }, -) - -config_setting( - name = "aio_build_config_archive", - flag_values = { - ":flag_aio_build_config": "archive", - }, -) - -# Run dgeni generation -npm_package_bin( - name = "dgeni", - # angular.io-package is a js_library target, which copies sources to $(BINDIR) - args = ["./$(BINDIR)/aio/tools/transforms/angular.io-package"], - data = [ - "//aio/tools/transforms/angular.io-package", - # Dgeni typescript package crawls type definitions for Angular dependencies - "@npm//rxjs", - "@npm//@types/node", - ], - env = { - "BAZEL_DGENI_OUTPUT_PATH": "$(@D)", - "GIT_BIN": "$(GIT_BIN_PATH)", - }, - exec_properties = ENABLE_NETWORK, - output_dir = True, - stamp = "@rules_nodejs//nodejs/stamp:use_stamp_flag", - # Makes remote git calls to get previous versions - tags = [ - "requires-network", - ], - tool = "@npm//dgeni/bin:dgeni", - toolchains = [ - "@npm//@angular/build-tooling/bazel/git-toolchain:current_git_toolchain", - ], - visibility = ["//aio/tests/deployment:__subpackages__"], -) - -# Copy stackblitz live examples to expected assets location -copy_to_directory( - name = "stackblitz", - srcs = ["//aio/content/examples:all-stackblitz"], - replace_prefixes = { - "examples": "generated/live-examples", - }, - root_paths = [ - "aio/content", - ], -) - -# Copy example zips to expected assets location -copy_to_directory( - name = "example-zips", - srcs = ["//aio/content/examples:all-example-zips"], - replace_prefixes = { - "examples": "generated/zips", - }, - root_paths = [ - "aio/content", - ], -) - -# All source and configuration files required to build the docs app -APPLICATION_FILES = [ - "angular.json", - "tsconfig.app.json", - "tsconfig.json", - "tsconfig.worker.json", - "security-exemptions.json", - "//aio/src/assets", - "//aio/src/assets/js", -] + glob( - ["src/**/*"], - exclude = [ - "src/**/*.spec.ts", - # Temporarily exclude generated sources produced by the non-bazel - # build until the whole project is built by bazel and this directory - # isn't needed. - "src/generated/**/*", - ], -) - -# Dependencies required to build the docs app. -APPLICATION_DEPS = [ - ":dgeni", - ":stackblitz", - ":example-zips", - "//aio/src/generated:ngsw-config", - "@npm//@angular-devkit/build-angular", - "@npm//@angular-eslint/builder", - "@npm//@angular/animations", - "@npm//@angular/cdk", - "@npm//@angular/cli", - "@npm//@angular/common", - "@npm//@angular/compiler", - "@npm//@angular/compiler-cli", - "@npm//@angular/core", - "@npm//@angular/elements", - "@npm//@angular/forms", - "@npm//@angular/material", - "@npm//@angular/platform-browser", - "@npm//@angular/platform-browser-dynamic", - "@npm//@angular/router", - "@npm//@angular/service-worker", - "@npm//@types/lunr", - "@npm//@types/trusted-types", - "@npm//lunr", - "@npm//rxjs", - "@npm//safevalues", - "@npm//tslib", - "@npm//zone.js", -] - -# All sources, specs, and config files required to test the docs app -TEST_FILES = APPLICATION_FILES + [ - "karma.conf.js", - "tsconfig.spec.json", -] + glob( - ["src/**/*.spec.ts"], -) - -# Dependencies required to test the docs app -TEST_DEPS = APPLICATION_DEPS + [ - "@npm//@angular/build-tooling/bazel/browsers/chromium", - "@npm//@types/jasmine", - "@npm//@types/node", - "@npm//assert", - "@npm//jasmine", - "@npm//jasmine-core", - "@npm//karma-chrome-launcher", - "@npm//karma-coverage", - "@npm//karma-jasmine", - "@npm//karma-jasmine-html-reporter", - "//adev/tools:windows-chromium-path", -] - -# All sources, specs, and config files required to serve the app -# and run e2e tests against it -E2E_FILES = APPLICATION_FILES + glob(["tests/e2e/**"]) - -# Dependencies required to run the e2e tests -E2E_DEPS = APPLICATION_DEPS + [ - "@npm//@angular/build-tooling/bazel/browsers/chromium", - "@npm//@types/jasmine", - "@npm//@types/node", - "@npm//jasmine-spec-reporter", - "@npm//protractor", - "@npm//ts-node", - "//adev/tools:windows-chromium-path", -] - -# Poll period for architect rules that watch for changes -ARCHITECT_POLL_MS = 1000 - -# Stamp npm_link targets for all dependencies that correspond to a -# first-party equivalent pacakge in angular. -link_local_packages(all_aio_deps = collections.uniq(APPLICATION_DEPS + TEST_DEPS + E2E_DEPS)) - -copy_to_bin( - name = "application_files_bin", - srcs = APPLICATION_FILES, -) - -architect( - name = "build-app", - args = select({ - ":aio_build_config_stable": ["site:build:stable"], - ":aio_build_config_next": ["site:build:next"], - ":aio_build_config_rc": ["site:build:rc"], - ":aio_build_config_archive": ["site:build:archive"], - }) + [ - "--output-path=build-app", - ], - chdir = "$(RULEDIR)", - data = [":application_files_bin"] + select({ - ":aio_local_deps": substitute_local_package_deps(APPLICATION_DEPS), - "//conditions:default": APPLICATION_DEPS, - }), - output_dir = True, - # When building with local packages (--config=aio_local_deps), RBE complains about - # the input tree being too large (> 70,000 files). - tags = ["no-remote-exec"], -) - -npm_package_bin( - name = "404-page", - outs = ["404.html"], - args = [ - "$(execpath src/404-body.html)", - "$(execpath :build-app)", - "$@", - ], - data = [ - "src/404-body.html", - ":build-app", - ], - tool = "//aio/scripts:build-404-page", -) - -# Prepare the final build artifact which substitutes a generated 404 page -# into the architect output. -copy_to_directory( - name = "build", - srcs = [ - ":404-page", - ":build-app", - ], - replace_prefixes = { - "build-app": "", - }, - visibility = ["//aio/scripts/deploy-to-firebase:__pkg__"], -) - -TEST_DATA = TEST_FILES + select({ - ":aio_local_deps": substitute_local_package_deps(TEST_DEPS), - "//conditions:default": TEST_DEPS, -}) - -aio_test( - name = "test", - args = [ - "site:test", - "--no-watch", - ], - data = TEST_DATA, -) - -aio_test( - name = "test-and-watch", - args = [ - "site:test", - "--watch", - "--poll=%d" % ARCHITECT_POLL_MS, - ], - data = TEST_DATA, - tags = [ - "ibazel_notify_changes", - "manual", - ], -) - -architect_test( - name = "e2e", - size = "large", - args = [ - "site:e2e", - "--no-webdriver-update", - "--port=0", - ], - chdir = package_name(), - data = E2E_FILES + select({ - ":aio_local_deps": substitute_local_package_deps(E2E_DEPS), - "//conditions:default": E2E_DEPS, - }), - env = { - "CHROME_BIN": "../$(CHROMIUM)", - "CHROMEDRIVER_BIN": "../$(CHROMEDRIVER)", - }, - # TODO: investigate why those tests became more flaky - # (presumably after AIO migration to Bazel) - flaky = True, - toolchains = [ - "@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias", - ], -) - -# Build and serve the app. Run with ibazel to watch for changes and re-serve. -architect( - name = "serve", - args = [ - "site:serve", - "--open", - "--poll=%d" % ARCHITECT_POLL_MS, - "--live-reload", - "--watch", - ], - chdir = package_name(), - data = APPLICATION_FILES + select({ - ":aio_local_deps": substitute_local_package_deps(APPLICATION_DEPS), - "//conditions:default": APPLICATION_DEPS, - }), - tags = ["ibazel_notify_changes"], -) - -# Build and serve the app, watch for changes, and run a fast but low-fidelity -# rebuild when docs change. Watching and serving is a part of the node script, -# so there is no need to run with ibazel, which would be slow as it would redo -# the full dgeni build on each change. - -nodejs_binary( - name = "docs-watch", - chdir = package_name(), - data = APPLICATION_FILES + [ - "//aio/scripts:fast-serve-and-watch", - ] + select({ - ":aio_local_deps": substitute_local_package_deps(APPLICATION_DEPS), - "//conditions:default": APPLICATION_DEPS, - }), - enable_linker = True, - entry_point = "//aio/scripts:fast-serve-and-watch.js", - env = { - # Have the authors package output its low-fi dgeni build - # to a different directory in the runfiles tree because bazel - # write-protects original dgeni runfiles. Then in angular.json - # we list this folder last under assets so that it will - # take precedence over the original dgeni assets, effectively - # overwriting select sources and then serving them. - "BAZEL_DGENI_OUTPUT_PATH": "dgeni-fast", - }, -) - -local_server_test( - name = "test-a11y-score-localhost", - args = ["LOCALHOST_URL"], - entry_point = "//aio/scripts:test-aio-a11y", - serve_target = ":build", -) - -local_server_test( - name = "test-pwa-score-localhost", - args = [ - "LOCALHOST_URL", - "all:0,pwa:100", - ], - data = [ - "//aio/scripts:audit-web-app", - ], - entry_point = "//aio/scripts:audit-web-app-script", - serve_target = ":build", -) diff --git a/aio/aio_targets.bzl b/aio/aio_targets.bzl deleted file mode 100644 index 491fd3ef966..00000000000 --- a/aio/aio_targets.bzl +++ /dev/null @@ -1,16 +0,0 @@ -load("@npm//@angular-devkit/architect-cli:index.bzl", "architect_test") - -def aio_test(name, data, args, **kwargs): - architect_test( - name = name, - args = args, - chdir = native.package_name(), - data = data, - env = { - "CHROME_BIN": "../$(CHROMIUM)", - }, - toolchains = [ - "@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias", - ], - **kwargs - ) diff --git a/aio/content/BUILD.bazel b/aio/content/BUILD.bazel deleted file mode 100644 index cffe5dedb29..00000000000 --- a/aio/content/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "content", - srcs = glob( - ["**"], - exclude = [ - "BUILD.bazel", - ], - ), -) diff --git a/aio/content/blocks/core/defer.md b/aio/content/blocks/core/defer.md deleted file mode 100644 index 6bf140ede7a..00000000000 --- a/aio/content/blocks/core/defer.md +++ /dev/null @@ -1,58 +0,0 @@ -A type of [block](api/core/defer) that can be used to defer load the JavaScript for components, directives and pipes used inside a component template. - -@syntax - -```html -@defer ( on ; when ; prefetch on ; prefetch when ) { - - -} @placeholder ( minimum? ) { - -

Placeholder

-} @loading ( minimum? ; after? ) { - - loading image -} @error { - -

An loading error occurred

-} -``` - -@description - -

Blocks

- -Supported sections of a defer block. Note: only the @defer block template fragment is deferred loaded. The remaining optional blocks are eagerly loaded. - -| block | Description | -| ----------- | ----------- | -| `@defer` | The defer loaded block of content | -| `@placeholder` | Content shown prior to defer loading (Optional)| -| `@loading` | Content shown during defer loading (Optional) | -| `@error` | Content shown when defer loading errors occur (Optional) | - -

Triggers

- -Triggers provide conditions for when defer loading occurs. Some allow a template reference variable as an optional parameter. Separate multiple triggers with a semicolon. - -| trigger | Triggers... | -| ----------- | ----------- | -| `on idle` | when the browser reports idle state (default) | -| `on viewport(?)` | when the element enters the viewport | -| `on interaction(?)` | when clicked, touched, or focused | -| `on hover(?)` | when element has been hovered | -| `on immediate` | when the page finishes rendering | -| `on timer()` | after a specific timeout | -| `when ` | on a custom condition | - -

Prefetch

- -Configures prefetching of the defer block used in the `@defer` parameters, but does not affect rendering. Rendering is handled by the standard `on` and `when` conditions. Separate multiple prefetch configurations with a semicolon. - -```html -@defer (prefetch on ; prefetch when ) { - -} -``` - -Learn more in the [defer loading guide](guide/defer). \ No newline at end of file diff --git a/aio/content/blocks/core/for.md b/aio/content/blocks/core/for.md deleted file mode 100644 index f004500d37f..00000000000 --- a/aio/content/blocks/core/for.md +++ /dev/null @@ -1,58 +0,0 @@ -The `@for` block repeatedly renders content of a block for each item in a collection. - -@syntax - -```html -@for (item of items; track item.name) { -
  • {{ item.name }}
  • -} @empty { -
  • There are no items.
  • -} -``` - -@description - -The `@for` block renders its content in response to changes in a collection. Collections can be any -JavaScript [iterable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols), -but there are performance advantages of using a regular `Array`. - -You can optionally include an `@empty` section immediately after the `@for` block content. The -content of the `@empty` block displays when there are no items. - -

    track and objects identity

    - -The value of the `track` expression determines a key used to associate array items with the views in -the DOM. Having clear indication of the item identity allows Angular to execute a minimal set of DOM -operations as items are added, removed or moved in a collection. - -To optimize performance, especially in loops over immutable data, ensure the track expression is effectively used to -identify each item uniquely. Because of the potential for poor performance, the `track` expression -is required for the `@for` loops. - -For collections that remain static , `track $index` provides a straightforward tracking mechanism. For dynamic -collections experiencing additions, deletions, or reordering, opt for a -unique property of each item as the tracking key. - -

    `$index` and other contextual variables

    - -Inside `@for` contents, several implicit variables are always available: - -| Variable | Meaning | -|----------|-----------------------------------------------| -| `$count` | Number of items in a collection iterated over | -| `$index` | Index of the current row | -| `$first` | Whether the current row is the first row | -| `$last` | Whether the current row is the last row | -| `$even` | Whether the current row index is even | -| `$odd` | Whether the current row index is odd | - -These variables are always available with these names, but can be aliased via a `let` segment: - -```html -@for (item of items; track item.id; let idx = $index, e = $even) { -Item #{{ idx }}: {{ item.name }} -} -``` - -The aliasing is especially useful in case of using nested `@for` blocks where contextual variable -names could collide. diff --git a/aio/content/blocks/core/if.md b/aio/content/blocks/core/if.md deleted file mode 100644 index 8aa5c626f10..00000000000 --- a/aio/content/blocks/core/if.md +++ /dev/null @@ -1,25 +0,0 @@ -The `@if` block conditionally displays its content when its condition expression is truthy. - -@syntax - -```html -@if (a > b) { - {{a}} is greater than {{b}} -} @else if (b > a) { - {{a}} is less than {{b}} -} @else { - {{a}} is equal to {{b}} -} -``` - -@description - -Content is added and removed from the DOM based on the evaluation of conditional expressions in the `@if` and `@else` blocks. - -The built-in `@if` supports referencing of expression results to keep a solution for common coding patterns: - -```html -@if (users$ | async; as users) { - {{ users.length }} -} -``` diff --git a/aio/content/blocks/core/switch.md b/aio/content/blocks/core/switch.md deleted file mode 100644 index 923391124ca..00000000000 --- a/aio/content/blocks/core/switch.md +++ /dev/null @@ -1,25 +0,0 @@ -The `@switch` block is inspired by the JavaScript `switch` statement: - -@syntax - -```html -@switch (condition) { - @case (caseA) { - Case A. - } - @case (caseB) { - Case B. - } - @default { - Default case. - } -} -``` - -@description - -The `@switch` blocks displays content selected by one of the cases matching against the conditional expression. The value of the conditional expression is compared to the case expression using the `===` operator. - -The `@default` block is optional and can be omitted. If no `@case` matches the expression and there is no `@default` block, nothing is shown. - -**`@switch` does not have fallthrough**, so you do not need an equivalent to a `break` or `return` statement. diff --git a/aio/content/demos/first-app/.gitignore b/aio/content/demos/first-app/.gitignore deleted file mode 100644 index 1d6ce0130c7..00000000000 --- a/aio/content/demos/first-app/.gitignore +++ /dev/null @@ -1,44 +0,0 @@ -# See http://help.github.com/ignore-files/ for more about ignoring files. -# git should ignore the cached files -.angular -node_modules - -# Compiled output -/dist -/tmp -/out-tsc - -# Node -/node_modules -npm-debug.log -yarn-error.log - -# IDEs and editors -.idea/ -.project -.classpath -.c9/ -*.launch -.settings/ -*.sublime-workspace - -# Visual Studio Code -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -.history/* - -# Miscellaneous -/.angular/cache -.sass-cache/ -/connect.lock -/coverage -/libpeerconnection.log -testem.log -/typings - -# System files -.DS_Store -Thumbs.db diff --git a/aio/content/demos/first-app/angular.json b/aio/content/demos/first-app/angular.json deleted file mode 100644 index 6c9dda1955b..00000000000 --- a/aio/content/demos/first-app/angular.json +++ /dev/null @@ -1,109 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - "projects": { - "addOneButton": { - "root": "", - "sourceRoot": "src", - "projectType": "application", - "prefix": "app", - "schematics": {}, - "architect": { - "build": { - "builder": "@angular-devkit/build-angular:browser", - "options": { - "outputPath": "dist/addOneButton", - "index": "src/index.html", - "main": "src/main.ts", - "tsConfig": "src/tsconfig.app.json", - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "styles": [ - ], - "scripts": [], - "polyfills": [ - "zone.js" - ] - }, - "configurations": { - "production": { - "optimization": true, - "outputHashing": "all", - "sourceMap": false, - "extractCss": true, - "namedChunks": false, - "aot": true, - "extractLicenses": true, - "vendorChunk": false, - "buildOptimizer": true - }, - "development": { - "buildOptimizer": false, - "optimization": false, - "vendorChunk": true, - "extractLicenses": false, - "sourceMap": true, - "namedChunks": true - } - } - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "options": { - "buildTarget": "addOneButton:build" - }, - "configurations": { - "production": { - "buildTarget": "addOneButton:build:production" - }, - "development": { - "buildTarget": "addOneButton:build:development" - } - }, - "defaultConfiguration": "development" - }, - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "addOneButton:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "main": "src/test.ts", - "tsConfig": "src/tsconfig.spec.json", - "karmaConfig": "src/karma.conf.js", - "styles": [ - ], - "scripts": [], - "assets": [ - "src/favicon.ico", - "src/assets" - ], - "polyfills": [ - "zone.js", - "zone.js/testing" - ] - } - }, - "lint": { - "builder": "@angular-eslint/builder:lint", - "options": { - "lintFilePatterns": [ - "src/**/*.ts", - "src/**/*.html" - ] - } - } - } - } - }, - "defaultProject": "addOneButton", - "cli": { - "analytics": false - } -} diff --git a/aio/content/demos/first-app/package.json b/aio/content/demos/first-app/package.json deleted file mode 100644 index 639c998d4e3..00000000000 --- a/aio/content/demos/first-app/package.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "angular", - "version": "0.0.0", - "private": true, - "dependencies": { - "@angular/common": "^16.0.0", - "@angular/compiler": "^16.0.0", - "@angular/core": "^16.0.0", - "@angular/platform-browser": "^16.0.0", - "rxjs": "^7.8.0", - "tslib": "^2.5.3", - "zone.js": "^0.13.0" - }, - "scripts": { - "ng": "ng", - "start": "ng serve", - "build": "ng build", - "test": "ng test", - "lint": "ng lint", - "e2e": "ng e2e" - }, - "devDependencies": { - "@angular-devkit/build-angular": "^16.0.0", - "@angular-eslint/builder": "16.0.3", - "@angular-eslint/eslint-plugin": "16.0.3", - "@angular-eslint/eslint-plugin-template": "16.0.3", - "@angular-eslint/schematics": "16.0.3", - "@angular-eslint/template-parser": "16.0.3", - "@angular/cli": "^16.0.0", - "@angular/compiler-cli": "^16.0.0", - "@types/jasmine": "~4.3.0", - "@typescript-eslint/eslint-plugin": "5.59.7", - "@typescript-eslint/parser": "5.59.7", - "eslint": "^8.40.0", - "jasmine-core": "~4.5.0", - "jasmine-spec-reporter": "~7.0.0", - "karma": "~6.4.1", - "karma-chrome-launcher": "~3.1.0", - "karma-coverage": "~2.2.0", - "karma-jasmine": "~5.1.0", - "karma-jasmine-html-reporter": "^2.0.0", - "typescript": "~5.0.0" - } -} \ No newline at end of file diff --git a/aio/content/demos/first-app/src/index.html b/aio/content/demos/first-app/src/index.html deleted file mode 100644 index 5507514b4ee..00000000000 --- a/aio/content/demos/first-app/src/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - Your first Angular app - - - Loading... - - diff --git a/aio/content/demos/first-app/src/karma.conf.js b/aio/content/demos/first-app/src/karma.conf.js deleted file mode 100644 index b0d5cbe014a..00000000000 --- a/aio/content/demos/first-app/src/karma.conf.js +++ /dev/null @@ -1,32 +0,0 @@ -// Karma configuration file, see link for more information -// https://karma-runner.github.io/1.0/config/configuration-file.html - -module.exports = function (config) { - config.set({ - basePath: '', - frameworks: ['jasmine', '@angular-devkit/build-angular'], - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-coverage-istanbul-reporter'), - require('@angular-devkit/build-angular/plugins/karma') - ], - client: { - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - coverageIstanbulReporter: { - dir: require('path').join(__dirname, './coverage/my-app'), - reports: ['html', 'lcovonly', 'text-summary'], - fixWebpackSourcePaths: true - }, - reporters: ['progress', 'kjhtml'], - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false, - restartOnFileChange: true - }); -}; diff --git a/aio/content/demos/first-app/src/main.ts b/aio/content/demos/first-app/src/main.ts deleted file mode 100644 index bd0909706a7..00000000000 --- a/aio/content/demos/first-app/src/main.ts +++ /dev/null @@ -1,21 +0,0 @@ -// import required packages -import 'zone.js'; -import { Component } from '@angular/core'; -import { bootstrapApplication } from '@angular/platform-browser'; - -// describe component -@Component({ - selector: 'add-one-button', // component name used in markup - standalone: true, // component is self-contained - template: // the component's markup - ` - {{ count }} - `, -}) - -// export component -export class AddOneButtonComponent { - count = 0; -} - -bootstrapApplication(AddOneButtonComponent); diff --git a/aio/content/demos/first-app/src/styles.css b/aio/content/demos/first-app/src/styles.css deleted file mode 100644 index 74f71b07761..00000000000 --- a/aio/content/demos/first-app/src/styles.css +++ /dev/null @@ -1 +0,0 @@ -/* Add application styles & imports to this file! */ \ No newline at end of file diff --git a/aio/content/demos/first-app/src/tsconfig.app.json b/aio/content/demos/first-app/src/tsconfig.app.json deleted file mode 100644 index 167dfc3ce14..00000000000 --- a/aio/content/demos/first-app/src/tsconfig.app.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/app", - "types": [] - }, - "files": [ - "main.ts" - ], - "include": [ - "**/*.d.ts" - ] -} diff --git a/aio/content/demos/first-app/src/tsconfig.spec.json b/aio/content/demos/first-app/src/tsconfig.spec.json deleted file mode 100644 index a70e6c4a9ef..00000000000 --- a/aio/content/demos/first-app/src/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "outDir": "../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/aio/content/demos/first-app/tsconfig.json b/aio/content/demos/first-app/tsconfig.json deleted file mode 100644 index 79aaf61a5df..00000000000 --- a/aio/content/demos/first-app/tsconfig.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "outDir": "./dist/out-tsc", - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "module": "esnext", - "moduleResolution": "node", - "importHelpers": true, - "target": "es2022", - "typeRoots": [ - "node_modules/@types" - ], - "lib": [ - "es2018", - "dom" - ] - }, - "angularCompilerOptions": { - "disableTypeScriptVersionCheck": true, - "fullTemplateTypeCheck": true, - "strictInjectionParameters": true - } -} diff --git a/aio/content/demos/first-app/yarn.lock b/aio/content/demos/first-app/yarn.lock deleted file mode 100644 index dfdc68271d6..00000000000 --- a/aio/content/demos/first-app/yarn.lock +++ /dev/null @@ -1,8098 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ampproject/remapping@2.2.1", "@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@ampproject/remapping@^2.1.0": - version "2.2.0" - resolved "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz" - integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== - dependencies: - "@jridgewell/gen-mapping" "^0.1.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@angular-devkit/architect@0.1600.5": - version "0.1600.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1600.5.tgz#e6570f8c3bf5e98088d70607595bbdc3fdcf26f4" - integrity sha512-K2bfaBqWtwiuLEaWCbiVNO9jNUhA0cGT+XfQu01Tr5UO9XfNXg/2xBj17JGClJiLIUWZ6bWlaHyVVYTWQuzLxA== - dependencies: - "@angular-devkit/core" "16.0.5" - rxjs "7.8.1" - -"@angular-devkit/build-angular@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-16.0.5.tgz#b9ce7026706de9c1d439917a922f70409f628a4b" - integrity sha512-I4B3aYv+rtvGwpwaIE2p+Uyor52UmYo93slXprhMKCW6FfYYWUScyVkufKNfdoEGO/cLRaSTo7gYkovC7bPdaA== - dependencies: - "@ampproject/remapping" "2.2.1" - "@angular-devkit/architect" "0.1600.5" - "@angular-devkit/build-webpack" "0.1600.5" - "@angular-devkit/core" "16.0.5" - "@babel/core" "7.21.4" - "@babel/generator" "7.21.4" - "@babel/helper-annotate-as-pure" "7.18.6" - "@babel/helper-split-export-declaration" "7.18.6" - "@babel/plugin-proposal-async-generator-functions" "7.20.7" - "@babel/plugin-transform-async-to-generator" "7.20.7" - "@babel/plugin-transform-runtime" "7.21.4" - "@babel/preset-env" "7.21.4" - "@babel/runtime" "7.21.0" - "@babel/template" "7.20.7" - "@discoveryjs/json-ext" "0.5.7" - "@ngtools/webpack" "16.0.5" - "@vitejs/plugin-basic-ssl" "1.0.1" - ansi-colors "4.1.3" - autoprefixer "10.4.14" - babel-loader "9.1.2" - babel-plugin-istanbul "6.1.1" - browserslist "4.21.5" - cacache "17.0.6" - chokidar "3.5.3" - copy-webpack-plugin "11.0.0" - critters "0.0.16" - css-loader "6.7.3" - esbuild-wasm "0.17.18" - glob "8.1.0" - https-proxy-agent "5.0.1" - inquirer "8.2.4" - jsonc-parser "3.2.0" - karma-source-map-support "1.4.0" - less "4.1.3" - less-loader "11.1.0" - license-webpack-plugin "4.0.2" - loader-utils "3.2.1" - magic-string "0.30.0" - mini-css-extract-plugin "2.7.5" - mrmime "1.0.1" - open "8.4.2" - ora "5.4.1" - parse5-html-rewriting-stream "7.0.0" - picomatch "2.3.1" - piscina "3.2.0" - postcss "8.4.23" - postcss-loader "7.2.4" - resolve-url-loader "5.0.0" - rxjs "7.8.1" - sass "1.62.1" - sass-loader "13.2.2" - semver "7.4.0" - source-map-loader "4.0.1" - source-map-support "0.5.21" - terser "5.17.1" - text-table "0.2.0" - tree-kill "1.2.2" - tslib "2.5.0" - vite "4.3.9" - webpack "5.80.0" - webpack-dev-middleware "6.0.2" - webpack-dev-server "4.13.2" - webpack-merge "5.8.0" - webpack-subresource-integrity "5.1.0" - optionalDependencies: - esbuild "0.17.18" - -"@angular-devkit/build-webpack@0.1600.5": - version "0.1600.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1600.5.tgz#60a6ce52c483c1d8ef6bfab75eeebc3b4fadcaa9" - integrity sha512-jFFyPSafWUVdaNVlKdN00xLl2PdJyB7XeFQnL017oG38h6ov3RILKJnsl3bnuTsMvWjuWo17Xd6BrKLGi+b7dA== - dependencies: - "@angular-devkit/architect" "0.1600.5" - rxjs "7.8.1" - -"@angular-devkit/core@16.0.5": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-16.0.5.tgz#fac7882e69e3f0af52ab19f92bbf0cf7c140ede1" - integrity sha512-33dMesCj87zUux77cZ2BJ46YxPzeLCCmpI2fcR4Gvg4mVhBV8rdQgG7iwZDDZZNno3Lr60cVCUo9rqQj2ZXk6g== - dependencies: - ajv "8.12.0" - ajv-formats "2.1.1" - jsonc-parser "3.2.0" - rxjs "7.8.1" - source-map "0.7.4" - -"@angular-devkit/schematics@16.0.5": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-16.0.5.tgz#8d6a91cc0d705191c5463f1cd83bba9564eb87a6" - integrity sha512-6Gjgd+PshVVx7iX1uhMgW6nzltaYEm4v1dwm2FTVGf2m0iIn/Ow2uUTrz/z17naOzc957IzfxxdmtcABEm/p6A== - dependencies: - "@angular-devkit/core" "16.0.5" - jsonc-parser "3.2.0" - magic-string "0.30.0" - ora "5.4.1" - rxjs "7.8.1" - -"@angular-eslint/builder@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/builder/-/builder-16.0.3.tgz#61846d7975b8248c7b7a1d7b251eed006c8666a3" - integrity sha512-pv/CrnOHHOnBqhyBmqUPsIHKXOHYMJztxYJ83tjxeXL5Moyu5e6CBMIQ58UtqmgWfEIA3n7owYy9KvHTJcemyQ== - dependencies: - "@nx/devkit" "16.2.2" - nx "16.2.2" - -"@angular-eslint/bundled-angular-compiler@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-16.0.3.tgz#52db355eb2794e5407bfd045c64e102a0c078fbe" - integrity sha512-8zwY6ustiPXBEF3+jELKVwGk6j2HJn7GHbqAhDFR02YiE27iRMSGTHIAWGs6ZI7F1JgfrIsOHrUgzC1x95K6rg== - -"@angular-eslint/eslint-plugin-template@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-16.0.3.tgz#513c6b675f0feb5c77d3de1f7daa5484ca1b62a3" - integrity sha512-OKTMWOjC7F5tdv7gm2tlmgyr/uVyS1RWJZn4X/6D6p0kOpiDXmajtbYHD5tzbshX2Ep62Nt+rg8+1XGHrU0ScA== - dependencies: - "@angular-eslint/bundled-angular-compiler" "16.0.3" - "@angular-eslint/utils" "16.0.3" - "@typescript-eslint/type-utils" "5.59.7" - "@typescript-eslint/utils" "5.59.7" - aria-query "5.1.3" - axobject-query "3.1.1" - -"@angular-eslint/eslint-plugin@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/eslint-plugin/-/eslint-plugin-16.0.3.tgz#ecd95c7efccf164c23b5fb3a5c49b8d3b708a1d6" - integrity sha512-1c+dFytcQDOA2wJ8/rtydMV6UYq1BgVfOcBXOr0WJxC9g8Cad9czcUOkW41WGrTp5kICMliV0ypH5eEaCM2WDQ== - dependencies: - "@angular-eslint/utils" "16.0.3" - "@typescript-eslint/utils" "5.59.7" - -"@angular-eslint/schematics@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/schematics/-/schematics-16.0.3.tgz#56f55a09f7882703a18112c97b4db1b47db5d66d" - integrity sha512-vRdSY0ovE+wfTvYeguPp/QAxvGejLADO8CzJkas0PxdCQiyLuTscKsYE82XcvX2kitMexvH71lNF0ggnGoMRXA== - dependencies: - "@angular-eslint/eslint-plugin" "16.0.3" - "@angular-eslint/eslint-plugin-template" "16.0.3" - "@nx/devkit" "16.2.2" - ignore "5.2.4" - nx "16.2.2" - strip-json-comments "3.1.1" - tmp "0.2.1" - -"@angular-eslint/template-parser@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/template-parser/-/template-parser-16.0.3.tgz#20bd165964545c5fa01b7b756d272f77cef828fc" - integrity sha512-IAWdwp/S9QC3EMiVxSS0E3ABy9PSidN3PW0Ll2EtM3mzXMYlpZXmxqd+B1xV/xKWzhk1Mp04QX8hHfG6Vq+qaQ== - dependencies: - "@angular-eslint/bundled-angular-compiler" "16.0.3" - eslint-scope "^7.0.0" - -"@angular-eslint/utils@16.0.3": - version "16.0.3" - resolved "https://registry.yarnpkg.com/@angular-eslint/utils/-/utils-16.0.3.tgz#a464f32a3df15d5e9f72cd47ffd123480c58c76e" - integrity sha512-QsbUVHJLk+fE08/D4y3wOyGk1iX2LVSygw+uzilbaAXfjD5/c0Ei5FbVx2mMYPk+aOl4yrvGQW3dmetMiAR0MQ== - dependencies: - "@angular-eslint/bundled-angular-compiler" "16.0.3" - "@typescript-eslint/utils" "5.59.7" - -"@angular/cli@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-16.0.5.tgz#b708e64668bdbdd6091c89e2bd76db78d9391443" - integrity sha512-ugo0O8Bv5A9ewylOW0h9oeyxbN9om8T+E9yY7gMphlvGFHKHqGPgpHws2Gu3tlAAkJHXpdBndhN0wfKtwHaloQ== - dependencies: - "@angular-devkit/architect" "0.1600.5" - "@angular-devkit/core" "16.0.5" - "@angular-devkit/schematics" "16.0.5" - "@schematics/angular" "16.0.5" - "@yarnpkg/lockfile" "1.1.0" - ansi-colors "4.1.3" - ini "4.0.0" - inquirer "8.2.4" - jsonc-parser "3.2.0" - npm-package-arg "10.1.0" - npm-pick-manifest "8.0.1" - open "8.4.2" - ora "5.4.1" - pacote "15.1.3" - resolve "1.22.2" - semver "7.4.0" - symbol-observable "4.0.0" - yargs "17.7.2" - -"@angular/common@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-16.0.5.tgz#aa4ced88a4eddc0c917a463c7bc04ea32ff63b62" - integrity sha512-qCcfuvs6Suqv7uA3MrtIi+aY2KW6F57XnRTzWdU3PLQjv8LHN8SZQee5ce2TQ8yCgAIdiLRGDqmLz+DvmRXiIQ== - dependencies: - tslib "^2.3.0" - -"@angular/compiler-cli@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-16.0.5.tgz#5fb6680e910c10e960f59bf95572ef47452b397d" - integrity sha512-AiT7rUX2V6SB18+uCRahGfpFZlyb4dIj63YxQSZIypoA1+AiqrmLVshnaiJhb7ZggZB8PIjJI8waPBbujXBtbg== - dependencies: - "@babel/core" "7.21.8" - "@jridgewell/sourcemap-codec" "^1.4.14" - chokidar "^3.0.0" - convert-source-map "^1.5.1" - reflect-metadata "^0.1.2" - semver "^7.0.0" - tslib "^2.3.0" - yargs "^17.2.1" - -"@angular/compiler@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-16.0.5.tgz#9a1dea6d8f4eb92d866bbc7fe0d8b87e8b5155b7" - integrity sha512-AqUqAcK7yQHRGkJF0PD3firTak4jEXvsuDB9+h399AbVUwHcAe46jSp8Cwn6B2mg8sKPCQ65IJRze8DCYv7xOg== - dependencies: - tslib "^2.3.0" - -"@angular/core@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-16.0.5.tgz#76c0c35ed90938424f55d8fd420145baf279b74e" - integrity sha512-zZYcL10eKkwjR0zIjJzqlyKpu+a0aPQrSdVUDc/ugEEcf80sN/BBEQxC8CNqccbUDFUIk/qPi/2Q9b6U1rKJpA== - dependencies: - tslib "^2.3.0" - -"@angular/platform-browser@^16.0.0": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-16.0.5.tgz#1dd99b71bdaf85d30545d5ef78e50d9ad7e7535c" - integrity sha512-2lTUsnrUMSVjkeEfEgDBbLFYYLWQMxxGWiEvXjJvAv/dg4YeRsEDk9TTYSmca4dtXcsa0v1AtvTRHa6lvupDwQ== - dependencies: - tslib "^2.3.0" - -"@assemblyscript/loader@^0.10.1": - version "0.10.1" - resolved "https://registry.npmjs.org/@assemblyscript/loader/-/loader-0.10.1.tgz" - integrity sha512-H71nDOOL8Y7kWRLqf6Sums+01Q5msqBW2KhDUTemh1tvY04eSkSXrK0uj/4mmY0Xr16/3zyZmsrxN7CKuRbNRg== - -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" - integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== - dependencies: - "@babel/highlight" "^7.18.6" - -"@babel/code-frame@^7.21.4", "@babel/code-frame@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.5.tgz#234d98e1551960604f1246e6475891a570ad5658" - integrity sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ== - dependencies: - "@babel/highlight" "^7.22.5" - -"@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.5.tgz" - integrity sha512-KZXo2t10+/jxmkhNXc7pZTqRvSOIvVv/+lJwHS+B2rErwOyjuVRh60yVpb7liQ1U5t7lLJ1bz+t8tSypUZdm0g== - -"@babel/compat-data@^7.20.5": - version "7.20.14" - resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.20.14.tgz" - integrity sha512-0YpKHD6ImkWMEINCyDAD0HLLUH/lPCefG8ld9it8DJB2wnApraKuhgYTvTY1z7UFIfBTGy5LwncZ+5HWWGbhFw== - -"@babel/compat-data@^7.21.4", "@babel/compat-data@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.5.tgz#b1f6c86a02d85d2dd3368a2b67c09add8cd0c255" - integrity sha512-4Jc/YuIaYqKnDDz892kPIledykKg12Aw1PYX5i/TY28anJtacvM1Rrr8wbieB9GfEJwlzqT0hUEao0CxEebiDA== - -"@babel/core@7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.4.tgz#c6dc73242507b8e2a27fd13a9c1814f9fa34a659" - integrity sha512-qt/YV149Jman/6AfmlxJ04LMIu8bMoyl3RB91yTFrxQmgbrSvQMy7cI8Q62FHx1t8wJ8B5fu0UDoLwHAhUo1QA== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.4" - "@babel/helper-compilation-targets" "^7.21.4" - "@babel/helper-module-transforms" "^7.21.2" - "@babel/helpers" "^7.21.0" - "@babel/parser" "^7.21.4" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.4" - "@babel/types" "^7.21.4" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/core@7.21.8": - version "7.21.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.21.8.tgz#2a8c7f0f53d60100ba4c32470ba0281c92aa9aa4" - integrity sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.21.4" - "@babel/generator" "^7.21.5" - "@babel/helper-compilation-targets" "^7.21.5" - "@babel/helper-module-transforms" "^7.21.5" - "@babel/helpers" "^7.21.5" - "@babel/parser" "^7.21.8" - "@babel/template" "^7.20.7" - "@babel/traverse" "^7.21.5" - "@babel/types" "^7.21.5" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.2" - semver "^6.3.0" - -"@babel/core@^7.12.3": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/core/-/core-7.20.5.tgz" - integrity sha512-UdOWmk4pNWTm/4DlPUl/Pt4Gz4rcEMb7CY0Y3eJl5Yz1vI8ZJGmHWaVE55LoxRjdpx0z259GE9U5STA9atUinQ== - dependencies: - "@ampproject/remapping" "^2.1.0" - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.0" - "@babel/helper-module-transforms" "^7.20.2" - "@babel/helpers" "^7.20.5" - "@babel/parser" "^7.20.5" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.1" - semver "^6.3.0" - -"@babel/generator@7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.21.4.tgz#64a94b7448989f421f919d5239ef553b37bb26bc" - integrity sha512-NieM3pVIYW2SwGzKoqfPrQsf4xGs9M9AIG3ThppsSRmO+m7eQhmI6amajKMUeIO37wFfsvnvcxQFx6x6iqxDnA== - dependencies: - "@babel/types" "^7.21.4" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/generator@^7.20.5": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.20.5.tgz" - integrity sha512-jl7JY2Ykn9S0yj4DQP82sYvPU+T3g0HFcWTqDLqiuA9tGRNIj9VfbtXGAYTTkyNEnQk1jkMGOdYka8aG/lulCA== - dependencies: - "@babel/types" "^7.20.5" - "@jridgewell/gen-mapping" "^0.3.2" - jsesc "^2.5.1" - -"@babel/generator@^7.21.4", "@babel/generator@^7.21.5", "@babel/generator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.5.tgz#1e7bf768688acfb05cf30b2369ef855e82d984f7" - integrity sha512-+lcUbnTRhd0jOewtFSedLyiPsD5tswKkbgcezOqqWFUVNEwoUTlpPOBmvhG7OXWLR4jMdv0czPGH5XbflnD1EA== - dependencies: - "@babel/types" "^7.22.5" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-annotate-as-pure@7.18.6", "@babel/helper-annotate-as-pure@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz" - integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-annotate-as-pure@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz#e7f06737b197d580a01edf75d97e2c8be99d3882" - integrity sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.9.tgz" - integrity sha512-yFQ0YCHoIqarl8BCRwBL8ulYUaZpz3bNsA7oFepAzee+8/+ImtADXNOmO5vJvsPff3qi+hvpkY/NYBTrBQgdNw== - dependencies: - "@babel/helper-explode-assignable-expression" "^7.18.6" - "@babel/types" "^7.18.9" - -"@babel/helper-compilation-targets@^7.17.7", "@babel/helper-compilation-targets@^7.18.9", "@babel/helper-compilation-targets@^7.20.0": - version "7.20.0" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz" - integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== - dependencies: - "@babel/compat-data" "^7.20.0" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz" - integrity sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-validator-option" "^7.18.6" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-compilation-targets@^7.21.4", "@babel/helper-compilation-targets@^7.21.5", "@babel/helper-compilation-targets@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.5.tgz#fc7319fc54c5e2fa14b2909cf3c5fd3046813e02" - integrity sha512-Ji+ywpHeuqxB8WDxraCiqR0xfhYjiDE/e6k7FuIaANnoOFxAHskHChz4vA1mJC9Lbm01s1PVAGhQY4FUKSkGZw== - dependencies: - "@babel/compat-data" "^7.22.5" - "@babel/helper-validator-option" "^7.22.5" - browserslist "^4.21.3" - lru-cache "^5.1.1" - semver "^6.3.0" - -"@babel/helper-create-class-features-plugin@^7.18.6": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.20.5.tgz" - integrity sha512-3RCdA/EmEaikrhayahwToF0fpweU/8o2p8vhc1c/1kftHOdTKuC65kik/TLc+qfbS8JKw4qqJbne4ovICDhmww== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/helper-replace-supers" "^7.19.1" - "@babel/helper-split-export-declaration" "^7.18.6" - -"@babel/helper-create-class-features-plugin@^7.21.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.5.tgz#2192a1970ece4685fbff85b48da2c32fcb130b7c" - integrity sha512-xkb58MyOYIslxu3gKmVXmjTtUPvBU4odYzbiIQbWwLKIHCsx6UGZGX6F1IznMFVnDdirseUZopzN+ZRt8Xb33Q== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - semver "^6.3.0" - -"@babel/helper-create-regexp-features-plugin@^7.18.6": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.20.5.tgz" - integrity sha512-m68B1lkg3XDGX5yCvGO0kPx3v9WIYLnzjKfPcQiwntEQa5ZeRkPmo2X/ISJc8qxWGfwUr+kvZAeEzAwLec2r2w== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - regexpu-core "^5.2.1" - -"@babel/helper-create-regexp-features-plugin@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.5.tgz#bb2bf0debfe39b831986a4efbf4066586819c6e4" - integrity sha512-1VpEFOIbMRaXyDeUwUfmTIxExLwQ+zkW+Bh5zXpApA3oQedBx9v/updixWxnx/bZpKw7u8VxWjb/qWpIcmPq8A== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - regexpu-core "^5.3.1" - semver "^6.3.0" - -"@babel/helper-define-polyfill-provider@^0.3.3": - version "0.3.3" - resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.3.tgz" - integrity sha512-z5aQKU4IzbqCC1XH0nAqfsFLMVSo22SBKUc0BxGrLkolTdPTructy0ToNnlO2zA4j9Q/7pjMZf0DSY+DSTYzww== - dependencies: - "@babel/helper-compilation-targets" "^7.17.7" - "@babel/helper-plugin-utils" "^7.16.7" - debug "^4.1.1" - lodash.debounce "^4.0.8" - resolve "^1.14.2" - semver "^6.1.2" - -"@babel/helper-environment-visitor@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" - integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== - -"@babel/helper-environment-visitor@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.5.tgz#f06dd41b7c1f44e1f8da6c4055b41ab3a09a7e98" - integrity sha512-XGmhECfVA/5sAt+H+xpSg0mfrHq6FzNr9Oxh7PSEBBRUb/mL7Kz3NICXb194rCqAEdxkhPT1a88teizAFyvk8Q== - -"@babel/helper-explode-assignable-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz" - integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": - version "7.19.0" - resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz" - integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/types" "^7.19.0" - -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== - dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-hoist-variables@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" - integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-member-expression-to-functions@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.9.tgz" - integrity sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg== - dependencies: - "@babel/types" "^7.18.9" - -"@babel/helper-member-expression-to-functions@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.5.tgz#0a7c56117cad3372fbf8d2fb4bf8f8d64a1e76b2" - integrity sha512-aBiH1NKMG0H2cGZqspNvsaBe6wNGjbJjuLy29aU+eDZjSbbN53BaxlpB02xm9v34pLTZ1nIQPFYn2qMZoa5BQQ== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" - integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-module-imports@^7.21.4", "@babel/helper-module-imports@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.5.tgz#1a8f4c9f4027d23f520bd76b364d44434a72660c" - integrity sha512-8Dl6+HD/cKifutF5qGd/8ZJi84QeAKh+CEe1sBzz8UayBBGg1dAIJrdHOcOM5b2MpzWL2yuotJTtGjETq0qjXg== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-transforms@^7.18.6", "@babel/helper-module-transforms@^7.20.2": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.20.2.tgz" - integrity sha512-zvBKyJXRbmK07XhMuujYoJ48B5yvvmM6+wcpv6Ivj4Yg6qO7NOZOSnvZN9CRl1zz1Z4cKf8YejmCMh8clOoOeA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-simple-access" "^7.20.2" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/helper-validator-identifier" "^7.19.1" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.1" - "@babel/types" "^7.20.2" - -"@babel/helper-module-transforms@^7.21.2", "@babel/helper-module-transforms@^7.21.5", "@babel/helper-module-transforms@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.5.tgz#0f65daa0716961b6e96b164034e737f60a80d2ef" - integrity sha512-+hGKDt/Ze8GFExiVHno/2dvG5IdstpzCq0y4Qc9OJ25D4q3pKfiIP/4Vp3/JvhDkLKsDK2api3q3fpIgiIF5bw== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-optimise-call-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz" - integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-optimise-call-expression@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz#f21531a9ccbff644fdd156b4077c16ff0c3f609e" - integrity sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.18.6", "@babel/helper-plugin-utils@^7.18.9", "@babel/helper-plugin-utils@^7.19.0", "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.20.2.tgz" - integrity sha512-8RvlJG2mj4huQ4pZ+rU9lqKi9ZKiRmuvGuM2HlWmkmgOhbs6zEAw6IEiJ5cQqGbDzGZOhwuOQNtZMi/ENLjZoQ== - -"@babel/helper-plugin-utils@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz#dd7ee3735e8a313b9f7b05a773d892e88e6d7295" - integrity sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg== - -"@babel/helper-remap-async-to-generator@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz" - integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-wrap-function" "^7.18.9" - "@babel/types" "^7.18.9" - -"@babel/helper-remap-async-to-generator@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.5.tgz#14a38141a7bf2165ad38da61d61cf27b43015da2" - integrity sha512-cU0Sq1Rf4Z55fgz7haOakIyM7+x/uCFwXpLPaeRzfoUtAEAuUZjZvFPjL/rk5rW693dIgn2hng1W7xbT7lWT4g== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-wrap-function" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-replace-supers@^7.18.6", "@babel/helper-replace-supers@^7.19.1": - version "7.19.1" - resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.19.1.tgz" - integrity sha512-T7ahH7wV0Hfs46SFh5Jz3s0B6+o8g3c+7TMxu7xKfmHikg7EAZ3I2Qk9LFhjxXq8sL7UkP5JflezNwoZa8WvWw== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-member-expression-to-functions" "^7.18.9" - "@babel/helper-optimise-call-expression" "^7.18.6" - "@babel/traverse" "^7.19.1" - "@babel/types" "^7.19.0" - -"@babel/helper-replace-supers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.5.tgz#71bc5fb348856dea9fdc4eafd7e2e49f585145dc" - integrity sha512-aLdNM5I3kdI/V9xGNyKSF3X/gTyMUBohTZ+/3QdQKAA9vxIiy12E+8E2HoOP1/DjeqU+g6as35QHJNMDDYpuCg== - dependencies: - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-member-expression-to-functions" "^7.22.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-simple-access@^7.20.2": - version "7.20.2" - resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz" - integrity sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA== - dependencies: - "@babel/types" "^7.20.2" - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-skip-transparent-expression-wrappers@^7.20.0", "@babel/helper-skip-transparent-expression-wrappers@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz#007f15240b5751c537c40e77abb4e89eeaaa8847" - integrity sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@7.18.6", "@babel/helper-split-export-declaration@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" - integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== - dependencies: - "@babel/types" "^7.18.6" - -"@babel/helper-split-export-declaration@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.5.tgz#88cf11050edb95ed08d596f7a044462189127a08" - integrity sha512-thqK5QFghPKWLhAV321lxF95yCg2K3Ob5yw+M3VHWfdia0IkPXUtoLH8x/6Fh486QUvzhb8YOWHChTVen2/PoQ== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.19.4": - version "7.19.4" - resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz" - integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== - -"@babel/helper-string-parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" - integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== - -"@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": - version "7.19.1" - resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" - integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== - -"@babel/helper-validator-identifier@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz#9544ef6a33999343c8740fa51350f30eeaaaf193" - integrity sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ== - -"@babel/helper-validator-option@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" - integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== - -"@babel/helper-validator-option@^7.21.0", "@babel/helper-validator-option@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.5.tgz#de52000a15a177413c8234fa3a8af4ee8102d0ac" - integrity sha512-R3oB6xlIVKUnxNUxbmgq7pKjxpru24zlimpE8WK47fACIlM0II/Hm1RS8IaOI7NgCr6LNS+jl5l75m20npAziw== - -"@babel/helper-wrap-function@^7.18.9": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.20.5.tgz" - integrity sha512-bYMxIWK5mh+TgXGVqAtnu5Yn1un+v8DDZtqyzKRLUzrh70Eal2O3aZ7aPYiMADO4uKlkzOiRiZ6GX5q3qxvW9Q== - dependencies: - "@babel/helper-function-name" "^7.19.0" - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helper-wrap-function@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.22.5.tgz#44d205af19ed8d872b4eefb0d2fa65f45eb34f06" - integrity sha512-bYqLIBSEshYcYQyfks8ewYA8S30yaGSeRslcvKMvoUk6HHPySbxHq9YRi6ghhzEU+yhQv9bP/jXnygkStOcqZw== - dependencies: - "@babel/helper-function-name" "^7.22.5" - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helpers@^7.20.5": - version "7.20.6" - resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.20.6.tgz" - integrity sha512-Pf/OjgfgFRW5bApskEz5pvidpim7tEDPlFtKcNRXWmfHGn9IEI2W2flqRQXTFb7gIPTyK++N6rVHuwKut4XK6w== - dependencies: - "@babel/template" "^7.18.10" - "@babel/traverse" "^7.20.5" - "@babel/types" "^7.20.5" - -"@babel/helpers@^7.21.0", "@babel/helpers@^7.21.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.5.tgz#74bb4373eb390d1ceed74a15ef97767e63120820" - integrity sha512-pSXRmfE1vzcUIDFQcSGA5Mr+GxBV9oiRKDuDxXvWQQBCh8HoIjs/2DlDB7H8smac1IVrB9/xdXj2N3Wol9Cr+Q== - dependencies: - "@babel/template" "^7.22.5" - "@babel/traverse" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/highlight@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" - integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== - dependencies: - "@babel/helper-validator-identifier" "^7.18.6" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/highlight@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.5.tgz#aa6c05c5407a67ebce408162b7ede789b4d22031" - integrity sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw== - dependencies: - "@babel/helper-validator-identifier" "^7.22.5" - chalk "^2.0.0" - js-tokens "^4.0.0" - -"@babel/parser@^7.14.7", "@babel/parser@^7.18.10", "@babel/parser@^7.20.5": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.20.5.tgz" - integrity sha512-r27t/cy/m9uKLXQNWWebeCUHgnAZq0CpG1OwKRxzJMP1vpSU4bSIK2hq+/cp0bQxetkXx38n09rNu8jVkcK/zA== - -"@babel/parser@^7.20.7": - version "7.20.15" - resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.20.15.tgz" - integrity sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg== - -"@babel/parser@^7.21.4", "@babel/parser@^7.21.8", "@babel/parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.5.tgz#721fd042f3ce1896238cf1b341c77eb7dee7dbea" - integrity sha512-DFZMC9LJUG9PLOclRC32G63UXwzqS2koQC8dkx+PLdmt1xSePYpbT/NbsrJy8Q/muXz7o/h/d4A7Fuyixm559Q== - -"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz" - integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.20.7": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.5.tgz#fef09f9499b1f1c930da8a0c419db42167d792ca" - integrity sha512-31Bb65aZaUwqCbWMnZPduIZxCBngHFlzyN6Dq6KAJjtx+lx6ohKHubc61OomYi7XwVD4Ol0XCVz4h+pYFR048g== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/plugin-transform-optional-chaining" "^7.22.5" - -"@babel/plugin-proposal-async-generator-functions@7.20.7", "@babel/plugin-proposal-async-generator-functions@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.20.7.tgz" - integrity sha512-xMbiLsn/8RK7Wq7VeVytytS2L6qE69bXPB10YCmMdDZbKF4okCqY74pI/jJQ/8U0b/F6NrT2+14b8/P9/3AMGA== - dependencies: - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - "@babel/plugin-syntax-async-generators" "^7.8.4" - -"@babel/plugin-proposal-class-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.18.6.tgz" - integrity sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-class-static-block@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.21.0.tgz#77bdd66fb7b605f3a61302d224bdfacf5547977d" - integrity sha512-XP5G9MWNUskFuP30IfFSEFB0Z6HzLIUcjYM4bYOPHXl7eiJ9HFv8tWj6TXTN5QODiEhDZAeI4hLok2iHFFV4hw== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - -"@babel/plugin-proposal-dynamic-import@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.18.6.tgz" - integrity sha512-1auuwmK+Rz13SJj36R+jqFPMJWyKEDd7lLSdOj4oJK0UTgGueSAtkrCvz9ewmgyU/P941Rv2fQwZJN8s6QruXw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - -"@babel/plugin-proposal-export-namespace-from@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.18.9.tgz" - integrity sha512-k1NtHyOMvlDDFeb9G5PhUXuGj8m/wiwojgQVEhJ/fsVsMCpLyOP4h0uGEjYJKrRI+EVPlb5Jk+Gt9P97lOGwtA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - -"@babel/plugin-proposal-json-strings@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.18.6.tgz" - integrity sha512-lr1peyn9kOdbYc0xr0OdHTZ5FMqS6Di+H0Fz2I/JwMzGmzJETNeOFq2pBySw6X/KFL5EWDjlJuMsUGRFb8fQgQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-json-strings" "^7.8.3" - -"@babel/plugin-proposal-logical-assignment-operators@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.20.7.tgz#dfbcaa8f7b4d37b51e8bfb46d94a5aea2bb89d83" - integrity sha512-y7C7cZgpMIjWlKE5T7eJwp+tnRYM89HmRvWM5EQuB5BoHEONjmQ8lSNmBUwOyy/GFRsohJED51YBF79hE1djug== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - -"@babel/plugin-proposal-nullish-coalescing-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.18.6.tgz" - integrity sha512-wQxQzxYeJqHcfppzBDnm1yAY0jSRkUXR2z8RePZYrKwMKgMlE8+Z6LUno+bd6LvbGh8Gltvy74+9pIYkr+XkKA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - -"@babel/plugin-proposal-numeric-separator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.18.6.tgz" - integrity sha512-ozlZFogPqoLm8WBr5Z8UckIoE4YQ5KESVcNudyXOR8uqIkliTEgJ3RoketfG6pmzLdeZF0H/wjE9/cCEitBl7Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - -"@babel/plugin-proposal-object-rest-spread@^7.20.7": - version "7.20.7" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.20.7.tgz#aa662940ef425779c75534a5c41e9d936edc390a" - integrity sha512-d2S98yCiLxDVmBmE8UjGcfPvNEUbA1U5q5WxaWFUGRzJSVAZqm5W6MbPct0jxnegUZ0niLeNX+IOzEs7wYg9Dg== - dependencies: - "@babel/compat-data" "^7.20.5" - "@babel/helper-compilation-targets" "^7.20.7" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-transform-parameters" "^7.20.7" - -"@babel/plugin-proposal-optional-catch-binding@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.18.6.tgz" - integrity sha512-Q40HEhs9DJQyaZfUjjn6vE8Cv4GmMHCYuMGIWUnlxH6400VGxOuwWsPt4FxXxJkC/5eOzgn0z21M9gMT4MOhbw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - -"@babel/plugin-proposal-optional-chaining@^7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.21.0.tgz#886f5c8978deb7d30f678b2e24346b287234d3ea" - integrity sha512-p4zeefM72gpmEe2fkUr/OnOXpWEf8nAgk7ZYVqqfFiyIG7oFfVZcCrU64hWn5xp4tQ9LkV4bTIa5rD0KANpKNA== - dependencies: - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-proposal-private-methods@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.18.6.tgz" - integrity sha512-nutsvktDItsNn4rpGItSNV2sz1XwS+nfU0Rg8aCx3W3NOKVzdMjJRu0O5OkgDp3ZGICSTbgRpxZoWsxoKRvbeA== - dependencies: - "@babel/helper-create-class-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-proposal-private-property-in-object@^7.21.0": - version "7.21.11" - resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.11.tgz#69d597086b6760c4126525cfa154f34631ff272c" - integrity sha512-0QZ8qP/3RLDVBwBFoWAwCtgcDZJVwA5LUJRZU8x2YFfKNuFq161wK3cuGrALu5yiPu+vzwTAg/sMWVNeWeNyaw== - dependencies: - "@babel/helper-annotate-as-pure" "^7.18.6" - "@babel/helper-create-class-features-plugin" "^7.21.0" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - -"@babel/plugin-proposal-unicode-property-regex@^7.18.6", "@babel/plugin-proposal-unicode-property-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.18.6.tgz" - integrity sha512-2BShG/d5yoZyXZfVePH91urL5wTG6ASZU9M4o03lKK8u8UW1y08OMttBSOADTcJrnPMpvDXRG3G8fyLh4ovs8w== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-syntax-async-generators@^7.8.4": - version "7.8.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" - integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-class-properties@^7.12.13": - version "7.12.13" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" - integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== - dependencies: - "@babel/helper-plugin-utils" "^7.12.13" - -"@babel/plugin-syntax-class-static-block@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" - integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-dynamic-import@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz" - integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-export-namespace-from@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz" - integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.3" - -"@babel/plugin-syntax-import-assertions@^7.20.0": - version "7.20.0" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz" - integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== - dependencies: - "@babel/helper-plugin-utils" "^7.19.0" - -"@babel/plugin-syntax-json-strings@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" - integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-logical-assignment-operators@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" - integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" - integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-numeric-separator@^7.10.4": - version "7.10.4" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" - integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== - dependencies: - "@babel/helper-plugin-utils" "^7.10.4" - -"@babel/plugin-syntax-object-rest-spread@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" - integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-catch-binding@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" - integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-optional-chaining@^7.8.3": - version "7.8.3" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" - integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== - dependencies: - "@babel/helper-plugin-utils" "^7.8.0" - -"@babel/plugin-syntax-private-property-in-object@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" - integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-syntax-top-level-await@^7.14.5": - version "7.14.5" - resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" - integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== - dependencies: - "@babel/helper-plugin-utils" "^7.14.5" - -"@babel/plugin-transform-arrow-functions@^7.20.7": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.22.5.tgz#e5ba566d0c58a5b2ba2a8b795450641950b71958" - integrity sha512-26lTNXoVRdAnsaDXPpvCNUq+OVWEVC6bx7Vvz9rC53F2bagUWW4u4ii2+h8Fejfh7RYqPxn+libeFBBck9muEw== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-async-to-generator@7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz" - integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== - dependencies: - "@babel/helper-module-imports" "^7.18.6" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-remap-async-to-generator" "^7.18.9" - -"@babel/plugin-transform-async-to-generator@^7.20.7": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.22.5.tgz#c7a85f44e46f8952f6d27fe57c2ed3cc084c3775" - integrity sha512-b1A8D8ZzE/VhNDoV1MSJTnpKkCG5bJo+19R4o4oy03zM7ws8yEMK755j61Dc3EyvdysbqH5BOOTquJ7ZX9C6vQ== - dependencies: - "@babel/helper-module-imports" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-remap-async-to-generator" "^7.22.5" - -"@babel/plugin-transform-block-scoped-functions@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz" - integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-block-scoping@^7.21.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.22.5.tgz#8bfc793b3a4b2742c0983fadc1480d843ecea31b" - integrity sha512-EcACl1i5fSQ6bt+YGuU/XGCeZKStLmyVGytWkpyhCLeQVA0eu6Wtiw92V+I1T/hnezUv7j74dA/Ro69gWcU+hg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-classes@^7.21.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.22.5.tgz#635d4e98da741fad814984639f4c0149eb0135e1" - integrity sha512-2edQhLfibpWpsVBx2n/GKOz6JdGQvLruZQfGr9l1qes2KQaWswjBzhQF7UDUZMNaMMQeYnQzxwOMPsbYF7wqPQ== - dependencies: - "@babel/helper-annotate-as-pure" "^7.22.5" - "@babel/helper-compilation-targets" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-optimise-call-expression" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-replace-supers" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - globals "^11.1.0" - -"@babel/plugin-transform-computed-properties@^7.20.7": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.22.5.tgz#cd1e994bf9f316bd1c2dafcd02063ec261bb3869" - integrity sha512-4GHWBgRf0krxPX+AaPtgBAlTgTeZmqDynokHOX7aqqAB4tHs3U2Y02zH6ETFdLZGcg9UQSD1WCmkVrE9ErHeOg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/template" "^7.22.5" - -"@babel/plugin-transform-destructuring@^7.21.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.22.5.tgz#d3aca7438f6c26c78cdd0b0ba920a336001b27cc" - integrity sha512-GfqcFuGW8vnEqTUBM7UtPd5A4q797LTvvwKxXTgRsFjoqaJiEg9deBG6kWeQYkVEL569NpnmpC0Pkr/8BLKGnQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-dotall-regex@^7.18.6", "@babel/plugin-transform-dotall-regex@^7.4.4": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz" - integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-duplicate-keys@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz" - integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-exponentiation-operator@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz" - integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== - dependencies: - "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-for-of@^7.21.0": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.22.5.tgz#ab1b8a200a8f990137aff9a084f8de4099ab173f" - integrity sha512-3kxQjX1dU9uudwSshyLeEipvrLjBCVthCgeTp6CzE/9JYrlAIaeekVxRpCWsDDfYTfRZRoCeZatCQvwo+wvK8A== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-function-name@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz" - integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== - dependencies: - "@babel/helper-compilation-targets" "^7.18.9" - "@babel/helper-function-name" "^7.18.9" - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz" - integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-member-expression-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz" - integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-modules-amd@^7.20.11": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.22.5.tgz#4e045f55dcf98afd00f85691a68fc0780704f526" - integrity sha512-R+PTfLTcYEmb1+kK7FNkhQ1gP4KgjpSO6HfH9+f8/yfp2Nt3ggBjiVpRwmwTlfqZLafYKJACy36yDXlEmI9HjQ== - dependencies: - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-modules-commonjs@^7.21.2": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.22.5.tgz#7d9875908d19b8c0536085af7b053fd5bd651bfa" - integrity sha512-B4pzOXj+ONRmuaQTg05b3y/4DuFz3WcCNAXPLb2Q0GT0TrGKGxNKV4jwsXts+StaM0LQczZbOpj8o1DLPDJIiA== - dependencies: - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-simple-access" "^7.22.5" - -"@babel/plugin-transform-modules-systemjs@^7.20.11": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.5.tgz#18c31410b5e579a0092638f95c896c2a98a5d496" - integrity sha512-emtEpoaTMsOs6Tzz+nbmcePl6AKVtS1yC4YNAeMun9U8YCsgadPNxnOPQ8GhHFB2qdx+LZu9LgoC0Lthuu05DQ== - dependencies: - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-module-transforms" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - -"@babel/plugin-transform-modules-umd@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz" - integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== - dependencies: - "@babel/helper-module-transforms" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-named-capturing-groups-regex@^7.20.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz#67fe18ee8ce02d57c855185e27e3dc959b2e991f" - integrity sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.22.5" - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-new-target@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.18.6.tgz" - integrity sha512-DjwFA/9Iu3Z+vrAn+8pBUGcjhxKguSMlsFqeCKbhb9BAV756v0krzVK04CRDi/4aqmk8BsHb4a/gFcaA5joXRw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-object-super@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz" - integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - "@babel/helper-replace-supers" "^7.18.6" - -"@babel/plugin-transform-optional-chaining@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.5.tgz#1003762b9c14295501beb41be72426736bedd1e0" - integrity sha512-AconbMKOMkyG+xCng2JogMCDcqW8wedQAqpVIL4cOSescZ7+iW8utC6YDZLMCSUIReEA733gzRSaOSXMAt/4WQ== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - -"@babel/plugin-transform-parameters@^7.20.7", "@babel/plugin-transform-parameters@^7.21.3": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.5.tgz#c3542dd3c39b42c8069936e48717a8d179d63a18" - integrity sha512-AVkFUBurORBREOmHRKo06FjHYgjrabpdqRSwq6+C7R5iTCZOsM4QbcB27St0a4U6fffyAOqh3s/qEfybAhfivg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - -"@babel/plugin-transform-property-literals@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz" - integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-regenerator@^7.20.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.22.5.tgz#cd8a68b228a5f75fa01420e8cc2fc400f0fc32aa" - integrity sha512-rR7KePOE7gfEtNTh9Qw+iO3Q/e4DEsoQ+hdvM6QUDH7JRJ5qxq5AA52ZzBWbI5i9lfNuvySgOGP8ZN7LAmaiPw== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - regenerator-transform "^0.15.1" - -"@babel/plugin-transform-reserved-words@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz" - integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-runtime@7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.21.4.tgz#2e1da21ca597a7d01fc96b699b21d8d2023191aa" - integrity sha512-1J4dhrw1h1PqnNNpzwxQ2UBymJUF8KuPjAAnlLwZcGhHAIqUigFW7cdK6GHoB64ubY4qXQNYknoUeks4Wz7CUA== - dependencies: - "@babel/helper-module-imports" "^7.21.4" - "@babel/helper-plugin-utils" "^7.20.2" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - semver "^6.3.0" - -"@babel/plugin-transform-shorthand-properties@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz" - integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-spread@^7.20.7": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.22.5.tgz#6487fd29f229c95e284ba6c98d65eafb893fea6b" - integrity sha512-5ZzDQIGyvN4w8+dMmpohL6MBo+l2G7tfC/O2Dg7/hjpgeWvUx8FzfeOKxGog9IimPa4YekaQ9PlDqTLOljkcxg== - dependencies: - "@babel/helper-plugin-utils" "^7.22.5" - "@babel/helper-skip-transparent-expression-wrappers" "^7.22.5" - -"@babel/plugin-transform-sticky-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz" - integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== - dependencies: - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/plugin-transform-template-literals@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz" - integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-typeof-symbol@^7.18.9": - version "7.18.9" - resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz" - integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-escapes@^7.18.10": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.18.10.tgz" - integrity sha512-kKAdAI+YzPgGY/ftStBFXTI1LZFju38rYThnfMykS+IXy8BVx+res7s2fxf1l8I35DV2T97ezo6+SGrXz6B3iQ== - dependencies: - "@babel/helper-plugin-utils" "^7.18.9" - -"@babel/plugin-transform-unicode-regex@^7.18.6": - version "7.18.6" - resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz" - integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== - dependencies: - "@babel/helper-create-regexp-features-plugin" "^7.18.6" - "@babel/helper-plugin-utils" "^7.18.6" - -"@babel/preset-env@7.21.4": - version "7.21.4" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.21.4.tgz#a952482e634a8dd8271a3fe5459a16eb10739c58" - integrity sha512-2W57zHs2yDLm6GD5ZpvNn71lZ0B/iypSdIeq25OurDKji6AdzV07qp4s3n1/x5BqtiGaTrPN3nerlSCaC5qNTw== - dependencies: - "@babel/compat-data" "^7.21.4" - "@babel/helper-compilation-targets" "^7.21.4" - "@babel/helper-plugin-utils" "^7.20.2" - "@babel/helper-validator-option" "^7.21.0" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.20.7" - "@babel/plugin-proposal-async-generator-functions" "^7.20.7" - "@babel/plugin-proposal-class-properties" "^7.18.6" - "@babel/plugin-proposal-class-static-block" "^7.21.0" - "@babel/plugin-proposal-dynamic-import" "^7.18.6" - "@babel/plugin-proposal-export-namespace-from" "^7.18.9" - "@babel/plugin-proposal-json-strings" "^7.18.6" - "@babel/plugin-proposal-logical-assignment-operators" "^7.20.7" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.18.6" - "@babel/plugin-proposal-numeric-separator" "^7.18.6" - "@babel/plugin-proposal-object-rest-spread" "^7.20.7" - "@babel/plugin-proposal-optional-catch-binding" "^7.18.6" - "@babel/plugin-proposal-optional-chaining" "^7.21.0" - "@babel/plugin-proposal-private-methods" "^7.18.6" - "@babel/plugin-proposal-private-property-in-object" "^7.21.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.18.6" - "@babel/plugin-syntax-async-generators" "^7.8.4" - "@babel/plugin-syntax-class-properties" "^7.12.13" - "@babel/plugin-syntax-class-static-block" "^7.14.5" - "@babel/plugin-syntax-dynamic-import" "^7.8.3" - "@babel/plugin-syntax-export-namespace-from" "^7.8.3" - "@babel/plugin-syntax-import-assertions" "^7.20.0" - "@babel/plugin-syntax-json-strings" "^7.8.3" - "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" - "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" - "@babel/plugin-syntax-numeric-separator" "^7.10.4" - "@babel/plugin-syntax-object-rest-spread" "^7.8.3" - "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" - "@babel/plugin-syntax-optional-chaining" "^7.8.3" - "@babel/plugin-syntax-private-property-in-object" "^7.14.5" - "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.20.7" - "@babel/plugin-transform-async-to-generator" "^7.20.7" - "@babel/plugin-transform-block-scoped-functions" "^7.18.6" - "@babel/plugin-transform-block-scoping" "^7.21.0" - "@babel/plugin-transform-classes" "^7.21.0" - "@babel/plugin-transform-computed-properties" "^7.20.7" - "@babel/plugin-transform-destructuring" "^7.21.3" - "@babel/plugin-transform-dotall-regex" "^7.18.6" - "@babel/plugin-transform-duplicate-keys" "^7.18.9" - "@babel/plugin-transform-exponentiation-operator" "^7.18.6" - "@babel/plugin-transform-for-of" "^7.21.0" - "@babel/plugin-transform-function-name" "^7.18.9" - "@babel/plugin-transform-literals" "^7.18.9" - "@babel/plugin-transform-member-expression-literals" "^7.18.6" - "@babel/plugin-transform-modules-amd" "^7.20.11" - "@babel/plugin-transform-modules-commonjs" "^7.21.2" - "@babel/plugin-transform-modules-systemjs" "^7.20.11" - "@babel/plugin-transform-modules-umd" "^7.18.6" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.20.5" - "@babel/plugin-transform-new-target" "^7.18.6" - "@babel/plugin-transform-object-super" "^7.18.6" - "@babel/plugin-transform-parameters" "^7.21.3" - "@babel/plugin-transform-property-literals" "^7.18.6" - "@babel/plugin-transform-regenerator" "^7.20.5" - "@babel/plugin-transform-reserved-words" "^7.18.6" - "@babel/plugin-transform-shorthand-properties" "^7.18.6" - "@babel/plugin-transform-spread" "^7.20.7" - "@babel/plugin-transform-sticky-regex" "^7.18.6" - "@babel/plugin-transform-template-literals" "^7.18.9" - "@babel/plugin-transform-typeof-symbol" "^7.18.9" - "@babel/plugin-transform-unicode-escapes" "^7.18.10" - "@babel/plugin-transform-unicode-regex" "^7.18.6" - "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.21.4" - babel-plugin-polyfill-corejs2 "^0.3.3" - babel-plugin-polyfill-corejs3 "^0.6.0" - babel-plugin-polyfill-regenerator "^0.4.1" - core-js-compat "^3.25.1" - semver "^6.3.0" - -"@babel/preset-modules@^0.1.5": - version "0.1.5" - resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz" - integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" - "@babel/plugin-transform-dotall-regex" "^7.4.4" - "@babel/types" "^7.4.4" - esutils "^2.0.2" - -"@babel/regjsgen@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" - integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== - -"@babel/runtime@7.21.0": - version "7.21.0" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.21.0.tgz#5b55c9d394e5fcf304909a8b00c07dc217b56673" - integrity sha512-xwII0//EObnq89Ji5AKYQaRYiW/nZ3llSv29d49IuxPhKbtJoLP+9QUUZ4nVragQVtaVGeZrpB+ZtG/Pdy/POw== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/runtime@^7.8.4": - version "7.20.6" - resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.20.6.tgz" - integrity sha512-Q+8MqP7TiHMWzSfwiJwXCjyf4GYA4Dgw3emg/7xmwsdLJOZUp+nMqcOwOzzYheuM1rhDu8FSj2l0aoMygEuXuA== - dependencies: - regenerator-runtime "^0.13.11" - -"@babel/template@7.20.7", "@babel/template@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz" - integrity sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.20.7" - "@babel/types" "^7.20.7" - -"@babel/template@^7.18.10": - version "7.18.10" - resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz" - integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/parser" "^7.18.10" - "@babel/types" "^7.18.10" - -"@babel/template@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.5.tgz#0c8c4d944509875849bd0344ff0050756eefc6ec" - integrity sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/traverse@^7.19.1", "@babel/traverse@^7.20.1", "@babel/traverse@^7.20.5": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.20.5.tgz" - integrity sha512-WM5ZNN3JITQIq9tFZaw1ojLU3WgWdtkxnhM1AegMS+PvHjkM5IXjmYEGY7yukz5XS4sJyEf2VzWjI8uAavhxBQ== - dependencies: - "@babel/code-frame" "^7.18.6" - "@babel/generator" "^7.20.5" - "@babel/helper-environment-visitor" "^7.18.9" - "@babel/helper-function-name" "^7.19.0" - "@babel/helper-hoist-variables" "^7.18.6" - "@babel/helper-split-export-declaration" "^7.18.6" - "@babel/parser" "^7.20.5" - "@babel/types" "^7.20.5" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/traverse@^7.21.4", "@babel/traverse@^7.21.5", "@babel/traverse@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.5.tgz#44bd276690db6f4940fdb84e1cb4abd2f729ccd1" - integrity sha512-7DuIjPgERaNo6r+PZwItpjCZEa5vyw4eJGufeLxrPdBXBoLcCJCIasvK6pK/9DVNrLZTLFhUGqaC6X/PA007TQ== - dependencies: - "@babel/code-frame" "^7.22.5" - "@babel/generator" "^7.22.5" - "@babel/helper-environment-visitor" "^7.22.5" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.5" - "@babel/parser" "^7.22.5" - "@babel/types" "^7.22.5" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.20.2", "@babel/types@^7.20.5", "@babel/types@^7.4.4": - version "7.20.5" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.20.5.tgz" - integrity sha512-c9fst/h2/dcF7H+MJKZ2T0KjEQ8hY/BNnDk/H3XY8C4Aw/eWQXWn/lWntHF9ooUBnGmEvbfGrTgLWc+um0YDUg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@babel/types@^7.20.7": - version "7.20.7" - resolved "https://registry.npmjs.org/@babel/types/-/types-7.20.7.tgz" - integrity sha512-69OnhBxSSgK0OzTJai4kyPDiKTIe3j+ctaHdIGVbRahTLAT7L3R9oeXHC2aVSuGYt3cVnoAMDmOCgJ2yaiLMvg== - dependencies: - "@babel/helper-string-parser" "^7.19.4" - "@babel/helper-validator-identifier" "^7.19.1" - to-fast-properties "^2.0.0" - -"@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.5.tgz#cd93eeaab025880a3a47ec881f4b096a5b786fbe" - integrity sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA== - dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.5" - to-fast-properties "^2.0.0" - -"@colors/colors@1.5.0": - version "1.5.0" - resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" - integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== - -"@discoveryjs/json-ext@0.5.7": - version "0.5.7" - resolved "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz" - integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== - -"@esbuild/android-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.18.tgz#4aa8d8afcffb4458736ca9b32baa97d7cb5861ea" - integrity sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw== - -"@esbuild/android-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz#bafb75234a5d3d1b690e7c2956a599345e84a2fd" - integrity sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA== - -"@esbuild/android-arm@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.18.tgz#74a7e95af4ee212ebc9db9baa87c06a594f2a427" - integrity sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw== - -"@esbuild/android-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.19.tgz#5898f7832c2298bc7d0ab53701c57beb74d78b4d" - integrity sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A== - -"@esbuild/android-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.18.tgz#1dcd13f201997c9fe0b204189d3a0da4eb4eb9b6" - integrity sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg== - -"@esbuild/android-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.19.tgz#658368ef92067866d95fb268719f98f363d13ae1" - integrity sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww== - -"@esbuild/darwin-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.18.tgz#444f3b961d4da7a89eb9bd35cfa4415141537c2a" - integrity sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ== - -"@esbuild/darwin-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz#584c34c5991b95d4d48d333300b1a4e2ff7be276" - integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg== - -"@esbuild/darwin-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.18.tgz#a6da308d0ac8a498c54d62e0b2bfb7119b22d315" - integrity sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A== - -"@esbuild/darwin-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz#7751d236dfe6ce136cce343dce69f52d76b7f6cb" - integrity sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw== - -"@esbuild/freebsd-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.18.tgz#b83122bb468889399d0d63475d5aea8d6829c2c2" - integrity sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA== - -"@esbuild/freebsd-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz#cacd171665dd1d500f45c167d50c6b7e539d5fd2" - integrity sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ== - -"@esbuild/freebsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.18.tgz#af59e0e03fcf7f221b34d4c5ab14094862c9c864" - integrity sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew== - -"@esbuild/freebsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz#0769456eee2a08b8d925d7c00b79e861cb3162e4" - integrity sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ== - -"@esbuild/linux-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.18.tgz#8551d72ba540c5bce4bab274a81c14ed01eafdcf" - integrity sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ== - -"@esbuild/linux-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz#38e162ecb723862c6be1c27d6389f48960b68edb" - integrity sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg== - -"@esbuild/linux-arm@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.18.tgz#e09e76e526df4f665d4d2720d28ff87d15cdf639" - integrity sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg== - -"@esbuild/linux-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz#1a2cd399c50040184a805174a6d89097d9d1559a" - integrity sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA== - -"@esbuild/linux-ia32@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.18.tgz#47878860ce4fe73a36fd8627f5647bcbbef38ba4" - integrity sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ== - -"@esbuild/linux-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz#e28c25266b036ce1cabca3c30155222841dc035a" - integrity sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ== - -"@esbuild/linux-loong64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.18.tgz#3f8fbf5267556fc387d20b2e708ce115de5c967a" - integrity sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ== - -"@esbuild/linux-loong64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz#0f887b8bb3f90658d1a0117283e55dbd4c9dcf72" - integrity sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ== - -"@esbuild/linux-mips64el@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.18.tgz#9d896d8f3c75f6c226cbeb840127462e37738226" - integrity sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA== - -"@esbuild/linux-mips64el@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz#f5d2a0b8047ea9a5d9f592a178ea054053a70289" - integrity sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A== - -"@esbuild/linux-ppc64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.18.tgz#3d9deb60b2d32c9985bdc3e3be090d30b7472783" - integrity sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ== - -"@esbuild/linux-ppc64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz#876590e3acbd9fa7f57a2c7d86f83717dbbac8c7" - integrity sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg== - -"@esbuild/linux-riscv64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.18.tgz#8a943cf13fd24ff7ed58aefb940ef178f93386bc" - integrity sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA== - -"@esbuild/linux-riscv64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz#7f49373df463cd9f41dc34f9b2262d771688bf09" - integrity sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA== - -"@esbuild/linux-s390x@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.18.tgz#66cb01f4a06423e5496facabdce4f7cae7cb80e5" - integrity sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw== - -"@esbuild/linux-s390x@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz#e2afd1afcaf63afe2c7d9ceacd28ec57c77f8829" - integrity sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q== - -"@esbuild/linux-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.18.tgz#23c26050c6c5d1359c7b774823adc32b3883b6c9" - integrity sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA== - -"@esbuild/linux-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz#8a0e9738b1635f0c53389e515ae83826dec22aa4" - integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== - -"@esbuild/netbsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.18.tgz#789a203d3115a52633ff6504f8cbf757f15e703b" - integrity sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg== - -"@esbuild/netbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz#c29fb2453c6b7ddef9a35e2c18b37bda1ae5c462" - integrity sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q== - -"@esbuild/openbsd-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.18.tgz#d7b998a30878f8da40617a10af423f56f12a5e90" - integrity sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA== - -"@esbuild/openbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz#95e75a391403cb10297280d524d66ce04c920691" - integrity sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g== - -"@esbuild/sunos-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.18.tgz#ecad0736aa7dae07901ba273db9ef3d3e93df31f" - integrity sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg== - -"@esbuild/sunos-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz#722eaf057b83c2575937d3ffe5aeb16540da7273" - integrity sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg== - -"@esbuild/win32-arm64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.18.tgz#58dfc177da30acf956252d7c8ae9e54e424887c4" - integrity sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg== - -"@esbuild/win32-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz#9aa9dc074399288bdcdd283443e9aeb6b9552b6f" - integrity sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag== - -"@esbuild/win32-ia32@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.18.tgz#340f6163172b5272b5ae60ec12c312485f69232b" - integrity sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw== - -"@esbuild/win32-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz#95ad43c62ad62485e210f6299c7b2571e48d2b03" - integrity sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw== - -"@esbuild/win32-x64@0.17.18": - version "0.17.18" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.18.tgz#3a8e57153905308db357fd02f57c180ee3a0a1fa" - integrity sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg== - -"@esbuild/win32-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz#8cfaf2ff603e9aabb910e9c0558c26cf32744061" - integrity sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA== - -"@eslint-community/eslint-utils@^4.2.0": - version "4.4.0" - resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" - integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== - dependencies: - eslint-visitor-keys "^3.3.0" - -"@eslint-community/regexpp@^4.4.0": - version "4.5.1" - resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.1.tgz#cdd35dce4fa1a89a4fd42b1599eb35b3af408884" - integrity sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ== - -"@eslint/eslintrc@^2.0.3": - version "2.0.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.3.tgz#4910db5505f4d503f27774bf356e3704818a0331" - integrity sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ== - dependencies: - ajv "^6.12.4" - debug "^4.3.2" - espree "^9.5.2" - globals "^13.19.0" - ignore "^5.2.0" - import-fresh "^3.2.1" - js-yaml "^4.1.0" - minimatch "^3.1.2" - strip-json-comments "^3.1.1" - -"@eslint/js@8.42.0": - version "8.42.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.42.0.tgz#484a1d638de2911e6f5a30c12f49c7e4a3270fb6" - integrity sha512-6SWlXpWU5AvId8Ac7zjzmIOqMOba/JWY8XZ4A7q7Gn1Vlfg/SFFIlrtHXt9nPn4op9ZPAkl91Jao+QQv3r/ukw== - -"@gar/promisify@^1.1.3": - version "1.1.3" - resolved "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz" - integrity sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw== - -"@humanwhocodes/config-array@^0.11.10": - version "0.11.10" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.10.tgz#5a3ffe32cc9306365fb3fd572596cd602d5e12d2" - integrity sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ== - dependencies: - "@humanwhocodes/object-schema" "^1.2.1" - debug "^4.1.1" - minimatch "^3.0.5" - -"@humanwhocodes/module-importer@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" - integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== - -"@humanwhocodes/object-schema@^1.2.1": - version "1.2.1" - resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" - integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== - -"@isaacs/cliui@^8.0.2": - version "8.0.2" - resolved "https://registry.yarnpkg.com/@isaacs/cliui/-/cliui-8.0.2.tgz#b37667b7bc181c168782259bab42474fbf52b550" - integrity sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA== - dependencies: - string-width "^5.1.2" - string-width-cjs "npm:string-width@^4.2.0" - strip-ansi "^7.0.1" - strip-ansi-cjs "npm:strip-ansi@^6.0.1" - wrap-ansi "^8.1.0" - wrap-ansi-cjs "npm:wrap-ansi@^7.0.0" - -"@istanbuljs/load-nyc-config@^1.0.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz" - integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== - dependencies: - camelcase "^5.3.1" - find-up "^4.1.0" - get-package-type "^0.1.0" - js-yaml "^3.13.1" - resolve-from "^5.0.0" - -"@istanbuljs/schema@^0.1.2": - version "0.1.3" - resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz" - integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== - -"@jridgewell/gen-mapping@^0.1.0": - version "0.1.1" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz" - integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== - dependencies: - "@jridgewell/set-array" "^1.0.0" - "@jridgewell/sourcemap-codec" "^1.4.10" - -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.2" - resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" - integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/resolve-uri@3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" - integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== - -"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - -"@jridgewell/source-map@^0.3.2": - version "0.3.2" - resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz" - integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/source-map@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/source-map/-/source-map-0.3.3.tgz#8108265659d4c33e72ffe14e33d6cc5eb59f2fda" - integrity sha512-b+fsZXeLYi9fEULmfBrhxn4IrPlINf8fiNarzTof004v3lFdntdwa9PF7vFJqm3mg7s+ScJMxXaE3Acp1irZcg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.13", "@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.14" - resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" - integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== - -"@jridgewell/trace-mapping@^0.3.17": - version "0.3.18" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" - integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@jridgewell/trace-mapping@^0.3.9": - version "0.3.17" - resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz" - integrity sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g== - dependencies: - "@jridgewell/resolve-uri" "3.1.0" - "@jridgewell/sourcemap-codec" "1.4.14" - -"@leichtgewicht/ip-codec@^2.0.1": - version "2.0.4" - resolved "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz" - integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== - -"@ngtools/webpack@16.0.5": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-16.0.5.tgz#4a2f4e5b02984e69fbfdabd8a5c7da14191734b3" - integrity sha512-qKQmPKxfcI9pumaKqM4EodcjauLA2JCGdAhBu+xafdmqV52K7goZKCqqzjYpraqeS+UOphi08XetX4mBPu9KMg== - -"@nodelib/fs.scandir@2.1.5": - version "2.1.5" - resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" - integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== - dependencies: - "@nodelib/fs.stat" "2.0.5" - run-parallel "^1.1.9" - -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": - version "2.0.5" - resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" - integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== - -"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": - version "1.2.8" - resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" - integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== - dependencies: - "@nodelib/fs.scandir" "2.1.5" - fastq "^1.6.0" - -"@npmcli/fs@^2.1.0": - version "2.1.2" - resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz" - integrity sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ== - dependencies: - "@gar/promisify" "^1.1.3" - semver "^7.3.5" - -"@npmcli/fs@^3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@npmcli/fs/-/fs-3.1.0.tgz" - integrity sha512-7kZUAaLscfgbwBQRbvdMYaZOWyMEcPTH/tJjnyAWJ/dvvs9Ef+CERx/qJb9GExJpl1qipaDGn7KqHnFGGixd0w== - dependencies: - semver "^7.3.5" - -"@npmcli/git@^4.0.0": - version "4.0.3" - resolved "https://registry.npmjs.org/@npmcli/git/-/git-4.0.3.tgz" - integrity sha512-8cXNkDIbnXPVbhXMmQ7/bklCAjtmPaXfI9aEM4iH+xSuEHINLMHhlfESvVwdqmHJRJkR48vNJTSUvoF6GRPSFA== - dependencies: - "@npmcli/promise-spawn" "^6.0.0" - lru-cache "^7.4.4" - mkdirp "^1.0.4" - npm-pick-manifest "^8.0.0" - proc-log "^3.0.0" - promise-inflight "^1.0.1" - promise-retry "^2.0.1" - semver "^7.3.5" - which "^3.0.0" - -"@npmcli/installed-package-contents@^2.0.1": - version "2.0.1" - resolved "https://registry.npmjs.org/@npmcli/installed-package-contents/-/installed-package-contents-2.0.1.tgz" - integrity sha512-GIykAFdOVK31Q1/zAtT5MbxqQL2vyl9mvFJv+OGu01zxbhL3p0xc8gJjdNGX1mWmUT43aEKVO2L6V/2j4TOsAA== - dependencies: - npm-bundled "^3.0.0" - npm-normalize-package-bin "^3.0.0" - -"@npmcli/move-file@^2.0.0": - version "2.0.1" - resolved "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz" - integrity sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ== - dependencies: - mkdirp "^1.0.4" - rimraf "^3.0.2" - -"@npmcli/node-gyp@^3.0.0": - version "3.0.0" - resolved "https://registry.npmjs.org/@npmcli/node-gyp/-/node-gyp-3.0.0.tgz" - integrity sha512-gp8pRXC2oOxu0DUE1/M3bYtb1b3/DbJ5aM113+XJBgfXdussRAsX0YOrOhdd8WvnAR6auDBvJomGAkLKA5ydxA== - -"@npmcli/promise-spawn@^6.0.0", "@npmcli/promise-spawn@^6.0.1": - version "6.0.1" - resolved "https://registry.npmjs.org/@npmcli/promise-spawn/-/promise-spawn-6.0.1.tgz" - integrity sha512-+hcUpxgx0vEpDJI9Cn+lkTdKLoqKBXFCVps5H7FujEU2vLOp6KwqjLlxbnz8Wzgm8oEqW/u5FeNAXSFjLdCD0A== - dependencies: - which "^3.0.0" - -"@npmcli/run-script@^6.0.0": - version "6.0.0" - resolved "https://registry.npmjs.org/@npmcli/run-script/-/run-script-6.0.0.tgz" - integrity sha512-ql+AbRur1TeOdl1FY+RAwGW9fcr4ZwiVKabdvm93mujGREVuVLbdkXRJDrkTXSdCjaxYydr1wlA2v67jxWG5BQ== - dependencies: - "@npmcli/node-gyp" "^3.0.0" - "@npmcli/promise-spawn" "^6.0.0" - node-gyp "^9.0.0" - read-package-json-fast "^3.0.0" - which "^3.0.0" - -"@nrwl/devkit@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nrwl/devkit/-/devkit-16.2.2.tgz#fd7d0a19b4be3ba35cc0d3dd9e4154f9812f432f" - integrity sha512-R8OSh33HtGycSuu0KshpH/tsTdi6j4w7DuIb+Sa59UDIkchpvMeNAz8tj/05Z2tTntDZnYqPkmCs6rkZ4PvY4Q== - dependencies: - "@nx/devkit" "16.2.2" - -"@nrwl/tao@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nrwl/tao/-/tao-16.2.2.tgz#ace8d96c0ffa9ff45accf077d3c8d94a6cfe03a4" - integrity sha512-cPj6b+wSWs2WNFQ0p1fMyrvSLjkKJo7vXQTtd7MXNJT2NWEZdCtRy+nidZzjs7gKvVXGdZ8zDBXmCHWorOieXw== - dependencies: - nx "16.2.2" - -"@nx/devkit@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/devkit/-/devkit-16.2.2.tgz#5035d7e3dc5e113ce29f243a912955fa7d93e95c" - integrity sha512-MTYzetk4AQ9u2syEb9z+drDsu6U6NRAXVuUDMNg0tpZcbtE9bCSLH2ngfvTCqmLrAMBsJZRdv0twS1iepMhlAg== - dependencies: - "@nrwl/devkit" "16.2.2" - ejs "^3.1.7" - ignore "^5.0.4" - semver "7.3.4" - tmp "~0.2.1" - tslib "^2.3.0" - -"@nx/nx-darwin-arm64@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-arm64/-/nx-darwin-arm64-16.2.2.tgz#7fb43fe8976a12b58f008d336d4898164254b740" - integrity sha512-CKfyLl92mhWqpv1hRTj3WgjVBY6yj3Et5T31m1N0assNWdTfuSB4ycdWzdlxXHx3yptnTOD/FCymTpUQI0GZRQ== - -"@nx/nx-darwin-x64@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-darwin-x64/-/nx-darwin-x64-16.2.2.tgz#74b20875e1bcd450291a58026df9728f0b70f681" - integrity sha512-++uDfp/Oo8DDVU53DiJVkRNjNbOLzahDH6dINeA/3yTCU/IS0wXoaoclNZBReMWlDKTVvWgLF/eSbGINMqUHRg== - -"@nx/nx-linux-arm-gnueabihf@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-16.2.2.tgz#5afa251361b609ed966d31cac6a789174bd6b3a5" - integrity sha512-A4XFk63Q7fxgZaHnigIeofp/xOT2ZGDoNUyzld+UTlyJyNcClcOcqrro74aKOCG7PH0D56oE06JW3g7GKszgsA== - -"@nx/nx-linux-arm64-gnu@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-16.2.2.tgz#5d2c4f75ba582844d139729f4b194d39b8fc81d1" - integrity sha512-aQpTLVSawFVr33pBWjj8elqvjA5uWvzDW7hGaFQPgWgmjxrtJikIAkcLjfNOz8XYjRAP4OZkTVh4/E3GUch0kQ== - -"@nx/nx-linux-arm64-musl@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-16.2.2.tgz#5346829cddd27223c1c1b79c93eb195442b86907" - integrity sha512-20vyNYQ2SYSaWdxORj9HdOyGxiqE8SauaFiBjjid6/e5mSyaSKu+HHGsvhDUqzlWn3OaABKBqx0iYa9Kmf3BOQ== - -"@nx/nx-linux-x64-gnu@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-16.2.2.tgz#702922f71076a041325add15b145f0e33726ec4a" - integrity sha512-0G8kYpEmGHD+tT7RvUEvVXvPbvQD9GfEjeWEzZAdNAAMJu7JFjIo/oZDJYV7cMvXnC+tbpI9Gba5xfv8Al95eA== - -"@nx/nx-linux-x64-musl@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-16.2.2.tgz#ca2b0b1c98f16dfe66b7cffbec1e7b4c877058b4" - integrity sha512-Incv7DbKLfh6kakzMBuy6GYRgI+jEdZBRiFw0GoN9EsknmrPT/URn+w6uuicGGEXOLYpO3HUO3E374+b5Wz2zg== - -"@nx/nx-win32-arm64-msvc@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-16.2.2.tgz#4ad8f7bf300dac63227e51c393345cc2306368d3" - integrity sha512-8m+Usj9faCl0pdQLFeBGhbYUObT3/tno5oGMPtJLyRjITNvTZAaIS4FFctp/rwJPehDBRQsUxwMJ2JRaU4jQdA== - -"@nx/nx-win32-x64-msvc@16.2.2": - version "16.2.2" - resolved "https://registry.yarnpkg.com/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-16.2.2.tgz#0afbeb2133613a5a3b0083e18a250472ccf45932" - integrity sha512-liHtyVVOttcqHIV3Xrg/1AJzEgfiOCeqJsleHXHGgPr1fxPx7SIZaa3/QnDY1lNMN+t6Gvj0/r2Ba3iuptYD3Q== - -"@parcel/watcher@2.0.4": - version "2.0.4" - resolved "https://registry.yarnpkg.com/@parcel/watcher/-/watcher-2.0.4.tgz#f300fef4cc38008ff4b8c29d92588eced3ce014b" - integrity sha512-cTDi+FUDBIUOBKEtj+nhiJ71AZVlkAsQFuGQTun5tV9mwQBQgZvhCzG+URPQc8myeN32yRVZEfVAPCs1RW+Jvg== - dependencies: - node-addon-api "^3.2.1" - node-gyp-build "^4.3.0" - -"@pkgjs/parseargs@^0.11.0": - version "0.11.0" - resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" - integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== - -"@schematics/angular@16.0.5": - version "16.0.5" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-16.0.5.tgz#d6862fa9bf4060bc5fd3c8a3c8c45a7dc0d2bd51" - integrity sha512-AddtFA95H7IkaY+H9u0Hdci3Ywwe6oNopL9kvm5hj8bFY6pukDWclRWOf2H2KqZu0qeAxMhETBpmoVYUuDbYmw== - dependencies: - "@angular-devkit/core" "16.0.5" - "@angular-devkit/schematics" "16.0.5" - jsonc-parser "3.2.0" - -"@sigstore/protobuf-specs@^0.1.0": - version "0.1.0" - resolved "https://registry.yarnpkg.com/@sigstore/protobuf-specs/-/protobuf-specs-0.1.0.tgz#957cb64ea2f5ce527cc9cf02a096baeb0d2b99b4" - integrity sha512-a31EnjuIDSX8IXBUib3cYLDRlPMU36AWX4xS8ysLaNu4ZzUesDiPt83pgrW2X1YLMe5L2HbDyaKK5BrL4cNKaQ== - -"@sigstore/tuf@^1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@sigstore/tuf/-/tuf-1.0.0.tgz#13b69323e7bf8de458cd6c952c57acd1169772a5" - integrity sha512-bLzi9GeZgMCvjJeLUIfs8LJYCxrPRA8IXQkzUtaFKKVPTz0mucRyqFcV2U20yg9K+kYAD0YSitzGfRZCFLjdHQ== - dependencies: - "@sigstore/protobuf-specs" "^0.1.0" - make-fetch-happen "^11.0.1" - tuf-js "^1.1.3" - -"@socket.io/component-emitter@~3.1.0": - version "3.1.0" - resolved "https://registry.npmjs.org/@socket.io/component-emitter/-/component-emitter-3.1.0.tgz" - integrity sha512-+9jVqKhRSpsc591z5vX+X5Yyw+he/HCB4iQ/RYxw35CEPaY1gnsNE43nf9n9AaYjAQrTiI/mOwKUKdUs9vf7Xg== - -"@tootallnate/once@2": - version "2.0.0" - resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz" - integrity sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A== - -"@tufjs/canonical-json@1.0.0": - version "1.0.0" - resolved "https://registry.yarnpkg.com/@tufjs/canonical-json/-/canonical-json-1.0.0.tgz#eade9fd1f537993bc1f0949f3aea276ecc4fab31" - integrity sha512-QTnf++uxunWvG2z3UFNzAoQPHxnSXOwtaI3iJ+AohhV+5vONuArPjJE7aPXPVXfXJsqrVbZBu9b81AJoSd09IQ== - -"@tufjs/models@1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@tufjs/models/-/models-1.0.4.tgz#5a689630f6b9dbda338d4b208019336562f176ef" - integrity sha512-qaGV9ltJP0EO25YfFUPhxRVK0evXFIAGicsVXuRim4Ed9cjPxYhNnNJ49SFmbeLgtxpslIkX317IgpfcHPVj/A== - dependencies: - "@tufjs/canonical-json" "1.0.0" - minimatch "^9.0.0" - -"@types/body-parser@*": - version "1.19.2" - resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" - integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== - dependencies: - "@types/connect" "*" - "@types/node" "*" - -"@types/bonjour@^3.5.9": - version "3.5.10" - resolved "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz" - integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== - dependencies: - "@types/node" "*" - -"@types/connect-history-api-fallback@^1.3.5": - version "1.3.5" - resolved "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz" - integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== - dependencies: - "@types/express-serve-static-core" "*" - "@types/node" "*" - -"@types/connect@*": - version "3.4.35" - resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" - integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== - dependencies: - "@types/node" "*" - -"@types/cookie@^0.4.1": - version "0.4.1" - resolved "https://registry.npmjs.org/@types/cookie/-/cookie-0.4.1.tgz" - integrity sha512-XW/Aa8APYr6jSVVA1y/DEIZX0/GMKLEVekNG727R8cs56ahETkRAy/3DR7+fJyh7oUgGwNQaRfXCun0+KbWY7Q== - -"@types/cors@^2.8.12": - version "2.8.13" - resolved "https://registry.npmjs.org/@types/cors/-/cors-2.8.13.tgz" - integrity sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA== - dependencies: - "@types/node" "*" - -"@types/eslint-scope@^3.7.3": - version "3.7.4" - resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz" - integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== - dependencies: - "@types/eslint" "*" - "@types/estree" "*" - -"@types/eslint@*": - version "8.4.10" - resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.10.tgz" - integrity sha512-Sl/HOqN8NKPmhWo2VBEPm0nvHnu2LL3v9vKo8MEq0EtbJ4eVzGPl41VNPvn5E1i5poMk4/XD8UriLHpJvEP/Nw== - dependencies: - "@types/estree" "*" - "@types/json-schema" "*" - -"@types/estree@*": - version "1.0.0" - resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.0.tgz" - integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== - -"@types/estree@^1.0.0": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.1.tgz#aa22750962f3bf0e79d753d3cc067f010c95f194" - integrity sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA== - -"@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.33": - version "4.17.33" - resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz" - integrity sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA== - dependencies: - "@types/node" "*" - "@types/qs" "*" - "@types/range-parser" "*" - -"@types/express@*", "@types/express@^4.17.13": - version "4.17.17" - resolved "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz" - integrity sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q== - dependencies: - "@types/body-parser" "*" - "@types/express-serve-static-core" "^4.17.33" - "@types/qs" "*" - "@types/serve-static" "*" - -"@types/http-proxy@^1.17.8": - version "1.17.10" - resolved "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.10.tgz" - integrity sha512-Qs5aULi+zV1bwKAg5z1PWnDXWmsn+LxIvUGv6E2+OOMYhclZMO+OXd9pYVf2gLykf2I7IV2u7oTHwChPNsvJ7g== - dependencies: - "@types/node" "*" - -"@types/jasmine@~4.3.0": - version "4.3.1" - resolved "https://registry.npmjs.org/@types/jasmine/-/jasmine-4.3.1.tgz" - integrity sha512-Vu8l+UGcshYmV1VWwULgnV/2RDbBaO6i2Ptx7nd//oJPIZGhoI1YLST4VKagD2Pq/Bc2/7zvtvhM7F3p4SN7kQ== - -"@types/json-schema@*", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== - -"@types/mime@*": - version "3.0.1" - resolved "https://registry.npmjs.org/@types/mime/-/mime-3.0.1.tgz" - integrity sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA== - -"@types/node@*": - version "12.20.55" - resolved "https://registry.npmjs.org/@types/node/-/node-12.20.55.tgz" - integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ== - -"@types/node@>=10.0.0": - version "18.11.11" - resolved "https://registry.npmjs.org/@types/node/-/node-18.11.11.tgz" - integrity sha512-KJ021B1nlQUBLopzZmPBVuGU9un7WJd/W4ya7Ih02B4Uwky5Nja0yGYav2EfYIk0RR2Q9oVhf60S2XR1BCWJ2g== - -"@types/qs@*": - version "6.9.7" - resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" - integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== - -"@types/range-parser@*": - version "1.2.4" - resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" - integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== - -"@types/retry@0.12.0": - version "0.12.0" - resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.0.tgz" - integrity sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA== - -"@types/semver@^7.3.12": - version "7.5.0" - resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.0.tgz#591c1ce3a702c45ee15f47a42ade72c2fd78978a" - integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw== - -"@types/serve-index@^1.9.1": - version "1.9.1" - resolved "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz" - integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== - dependencies: - "@types/express" "*" - -"@types/serve-static@*", "@types/serve-static@^1.13.10": - version "1.15.1" - resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.15.1.tgz" - integrity sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ== - dependencies: - "@types/mime" "*" - "@types/node" "*" - -"@types/sockjs@^0.3.33": - version "0.3.33" - resolved "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz" - integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== - dependencies: - "@types/node" "*" - -"@types/ws@^8.5.1": - version "8.5.4" - resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.4.tgz" - integrity sha512-zdQDHKUgcX/zBc4GrwsE/7dVdAD8JR4EuiAXiiUhhfyIJXXb2+PrGshFyeXWQPMmmZ2XxgaqclgpIC7eTXc1mg== - dependencies: - "@types/node" "*" - -"@typescript-eslint/eslint-plugin@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz#e470af414f05ecfdc05a23e9ce6ec8f91db56fe2" - integrity sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA== - dependencies: - "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.59.7" - "@typescript-eslint/type-utils" "5.59.7" - "@typescript-eslint/utils" "5.59.7" - debug "^4.3.4" - grapheme-splitter "^1.0.4" - ignore "^5.2.0" - natural-compare-lite "^1.4.0" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/parser@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.7.tgz#02682554d7c1028b89aa44a48bf598db33048caa" - integrity sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ== - dependencies: - "@typescript-eslint/scope-manager" "5.59.7" - "@typescript-eslint/types" "5.59.7" - "@typescript-eslint/typescript-estree" "5.59.7" - debug "^4.3.4" - -"@typescript-eslint/scope-manager@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz#0243f41f9066f3339d2f06d7f72d6c16a16769e2" - integrity sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ== - dependencies: - "@typescript-eslint/types" "5.59.7" - "@typescript-eslint/visitor-keys" "5.59.7" - -"@typescript-eslint/type-utils@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz#89c97291371b59eb18a68039857c829776f1426d" - integrity sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ== - dependencies: - "@typescript-eslint/typescript-estree" "5.59.7" - "@typescript-eslint/utils" "5.59.7" - debug "^4.3.4" - tsutils "^3.21.0" - -"@typescript-eslint/types@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.7.tgz#6f4857203fceee91d0034ccc30512d2939000742" - integrity sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A== - -"@typescript-eslint/typescript-estree@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz#b887acbd4b58e654829c94860dbff4ac55c5cff8" - integrity sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ== - dependencies: - "@typescript-eslint/types" "5.59.7" - "@typescript-eslint/visitor-keys" "5.59.7" - debug "^4.3.4" - globby "^11.1.0" - is-glob "^4.0.3" - semver "^7.3.7" - tsutils "^3.21.0" - -"@typescript-eslint/utils@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.7.tgz#7adf068b136deae54abd9a66ba5a8780d2d0f898" - integrity sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@types/json-schema" "^7.0.9" - "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.59.7" - "@typescript-eslint/types" "5.59.7" - "@typescript-eslint/typescript-estree" "5.59.7" - eslint-scope "^5.1.1" - semver "^7.3.7" - -"@typescript-eslint/visitor-keys@5.59.7": - version "5.59.7" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz#09c36eaf268086b4fbb5eb9dc5199391b6485fc5" - integrity sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ== - dependencies: - "@typescript-eslint/types" "5.59.7" - eslint-visitor-keys "^3.3.0" - -"@vitejs/plugin-basic-ssl@1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@vitejs/plugin-basic-ssl/-/plugin-basic-ssl-1.0.1.tgz#48c46eab21e0730921986ce742563ae83fe7fe34" - integrity sha512-pcub+YbFtFhaGRTo1832FQHQSHvMrlb43974e2eS8EKleR3p1cDdkJFPci1UhwkEf1J9Bz+wKBSzqpKp7nNj2A== - -"@webassemblyjs/ast@1.11.6", "@webassemblyjs/ast@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.6.tgz#db046555d3c413f8966ca50a95176a0e2c642e24" - integrity sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q== - dependencies: - "@webassemblyjs/helper-numbers" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - -"@webassemblyjs/floating-point-hex-parser@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz#dacbcb95aff135c8260f77fa3b4c5fea600a6431" - integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== - -"@webassemblyjs/helper-api-error@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz#6132f68c4acd59dcd141c44b18cbebbd9f2fa768" - integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== - -"@webassemblyjs/helper-buffer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz#b66d73c43e296fd5e88006f18524feb0f2c7c093" - integrity sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA== - -"@webassemblyjs/helper-numbers@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz#cbce5e7e0c1bd32cf4905ae444ef64cea919f1b5" - integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== - dependencies: - "@webassemblyjs/floating-point-hex-parser" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" - "@xtuc/long" "4.2.2" - -"@webassemblyjs/helper-wasm-bytecode@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz#bb2ebdb3b83aa26d9baad4c46d4315283acd51e9" - integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== - -"@webassemblyjs/helper-wasm-section@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz#ff97f3863c55ee7f580fd5c41a381e9def4aa577" - integrity sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - -"@webassemblyjs/ieee754@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz#bb665c91d0b14fffceb0e38298c329af043c6e3a" - integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== - dependencies: - "@xtuc/ieee754" "^1.2.0" - -"@webassemblyjs/leb128@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.6.tgz#70e60e5e82f9ac81118bc25381a0b283893240d7" - integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== - dependencies: - "@xtuc/long" "4.2.2" - -"@webassemblyjs/utf8@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.6.tgz#90f8bc34c561595fe156603be7253cdbcd0fab5a" - integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== - -"@webassemblyjs/wasm-edit@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz#c72fa8220524c9b416249f3d94c2958dfe70ceab" - integrity sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/helper-wasm-section" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-opt" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - "@webassemblyjs/wast-printer" "1.11.6" - -"@webassemblyjs/wasm-gen@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz#fb5283e0e8b4551cc4e9c3c0d7184a65faf7c268" - integrity sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wasm-opt@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz#d9a22d651248422ca498b09aa3232a81041487c2" - integrity sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-buffer" "1.11.6" - "@webassemblyjs/wasm-gen" "1.11.6" - "@webassemblyjs/wasm-parser" "1.11.6" - -"@webassemblyjs/wasm-parser@1.11.6", "@webassemblyjs/wasm-parser@^1.11.5": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz#bb85378c527df824004812bbdb784eea539174a1" - integrity sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@webassemblyjs/helper-api-error" "1.11.6" - "@webassemblyjs/helper-wasm-bytecode" "1.11.6" - "@webassemblyjs/ieee754" "1.11.6" - "@webassemblyjs/leb128" "1.11.6" - "@webassemblyjs/utf8" "1.11.6" - -"@webassemblyjs/wast-printer@1.11.6": - version "1.11.6" - resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz#a7bf8dd7e362aeb1668ff43f35cb849f188eff20" - integrity sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A== - dependencies: - "@webassemblyjs/ast" "1.11.6" - "@xtuc/long" "4.2.2" - -"@xtuc/ieee754@^1.2.0": - version "1.2.0" - resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" - integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== - -"@xtuc/long@4.2.2": - version "4.2.2" - resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" - integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== - -"@yarnpkg/lockfile@1.1.0", "@yarnpkg/lockfile@^1.1.0": - version "1.1.0" - resolved "https://registry.npmjs.org/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz" - integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== - -"@yarnpkg/parsers@^3.0.0-rc.18": - version "3.0.0-rc.45" - resolved "https://registry.yarnpkg.com/@yarnpkg/parsers/-/parsers-3.0.0-rc.45.tgz#fcc7d0ab7828afdb20d1e13160b1d117c07536f4" - integrity sha512-Aj0aHBV/crFQTpKQvL6k1xNiOhnlfVLu06LunelQAvl1MTeWrSi8LD9UJJDCFJiG4kx8NysUE6Tx0KZyPQUzIw== - dependencies: - js-yaml "^3.10.0" - tslib "^2.4.0" - -"@zkochan/js-yaml@0.0.6": - version "0.0.6" - resolved "https://registry.yarnpkg.com/@zkochan/js-yaml/-/js-yaml-0.0.6.tgz#975f0b306e705e28b8068a07737fa46d3fc04826" - integrity sha512-nzvgl3VfhcELQ8LyVrYOru+UtAy1nrygk2+AGbTm8a5YcO6o8lSjAT+pfg3vJWxIoZKOUhrK6UU7xW/+00kQrg== - dependencies: - argparse "^2.0.1" - -abab@^2.0.6: - version "2.0.6" - resolved "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz" - integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== - -abbrev@^1.0.0: - version "1.1.1" - resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" - integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== - -accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.8: - version "1.3.8" - resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" - integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== - dependencies: - mime-types "~2.1.34" - negotiator "0.6.3" - -acorn-import-assertions@^1.7.6: - version "1.8.0" - resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz" - integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== - -acorn-jsx@^5.3.2: - version "5.3.2" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" - integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== - -acorn@^8.5.0, acorn@^8.7.1: - version "8.8.1" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.1.tgz" - integrity sha512-7zFpHzhnqYKrkYdUjF1HI1bzd0VygEGX8lFk4k5zVMqHEoES+P+7TKI+EvLO9WVMJ8eekdO0aDEK044xTXwPPA== - -acorn@^8.8.0, acorn@^8.8.2: - version "8.8.2" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.2.tgz#1b2f25db02af965399b9776b0c2c391276d37c4a" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -adjust-sourcemap-loader@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/adjust-sourcemap-loader/-/adjust-sourcemap-loader-4.0.0.tgz" - integrity sha512-OXwN5b9pCUXNQHJpwwD2qP40byEmSgzj8B4ydSN0uMNYWiFmJ6x6KwUllMmfk8Rwu/HJDFR7U8ubsWBoN0Xp0A== - dependencies: - loader-utils "^2.0.0" - regex-parser "^2.2.11" - -agent-base@6, agent-base@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz" - integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== - dependencies: - debug "4" - -agentkeepalive@^4.2.1: - version "4.2.1" - resolved "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.2.1.tgz" - integrity sha512-Zn4cw2NEqd+9fiSVWMscnjyQ1a8Yfoc5oBajLeo5w+YBHgDUcEBY2hS4YpTz6iN5f/2zQiktcuM6tS8x1p9dpA== - dependencies: - debug "^4.1.0" - depd "^1.1.2" - humanize-ms "^1.2.1" - -aggregate-error@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" - integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== - dependencies: - clean-stack "^2.0.0" - indent-string "^4.0.0" - -ajv-formats@2.1.1, ajv-formats@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" - integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== - dependencies: - ajv "^8.0.0" - -ajv-keywords@^3.5.2: - version "3.5.2" - resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" - integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== - -ajv-keywords@^5.0.0: - version "5.1.0" - resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz" - integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== - dependencies: - fast-deep-equal "^3.1.3" - -ajv@8.12.0, ajv@^8.0.0: - version "8.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: - version "6.12.6" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^8.8.0: - version "8.11.2" - resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz" - integrity sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ansi-colors@4.1.3, ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - -ansi-escapes@^4.2.1: - version "4.3.2" - resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz" - integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== - dependencies: - type-fest "^0.21.3" - -ansi-html-community@^0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz" - integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== - -ansi-regex@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" - integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== - -ansi-regex@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.0.1.tgz#3183e38fae9a65d7cb5e53945cd5897d0260a06a" - integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -ansi-styles@^6.1.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-6.2.1.tgz#0e62320cf99c21afff3b3012192546aacbfb05c5" - integrity sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug== - -anymatch@~3.1.2: - version "3.1.3" - resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz" - integrity sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -"aproba@^1.0.3 || ^2.0.0": - version "2.0.0" - resolved "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz" - integrity sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ== - -are-we-there-yet@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz" - integrity sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg== - dependencies: - delegates "^1.0.0" - readable-stream "^3.6.0" - -argparse@^1.0.7: - version "1.0.10" - resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" - integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== - dependencies: - sprintf-js "~1.0.2" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -aria-query@5.1.3: - version "5.1.3" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-5.1.3.tgz#19db27cd101152773631396f7a95a3b58c22c35e" - integrity sha512-R5iJ5lkuHybztUfuOAznmboyjWq8O6sqNqtK7CLOqdydi54VNbORp49mb14KbWgG1QD3JFO9hJdZ+y4KutfdOQ== - dependencies: - deep-equal "^2.0.5" - -array-buffer-byte-length@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" - integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== - dependencies: - call-bind "^1.0.2" - is-array-buffer "^3.0.1" - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" - integrity sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg== - -array-flatten@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" - integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== - -array-union@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" - integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== - -async@^3.2.3: - version "3.2.4" - resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" - integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - -autoprefixer@10.4.14: - version "10.4.14" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.14.tgz#e28d49902f8e759dd25b153264e862df2705f79d" - integrity sha512-FQzyfOsTlwVzjHxKEqRIAdJx9niO6VCBCoEwax/VLSoQF29ggECcPuBqUMZ+u8jCZOPSy8b8/8KnuFbp0SaFZQ== - dependencies: - browserslist "^4.21.5" - caniuse-lite "^1.0.30001464" - fraction.js "^4.2.0" - normalize-range "^0.1.2" - picocolors "^1.0.0" - postcss-value-parser "^4.2.0" - -available-typed-arrays@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" - integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== - -axios@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - -axobject-query@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.1.1.tgz#3b6e5c6d4e43ca7ba51c5babf99d22a9c68485e1" - integrity sha512-goKlv8DZrK9hUh975fnHzhNIO4jUnFCfv/dszV5VwUGDFjI6vQ2VwoyjYjYNEbBE8AH87TduWP5uyDR1D+Iteg== - dependencies: - deep-equal "^2.0.5" - -babel-loader@9.1.2: - version "9.1.2" - resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-9.1.2.tgz" - integrity sha512-mN14niXW43tddohGl8HPu5yfQq70iUThvFL/4QzESA7GcZoC0eVOhvWdQ8+3UlSjaDE9MVtsW9mxDY07W7VpVA== - dependencies: - find-cache-dir "^3.3.2" - schema-utils "^4.0.0" - -babel-plugin-istanbul@6.1.1: - version "6.1.1" - resolved "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-6.1.1.tgz" - integrity sha512-Y1IQok9821cC9onCx5otgFfRm7Lm+I+wwxOx738M/WLPZ9Q42m4IG5W0FNX8WLL2gYMZo3JkuXIH2DOpWM+qwA== - dependencies: - "@babel/helper-plugin-utils" "^7.0.0" - "@istanbuljs/load-nyc-config" "^1.0.0" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-instrument "^5.0.4" - test-exclude "^6.0.0" - -babel-plugin-polyfill-corejs2@^0.3.3: - version "0.3.3" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz" - integrity sha512-8hOdmFYFSZhqg2C/JgLUQ+t52o5nirNwaWM2B9LWteozwIvM14VSwdsCAUET10qT+kmySAlseadmfeeSWFCy+Q== - dependencies: - "@babel/compat-data" "^7.17.7" - "@babel/helper-define-polyfill-provider" "^0.3.3" - semver "^6.1.1" - -babel-plugin-polyfill-corejs3@^0.6.0: - version "0.6.0" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.6.0.tgz" - integrity sha512-+eHqR6OPcBhJOGgsIar7xoAB1GcSwVUA3XjAd7HJNzOXT4wv6/H7KIdA/Nc60cvUlDbKApmqNvD1B1bzOt4nyA== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - core-js-compat "^3.25.1" - -babel-plugin-polyfill-regenerator@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.4.1.tgz" - integrity sha512-NtQGmyQDXjQqQ+IzRkBVwEOz9lQ4zxAQZgoAYEtU9dJjnl1Oc98qnN7jcp+bE7O7aYzVpavXE3/VKXNzUbh7aw== - dependencies: - "@babel/helper-define-polyfill-provider" "^0.3.3" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base64-js@^1.2.0, base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base64id@2.0.0, base64id@~2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/base64id/-/base64id-2.0.0.tgz" - integrity sha512-lGe34o6EHj9y3Kts9R4ZYs/Gr+6N7MCaMlIFA3F1R2O5/m7K06AxfSeO5530PEERE6/WyEg3lsuyw4GHlPZHog== - -batch@0.6.1: - version "0.6.1" - resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" - integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw== - -big.js@^5.2.2: - version "5.2.2" - resolved "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz" - integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bl@^4.0.3, bl@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz" - integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== - dependencies: - buffer "^5.5.0" - inherits "^2.0.4" - readable-stream "^3.4.0" - -body-parser@1.20.1, body-parser@^1.19.0: - version "1.20.1" - resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz" - integrity sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw== - dependencies: - bytes "3.1.2" - content-type "~1.0.4" - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - http-errors "2.0.0" - iconv-lite "0.4.24" - on-finished "2.4.1" - qs "6.11.0" - raw-body "2.5.1" - type-is "~1.6.18" - unpipe "1.0.0" - -bonjour-service@^1.0.11: - version "1.1.0" - resolved "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.1.0.tgz" - integrity sha512-LVRinRB3k1/K0XzZ2p58COnWvkQknIY6sf0zF2rpErvcJXpMBttEPQSxK+HEXSS9VmpZlDoDnQWv8ftJT20B0Q== - dependencies: - array-flatten "^2.1.2" - dns-equal "^1.0.0" - fast-deep-equal "^3.1.3" - multicast-dns "^7.2.5" - -boolbase@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" - integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww== - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -brace-expansion@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz" - integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== - dependencies: - balanced-match "^1.0.0" - -braces@^3.0.2, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -browserslist@4.21.5, browserslist@^4.14.5, browserslist@^4.21.3, browserslist@^4.21.4: - version "4.21.5" - resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz" - integrity sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w== - dependencies: - caniuse-lite "^1.0.30001449" - electron-to-chromium "^1.4.284" - node-releases "^2.0.8" - update-browserslist-db "^1.0.10" - -browserslist@^4.21.5: - version "4.21.7" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.7.tgz#e2b420947e5fb0a58e8f4668ae6e23488127e551" - integrity sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA== - dependencies: - caniuse-lite "^1.0.30001489" - electron-to-chromium "^1.4.411" - node-releases "^2.0.12" - update-browserslist-db "^1.0.11" - -buffer-from@^1.0.0: - version "1.1.2" - resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" - integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== - -buffer@^5.5.0: - version "5.7.1" - resolved "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -builtins@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/builtins/-/builtins-5.0.1.tgz" - integrity sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ== - dependencies: - semver "^7.0.0" - -bytes@3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" - integrity sha512-pMhOfFDPiv9t5jjIXkHosWmkSyQbvsgEVNkz0ERHbuLh2T/7j4Mqqpz523Fe8MVY89KC6Sh/QfS2sM+SjgFDcw== - -bytes@3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" - integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== - -cacache@17.0.6: - version "17.0.6" - resolved "https://registry.yarnpkg.com/cacache/-/cacache-17.0.6.tgz#faf9739a067e6dcfd31316df82fdf7e1ec460373" - integrity sha512-ixcYmEBExFa/+ajIPjcwypxL97CjJyOsH9A/W+4qgEPIpJvKlC+HmVY8nkIck6n3PwUTdgq9c489niJGwl+5Cw== - dependencies: - "@npmcli/fs" "^3.1.0" - fs-minipass "^3.0.0" - glob "^10.2.2" - lru-cache "^7.7.1" - minipass "^5.0.0" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - p-map "^4.0.0" - promise-inflight "^1.0.1" - ssri "^10.0.0" - tar "^6.1.11" - unique-filename "^3.0.0" - -cacache@^16.1.0: - version "16.1.3" - resolved "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz" - integrity sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ== - dependencies: - "@npmcli/fs" "^2.1.0" - "@npmcli/move-file" "^2.0.0" - chownr "^2.0.0" - fs-minipass "^2.1.0" - glob "^8.0.1" - infer-owner "^1.0.4" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - mkdirp "^1.0.4" - p-map "^4.0.0" - promise-inflight "^1.0.1" - rimraf "^3.0.2" - ssri "^9.0.0" - tar "^6.1.11" - unique-filename "^2.0.0" - -cacache@^17.0.0: - version "17.0.3" - resolved "https://registry.npmjs.org/cacache/-/cacache-17.0.3.tgz" - integrity sha512-pwsIK/grdM0cHpfVaNFxMdzElBtLJGsVPE+JnxqXP1l40O01Z1mfDE8MbRTuwomGq/UwEtGisOylutOEVJxEqg== - dependencies: - "@npmcli/fs" "^3.1.0" - fs-minipass "^2.1.0" - glob "^8.0.1" - lru-cache "^7.7.1" - minipass "^4.0.0" - minipass-collect "^1.0.2" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - p-map "^4.0.0" - promise-inflight "^1.0.1" - ssri "^10.0.0" - tar "^6.1.11" - unique-filename "^3.0.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -callsites@^3.0.0: - version "3.1.0" - resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" - integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== - -camelcase@^5.3.1: - version "5.3.1" - resolved "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz" - integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== - -caniuse-lite@^1.0.30001449: - version "1.0.30001458" - resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001458.tgz" - integrity sha512-lQ1VlUUq5q9ro9X+5gOEyH7i3vm+AYVT1WDCVB69XOZ17KZRhnZ9J0Sqz7wTHQaLBJccNCHq8/Ww5LlOIZbB0w== - -caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.30001489: - version "1.0.30001499" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001499.tgz#0235c127d9795c82aaf0a7f43e24018549dac659" - integrity sha512-IhoQqRrW6WiecFcfZgoJS1YLEN1/HR1vHP5WNgjCARRW7KUNToHHTX3FrwCM+y4zkRa48D9rE90WFYc2IWhDWQ== - -chalk@^2.0.0: - version "2.4.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0, chalk@^4.0.2, chalk@^4.1.0, chalk@^4.1.1: - version "4.1.2" - resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" - integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -chardet@^0.7.0: - version "0.7.0" - resolved "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz" - integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA== - -chokidar@3.5.3, "chokidar@>=3.0.0 <4.0.0", chokidar@^3.0.0, chokidar@^3.5.1, chokidar@^3.5.3: - version "3.5.3" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" - integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== - dependencies: - anymatch "~3.1.2" - braces "~3.0.2" - glob-parent "~5.1.2" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.6.0" - optionalDependencies: - fsevents "~2.3.2" - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -chrome-trace-event@^1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" - integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== - -clean-stack@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" - integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== - -cli-cursor@3.1.0, cli-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz" - integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== - dependencies: - restore-cursor "^3.1.0" - -cli-spinners@2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.6.1.tgz#adc954ebe281c37a6319bfa401e6dd2488ffb70d" - integrity sha512-x/5fWmGMnbKQAaNwN+UZlV79qBLM9JFnJuJ03gIi5whrob0xV0ofNVHy9DhwGdsMJQc2OKv0oGmLzvaqvAVv+g== - -cli-spinners@^2.5.0: - version "2.7.0" - resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.7.0.tgz" - integrity sha512-qu3pN8Y3qHNgE2AFweciB1IfMnmZ/fsNTEE+NOFjmGB2F/7rLhnhzppvpCnN4FovtP26k8lHyy9ptEbNwWFLzw== - -cli-width@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz" - integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -cliui@^8.0.1: - version "8.0.1" - resolved "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz" - integrity sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.1" - wrap-ansi "^7.0.0" - -clone-deep@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz" - integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== - dependencies: - is-plain-object "^2.0.4" - kind-of "^6.0.2" - shallow-clone "^3.0.0" - -clone@^1.0.2: - version "1.0.4" - resolved "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz" - integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -color-support@^1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz" - integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== - -colorette@^2.0.10: - version "2.0.19" - resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.19.tgz" - integrity sha512-3tlv/dIP7FWvj3BsbHrGLJ6l/oKh1O3TcgBqMn+yyCagOxc23fyzDS6HypQbgxWbkpDnf52p1LuR4eWDQ/K9WQ== - -colors@1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz" - integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== - -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -commander@^2.20.0: - version "2.20.3" - resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" - integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== - -commondir@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" - integrity sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg== - -compressible@~2.0.16: - version "2.0.18" - resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz" - integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== - dependencies: - mime-db ">= 1.43.0 < 2" - -compression@^1.7.4: - version "1.7.4" - resolved "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz" - integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== - dependencies: - accepts "~1.3.5" - bytes "3.0.0" - compressible "~2.0.16" - debug "2.6.9" - on-headers "~1.0.2" - safe-buffer "5.1.2" - vary "~1.1.2" - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" - integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg== - -connect-history-api-fallback@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz" - integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== - -connect@^3.7.0: - version "3.7.0" - resolved "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz" - integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== - dependencies: - debug "2.6.9" - finalhandler "1.1.2" - parseurl "~1.3.3" - utils-merge "1.0.1" - -console-control-strings@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" - integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== - -content-disposition@0.5.4: - version "0.5.4" - resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" - integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== - dependencies: - safe-buffer "5.2.1" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.5.1, convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" - integrity sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ== - -cookie@0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" - integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== - -cookie@~0.4.1: - version "0.4.2" - resolved "https://registry.npmjs.org/cookie/-/cookie-0.4.2.tgz" - integrity sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA== - -copy-anything@^2.0.1: - version "2.0.6" - resolved "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz" - integrity sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw== - dependencies: - is-what "^3.14.1" - -copy-webpack-plugin@11.0.0: - version "11.0.0" - resolved "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz" - integrity sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ== - dependencies: - fast-glob "^3.2.11" - glob-parent "^6.0.1" - globby "^13.1.1" - normalize-path "^3.0.0" - schema-utils "^4.0.0" - serialize-javascript "^6.0.0" - -core-js-compat@^3.25.1: - version "3.26.1" - resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.26.1.tgz" - integrity sha512-622/KzTudvXCDLRw70iHW4KKs1aGpcRcowGWyYJr2DEBfRrd6hNJybxSWJFuZYD4ma86xhrwDDHxmDaIq4EA8A== - dependencies: - browserslist "^4.21.4" - -core-util-is@~1.0.0: - version "1.0.3" - resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" - integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== - -cors@~2.8.5: - version "2.8.5" - resolved "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -cosmiconfig-typescript-loader@^4.3.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-4.3.0.tgz#c4259ce474c9df0f32274ed162c0447c951ef073" - integrity sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q== - -cosmiconfig@^8.1.3: - version "8.2.0" - resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.2.0.tgz#f7d17c56a590856cd1e7cee98734dca272b0d8fd" - integrity sha512-3rTMnFJA1tCOPwRxtgF4wd7Ab2qvDbL8jX+3smjIbS4HlZBagTlpERbdN7iAbWlrfxE3M8c27kTwTawQ7st+OQ== - dependencies: - import-fresh "^3.2.1" - js-yaml "^4.1.0" - parse-json "^5.0.0" - path-type "^4.0.0" - -critters@0.0.16: - version "0.0.16" - resolved "https://registry.npmjs.org/critters/-/critters-0.0.16.tgz" - integrity sha512-JwjgmO6i3y6RWtLYmXwO5jMd+maZt8Tnfu7VVISmEWyQqfLpB8soBswf8/2bu6SBXxtKA68Al3c+qIG1ApT68A== - dependencies: - chalk "^4.1.0" - css-select "^4.2.0" - parse5 "^6.0.1" - parse5-htmlparser2-tree-adapter "^6.0.1" - postcss "^8.3.7" - pretty-bytes "^5.3.0" - -cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: - version "7.0.3" - resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - -css-loader@6.7.3: - version "6.7.3" - resolved "https://registry.npmjs.org/css-loader/-/css-loader-6.7.3.tgz" - integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== - dependencies: - icss-utils "^5.1.0" - postcss "^8.4.19" - postcss-modules-extract-imports "^3.0.0" - postcss-modules-local-by-default "^4.0.0" - postcss-modules-scope "^3.0.0" - postcss-modules-values "^4.0.0" - postcss-value-parser "^4.2.0" - semver "^7.3.8" - -css-select@^4.2.0: - version "4.3.0" - resolved "https://registry.npmjs.org/css-select/-/css-select-4.3.0.tgz" - integrity sha512-wPpOYtnsVontu2mODhA19JrqWxNsfdatRKd64kmpRbQgh1KtItko5sTnEpPdpSaJszTOhEMlF/RPz28qj4HqhQ== - dependencies: - boolbase "^1.0.0" - css-what "^6.0.1" - domhandler "^4.3.1" - domutils "^2.8.0" - nth-check "^2.0.1" - -css-what@^6.0.1: - version "6.1.0" - resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" - integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== - -cssesc@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" - integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== - -custom-event@~1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/custom-event/-/custom-event-1.0.1.tgz" - integrity sha512-GAj5FOq0Hd+RsCGVJxZuKaIDXDf3h6GQoNEjFgbLLI/trgtavwUbSnZ5pVfg27DVCaWjIohryS0JFwIJyT2cMg== - -date-format@^4.0.14: - version "4.0.14" - resolved "https://registry.npmjs.org/date-format/-/date-format-4.0.14.tgz" - integrity sha512-39BOQLs9ZjKh0/patS9nrT8wc3ioX3/eA/zgbKNopnF2wCqJEoxywwwElATYvRsXdnOxA/OQeQoFZ3rFjVajhg== - -debug@2.6.9: - version "2.6.9" - resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4, debug@~4.3.1, debug@~4.3.2: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - -debug@^3.2.6: - version "3.2.7" - resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -deep-equal@^2.0.5: - version "2.2.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-2.2.1.tgz#c72ab22f3a7d3503a4ca87dde976fe9978816739" - integrity sha512-lKdkdV6EOGoVn65XaOsPdH4rMxTZOnmFyuIkMjM1i5HHCbfjC97dawgTAy0deYNfuqUqW+Q5VrVaQYtUpSd6yQ== - dependencies: - array-buffer-byte-length "^1.0.0" - call-bind "^1.0.2" - es-get-iterator "^1.1.3" - get-intrinsic "^1.2.0" - is-arguments "^1.1.1" - is-array-buffer "^3.0.2" - is-date-object "^1.0.5" - is-regex "^1.1.4" - is-shared-array-buffer "^1.0.2" - isarray "^2.0.5" - object-is "^1.1.5" - object-keys "^1.1.1" - object.assign "^4.1.4" - regexp.prototype.flags "^1.5.0" - side-channel "^1.0.4" - which-boxed-primitive "^1.0.2" - which-collection "^1.0.1" - which-typed-array "^1.1.9" - -deep-is@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.4.tgz#a6f2dce612fadd2ef1f519b73551f17e85199831" - integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ== - -default-gateway@^6.0.3: - version "6.0.3" - resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz" - integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== - dependencies: - execa "^5.0.0" - -defaults@^1.0.3: - version "1.0.4" - resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz" - integrity sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A== - dependencies: - clone "^1.0.2" - -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - -define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" - integrity sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA== - dependencies: - has-property-descriptors "^1.0.0" - object-keys "^1.1.1" - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - -delegates@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" - integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== - -depd@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" - integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== - -depd@^1.1.2, depd@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" - integrity sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ== - -destroy@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" - integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== - -detect-node@^2.0.4: - version "2.1.0" - resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz" - integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== - -di@^0.0.1: - version "0.0.1" - resolved "https://registry.npmjs.org/di/-/di-0.0.1.tgz" - integrity sha512-uJaamHkagcZtHPqCIHZxnFrXlunQXgBOsZSUOWwFw31QJCAbyTBoHMW75YOTur5ZNx8pIeAKgf6GWIgaqqiLhA== - -dir-glob@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" - integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== - dependencies: - path-type "^4.0.0" - -dns-equal@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz" - integrity sha512-z+paD6YUQsk+AbGCEM4PrOXSss5gd66QfcVBFTKR/HpFL9jCqikS94HYwKww6fQyO7IxrIIyUu+g0Ka9tUS2Cg== - -dns-packet@^5.2.2: - version "5.4.0" - resolved "https://registry.npmjs.org/dns-packet/-/dns-packet-5.4.0.tgz" - integrity sha512-EgqGeaBB8hLiHLZtp/IbaDQTL8pZ0+IvwzSHA6d7VyMDM+B9hgddEMa9xjK5oYnw0ci0JQ6g2XCD7/f6cafU6g== - dependencies: - "@leichtgewicht/ip-codec" "^2.0.1" - -doctrine@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" - integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== - dependencies: - esutils "^2.0.2" - -dom-serialize@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/dom-serialize/-/dom-serialize-2.2.1.tgz" - integrity sha512-Yra4DbvoW7/Z6LBN560ZwXMjoNOSAN2wRsKFGc4iBeso+mpIA6qj1vfdf9HpMaKAqG6wXTy+1SYEzmNpKXOSsQ== - dependencies: - custom-event "~1.0.0" - ent "~2.2.0" - extend "^3.0.0" - void-elements "^2.0.0" - -dom-serializer@^1.0.1: - version "1.4.1" - resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.4.1.tgz" - integrity sha512-VHwB3KfrcOOkelEG2ZOfxqLZdfkil8PtJi4P8N2MMXucZq2yLp75ClViUlOVwyoHEDjYU433Aq+5zWP61+RGag== - dependencies: - domelementtype "^2.0.1" - domhandler "^4.2.0" - entities "^2.0.0" - -domelementtype@^2.0.1, domelementtype@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz" - integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== - -domhandler@^4.2.0, domhandler@^4.3.1: - version "4.3.1" - resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz" - integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== - dependencies: - domelementtype "^2.2.0" - -domutils@^2.8.0: - version "2.8.0" - resolved "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz" - integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== - dependencies: - dom-serializer "^1.0.1" - domelementtype "^2.2.0" - domhandler "^4.2.0" - -dotenv@~10.0.0: - version "10.0.0" - resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" - integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== - -duplexer@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" - integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== - -eastasianwidth@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb" - integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" - integrity sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow== - -ejs@^3.1.7: - version "3.1.9" - resolved "https://registry.yarnpkg.com/ejs/-/ejs-3.1.9.tgz#03c9e8777fe12686a9effcef22303ca3d8eeb361" - integrity sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ== - dependencies: - jake "^10.8.5" - -electron-to-chromium@^1.4.284: - version "1.4.284" - resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.284.tgz" - integrity sha512-M8WEXFuKXMYMVr45fo8mq0wUrrJHheiKZf6BArTKk9ZBYCKJEOU5H8cdWgDT+qCVZf7Na4lVUaZsA+h6uA9+PA== - -electron-to-chromium@^1.4.411: - version "1.4.427" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.427.tgz#67e8069f7a864fc092fe2e09f196e68af5cb88a1" - integrity sha512-HK3r9l+Jm8dYAm1ctXEWIC+hV60zfcjS9UA5BDlYvnI5S7PU/yytjpvSrTNrSSRRkuu3tDyZhdkwIczh+0DWaw== - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -emoji-regex@^9.2.2: - version "9.2.2" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-9.2.2.tgz#840c8803b0d8047f4ff0cf963176b32d4ef3ed72" - integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== - -emojis-list@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz" - integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" - integrity sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w== - -encoding@^0.1.13: - version "0.1.13" - resolved "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.4.1: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -engine.io-parser@~5.0.3: - version "5.0.4" - resolved "https://registry.npmjs.org/engine.io-parser/-/engine.io-parser-5.0.4.tgz" - integrity sha512-+nVFp+5z1E3HcToEnO7ZIj3g+3k9389DvWtvJZz0T6/eOCPIyyxehFcedoYrZQrp0LgQbD9pPXhpMBKMd5QURg== - -engine.io@~6.2.1: - version "6.2.1" - resolved "https://registry.npmjs.org/engine.io/-/engine.io-6.2.1.tgz" - integrity sha512-ECceEFcAaNRybd3lsGQKas3ZlMVjN3cyWwMP25D2i0zWfyiytVbTpRPa34qrr+FHddtpBVOmq4H/DCv1O0lZRA== - dependencies: - "@types/cookie" "^0.4.1" - "@types/cors" "^2.8.12" - "@types/node" ">=10.0.0" - accepts "~1.3.4" - base64id "2.0.0" - cookie "~0.4.1" - cors "~2.8.5" - debug "~4.3.1" - engine.io-parser "~5.0.3" - ws "~8.2.3" - -enhanced-resolve@^5.13.0: - version "5.14.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.14.1.tgz#de684b6803724477a4af5d74ccae5de52c25f6b3" - integrity sha512-Vklwq2vDKtl0y/vtwjSesgJ5MYS7Etuk5txS8VdKL4AOS1aUlD96zqIfsOSLQsdv3xgMRbtkWM8eG9XDfKUPow== - dependencies: - graceful-fs "^4.2.4" - tapable "^2.2.0" - -enquirer@~2.3.6: - version "2.3.6" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" - integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== - dependencies: - ansi-colors "^4.1.1" - -ent@~2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/ent/-/ent-2.2.0.tgz" - integrity sha512-GHrMyVZQWvTIdDtpiEXdHZnFQKzeO09apj8Cbl4pKWy4i0Oprcq17usfDt5aO63swf0JOeMWjWQE/LzgSRuWpA== - -entities@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" - integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== - -entities@^4.3.0, entities@^4.4.0: - version "4.4.0" - resolved "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz" - integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== - -env-paths@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/env-paths/-/env-paths-2.2.1.tgz" - integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== - -err-code@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/err-code/-/err-code-2.0.3.tgz" - integrity sha512-2bmlRpNKBxT/CRmPOlyISQpNj+qSeYvcym/uT0Jx2bMOlKLtSy1ZmLuVxSEKKyor/N5yhvp/ZiG1oE3DEYMSFA== - -errno@^0.1.1: - version "0.1.8" - resolved "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -error-ex@^1.3.1: - version "1.3.2" - resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-get-iterator@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.3.tgz#3ef87523c5d464d41084b2c3c9c214f1199763d6" - integrity sha512-sPZmqHBe6JIiTfN5q2pEi//TwxmAFHwj/XEuYjTuse78i8KxaqMTTzxPoFKuzRpDpTJ+0NAbpfenkmH2rePtuw== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.3" - has-symbols "^1.0.3" - is-arguments "^1.1.1" - is-map "^2.0.2" - is-set "^2.0.2" - is-string "^1.0.7" - isarray "^2.0.5" - stop-iteration-iterator "^1.0.0" - -es-module-lexer@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-1.3.0.tgz#6be9c9e0b4543a60cd166ff6f8b4e9dae0b0c16f" - integrity sha512-vZK7T0N2CBmBOixhmjdqx2gWVbFZ4DXZ/NyRMZVlJXPa7CyFS+/a4QQsDGDQy9ZfEzxFuNEsMLeQJnKP2p5/JA== - -esbuild-wasm@0.17.18: - version "0.17.18" - resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.17.18.tgz#4d922c509eccfc33f7969c880a520e5e665681ef" - integrity sha512-h4m5zVa+KaDuRFIbH9dokMwovvkIjTQJS7/Ry+0Z1paVuS9aIkso2vdA2GmwH9GSvGX6w71WveJ3PfkoLuWaRw== - -esbuild@0.17.18: - version "0.17.18" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.18.tgz#f4f8eb6d77384d68cd71c53eb6601c7efe05e746" - integrity sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w== - optionalDependencies: - "@esbuild/android-arm" "0.17.18" - "@esbuild/android-arm64" "0.17.18" - "@esbuild/android-x64" "0.17.18" - "@esbuild/darwin-arm64" "0.17.18" - "@esbuild/darwin-x64" "0.17.18" - "@esbuild/freebsd-arm64" "0.17.18" - "@esbuild/freebsd-x64" "0.17.18" - "@esbuild/linux-arm" "0.17.18" - "@esbuild/linux-arm64" "0.17.18" - "@esbuild/linux-ia32" "0.17.18" - "@esbuild/linux-loong64" "0.17.18" - "@esbuild/linux-mips64el" "0.17.18" - "@esbuild/linux-ppc64" "0.17.18" - "@esbuild/linux-riscv64" "0.17.18" - "@esbuild/linux-s390x" "0.17.18" - "@esbuild/linux-x64" "0.17.18" - "@esbuild/netbsd-x64" "0.17.18" - "@esbuild/openbsd-x64" "0.17.18" - "@esbuild/sunos-x64" "0.17.18" - "@esbuild/win32-arm64" "0.17.18" - "@esbuild/win32-ia32" "0.17.18" - "@esbuild/win32-x64" "0.17.18" - -esbuild@^0.17.5: - version "0.17.19" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.17.19.tgz#087a727e98299f0462a3d0bcdd9cd7ff100bd955" - integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw== - optionalDependencies: - "@esbuild/android-arm" "0.17.19" - "@esbuild/android-arm64" "0.17.19" - "@esbuild/android-x64" "0.17.19" - "@esbuild/darwin-arm64" "0.17.19" - "@esbuild/darwin-x64" "0.17.19" - "@esbuild/freebsd-arm64" "0.17.19" - "@esbuild/freebsd-x64" "0.17.19" - "@esbuild/linux-arm" "0.17.19" - "@esbuild/linux-arm64" "0.17.19" - "@esbuild/linux-ia32" "0.17.19" - "@esbuild/linux-loong64" "0.17.19" - "@esbuild/linux-mips64el" "0.17.19" - "@esbuild/linux-ppc64" "0.17.19" - "@esbuild/linux-riscv64" "0.17.19" - "@esbuild/linux-s390x" "0.17.19" - "@esbuild/linux-x64" "0.17.19" - "@esbuild/netbsd-x64" "0.17.19" - "@esbuild/openbsd-x64" "0.17.19" - "@esbuild/sunos-x64" "0.17.19" - "@esbuild/win32-arm64" "0.17.19" - "@esbuild/win32-ia32" "0.17.19" - "@esbuild/win32-x64" "0.17.19" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" - integrity sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow== - -escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" - integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg== - -escape-string-regexp@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -eslint-scope@5.1.1, eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== - dependencies: - esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-scope@^7.0.0, eslint-scope@^7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.0.tgz#f21ebdafda02352f103634b96dd47d9f81ca117b" - integrity sha512-DYj5deGlHBfMt15J7rdtyKNq/Nqlv5KfU4iodrQ019XESsRnwXH9KAE0y3cwtUHDo2ob7CypAnCqefh6vioWRw== - dependencies: - esrecurse "^4.3.0" - estraverse "^5.2.0" - -eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz#c22c48f48942d08ca824cc526211ae400478a994" - integrity sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA== - -eslint@^8.40.0: - version "8.42.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.42.0.tgz#7bebdc3a55f9ed7167251fe7259f75219cade291" - integrity sha512-ulg9Ms6E1WPf67PHaEY4/6E2tEn5/f7FXGzr3t9cBMugOmf1INYvuUwwh1aXQN4MfJ6a5K2iNwP3w4AColvI9A== - dependencies: - "@eslint-community/eslint-utils" "^4.2.0" - "@eslint-community/regexpp" "^4.4.0" - "@eslint/eslintrc" "^2.0.3" - "@eslint/js" "8.42.0" - "@humanwhocodes/config-array" "^0.11.10" - "@humanwhocodes/module-importer" "^1.0.1" - "@nodelib/fs.walk" "^1.2.8" - ajv "^6.10.0" - chalk "^4.0.0" - cross-spawn "^7.0.2" - debug "^4.3.2" - doctrine "^3.0.0" - escape-string-regexp "^4.0.0" - eslint-scope "^7.2.0" - eslint-visitor-keys "^3.4.1" - espree "^9.5.2" - esquery "^1.4.2" - esutils "^2.0.2" - fast-deep-equal "^3.1.3" - file-entry-cache "^6.0.1" - find-up "^5.0.0" - glob-parent "^6.0.2" - globals "^13.19.0" - graphemer "^1.4.0" - ignore "^5.2.0" - import-fresh "^3.0.0" - imurmurhash "^0.1.4" - is-glob "^4.0.0" - is-path-inside "^3.0.3" - js-yaml "^4.1.0" - json-stable-stringify-without-jsonify "^1.0.1" - levn "^0.4.1" - lodash.merge "^4.6.2" - minimatch "^3.1.2" - natural-compare "^1.4.0" - optionator "^0.9.1" - strip-ansi "^6.0.1" - strip-json-comments "^3.1.0" - text-table "^0.2.0" - -espree@^9.5.2: - version "9.5.2" - resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.2.tgz#e994e7dc33a082a7a82dceaf12883a829353215b" - integrity sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw== - dependencies: - acorn "^8.8.0" - acorn-jsx "^5.3.2" - eslint-visitor-keys "^3.4.1" - -esprima@^4.0.0: - version "4.0.1" - resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" - integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== - -esquery@^1.4.2: - version "1.5.0" - resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" - integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== - dependencies: - estraverse "^5.1.0" - -esrecurse@^4.3.0: - version "4.3.0" - resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" - integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== - dependencies: - estraverse "^5.2.0" - -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - -estraverse@^5.1.0, estraverse@^5.2.0: - version "5.3.0" - resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" - integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" - integrity sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg== - -eventemitter-asyncresource@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/eventemitter-asyncresource/-/eventemitter-asyncresource-1.0.0.tgz" - integrity sha512-39F7TBIV0G7gTelxwbEqnwhp90eqCPON1k0NwNfwhgKn4Co4ybUbj2pECcXT0B3ztRKZ7Pw1JujUUgmQJHcVAQ== - -eventemitter3@^4.0.0: - version "4.0.7" - resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" - integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== - -events@^3.2.0: - version "3.3.0" - resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -execa@^5.0.0: - version "5.1.1" - resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" - integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== - dependencies: - cross-spawn "^7.0.3" - get-stream "^6.0.0" - human-signals "^2.1.0" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.1" - onetime "^5.1.2" - signal-exit "^3.0.3" - strip-final-newline "^2.0.0" - -express@^4.17.3: - version "4.18.2" - resolved "https://registry.npmjs.org/express/-/express-4.18.2.tgz" - integrity sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ== - dependencies: - accepts "~1.3.8" - array-flatten "1.1.1" - body-parser "1.20.1" - content-disposition "0.5.4" - content-type "~1.0.4" - cookie "0.5.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "2.0.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "1.2.0" - fresh "0.5.2" - http-errors "2.0.0" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "2.4.1" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.7" - qs "6.11.0" - range-parser "~1.2.1" - safe-buffer "5.2.1" - send "0.18.0" - serve-static "1.15.0" - setprototypeof "1.2.0" - statuses "2.0.1" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -extend@^3.0.0: - version "3.0.2" - resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -external-editor@^3.0.3: - version "3.1.0" - resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz" - integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== - dependencies: - chardet "^0.7.0" - iconv-lite "^0.4.24" - tmp "^0.0.33" - -fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-glob@3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" - integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-glob@^3.2.11, fast-glob@^3.2.9: - version "3.2.12" - resolved "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz" - integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== - dependencies: - "@nodelib/fs.stat" "^2.0.2" - "@nodelib/fs.walk" "^1.2.3" - glob-parent "^5.1.2" - merge2 "^1.3.0" - micromatch "^4.0.4" - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fast-levenshtein@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" - integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw== - -fastq@^1.6.0: - version "1.14.0" - resolved "https://registry.npmjs.org/fastq/-/fastq-1.14.0.tgz" - integrity sha512-eR2D+V9/ExcbF9ls441yIuN6TI2ED1Y2ZcA5BmMtJsOkWOFRJQ0Jt0g1UwqXJJVAb+V+umH5Dfr8oh4EVP7VVg== - dependencies: - reusify "^1.0.4" - -faye-websocket@^0.11.3: - version "0.11.4" - resolved "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz" - integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== - dependencies: - websocket-driver ">=0.5.1" - -figures@3.2.0, figures@^3.0.0: - version "3.2.0" - resolved "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz" - integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== - dependencies: - escape-string-regexp "^1.0.5" - -file-entry-cache@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" - integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== - dependencies: - flat-cache "^3.0.4" - -filelist@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5" - integrity sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q== - dependencies: - minimatch "^5.0.1" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -finalhandler@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" - integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "2.4.1" - parseurl "~1.3.3" - statuses "2.0.1" - unpipe "~1.0.0" - -find-cache-dir@^3.3.2: - version "3.3.2" - resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" - integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== - dependencies: - commondir "^1.0.1" - make-dir "^3.0.2" - pkg-dir "^4.1.0" - -find-up@^4.0.0, find-up@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" - integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== - dependencies: - locate-path "^5.0.0" - path-exists "^4.0.0" - -find-up@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -flat-cache@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" - integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== - dependencies: - flatted "^3.1.0" - rimraf "^3.0.2" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flatted@^3.1.0, flatted@^3.2.7: - version "3.2.7" - resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" - integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== - -follow-redirects@^1.0.0, follow-redirects@^1.15.0: - version "1.15.2" - resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz" - integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== - -for-each@^0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -foreground-child@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" - integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== - dependencies: - cross-spawn "^7.0.0" - signal-exit "^4.0.1" - -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -forwarded@0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" - integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== - -fraction.js@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz" - integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" - integrity sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q== - -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - -fs-extra@^11.1.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-11.1.1.tgz#da69f7c39f3b002378b0954bb6ae7efdc0876e2d" - integrity sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -fs-extra@^8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz" - integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^2.0.0, fs-minipass@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== - dependencies: - minipass "^3.0.0" - -fs-minipass@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/fs-minipass/-/fs-minipass-3.0.1.tgz" - integrity sha512-MhaJDcFRTuLidHrIttu0RDGyyXs/IYHVmlcxfLAEFIWjc1vdLAkdwT7Ace2u7DbitWC0toKMl5eJZRYNVreIMw== - dependencies: - minipass "^4.0.0" - -fs-monkey@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz" - integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" - integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== - -fsevents@~2.3.2: - version "2.3.2" - resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functions-have-names@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" - integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== - -gauge@^4.0.3: - version "4.0.4" - resolved "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz" - integrity sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg== - dependencies: - aproba "^1.0.3 || ^2.0.0" - color-support "^1.1.3" - console-control-strings "^1.1.0" - has-unicode "^2.0.1" - signal-exit "^3.0.7" - string-width "^4.2.3" - strip-ansi "^6.0.1" - wide-align "^1.1.5" - -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-intrinsic@^1.0.2: - version "1.1.3" - resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz" - integrity sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.3" - -get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" - integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-proto "^1.0.1" - has-symbols "^1.0.3" - -get-package-type@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz" - integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== - -get-stream@^6.0.0: - version "6.0.1" - resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" - integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== - -glob-parent@^5.1.2, glob-parent@~5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob-parent@^6.0.1, glob-parent@^6.0.2: - version "6.0.2" - resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" - integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== - dependencies: - is-glob "^4.0.3" - -glob-to-regexp@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" - integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== - -glob@7.1.4: - version "7.1.4" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" - integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@8.1.0: - version "8.1.0" - resolved "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz" - integrity sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -glob@^10.2.2: - version "10.2.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.7.tgz#9dd2828cd5bc7bd861e7738d91e7113dda41d7d8" - integrity sha512-jTKehsravOJo8IJxUGfZILnkvVJM/MOfHRs8QcXolVef2zNI9Tqyy5+SeuOAZd3upViEZQLyFpQhYiHLrMUNmA== - dependencies: - foreground-child "^3.1.0" - jackspeak "^2.0.3" - minimatch "^9.0.1" - minipass "^5.0.0 || ^6.0.2" - path-scurry "^1.7.0" - -glob@^7.1.3, glob@^7.1.4, glob@^7.1.7: - version "7.2.3" - resolved "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz" - integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.1.1" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^8.0.1: - version "8.0.3" - resolved "https://registry.npmjs.org/glob/-/glob-8.0.3.tgz" - integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^5.0.1" - once "^1.3.0" - -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.19.0: - version "13.20.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.20.0.tgz#ea276a1e508ffd4f1612888f9d1bad1e2717bf82" - integrity sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ== - dependencies: - type-fest "^0.20.2" - -globby@^11.1.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" - integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== - dependencies: - array-union "^2.1.0" - dir-glob "^3.0.1" - fast-glob "^3.2.9" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^3.0.0" - -globby@^13.1.1: - version "13.1.2" - resolved "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz" - integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== - dependencies: - dir-glob "^3.0.1" - fast-glob "^3.2.11" - ignore "^5.2.0" - merge2 "^1.4.1" - slash "^4.0.0" - -gopd@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" - integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== - dependencies: - get-intrinsic "^1.1.3" - -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9: - version "4.2.10" - resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -grapheme-splitter@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz#9cf3a665c6247479896834af35cf1dbb4400767e" - integrity sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ== - -graphemer@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" - integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== - -handle-thing@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz" - integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== - -has-bigints@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" - integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" - integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw== - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-property-descriptors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" - integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== - dependencies: - get-intrinsic "^1.1.1" - -has-proto@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" - integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== - -has-symbols@^1.0.2, has-symbols@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz" - integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== - -has-tostringtag@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" - integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== - dependencies: - has-symbols "^1.0.2" - -has-unicode@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" - integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== - -has@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hdr-histogram-js@^2.0.1: - version "2.0.3" - resolved "https://registry.npmjs.org/hdr-histogram-js/-/hdr-histogram-js-2.0.3.tgz" - integrity sha512-Hkn78wwzWHNCp2uarhzQ2SGFLU3JY8SBDDd3TAABK4fc30wm+MuPOrg5QVFVfkKOQd6Bfz3ukJEI+q9sXEkK1g== - dependencies: - "@assemblyscript/loader" "^0.10.1" - base64-js "^1.2.0" - pako "^1.0.3" - -hdr-histogram-percentiles-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/hdr-histogram-percentiles-obj/-/hdr-histogram-percentiles-obj-3.0.0.tgz" - integrity sha512-7kIufnBqdsBGcSZLPJwqHT3yhk1QTsSlFsVD3kx5ixH/AlgBs9yM1q6DPhXZ8f8gtdqgh7N7/5btRLpQsS2gHw== - -hosted-git-info@^6.0.0: - version "6.1.1" - resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-6.1.1.tgz" - integrity sha512-r0EI+HBMcXadMrugk0GCQ+6BQV39PiWAZVfq7oIckeGiN7sjRGyQxPdft3nQekFTCQbYxLBH+/axZMeH8UX6+w== - dependencies: - lru-cache "^7.5.1" - -hpack.js@^2.1.6: - version "2.1.6" - resolved "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz" - integrity sha512-zJxVehUdMGIKsRaNt7apO2Gqp0BdqW5yaiGHXXmbpvxgBYVZnAql+BJb4RO5ad2MgpbZKn5G6nMnegrH1FcNYQ== - dependencies: - inherits "^2.0.1" - obuf "^1.0.0" - readable-stream "^2.0.1" - wbuf "^1.1.0" - -html-entities@^2.3.2: - version "2.3.3" - resolved "https://registry.npmjs.org/html-entities/-/html-entities-2.3.3.tgz" - integrity sha512-DV5Ln36z34NNTDgnz0EWGBLZENelNAtkiFA4kyNOG2tDI6Mz1uSWiq1wAKdyjnJwyDiDO7Fa2SO1CTxPXL8VxA== - -html-escaper@^2.0.0: - version "2.0.2" - resolved "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz" - integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== - -http-cache-semantics@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-cache-semantics@^4.1.1: - version "4.1.1" - resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.1.tgz" - integrity sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ== - -http-deceiver@^1.2.7: - version "1.2.7" - resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" - integrity sha512-LmpOGxTfbpgtGVxJrj5k7asXHCgNZp5nLfp+hWc8QQRqtb7fUy6kRY3BO1h9ddF6yIPYUARgxGOwB42DnxIaNw== - -http-errors@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" - integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== - dependencies: - depd "2.0.0" - inherits "2.0.4" - setprototypeof "1.2.0" - statuses "2.0.1" - toidentifier "1.0.1" - -http-errors@~1.6.2: - version "1.6.3" - resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" - integrity sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.0" - statuses ">= 1.4.0 < 2" - -http-parser-js@>=0.5.1: - version "0.5.8" - resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.8.tgz" - integrity sha512-SGeBX54F94Wgu5RH3X5jsDtf4eHyRogWX1XGT3b4HuW3tQPM4AaBzoUji/4AAJNXCEOWZ5O0DgZmJw1947gD5Q== - -http-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz" - integrity sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w== - dependencies: - "@tootallnate/once" "2" - agent-base "6" - debug "4" - -http-proxy-middleware@^2.0.3: - version "2.0.6" - resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz" - integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== - dependencies: - "@types/http-proxy" "^1.17.8" - http-proxy "^1.18.1" - is-glob "^4.0.1" - is-plain-obj "^3.0.0" - micromatch "^4.0.2" - -http-proxy@^1.18.1: - version "1.18.1" - resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" - integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== - dependencies: - eventemitter3 "^4.0.0" - follow-redirects "^1.0.0" - requires-port "^1.0.0" - -https-proxy-agent@5.0.1, https-proxy-agent@^5.0.0: - version "5.0.1" - resolved "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz" - integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== - dependencies: - agent-base "6" - debug "4" - -human-signals@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" - integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== - -humanize-ms@^1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" - integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== - dependencies: - ms "^2.0.0" - -iconv-lite@0.4.24, iconv-lite@^0.4.24: - version "0.4.24" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2, iconv-lite@^0.6.3: - version "0.6.3" - resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" - integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -icss-utils@^5.0.0, icss-utils@^5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz" - integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -ignore-walk@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-6.0.0.tgz" - integrity sha512-bTf9UWe/UP1yxG3QUrj/KOvEhTAUWPcv+WvbFZ28LcqznXabp7Xu6o9y1JEC18+oqODuS7VhTpekV5XvFwsxJg== - dependencies: - minimatch "^5.0.1" - -ignore@5.2.4, ignore@^5.0.4: - version "5.2.4" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" - integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== - -ignore@^5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.1.tgz" - integrity sha512-d2qQLzTJ9WxQftPAuEQpSPmKqzxePjzVbpAVv62AQ64NTL+wR4JkrVqR/LqFsFEUsHDAiId52mJteHDFuDkElA== - -image-size@~0.5.0: - version "0.5.5" - resolved "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz" - integrity sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ== - -immutable@^4.0.0: - version "4.1.0" - resolved "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz" - integrity sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ== - -import-fresh@^3.0.0, import-fresh@^3.2.1: - version "3.3.0" - resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" - integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== - dependencies: - parent-module "^1.0.0" - resolve-from "^4.0.0" - -imurmurhash@^0.1.4: - version "0.1.4" - resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" - integrity sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA== - -indent-string@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" - integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== - -infer-owner@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz" - integrity sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A== - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" - integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA== - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.3: - version "2.0.4" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" - integrity sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw== - -ini@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/ini/-/ini-4.0.0.tgz#35b4b0ba3bb9a3feb8c50dbf92fb1671efda88eb" - integrity sha512-t0ikzf5qkSFqRl1e6ejKBe+Tk2bsQd8ivEkcisyGXsku2t8NvXZ1Y3RRz5vxrDgOrTBOi13CvGsVoI5wVpd7xg== - -inquirer@8.2.4: - version "8.2.4" - resolved "https://registry.npmjs.org/inquirer/-/inquirer-8.2.4.tgz" - integrity sha512-nn4F01dxU8VeKfq192IjLsxu0/OmMZ4Lg3xKAns148rCaXP6ntAoEkVYZThWjwON8AlzdZZi6oqnhNbxUG9hVg== - dependencies: - ansi-escapes "^4.2.1" - chalk "^4.1.1" - cli-cursor "^3.1.0" - cli-width "^3.0.0" - external-editor "^3.0.3" - figures "^3.0.0" - lodash "^4.17.21" - mute-stream "0.0.8" - ora "^5.4.1" - run-async "^2.4.0" - rxjs "^7.5.5" - string-width "^4.1.0" - strip-ansi "^6.0.0" - through "^2.3.6" - wrap-ansi "^7.0.0" - -internal-slot@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" - integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== - dependencies: - get-intrinsic "^1.2.0" - has "^1.0.3" - side-channel "^1.0.4" - -ip@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz" - integrity sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ== - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -ipaddr.js@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz" - integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== - -is-arguments@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" - integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" - integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.2.0" - is-typed-array "^1.1.10" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" - integrity sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg== - -is-bigint@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" - integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== - dependencies: - has-bigints "^1.0.1" - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" - integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-callable@^1.1.3: - version "1.2.7" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" - integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== - -is-core-module@^2.11.0: - version "2.12.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.12.1.tgz#0c0b6885b6f80011c71541ce15c8d66cf5a4f9fd" - integrity sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg== - dependencies: - has "^1.0.3" - -is-core-module@^2.8.1, is-core-module@^2.9.0: - version "2.11.0" - resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz" - integrity sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw== - dependencies: - has "^1.0.3" - -is-date-object@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" - integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== - dependencies: - has-tostringtag "^1.0.0" - -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" - integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ== - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: - version "4.0.3" - resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" - integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== - dependencies: - is-extglob "^2.1.1" - -is-interactive@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz" - integrity sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w== - -is-lambda@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz" - integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== - -is-map@^2.0.1, is-map@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-map/-/is-map-2.0.2.tgz#00922db8c9bf73e81b7a335827bc2a43f2b91127" - integrity sha512-cOZFQQozTha1f4MxLFzlgKYPTyj26picdZTx82hbc/Xf4K/tZOOXSCkMvU4pKioRXGDLJRn0GM7Upe7kR721yg== - -is-number-object@^1.0.4: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" - integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== - dependencies: - has-tostringtag "^1.0.0" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-path-inside@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" - integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== - -is-plain-obj@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz" - integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== - -is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-regex@^1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" - integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== - dependencies: - call-bind "^1.0.2" - has-tostringtag "^1.0.0" - -is-set@^2.0.1, is-set@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" - integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== - -is-shared-array-buffer@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" - integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== - dependencies: - call-bind "^1.0.2" - -is-stream@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" - integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== - -is-string@^1.0.5, is-string@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" - integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== - dependencies: - has-tostringtag "^1.0.0" - -is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.10: - version "1.1.10" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.10.tgz#36a5b5cb4189b575d1a3e4b08536bfb485801e3f" - integrity sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - -is-unicode-supported@^0.1.0: - version "0.1.0" - resolved "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz" - integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== - -is-weakmap@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-weakmap/-/is-weakmap-2.0.1.tgz#5008b59bdc43b698201d18f62b37b2ca243e8cf2" - integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== - -is-weakset@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/is-weakset/-/is-weakset-2.0.2.tgz#4569d67a747a1ce5a994dfd4ef6dcea76e7c0a1d" - integrity sha512-t2yVvttHkQktwnNNmBQ98AhENLdPUTDTE21uPqAQ0ARwQfGeQKRVS0NNurH7bTf7RrvcVn1OOge45CnBeHCSmg== - dependencies: - call-bind "^1.0.2" - get-intrinsic "^1.1.1" - -is-what@^3.14.1: - version "3.14.1" - resolved "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz" - integrity sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA== - -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" - integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== - -isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" - integrity sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ== - -isbinaryfile@^4.0.8: - version "4.0.10" - resolved "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-4.0.10.tgz" - integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw== - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" - integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== - -isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" - integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg== - -istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz" - integrity sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw== - -istanbul-lib-instrument@^5.0.4, istanbul-lib-instrument@^5.1.0: - version "5.2.1" - resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-5.2.1.tgz" - integrity sha512-pzqtp31nLv/XFOzXGuvhCb8qhjmTVo5vjVk19XE4CRlSWz0KoeJ3bw9XsA7nOp9YBf4qHjwBxkDzKcME/J29Yg== - dependencies: - "@babel/core" "^7.12.3" - "@babel/parser" "^7.14.7" - "@istanbuljs/schema" "^0.1.2" - istanbul-lib-coverage "^3.2.0" - semver "^6.3.0" - -istanbul-lib-report@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" - integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== - dependencies: - istanbul-lib-coverage "^3.0.0" - make-dir "^3.0.0" - supports-color "^7.1.0" - -istanbul-lib-source-maps@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz" - integrity sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw== - dependencies: - debug "^4.1.1" - istanbul-lib-coverage "^3.0.0" - source-map "^0.6.1" - -istanbul-reports@^3.0.5: - version "3.1.5" - resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.5.tgz" - integrity sha512-nUsEMa9pBt/NOHqbcbeJEgqIlY/K7rVWUX6Lql2orY5e9roQOthbR3vtY4zzf2orPELg80fnxxk9zUyPlgwD1w== - dependencies: - html-escaper "^2.0.0" - istanbul-lib-report "^3.0.0" - -jackspeak@^2.0.3: - version "2.2.1" - resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.2.1.tgz#655e8cf025d872c9c03d3eb63e8f0c024fef16a6" - integrity sha512-MXbxovZ/Pm42f6cDIDkl3xpwv1AGwObKwfmjs2nQePiy85tP3fatofl3FC1aBsOtP/6fq5SbtgHwWcMsLP+bDw== - dependencies: - "@isaacs/cliui" "^8.0.2" - optionalDependencies: - "@pkgjs/parseargs" "^0.11.0" - -jake@^10.8.5: - version "10.8.7" - resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f" - integrity sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w== - dependencies: - async "^3.2.3" - chalk "^4.0.2" - filelist "^1.0.4" - minimatch "^3.1.2" - -jasmine-core@^4.1.0, jasmine-core@~4.5.0: - version "4.5.0" - resolved "https://registry.npmjs.org/jasmine-core/-/jasmine-core-4.5.0.tgz" - integrity sha512-9PMzyvhtocxb3aXJVOPqBDswdgyAeSB81QnLop4npOpbqnheaTEwPc9ZloQeVswugPManznQBjD8kWDTjlnHuw== - -jasmine-spec-reporter@~7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/jasmine-spec-reporter/-/jasmine-spec-reporter-7.0.0.tgz" - integrity sha512-OtC7JRasiTcjsaCBPtMO0Tl8glCejM4J4/dNuOJdA8lBjz4PmWjYQ6pzb0uzpBNAWJMDudYuj9OdXJWqM2QTJg== - dependencies: - colors "1.4.0" - -jest-worker@^27.4.5: - version "27.5.1" - resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" - integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== - dependencies: - "@types/node" "*" - merge-stream "^2.0.0" - supports-color "^8.0.0" - -js-tokens@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-yaml@4.1.0, js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -js-yaml@^3.10.0, js-yaml@^3.13.1: - version "3.14.1" - resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" - integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" - integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== - -json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" - integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== - -json-parse-even-better-errors@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-3.0.0.tgz" - integrity sha512-iZbGHafX/59r39gPwVPRBGw0QQKnA7tte5pSMrhWOW7swGsVvVTjmfyAV9pNqk8YGT7tRCdxRu8uzcgZwoDooA== - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - -json-stable-stringify-without-jsonify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" - integrity sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw== - -json5@^2.1.2, json5@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz" - integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== - -json5@^2.2.2: - version "2.2.3" - resolved "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== - -jsonc-parser@3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz" - integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz" - integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg== - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -jsonparse@^1.3.1: - version "1.3.1" - resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" - integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== - -karma-chrome-launcher@~3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/karma-chrome-launcher/-/karma-chrome-launcher-3.1.1.tgz" - integrity sha512-hsIglcq1vtboGPAN+DGCISCFOxW+ZVnIqhDQcCMqqCp+4dmJ0Qpq5QAjkbA0X2L9Mi6OBkHi2Srrbmm7pUKkzQ== - dependencies: - which "^1.2.1" - -karma-coverage@~2.2.0: - version "2.2.0" - resolved "https://registry.npmjs.org/karma-coverage/-/karma-coverage-2.2.0.tgz" - integrity sha512-gPVdoZBNDZ08UCzdMHHhEImKrw1+PAOQOIiffv1YsvxFhBjqvo/SVXNk4tqn1SYqX0BJZT6S/59zgxiBe+9OuA== - dependencies: - istanbul-lib-coverage "^3.2.0" - istanbul-lib-instrument "^5.1.0" - istanbul-lib-report "^3.0.0" - istanbul-lib-source-maps "^4.0.1" - istanbul-reports "^3.0.5" - minimatch "^3.0.4" - -karma-jasmine-html-reporter@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.0.0.tgz" - integrity sha512-SB8HNNiazAHXM1vGEzf8/tSyEhkfxuDdhYdPBX2Mwgzt0OuF2gicApQ+uvXLID/gXyJQgvrM9+1/2SxZFUUDIA== - -karma-jasmine@~5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/karma-jasmine/-/karma-jasmine-5.1.0.tgz" - integrity sha512-i/zQLFrfEpRyQoJF9fsCdTMOF5c2dK7C7OmsuKg2D0YSsuZSfQDiLuaiktbuio6F2wiCsZSnSnieIQ0ant/uzQ== - dependencies: - jasmine-core "^4.1.0" - -karma-source-map-support@1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/karma-source-map-support/-/karma-source-map-support-1.4.0.tgz" - integrity sha512-RsBECncGO17KAoJCYXjv+ckIz+Ii9NCi+9enk+rq6XC81ezYkb4/RHE6CTXdA7IOJqoF3wcaLfVG0CPmE5ca6A== - dependencies: - source-map-support "^0.5.5" - -karma@~6.4.1: - version "6.4.1" - resolved "https://registry.npmjs.org/karma/-/karma-6.4.1.tgz" - integrity sha512-Cj57NKOskK7wtFWSlMvZf459iX+kpYIPXmkNUzP2WAFcA7nhr/ALn5R7sw3w+1udFDcpMx/tuB8d5amgm3ijaA== - dependencies: - "@colors/colors" "1.5.0" - body-parser "^1.19.0" - braces "^3.0.2" - chokidar "^3.5.1" - connect "^3.7.0" - di "^0.0.1" - dom-serialize "^2.2.1" - glob "^7.1.7" - graceful-fs "^4.2.6" - http-proxy "^1.18.1" - isbinaryfile "^4.0.8" - lodash "^4.17.21" - log4js "^6.4.1" - mime "^2.5.2" - minimatch "^3.0.4" - mkdirp "^0.5.5" - qjobs "^1.2.0" - range-parser "^1.2.1" - rimraf "^3.0.2" - socket.io "^4.4.1" - source-map "^0.6.1" - tmp "^0.2.1" - ua-parser-js "^0.7.30" - yargs "^16.1.1" - -kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -klona@^2.0.4: - version "2.0.5" - resolved "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz" - integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== - -klona@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.6.tgz#85bffbf819c03b2f53270412420a4555ef882e22" - integrity sha512-dhG34DXATL5hSxJbIexCft8FChFXtmskoZYnoPWjXQuebWYCNkVeV3KkGegCK9CP1oswI/vQibS2GY7Em/sJJA== - -launch-editor@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/launch-editor/-/launch-editor-2.6.0.tgz#4c0c1a6ac126c572bd9ff9a30da1d2cae66defd7" - integrity sha512-JpDCcQnyAAzZZaZ7vEiSqL690w7dAEyLao+KC96zBplnYbJS7TYNjvM3M7y3dGz+v7aIsJk3hllWuc0kWAjyRQ== - dependencies: - picocolors "^1.0.0" - shell-quote "^1.7.3" - -less-loader@11.1.0: - version "11.1.0" - resolved "https://registry.npmjs.org/less-loader/-/less-loader-11.1.0.tgz" - integrity sha512-C+uDBV7kS7W5fJlUjq5mPBeBVhYpTIm5gB09APT9o3n/ILeaXVsiSFTbZpTJCJwQ/Crczfn3DmfQFwxYusWFug== - dependencies: - klona "^2.0.4" - -less@4.1.3: - version "4.1.3" - resolved "https://registry.npmjs.org/less/-/less-4.1.3.tgz" - integrity sha512-w16Xk/Ta9Hhyei0Gpz9m7VS8F28nieJaL/VyShID7cYvP6IL5oHeL6p4TXSDJqZE/lNv0oJ2pGVjJsRkfwm5FA== - dependencies: - copy-anything "^2.0.1" - parse-node-version "^1.0.1" - tslib "^2.3.0" - optionalDependencies: - errno "^0.1.1" - graceful-fs "^4.1.2" - image-size "~0.5.0" - make-dir "^2.1.0" - mime "^1.4.1" - needle "^3.1.0" - source-map "~0.6.0" - -levn@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" - integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== - dependencies: - prelude-ls "^1.2.1" - type-check "~0.4.0" - -license-webpack-plugin@4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz" - integrity sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw== - dependencies: - webpack-sources "^3.0.0" - -lines-and-columns@^1.1.6: - version "1.2.4" - resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" - integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== - -lines-and-columns@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-2.0.3.tgz#b2f0badedb556b747020ab8ea7f0373e22efac1b" - integrity sha512-cNOjgCnLB+FnvWWtyRTzmB3POJ+cXxTA81LoW7u8JdmhfXzriropYwpjShnz1QLLWsQwY7nIxoDmcPTwphDK9w== - -loader-runner@^4.2.0: - version "4.3.0" - resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz" - integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== - -loader-utils@3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.1.tgz" - integrity sha512-ZvFw1KWS3GVyYBYb7qkmRM/WwL2TQQBxgCK62rlvm4WpVQ23Nb4tYjApUlfjrEGvOs7KHEsmyUn75OHZrJMWPw== - -loader-utils@^2.0.0: - version "2.0.4" - resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-2.0.4.tgz" - integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== - dependencies: - big.js "^5.2.2" - emojis-list "^3.0.0" - json5 "^2.1.2" - -locate-path@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" - integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== - dependencies: - p-locate "^4.1.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.debounce@^4.0.8: - version "4.0.8" - resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" - integrity sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow== - -lodash.merge@^4.6.2: - version "4.6.2" - resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" - integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== - -lodash@^4.17.21: - version "4.17.21" - resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz" - integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== - dependencies: - chalk "^4.1.0" - is-unicode-supported "^0.1.0" - -log4js@^6.4.1: - version "6.7.1" - resolved "https://registry.npmjs.org/log4js/-/log4js-6.7.1.tgz" - integrity sha512-lzbd0Eq1HRdWM2abSD7mk6YIVY0AogGJzb/z+lqzRk+8+XJP+M6L1MS5FUSc3jjGru4dbKjEMJmqlsoYYpuivQ== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - flatted "^3.2.7" - rfdc "^1.3.0" - streamroller "^3.1.3" - -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" - integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== - dependencies: - yallist "^4.0.0" - -lru-cache@^7.4.4, lru-cache@^7.5.1, lru-cache@^7.7.1: - version "7.14.1" - resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-7.14.1.tgz" - integrity sha512-ysxwsnTKdAx96aTRdhDOCQfDgbHnt8SK0KY8SEjO0wHinhWOFTESbjVCMPbU1uGXg/ch4lifqx0wfjOawU2+WA== - -lru-cache@^9.1.1: - version "9.1.2" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.2.tgz#255fdbc14b75589d6d0e73644ca167a8db506835" - integrity sha512-ERJq3FOzJTxBbFjZ7iDs+NiK4VI9Wz+RdrrAB8dio1oV+YvdPzUEE4QNiT2VD51DkIbCYRUUzCRkssXCHqSnKQ== - -magic-string@0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.30.0.tgz#fd58a4748c5c4547338a424e90fa5dd17f4de529" - integrity sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ== - dependencies: - "@jridgewell/sourcemap-codec" "^1.4.13" - -make-dir@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz" - integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== - dependencies: - pify "^4.0.1" - semver "^5.6.0" - -make-dir@^3.0.0, make-dir@^3.0.2: - version "3.1.0" - resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" - integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== - dependencies: - semver "^6.0.0" - -make-fetch-happen@^10.0.3: - version "10.2.1" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz" - integrity sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w== - dependencies: - agentkeepalive "^4.2.1" - cacache "^16.1.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^3.1.6" - minipass-collect "^1.0.2" - minipass-fetch "^2.0.3" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^9.0.0" - -make-fetch-happen@^11.0.0: - version "11.0.2" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.2.tgz" - integrity sha512-5n/Pq41w/uZghpdlXAY5kIM85RgJThtTH/NYBRAZ9VUOBWV90USaQjwGrw76fZP3Lj5hl/VZjpVvOaRBMoL/2w== - dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" - http-cache-semantics "^4.1.0" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^4.0.0" - minipass-collect "^1.0.2" - minipass-fetch "^3.0.0" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^10.0.0" - -make-fetch-happen@^11.0.1: - version "11.0.3" - resolved "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-11.0.3.tgz" - integrity sha512-oPLh5m10lRNNZDjJ2kP8UpboUx2uFXVaVweVe/lWut4iHWcQEmfqSVJt2ihZsFI8HbpwyyocaXbCAWf0g1ukIA== - dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" - http-cache-semantics "^4.1.1" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^4.0.0" - minipass-fetch "^3.0.0" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^10.0.0" - -make-fetch-happen@^11.1.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-11.1.1.tgz#85ceb98079584a9523d4bf71d32996e7e208549f" - integrity sha512-rLWS7GCSTcEujjVBs2YqG7Y4643u8ucvCJeSRqiLYhesrDuzeuFIk37xREzAsfQaqzl8b9rNCE4m6J8tvX4Q8w== - dependencies: - agentkeepalive "^4.2.1" - cacache "^17.0.0" - http-cache-semantics "^4.1.1" - http-proxy-agent "^5.0.0" - https-proxy-agent "^5.0.0" - is-lambda "^1.0.1" - lru-cache "^7.7.1" - minipass "^5.0.0" - minipass-fetch "^3.0.0" - minipass-flush "^1.0.5" - minipass-pipeline "^1.2.4" - negotiator "^0.6.3" - promise-retry "^2.0.1" - socks-proxy-agent "^7.0.0" - ssri "^10.0.0" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" - integrity sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ== - -memfs@^3.4.12, memfs@^3.4.3: - version "3.4.13" - resolved "https://registry.npmjs.org/memfs/-/memfs-3.4.13.tgz" - integrity sha512-omTM41g3Skpvx5dSYeZIbXKcXoAVc/AoMNwn9TKx++L/gaen/+4TTttmu8ZSch5vfVJ8uJvGbroTsIlslRg6lg== - dependencies: - fs-monkey "^1.0.3" - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" - integrity sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w== - -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - -merge2@^1.3.0, merge2@^1.4.1: - version "1.4.1" - resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" - integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" - integrity sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w== - -micromatch@^4.0.2, micromatch@^4.0.4: - version "4.0.5" - resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" - integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== - dependencies: - braces "^3.0.2" - picomatch "^2.3.1" - -mime-db@1.52.0, "mime-db@>= 1.43.0 < 2": - version "1.52.0" - resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12, mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24, mime-types@~2.1.34: - version "2.1.35" - resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" - -mime@1.6.0, mime@^1.4.1: - version "1.6.0" - resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mime@^2.5.2: - version "2.6.0" - resolved "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz" - integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg== - -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -mini-css-extract-plugin@2.7.5: - version "2.7.5" - resolved "https://registry.yarnpkg.com/mini-css-extract-plugin/-/mini-css-extract-plugin-2.7.5.tgz#afbb344977659ec0f1f6e050c7aea456b121cfc5" - integrity sha512-9HaR++0mlgom81s95vvNjxkg52n2b5s//3ZTI1EtzFb98awsLSivs2LMsVqnQ3ay0PVhqWcGNyDaTE961FOcjQ== - dependencies: - schema-utils "^4.0.0" - -minimalistic-assert@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimatch@3.0.5: - version "3.0.5" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.5.tgz#4da8f1290ee0f0f8e83d60ca69f8f134068604a3" - integrity sha512-tUpxzX0VAzJHjLu0xUfFv1gwVp9ba3IOuRAVH2EGuRW8a5emA2FlACLqiT/lDVtS1W+TGNwqz3sWaNyLgDJWuw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: - version "3.1.2" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" - integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== - dependencies: - brace-expansion "^1.1.7" - -minimatch@^5.0.1: - version "5.1.1" - resolved "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz" - integrity sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g== - dependencies: - brace-expansion "^2.0.1" - -minimatch@^9.0.0, minimatch@^9.0.1: - version "9.0.1" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" - integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== - dependencies: - brace-expansion "^2.0.1" - -minimist@^1.2.0: - version "1.2.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" - integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== - -minimist@^1.2.6: - version "1.2.7" - resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz" - integrity sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g== - -minipass-collect@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz" - integrity sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA== - dependencies: - minipass "^3.0.0" - -minipass-fetch@^2.0.3: - version "2.1.2" - resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz" - integrity sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA== - dependencies: - minipass "^3.1.6" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - -minipass-fetch@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz" - integrity sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw== - dependencies: - minipass "^4.0.0" - minipass-sized "^1.0.3" - minizlib "^2.1.2" - optionalDependencies: - encoding "^0.1.13" - -minipass-flush@^1.0.5: - version "1.0.5" - resolved "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz" - integrity sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw== - dependencies: - minipass "^3.0.0" - -minipass-json-stream@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/minipass-json-stream/-/minipass-json-stream-1.0.1.tgz" - integrity sha512-ODqY18UZt/I8k+b7rl2AENgbWE8IDYam+undIJONvigAz8KR5GWblsFTEfQs0WODsjbSXWlm+JHEv8Gr6Tfdbg== - dependencies: - jsonparse "^1.3.1" - minipass "^3.0.0" - -minipass-pipeline@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz" - integrity sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A== - dependencies: - minipass "^3.0.0" - -minipass-sized@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz" - integrity sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g== - dependencies: - minipass "^3.0.0" - -minipass@^3.0.0, minipass@^3.1.1, minipass@^3.1.6: - version "3.3.6" - resolved "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz" - integrity sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw== - dependencies: - yallist "^4.0.0" - -minipass@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/minipass/-/minipass-4.0.0.tgz" - integrity sha512-g2Uuh2jEKoht+zvO6vJqXmYpflPqzRBT+Th2h01DKh5z7wbY/AZ2gCQ78cP70YoHPyFdY30YBV5WxgLOEwOykw== - dependencies: - yallist "^4.0.0" - -minipass@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" - integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== - -"minipass@^5.0.0 || ^6.0.2": - version "6.0.2" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-6.0.2.tgz#542844b6c4ce95b202c0995b0a471f1229de4c81" - integrity sha512-MzWSV5nYVT7mVyWCwn2o7JH13w2TBRmmSqSRCKzTw+lmft9X4z+3wjvs06Tzijo5z4W/kahUCDpRXTF+ZrmF/w== - -minizlib@^2.1.1, minizlib@^2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== - dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^0.5.5: - version "0.5.6" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" - integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== - dependencies: - minimist "^1.2.6" - -mkdirp@^1.0.3, mkdirp@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mrmime@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mrmime/-/mrmime-1.0.1.tgz#5f90c825fad4bdd41dc914eff5d1a8cfdaf24f27" - integrity sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" - integrity sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.0.0, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multicast-dns@^7.2.5: - version "7.2.5" - resolved "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz" - integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== - dependencies: - dns-packet "^5.2.2" - thunky "^1.0.2" - -mute-stream@0.0.8: - version "0.0.8" - resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz" - integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== - -nanoid@^3.3.4: - version "3.3.4" - resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz" - integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== - -nanoid@^3.3.6: - version "3.3.6" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c" - integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA== - -natural-compare-lite@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare-lite/-/natural-compare-lite-1.4.0.tgz#17b09581988979fddafe0201e931ba933c96cbb4" - integrity sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g== - -natural-compare@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" - integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== - -needle@^3.1.0: - version "3.2.0" - resolved "https://registry.npmjs.org/needle/-/needle-3.2.0.tgz" - integrity sha512-oUvzXnyLiVyVGoianLijF9O/RecZUf7TkBfimjGrLM4eQhXyeJwM6GeAWccwfQ9aa4gMCZKqhAOuLaMIcQxajQ== - dependencies: - debug "^3.2.6" - iconv-lite "^0.6.3" - sax "^1.2.4" - -negotiator@0.6.3, negotiator@^0.6.3: - version "0.6.3" - resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" - integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== - -neo-async@^2.6.2: - version "2.6.2" - resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" - integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== - -nice-napi@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/nice-napi/-/nice-napi-1.0.2.tgz" - integrity sha512-px/KnJAJZf5RuBGcfD+Sp2pAKq0ytz8j+1NehvgIGFkvtvFrDM3T8E4x/JJODXK9WZow8RRGrbA9QQ3hs+pDhA== - dependencies: - node-addon-api "^3.0.0" - node-gyp-build "^4.2.2" - -node-addon-api@^3.0.0, node-addon-api@^3.2.1: - version "3.2.1" - resolved "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz" - integrity sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A== - -node-forge@^1: - version "1.3.1" - resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" - integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== - -node-gyp-build@^4.2.2: - version "4.5.0" - resolved "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.5.0.tgz" - integrity sha512-2iGbaQBV+ITgCz76ZEjmhUKAKVf7xfY1sRl4UiKQspfZMH2h06SyhNsnSVy50cwkFQDGLyif6m/6uFXHkOZ6rg== - -node-gyp-build@^4.3.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.6.0.tgz#0c52e4cbf54bbd28b709820ef7b6a3c2d6209055" - integrity sha512-NTZVKn9IylLwUzaKjkas1e4u2DLNcV4rdYagA4PWdPwW87Bi7z+BznyKSRwS/761tV/lzCGXplWsiaMjLqP2zQ== - -node-gyp@^9.0.0: - version "9.3.0" - resolved "https://registry.npmjs.org/node-gyp/-/node-gyp-9.3.0.tgz" - integrity sha512-A6rJWfXFz7TQNjpldJ915WFb1LnhO4lIve3ANPbWreuEoLoKlFT3sxIepPBkLhM27crW8YmN+pjlgbasH6cH/Q== - dependencies: - env-paths "^2.2.0" - glob "^7.1.4" - graceful-fs "^4.2.6" - make-fetch-happen "^10.0.3" - nopt "^6.0.0" - npmlog "^6.0.0" - rimraf "^3.0.2" - semver "^7.3.5" - tar "^6.1.2" - which "^2.0.2" - -node-releases@^2.0.12: - version "2.0.12" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" - integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== - -node-releases@^2.0.8: - version "2.0.10" - resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz" - integrity sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w== - -nopt@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz" - integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== - dependencies: - abbrev "^1.0.0" - -normalize-package-data@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-5.0.0.tgz" - integrity sha512-h9iPVIfrVZ9wVYQnxFgtw1ugSvGEMOlyPWWtm8BMJhnwyEL/FLbYbTY3V3PpjI/BUK67n9PEWDu6eHzu1fB15Q== - dependencies: - hosted-git-info "^6.0.0" - is-core-module "^2.8.1" - semver "^7.3.5" - validate-npm-package-license "^3.0.4" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-range@^0.1.2: - version "0.1.2" - resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" - integrity sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA== - -npm-bundled@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/npm-bundled/-/npm-bundled-3.0.0.tgz" - integrity sha512-Vq0eyEQy+elFpzsKjMss9kxqb9tG3YHg4dsyWuUENuzvSUWe1TCnW/vV9FkhvBk/brEDoDiVd+M1Btosa6ImdQ== - dependencies: - npm-normalize-package-bin "^3.0.0" - -npm-install-checks@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-6.0.0.tgz" - integrity sha512-SBU9oFglRVZnfElwAtF14NivyulDqF1VKqqwNsFW9HDcbHMAPHpRSsVFgKuwFGq/hVvWZExz62Th0kvxn/XE7Q== - dependencies: - semver "^7.1.1" - -npm-normalize-package-bin@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-3.0.0.tgz" - integrity sha512-g+DPQSkusnk7HYXr75NtzkIP4+N81i3RPsGFidF3DzHd9MT9wWngmqoeg/fnHFz5MNdtG4w03s+QnhewSLTT2Q== - -npm-package-arg@10.1.0, npm-package-arg@^10.0.0: - version "10.1.0" - resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-10.1.0.tgz" - integrity sha512-uFyyCEmgBfZTtrKk/5xDfHp6+MdrqGotX/VoOyEEl3mBwiEE5FlBaePanazJSVMPT7vKepcjYBY2ztg9A3yPIA== - dependencies: - hosted-git-info "^6.0.0" - proc-log "^3.0.0" - semver "^7.3.5" - validate-npm-package-name "^5.0.0" - -npm-packlist@^7.0.0: - version "7.0.4" - resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-7.0.4.tgz" - integrity sha512-d6RGEuRrNS5/N84iglPivjaJPxhDbZmlbTwTDX2IbcRHG5bZCdtysYMhwiPvcF4GisXHGn7xsxv+GQ7T/02M5Q== - dependencies: - ignore-walk "^6.0.0" - -npm-pick-manifest@8.0.1, npm-pick-manifest@^8.0.0: - version "8.0.1" - resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-8.0.1.tgz" - integrity sha512-mRtvlBjTsJvfCCdmPtiu2bdlx8d/KXtF7yNXNWe7G0Z36qWA9Ny5zXsI2PfBZEv7SXgoxTmNaTzGSbbzDZChoA== - dependencies: - npm-install-checks "^6.0.0" - npm-normalize-package-bin "^3.0.0" - npm-package-arg "^10.0.0" - semver "^7.3.5" - -npm-registry-fetch@^14.0.0: - version "14.0.3" - resolved "https://registry.npmjs.org/npm-registry-fetch/-/npm-registry-fetch-14.0.3.tgz" - integrity sha512-YaeRbVNpnWvsGOjX2wk5s85XJ7l1qQBGAp724h8e2CZFFhMSuw9enom7K1mWVUtvXO1uUSFIAPofQK0pPN0ZcA== - dependencies: - make-fetch-happen "^11.0.0" - minipass "^4.0.0" - minipass-fetch "^3.0.0" - minipass-json-stream "^1.0.1" - minizlib "^2.1.2" - npm-package-arg "^10.0.0" - proc-log "^3.0.0" - -npm-run-path@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - -npmlog@^6.0.0: - version "6.0.2" - resolved "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz" - integrity sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg== - dependencies: - are-we-there-yet "^3.0.0" - console-control-strings "^1.1.0" - gauge "^4.0.3" - set-blocking "^2.0.0" - -nth-check@^2.0.1: - version "2.1.1" - resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz" - integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== - dependencies: - boolbase "^1.0.0" - -nx@16.2.2: - version "16.2.2" - resolved "https://registry.yarnpkg.com/nx/-/nx-16.2.2.tgz#8792e4dcc6522daf7bccc52e6ffd65d7162264a6" - integrity sha512-gOcpqs6wf8YdFIq6P0IlMxBGr2c27pM55zpqO7epSlN6NqW6SOFKnZa+6z4NV9qmifMqzWPx2VF0BY54ARuqYg== - dependencies: - "@nrwl/tao" "16.2.2" - "@parcel/watcher" "2.0.4" - "@yarnpkg/lockfile" "^1.1.0" - "@yarnpkg/parsers" "^3.0.0-rc.18" - "@zkochan/js-yaml" "0.0.6" - axios "^1.0.0" - chalk "^4.1.0" - cli-cursor "3.1.0" - cli-spinners "2.6.1" - cliui "^7.0.2" - dotenv "~10.0.0" - enquirer "~2.3.6" - fast-glob "3.2.7" - figures "3.2.0" - flat "^5.0.2" - fs-extra "^11.1.0" - glob "7.1.4" - ignore "^5.0.4" - js-yaml "4.1.0" - jsonc-parser "3.2.0" - lines-and-columns "~2.0.3" - minimatch "3.0.5" - npm-run-path "^4.0.1" - open "^8.4.0" - semver "7.3.4" - string-width "^4.2.3" - strong-log-transformer "^2.1.0" - tar-stream "~2.2.0" - tmp "~0.2.1" - tsconfig-paths "^4.1.2" - tslib "^2.3.0" - v8-compile-cache "2.3.0" - yargs "^17.6.2" - yargs-parser "21.1.1" - optionalDependencies: - "@nx/nx-darwin-arm64" "16.2.2" - "@nx/nx-darwin-x64" "16.2.2" - "@nx/nx-linux-arm-gnueabihf" "16.2.2" - "@nx/nx-linux-arm64-gnu" "16.2.2" - "@nx/nx-linux-arm64-musl" "16.2.2" - "@nx/nx-linux-x64-gnu" "16.2.2" - "@nx/nx-linux-x64-musl" "16.2.2" - "@nx/nx-win32-arm64-msvc" "16.2.2" - "@nx/nx-win32-x64-msvc" "16.2.2" - -object-assign@^4: - version "4.1.1" - resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" - integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg== - -object-inspect@^1.9.0: - version "1.12.2" - resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz" - integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== - -object-is@^1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object.assign@^4.1.4: - version "4.1.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" - integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.4" - has-symbols "^1.0.3" - object-keys "^1.1.1" - -obuf@^1.0.0, obuf@^1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz" - integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== - -on-finished@2.4.1: - version "2.4.1" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" - integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== - dependencies: - ee-first "1.1.1" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz" - integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== - dependencies: - ee-first "1.1.1" - -on-headers@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" - integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== - -once@^1.3.0, once@^1.4.0: - version "1.4.0" - resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" - integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w== - dependencies: - wrappy "1" - -onetime@^5.1.0, onetime@^5.1.2: - version "5.1.2" - resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - -open@8.4.2, open@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" - integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -open@^8.0.9: - version "8.4.1" - resolved "https://registry.npmjs.org/open/-/open-8.4.1.tgz" - integrity sha512-/4b7qZNhv6Uhd7jjnREh1NjnPxlTq+XNWPG88Ydkj5AILcA5m3ajvcg57pB24EQjKv0dK62XnDqk9c/hkIG5Kg== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - -optionator@^0.9.1: - version "0.9.1" - resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" - integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== - dependencies: - deep-is "^0.1.3" - fast-levenshtein "^2.0.6" - levn "^0.4.1" - prelude-ls "^1.2.1" - type-check "^0.4.0" - word-wrap "^1.2.3" - -ora@5.4.1, ora@^5.4.1: - version "5.4.1" - resolved "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz" - integrity sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ== - dependencies: - bl "^4.1.0" - chalk "^4.1.0" - cli-cursor "^3.1.0" - cli-spinners "^2.5.0" - is-interactive "^1.0.0" - is-unicode-supported "^0.1.0" - log-symbols "^4.1.0" - strip-ansi "^6.0.0" - wcwidth "^1.0.1" - -os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" - integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== - -p-limit@^2.2.0: - version "2.3.0" - resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" - integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== - dependencies: - p-try "^2.0.0" - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" - integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== - dependencies: - p-limit "^2.2.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-map@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" - integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== - dependencies: - aggregate-error "^3.0.0" - -p-retry@^4.5.0: - version "4.6.2" - resolved "https://registry.npmjs.org/p-retry/-/p-retry-4.6.2.tgz" - integrity sha512-312Id396EbJdvRONlngUx0NydfrIQ5lsYu0znKVUzVvArzEIt08V1qhtyESbGVd1FGX7UKtiFp5uwKZdM8wIuQ== - dependencies: - "@types/retry" "0.12.0" - retry "^0.13.1" - -p-try@^2.0.0: - version "2.2.0" - resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" - integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== - -pacote@15.1.3: - version "15.1.3" - resolved "https://registry.yarnpkg.com/pacote/-/pacote-15.1.3.tgz#4c0e7fb5e7ab3b27fb3f86514b451ad4c4f64e9d" - integrity sha512-aRts8cZqxiJVDitmAh+3z+FxuO3tLNWEmwDRPEpDDiZJaRz06clP4XX112ynMT5uF0QNoMPajBBHnaStUEPJXA== - dependencies: - "@npmcli/git" "^4.0.0" - "@npmcli/installed-package-contents" "^2.0.1" - "@npmcli/promise-spawn" "^6.0.1" - "@npmcli/run-script" "^6.0.0" - cacache "^17.0.0" - fs-minipass "^3.0.0" - minipass "^5.0.0" - npm-package-arg "^10.0.0" - npm-packlist "^7.0.0" - npm-pick-manifest "^8.0.0" - npm-registry-fetch "^14.0.0" - proc-log "^3.0.0" - promise-retry "^2.0.1" - read-package-json "^6.0.0" - read-package-json-fast "^3.0.0" - sigstore "^1.3.0" - ssri "^10.0.0" - tar "^6.1.11" - -pako@^1.0.3: - version "1.0.11" - resolved "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz" - integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== - -parent-module@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" - integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== - dependencies: - callsites "^3.0.0" - -parse-json@^5.0.0: - version "5.2.0" - resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" - integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== - dependencies: - "@babel/code-frame" "^7.0.0" - error-ex "^1.3.1" - json-parse-even-better-errors "^2.3.0" - lines-and-columns "^1.1.6" - -parse-node-version@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz" - integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== - -parse5-html-rewriting-stream@7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/parse5-html-rewriting-stream/-/parse5-html-rewriting-stream-7.0.0.tgz" - integrity sha512-mazCyGWkmCRWDI15Zp+UiCqMp/0dgEmkZRvhlsqqKYr4SsVm/TvnSpD9fCvqCA2zoWJcfRym846ejWBBHRiYEg== - dependencies: - entities "^4.3.0" - parse5 "^7.0.0" - parse5-sax-parser "^7.0.0" - -parse5-htmlparser2-tree-adapter@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-6.0.1.tgz" - integrity sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA== - dependencies: - parse5 "^6.0.1" - -parse5-sax-parser@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz" - integrity sha512-5A+v2SNsq8T6/mG3ahcz8ZtQ0OUFTatxPbeidoMB7tkJSGDY3tdfl4MHovtLQHkEn5CGxijNWRQHhRQ6IRpXKg== - dependencies: - parse5 "^7.0.0" - -parse5@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" - integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== - -parse5@^7.0.0: - version "7.1.2" - resolved "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz" - integrity sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw== - dependencies: - entities "^4.4.0" - -parseurl@~1.3.2, parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" - integrity sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg== - -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.7: - version "1.0.7" - resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" - integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== - -path-scurry@^1.7.0: - version "1.9.2" - resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.9.2.tgz#90f9d296ac5e37e608028e28a447b11d385b3f63" - integrity sha512-qSDLy2aGFPm8i4rsbHd4MNyTcrzHFsLQykrtbuGRknZZCBBVXSv2tSCDN2Cg6Rt/GFRw8GoW9y9Ecw5rIPG1sg== - dependencies: - lru-cache "^9.1.1" - minipass "^5.0.0 || ^6.0.2" - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" - integrity sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ== - -path-type@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" - integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== - -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - -picomatch@2.3.1, picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.3.1: - version "2.3.1" - resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" - integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== - -pify@^4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz" - integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== - -piscina@3.2.0: - version "3.2.0" - resolved "https://registry.npmjs.org/piscina/-/piscina-3.2.0.tgz" - integrity sha512-yn/jMdHRw+q2ZJhFhyqsmANcbF6V2QwmD84c6xRau+QpQOmtrBCoRGdvTfeuFDYXB5W2m6MfLkjkvQa9lUSmIA== - dependencies: - eventemitter-asyncresource "^1.0.0" - hdr-histogram-js "^2.0.1" - hdr-histogram-percentiles-obj "^3.0.0" - optionalDependencies: - nice-napi "^1.0.2" - -pkg-dir@^4.1.0: - version "4.2.0" - resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" - integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== - dependencies: - find-up "^4.0.0" - -postcss-loader@7.2.4: - version "7.2.4" - resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-7.2.4.tgz#2884f4ca172de633b2cf1f93dc852968f0632ba9" - integrity sha512-F88rpxxNspo5hatIc+orYwZDtHFaVFOSIVAx+fBfJC1GmhWbVmPWtmg2gXKE1OxJbneOSGn8PWdIwsZFcruS+w== - dependencies: - cosmiconfig "^8.1.3" - cosmiconfig-typescript-loader "^4.3.0" - klona "^2.0.6" - semver "^7.3.8" - -postcss-modules-extract-imports@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" - integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== - -postcss-modules-local-by-default@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz" - integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== - dependencies: - icss-utils "^5.0.0" - postcss-selector-parser "^6.0.2" - postcss-value-parser "^4.1.0" - -postcss-modules-scope@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz" - integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== - dependencies: - postcss-selector-parser "^6.0.4" - -postcss-modules-values@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz" - integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== - dependencies: - icss-utils "^5.0.0" - -postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: - version "6.0.11" - resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.11.tgz" - integrity sha512-zbARubNdogI9j7WY4nQJBiNqQf3sLS3wCP4WfOidu+p28LofJqDH1tcXypGrcmMHhDk2t9wGhCsYe/+szLTy1g== - dependencies: - cssesc "^3.0.0" - util-deprecate "^1.0.2" - -postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" - integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== - -postcss@8.4.23: - version "8.4.23" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.23.tgz#df0aee9ac7c5e53e1075c24a3613496f9e6552ab" - integrity sha512-bQ3qMcpF6A/YjR55xtoTr0jGOlnPOKAIMdOWiv0EIT6HVPEaJiJB4NLljSbiHoC2RX7DN5Uvjtpbg1NPdwv1oA== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^8.2.14, postcss@^8.3.7: - version "8.4.19" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.19.tgz" - integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^8.4.19: - version "8.4.21" - resolved "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz" - integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== - dependencies: - nanoid "^3.3.4" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -postcss@^8.4.23: - version "8.4.24" - resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.24.tgz#f714dba9b2284be3cc07dbd2fc57ee4dc972d2df" - integrity sha512-M0RzbcI0sO/XJNucsGjvWU9ERWxb/ytp1w6dKtxTKgixdtQDq4rmx/g8W1hnaheq9jgwL/oyEdH5Bc4WwJKMqg== - dependencies: - nanoid "^3.3.6" - picocolors "^1.0.0" - source-map-js "^1.0.2" - -prelude-ls@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" - integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== - -pretty-bytes@^5.3.0: - version "5.6.0" - resolved "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.6.0.tgz" - integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== - -proc-log@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/proc-log/-/proc-log-3.0.0.tgz" - integrity sha512-++Vn7NS4Xf9NacaU9Xq3URUuqZETPsf8L4j5/ckhaRYsfPeRyzGw+iDjFhV/Jr3uNmTvvddEJFWh5R1gRgUH8A== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -promise-inflight@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" - integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== - -promise-retry@^2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz" - integrity sha512-y+WKFlBR8BGXnsNlIHFGPZmyDf3DFMoLhaflAnyZgV6rG6xu+JwesTo2Q9R6XwYmtmwAFCkAk3e35jEdoeh/3g== - dependencies: - err-code "^2.0.2" - retry "^0.12.0" - -proxy-addr@~2.0.7: - version "2.0.7" - resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" - integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== - dependencies: - forwarded "0.2.0" - ipaddr.js "1.9.1" - -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz" - integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== - -punycode@^2.1.0: - version "2.1.1" - resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qjobs@^1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz" - integrity sha512-8YOJEHtxpySA3fFDyCRxA+UUV+fA+rTWnuWvylOK/NCjhY+b4ocCtmu8TtsWb+mYeU+GCHf/S66KZF/AsteKHg== - -qs@6.11.0: - version "6.11.0" - resolved "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz" - integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== - dependencies: - side-channel "^1.0.4" - -queue-microtask@^1.2.2: - version "1.2.3" - resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" - integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== - -randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -range-parser@^1.2.1, range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.5.1: - version "2.5.1" - resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" - integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== - dependencies: - bytes "3.1.2" - http-errors "2.0.0" - iconv-lite "0.4.24" - unpipe "1.0.0" - -read-package-json-fast@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/read-package-json-fast/-/read-package-json-fast-3.0.1.tgz" - integrity sha512-8+HW7Yo+cjfF+md8DqsZHgats2mxf7gGYow/+2JjxrftoHFZz9v4dzd0EubzYbkNaLxrTVcnllHwklXN2+7aTQ== - dependencies: - json-parse-even-better-errors "^3.0.0" - npm-normalize-package-bin "^3.0.0" - -read-package-json@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/read-package-json/-/read-package-json-6.0.0.tgz" - integrity sha512-b/9jxWJ8EwogJPpv99ma+QwtqB7FSl3+V6UXS7Aaay8/5VwMY50oIFooY1UKXMWpfNCM6T/PoGqa5GD1g9xf9w== - dependencies: - glob "^8.0.1" - json-parse-even-better-errors "^3.0.0" - normalize-package-data "^5.0.0" - npm-normalize-package-bin "^3.0.0" - -readable-stream@^2.0.1: - version "2.3.8" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz" - integrity sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@^3.1.1: - version "3.6.2" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.2.tgz#56a9b36ea965c00c5a93ef31eb111a0f11056967" - integrity sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readdirp@~3.6.0: - version "3.6.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" - integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== - dependencies: - picomatch "^2.2.1" - -reflect-metadata@^0.1.2: - version "0.1.13" - resolved "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz" - integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg== - -regenerate-unicode-properties@^10.1.0: - version "10.1.0" - resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz" - integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== - dependencies: - regenerate "^1.4.2" - -regenerate@^1.4.2: - version "1.4.2" - resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.13.11: - version "0.13.11" - resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.11.tgz" - integrity sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg== - -regenerator-transform@^0.15.1: - version "0.15.1" - resolved "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.1.tgz" - integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== - dependencies: - "@babel/runtime" "^7.8.4" - -regex-parser@^2.2.11: - version "2.2.11" - resolved "https://registry.npmjs.org/regex-parser/-/regex-parser-2.2.11.tgz" - integrity sha512-jbD/FT0+9MBU2XAZluI7w2OBs1RBi6p9M83nkoZayQXXU9e8Robt69FcZc7wU4eJD/YFTjn1JdCk3rbMJajz8Q== - -regexp.prototype.flags@^1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz#fe7ce25e7e4cca8db37b6634c8a2c7009199b9cb" - integrity sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.2.0" - functions-have-names "^1.2.3" - -regexpu-core@^5.2.1: - version "5.2.2" - resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.2.2.tgz" - integrity sha512-T0+1Zp2wjF/juXMrMxHxidqGYn8U4R+zleSJhX9tQ1PUsS8a9UtYfbsF9LdiVgNX3kiX8RNaKM42nfSgvFJjmw== - dependencies: - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsgen "^0.7.1" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -regexpu-core@^5.3.1: - version "5.3.2" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" - integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== - dependencies: - "@babel/regjsgen" "^0.8.0" - regenerate "^1.4.2" - regenerate-unicode-properties "^10.1.0" - regjsparser "^0.9.1" - unicode-match-property-ecmascript "^2.0.0" - unicode-match-property-value-ecmascript "^2.1.0" - -regjsgen@^0.7.1: - version "0.7.1" - resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.7.1.tgz" - integrity sha512-RAt+8H2ZEzHeYWxZ3H2z6tF18zyyOnlcdaafLrm21Bguj7uZy6ULibiAFdXEtKQY4Sy7wDTwDiOazasMLc4KPA== - -regjsparser@^0.9.1: - version "0.9.1" - resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz" - integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== - dependencies: - jsesc "~0.5.0" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" - integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== - -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -requires-port@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" - integrity sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ== - -resolve-from@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" - integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== - -resolve-from@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz" - integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== - -resolve-url-loader@5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/resolve-url-loader/-/resolve-url-loader-5.0.0.tgz" - integrity sha512-uZtduh8/8srhBoMx//5bwqjQ+rfYOUq8zC9NrMUGtjBiGTtFJM42s58/36+hTqeqINcnYe08Nj3LkK9lW4N8Xg== - dependencies: - adjust-sourcemap-loader "^4.0.0" - convert-source-map "^1.7.0" - loader-utils "^2.0.0" - postcss "^8.2.14" - source-map "0.6.1" - -resolve@1.22.2: - version "1.22.2" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.2.tgz#0ed0943d4e301867955766c9f3e1ae6d01c6845f" - integrity sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g== - dependencies: - is-core-module "^2.11.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -resolve@^1.14.2: - version "1.22.1" - resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz" - integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== - dependencies: - is-core-module "^2.9.0" - path-parse "^1.0.7" - supports-preserve-symlinks-flag "^1.0.0" - -restore-cursor@^3.1.0: - version "3.1.0" - resolved "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz" - integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== - dependencies: - onetime "^5.1.0" - signal-exit "^3.0.2" - -retry@^0.12.0: - version "0.12.0" - resolved "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz" - integrity sha512-9LkiTwjUh6rT555DtE9rTX+BKByPfrMzEAtnlEtdEwr3Nkffwiihqe2bWADg+OQRjt9gl6ICdmB/ZFDCGAtSow== - -retry@^0.13.1: - version "0.13.1" - resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" - integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== - -reusify@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" - integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== - -rfdc@^1.3.0: - version "1.3.0" - resolved "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz" - integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== - -rimraf@^3.0.0, rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== - dependencies: - glob "^7.1.3" - -rollup@^3.21.0: - version "3.25.0" - resolved "https://registry.yarnpkg.com/rollup/-/rollup-3.25.0.tgz#71327d396a9decbf23c87b55916ae7204211738a" - integrity sha512-FnJkNRst2jEZGw7f+v4hFo6UTzpDKrAKcHZWcEfm5/GJQ5CK7wgb4moNLNAe7npKUev7yQn1AY/YbZRIxOv6Qg== - optionalDependencies: - fsevents "~2.3.2" - -run-async@^2.4.0: - version "2.4.1" - resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz" - integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== - -run-parallel@^1.1.9: - version "1.2.0" - resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" - integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== - dependencies: - queue-microtask "^1.2.2" - -rxjs@7.8.1, rxjs@^7.8.0: - version "7.8.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.8.1.tgz#6f6f3d99ea8044291efd92e7c7fcf562c4057543" - integrity sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg== - dependencies: - tslib "^2.1.0" - -rxjs@^7.5.5: - version "7.6.0" - resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.6.0.tgz" - integrity sha512-DDa7d8TFNUalGC9VqXvQ1euWNN7sc63TrUCuM9J998+ViviahMIjKSOU7rfcgFOF+FCD71BhDRv4hrFz+ImDLQ== - dependencies: - tslib "^2.1.0" - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.1.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0": - version "2.1.2" - resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -sass-loader@13.2.2: - version "13.2.2" - resolved "https://registry.yarnpkg.com/sass-loader/-/sass-loader-13.2.2.tgz#f97e803993b24012c10d7ba9676548bf7a6b18b9" - integrity sha512-nrIdVAAte3B9icfBiGWvmMhT/D+eCDwnk+yA7VE/76dp/WkHX+i44Q/pfo71NYbwj0Ap+PGsn0ekOuU1WFJ2AA== - dependencies: - klona "^2.0.6" - neo-async "^2.6.2" - -sass@1.62.1: - version "1.62.1" - resolved "https://registry.yarnpkg.com/sass/-/sass-1.62.1.tgz#caa8d6bf098935bc92fc73fa169fb3790cacd029" - integrity sha512-NHpxIzN29MXvWiuswfc1W3I0N8SXBd8UR26WntmDlRYf0bSADnwnOjsyMZ3lMezSlArD33Vs3YFhp7dWvL770A== - dependencies: - chokidar ">=3.0.0 <4.0.0" - immutable "^4.0.0" - source-map-js ">=0.6.2 <2.0.0" - -sax@^1.2.4: - version "1.2.4" - resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" - integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== - -schema-utils@^3.1.1: - version "3.1.1" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" - integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^3.1.2: - version "3.2.0" - resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.2.0.tgz#7dff4881064a4f22c09f0c6a1457feb820fd0636" - integrity sha512-0zTyLGyDJYd/MBxG1AhJkKa6fpEBds4OQO2ut0w7OYG+ZGhGea09lijvzsqegYSik88zc7cUtIlnnO+/BvD6gQ== - dependencies: - "@types/json-schema" "^7.0.8" - ajv "^6.12.5" - ajv-keywords "^3.5.2" - -schema-utils@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" - integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== - dependencies: - "@types/json-schema" "^7.0.9" - ajv "^8.8.0" - ajv-formats "^2.1.1" - ajv-keywords "^5.0.0" - -select-hose@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz" - integrity sha512-mEugaLK+YfkijB4fx0e6kImuJdCIt2LxCRcbEYPqRGCs4F2ogyfZU5IAZRdjCP8JPq2AtdNoC/Dux63d9Kiryg== - -selfsigned@^2.1.1: - version "2.1.1" - resolved "https://registry.npmjs.org/selfsigned/-/selfsigned-2.1.1.tgz" - integrity sha512-GSL3aowiF7wa/WtSFwnUrludWFoNhftq8bUkH9pkzjpN2XSPOAYEgg6e0sS9s0rZwgJzJiQRPU18A6clnoW5wQ== - dependencies: - node-forge "^1" - -semver@7.3.4: - version "7.3.4" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97" - integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw== - dependencies: - lru-cache "^6.0.0" - -semver@7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.4.0.tgz#8481c92feffc531ab1e012a8ffc15bdd3a0f4318" - integrity sha512-RgOxM8Mw+7Zus0+zcLEUn8+JfoLpj/huFTItQy2hsM4khuC1HYRDp0cU482Ewn/Fcy6bCjufD8vAj7voC66KQw== - dependencies: - lru-cache "^6.0.0" - -semver@^5.6.0: - version "5.7.1" - resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.3.0: - version "6.3.0" - resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.0.0, semver@^7.1.1, semver@^7.3.5, semver@^7.3.8: - version "7.3.8" - resolved "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz" - integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A== - dependencies: - lru-cache "^6.0.0" - -semver@^7.3.7: - version "7.5.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.1.tgz#c90c4d631cf74720e46b21c1d37ea07edfab91ec" - integrity sha512-Wvss5ivl8TMRZXXESstBA4uR5iXgEN/VC5/sOcuXdVLzcdkz4HWetIoRfG5gb5X+ij/G9rw9YoGn3QoQ8OCSpw== - dependencies: - lru-cache "^6.0.0" - -send@0.18.0: - version "0.18.0" - resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" - integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== - dependencies: - debug "2.6.9" - depd "2.0.0" - destroy "1.2.0" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "2.0.0" - mime "1.6.0" - ms "2.1.3" - on-finished "2.4.1" - range-parser "~1.2.1" - statuses "2.0.1" - -serialize-javascript@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" - integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== - dependencies: - randombytes "^2.1.0" - -serialize-javascript@^6.0.1: - version "6.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.1.tgz#b206efb27c3da0b0ab6b52f48d170b7996458e5c" - integrity sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w== - dependencies: - randombytes "^2.1.0" - -serve-index@^1.9.1: - version "1.9.1" - resolved "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz" - integrity sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw== - dependencies: - accepts "~1.3.4" - batch "0.6.1" - debug "2.6.9" - escape-html "~1.0.3" - http-errors "~1.6.2" - mime-types "~2.1.17" - parseurl "~1.3.2" - -serve-static@1.15.0: - version "1.15.0" - resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" - integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.18.0" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" - integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== - -setprototypeof@1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" - integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== - -setprototypeof@1.2.0: - version "1.2.0" - resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" - integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== - -shallow-clone@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz" - integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== - dependencies: - kind-of "^6.0.2" - -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - -shell-quote@^1.7.3: - version "1.8.1" - resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.8.1.tgz#6dbf4db75515ad5bac63b4f1894c3a154c766680" - integrity sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA== - -side-channel@^1.0.4: - version "1.0.4" - resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" - integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== - dependencies: - call-bind "^1.0.0" - get-intrinsic "^1.0.2" - object-inspect "^1.9.0" - -signal-exit@^3.0.2, signal-exit@^3.0.3, signal-exit@^3.0.7: - version "3.0.7" - resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz" - integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== - -signal-exit@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967" - integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q== - -sigstore@^1.3.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/sigstore/-/sigstore-1.6.0.tgz#887a4007c6ee83f3ef3fd844be1a0840e849c301" - integrity sha512-QODKff/qW/TXOZI6V/Clqu74xnInAS6it05mufj4/fSewexLtfEntgLZZcBtUK44CDQyUE5TUXYy1ARYzlfG9g== - dependencies: - "@sigstore/protobuf-specs" "^0.1.0" - "@sigstore/tuf" "^1.0.0" - make-fetch-happen "^11.0.1" - tuf-js "^1.1.3" - -slash@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" - integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== - -slash@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz" - integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== - -smart-buffer@^4.2.0: - version "4.2.0" - resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz" - integrity sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg== - -socket.io-adapter@~2.4.0: - version "2.4.0" - resolved "https://registry.npmjs.org/socket.io-adapter/-/socket.io-adapter-2.4.0.tgz" - integrity sha512-W4N+o69rkMEGVuk2D/cvca3uYsvGlMwsySWV447y99gUPghxq42BxqLNMndb+a1mm/5/7NeXVQS7RLa2XyXvYg== - -socket.io-parser@~4.2.1: - version "4.2.1" - resolved "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.2.1.tgz" - integrity sha512-V4GrkLy+HeF1F/en3SpUaM+7XxYXpuMUWLGde1kSSh5nQMN4hLrbPIkD+otwh6q9R6NOQBN4AMaOZ2zVjui82g== - dependencies: - "@socket.io/component-emitter" "~3.1.0" - debug "~4.3.1" - -socket.io@^4.4.1: - version "4.5.4" - resolved "https://registry.npmjs.org/socket.io/-/socket.io-4.5.4.tgz" - integrity sha512-m3GC94iK9MfIEeIBfbhJs5BqFibMtkRk8ZpKwG2QwxV0m/eEhPIV4ara6XCF1LWNAus7z58RodiZlAH71U3EhQ== - dependencies: - accepts "~1.3.4" - base64id "~2.0.0" - debug "~4.3.2" - engine.io "~6.2.1" - socket.io-adapter "~2.4.0" - socket.io-parser "~4.2.1" - -sockjs@^0.3.24: - version "0.3.24" - resolved "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz" - integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== - dependencies: - faye-websocket "^0.11.3" - uuid "^8.3.2" - websocket-driver "^0.7.4" - -socks-proxy-agent@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz" - integrity sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww== - dependencies: - agent-base "^6.0.2" - debug "^4.3.3" - socks "^2.6.2" - -socks@^2.6.2: - version "2.7.1" - resolved "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz" - integrity sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ== - dependencies: - ip "^2.0.0" - smart-buffer "^4.2.0" - -"source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.2: - version "1.0.2" - resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" - integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== - -source-map-loader@4.0.1: - version "4.0.1" - resolved "https://registry.npmjs.org/source-map-loader/-/source-map-loader-4.0.1.tgz" - integrity sha512-oqXpzDIByKONVY8g1NUPOTQhe0UTU5bWUl32GSkqK2LjJj0HmwTMVKxcUip0RgAYhY1mqgOxjbQM48a0mmeNfA== - dependencies: - abab "^2.0.6" - iconv-lite "^0.6.3" - source-map-js "^1.0.2" - -source-map-support@0.5.21, source-map-support@^0.5.5, source-map-support@~0.5.20: - version "0.5.21" - resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" - integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0: - version "0.6.1" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -source-map@0.7.4: - version "0.7.4" - resolved "https://registry.npmjs.org/source-map/-/source-map-0.7.4.tgz" - integrity sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.12" - resolved "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz" - integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== - -spdy-transport@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz" - integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== - dependencies: - debug "^4.1.0" - detect-node "^2.0.4" - hpack.js "^2.1.6" - obuf "^1.1.2" - readable-stream "^3.0.6" - wbuf "^1.7.3" - -spdy@^4.0.2: - version "4.0.2" - resolved "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz" - integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== - dependencies: - debug "^4.1.0" - handle-thing "^2.0.0" - http-deceiver "^1.2.7" - select-hose "^2.0.0" - spdy-transport "^3.0.0" - -sprintf-js@~1.0.2: - version "1.0.3" - resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" - integrity sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g== - -ssri@^10.0.0: - version "10.0.1" - resolved "https://registry.npmjs.org/ssri/-/ssri-10.0.1.tgz" - integrity sha512-WVy6di9DlPOeBWEjMScpNipeSX2jIZBGEn5Uuo8Q7aIuFEuDX0pw8RxcOjlD1TWP4obi24ki7m/13+nFpcbXrw== - dependencies: - minipass "^4.0.0" - -ssri@^9.0.0: - version "9.0.1" - resolved "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz" - integrity sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q== - dependencies: - minipass "^3.1.1" - -statuses@2.0.1: - version "2.0.1" - resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" - integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== - -"statuses@>= 1.4.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" - integrity sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA== - -stop-iteration-iterator@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/stop-iteration-iterator/-/stop-iteration-iterator-1.0.0.tgz#6a60be0b4ee757d1ed5254858ec66b10c49285e4" - integrity sha512-iCGQj+0l0HOdZ2AEeBADlsRC+vsnDsZsbdSiH1yNSjcfKM7fdpCMfqAL/dwF5BLiw/XhRft/Wax6zQbhq2BcjQ== - dependencies: - internal-slot "^1.0.4" - -streamroller@^3.1.3: - version "3.1.3" - resolved "https://registry.npmjs.org/streamroller/-/streamroller-3.1.3.tgz" - integrity sha512-CphIJyFx2SALGHeINanjFRKQ4l7x2c+rXYJ4BMq0gd+ZK0gi4VT8b+eHe2wi58x4UayBAKx4xtHpXT/ea1cz8w== - dependencies: - date-format "^4.0.14" - debug "^4.3.4" - fs-extra "^8.1.0" - -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: - version "4.2.3" - resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^5.0.1, string-width@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-5.1.2.tgz#14f8daec6d81e7221d2a357e668cab73bdbca794" - integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== - dependencies: - eastasianwidth "^0.2.0" - emoji-regex "^9.2.2" - strip-ansi "^7.0.1" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^6.0.0, strip-ansi@^6.0.1: - version "6.0.1" - resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@^7.0.1: - version "7.1.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45" - integrity sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ== - dependencies: - ansi-regex "^6.0.1" - -strip-bom@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" - integrity sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA== - -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -strong-log-transformer@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/strong-log-transformer/-/strong-log-transformer-2.1.0.tgz#0f5ed78d325e0421ac6f90f7f10e691d6ae3ae10" - integrity sha512-B3Hgul+z0L9a236FAUC9iZsL+nVHgoCJnqCbN588DjYxvGXaXaaFbfmQ/JhvKjZwsOukuR72XbHv71Qkug0HxA== - dependencies: - duplexer "^0.1.1" - minimist "^1.2.0" - through "^2.3.4" - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -supports-color@^8.0.0: - version "8.1.1" - resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-preserve-symlinks-flag@^1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" - integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== - -symbol-observable@4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-4.0.0.tgz" - integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== - -tapable@^2.1.1, tapable@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" - integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== - -tar-stream@~2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - -tar@^6.1.11, tar@^6.1.2: - version "6.1.13" - resolved "https://registry.npmjs.org/tar/-/tar-6.1.13.tgz" - integrity sha512-jdIBIN6LTIe2jqzay/2vtYLlBHa3JF42ot3h1dW8Q0PaAG4v8rm0cvpVePtau5C6OKXGGcgO9q2AMNSWxiLqKw== - dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^4.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -terser-webpack-plugin@^5.3.7: - version "5.3.9" - resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz#832536999c51b46d468067f9e37662a3b96adfe1" - integrity sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA== - dependencies: - "@jridgewell/trace-mapping" "^0.3.17" - jest-worker "^27.4.5" - schema-utils "^3.1.1" - serialize-javascript "^6.0.1" - terser "^5.16.8" - -terser@5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.1.tgz#948f10830454761e2eeedc6debe45c532c83fd69" - integrity sha512-hVl35zClmpisy6oaoKALOpS0rDYLxRFLHhRuDlEGTKey9qHjS1w9GMORjuwIMt70Wan4lwsLYyWDVnWgF+KUEw== - dependencies: - "@jridgewell/source-map" "^0.3.2" - acorn "^8.5.0" - commander "^2.20.0" - source-map-support "~0.5.20" - -terser@^5.16.8: - version "5.17.7" - resolved "https://registry.yarnpkg.com/terser/-/terser-5.17.7.tgz#2a8b134826fe179b711969fd9d9a0c2479b2a8c3" - integrity sha512-/bi0Zm2C6VAexlGgLlVxA0P2lru/sdLyfCVaRMfKVo9nWxbmz7f/sD8VPybPeSUJaJcwmCJis9pBIhcVcG1QcQ== - dependencies: - "@jridgewell/source-map" "^0.3.3" - acorn "^8.8.2" - commander "^2.20.0" - source-map-support "~0.5.20" - -test-exclude@^6.0.0: - version "6.0.0" - resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz" - integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== - dependencies: - "@istanbuljs/schema" "^0.1.2" - glob "^7.1.4" - minimatch "^3.0.4" - -text-table@0.2.0, text-table@^0.2.0: - version "0.2.0" - resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" - integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== - -through@^2.3.4, through@^2.3.6: - version "2.3.8" - resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" - integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== - -thunky@^1.0.2: - version "1.1.0" - resolved "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz" - integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== - -tmp@0.2.1, tmp@^0.2.1, tmp@~0.2.1: - version "0.2.1" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz" - integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== - dependencies: - rimraf "^3.0.0" - -tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -toidentifier@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" - integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== - -tree-kill@1.2.2: - version "1.2.2" - resolved "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz" - integrity sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A== - -tsconfig-paths@^4.1.2: - version "4.2.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-4.2.0.tgz#ef78e19039133446d244beac0fd6a1632e2d107c" - integrity sha512-NoZ4roiN7LnbKn9QqE1amc9DJfzvZXxF4xDavcOWt1BPkdx+m+0gJuPM+S0vCe7zTJMYUP0R8pO2XMr+Y8oLIg== - dependencies: - json5 "^2.2.2" - minimist "^1.2.6" - strip-bom "^3.0.0" - -tslib@2.5.0: - version "2.5.0" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.5.0.tgz" - integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== - -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - -tslib@^2.1.0, tslib@^2.3.0: - version "2.4.1" - resolved "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz" - integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== - -tslib@^2.4.0, tslib@^2.5.3: - version "2.5.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913" - integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w== - -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - -tuf-js@^1.1.3: - version "1.1.6" - resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.6.tgz#ad3e7a20237b83b51c2a8f9d1ddf093279a10fc2" - integrity sha512-CXwFVIsXGbVY4vFiWF7TJKWmlKJAT8TWkH4RmiohJRcDJInix++F0dznDmoVbtJNzZ8yLprKUG4YrDIhv3nBMg== - dependencies: - "@tufjs/models" "1.0.4" - debug "^4.3.4" - make-fetch-happen "^11.1.0" - -type-check@^0.4.0, type-check@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" - integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== - dependencies: - prelude-ls "^1.2.1" - -type-fest@^0.20.2: - version "0.20.2" - resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" - integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== - -type-fest@^0.21.3: - version "0.21.3" - resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz" - integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== - -type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -typed-assert@^1.0.8: - version "1.0.9" - resolved "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz" - integrity sha512-KNNZtayBCtmnNmbo5mG47p1XsCyrx6iVqomjcZnec/1Y5GGARaxPs6r49RnSPeUP3YjNYiU9sQHAtY4BBvnZwg== - -typescript@~5.0.0: - version "5.0.4" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" - integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== - -ua-parser-js@^0.7.30: - version "0.7.32" - resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.32.tgz" - integrity sha512-f9BESNVhzlhEFf2CHMSj40NWOjYPl1YKYbrvIr/hFTDEmLq7SRbWvm7FcdcpCYT95zrOhC7gZSxjdnnTpBcwVw== - -unicode-canonical-property-names-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" - integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== - -unicode-match-property-ecmascript@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz" - integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== - dependencies: - unicode-canonical-property-names-ecmascript "^2.0.0" - unicode-property-aliases-ecmascript "^2.0.0" - -unicode-match-property-value-ecmascript@^2.1.0: - version "2.1.0" - resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz" - integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== - -unicode-property-aliases-ecmascript@^2.0.0: - version "2.1.0" - resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz" - integrity sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w== - -unique-filename@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz" - integrity sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A== - dependencies: - unique-slug "^3.0.0" - -unique-filename@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unique-filename/-/unique-filename-3.0.0.tgz" - integrity sha512-afXhuC55wkAmZ0P18QsVE6kp8JaxrEokN2HGIoIVv2ijHQd419H0+6EigAFcIzXeMIkcIkNBpB3L/DXB3cTS/g== - dependencies: - unique-slug "^4.0.0" - -unique-slug@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz" - integrity sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w== - dependencies: - imurmurhash "^0.1.4" - -unique-slug@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-4.0.0.tgz" - integrity sha512-WrcA6AyEfqDX5bWige/4NQfPZMtASNVxdmWR76WESYQVAACSgWcR6e9i0mofqqBxYFtL4oAxPIptY73/0YE1DQ== - dependencies: - imurmurhash "^0.1.4" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" - integrity sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ== - -update-browserslist-db@^1.0.10: - version "1.0.10" - resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz" - integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" - integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw== - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" - integrity sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA== - -uuid@^8.3.2: - version "8.3.2" - resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" - integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== - -v8-compile-cache@2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" - integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== - -validate-npm-package-license@^3.0.4: - version "3.0.4" - resolved "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -validate-npm-package-name@^5.0.0: - version "5.0.0" - resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-5.0.0.tgz" - integrity sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ== - dependencies: - builtins "^5.0.0" - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" - integrity sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg== - -vite@4.3.9: - version "4.3.9" - resolved "https://registry.yarnpkg.com/vite/-/vite-4.3.9.tgz#db896200c0b1aa13b37cdc35c9e99ee2fdd5f96d" - integrity sha512-qsTNZjO9NoJNW7KnOrgYwczm0WctJ8m/yqYAMAK9Lxt4SoySUfS5S8ia9K7JHpa3KEeMfyF8LoJ3c5NeBJy6pg== - dependencies: - esbuild "^0.17.5" - postcss "^8.4.23" - rollup "^3.21.0" - optionalDependencies: - fsevents "~2.3.2" - -void-elements@^2.0.0: - version "2.0.1" - resolved "https://registry.npmjs.org/void-elements/-/void-elements-2.0.1.tgz" - integrity sha512-qZKX4RnBzH2ugr8Lxa7x+0V6XD9Sb/ouARtiasEQCHB1EVU4NXtmHsDDrx1dO4ne5fc3J6EW05BP1Dl0z0iung== - -watchpack@^2.4.0: - version "2.4.0" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" - integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== - dependencies: - glob-to-regexp "^0.4.1" - graceful-fs "^4.1.2" - -wbuf@^1.1.0, wbuf@^1.7.3: - version "1.7.3" - resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" - integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== - dependencies: - minimalistic-assert "^1.0.0" - -wcwidth@^1.0.1: - version "1.0.1" - resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" - integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== - dependencies: - defaults "^1.0.3" - -webpack-dev-middleware@6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-6.0.2.tgz#4aab69257378e01d6fe964a8b2d07e8a87623ebc" - integrity sha512-iOddiJzPcQC6lwOIu60vscbGWth8PCRcWRCwoQcTQf9RMoOWBHg5EyzpGdtSmGMrSPd5vHEfFXmVErQEmkRngQ== - dependencies: - colorette "^2.0.10" - memfs "^3.4.12" - mime-types "^2.1.31" - range-parser "^1.2.1" - schema-utils "^4.0.0" - -webpack-dev-middleware@^5.3.1: - version "5.3.3" - resolved "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.3.tgz" - integrity sha512-hj5CYrY0bZLB+eTO+x/j67Pkrquiy7kWepMHmUMoPsmcUaeEnQJqFzHJOyxgWlq746/wUuA64p9ta34Kyb01pA== - dependencies: - colorette "^2.0.10" - memfs "^3.4.3" - mime-types "^2.1.31" - range-parser "^1.2.1" - schema-utils "^4.0.0" - -webpack-dev-server@4.13.2: - version "4.13.2" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-4.13.2.tgz#d97445481d78691efe6d9a3b230833d802fc31f9" - integrity sha512-5i6TrGBRxG4vnfDpB6qSQGfnB6skGBXNL5/542w2uRGLimX6qeE5BQMLrzIC3JYV/xlGOv+s+hTleI9AZKUQNw== - dependencies: - "@types/bonjour" "^3.5.9" - "@types/connect-history-api-fallback" "^1.3.5" - "@types/express" "^4.17.13" - "@types/serve-index" "^1.9.1" - "@types/serve-static" "^1.13.10" - "@types/sockjs" "^0.3.33" - "@types/ws" "^8.5.1" - ansi-html-community "^0.0.8" - bonjour-service "^1.0.11" - chokidar "^3.5.3" - colorette "^2.0.10" - compression "^1.7.4" - connect-history-api-fallback "^2.0.0" - default-gateway "^6.0.3" - express "^4.17.3" - graceful-fs "^4.2.6" - html-entities "^2.3.2" - http-proxy-middleware "^2.0.3" - ipaddr.js "^2.0.1" - launch-editor "^2.6.0" - open "^8.0.9" - p-retry "^4.5.0" - rimraf "^3.0.2" - schema-utils "^4.0.0" - selfsigned "^2.1.1" - serve-index "^1.9.1" - sockjs "^0.3.24" - spdy "^4.0.2" - webpack-dev-middleware "^5.3.1" - ws "^8.13.0" - -webpack-merge@5.8.0: - version "5.8.0" - resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz" - integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== - dependencies: - clone-deep "^4.0.1" - wildcard "^2.0.0" - -webpack-sources@^3.0.0, webpack-sources@^3.2.3: - version "3.2.3" - resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" - integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== - -webpack-subresource-integrity@5.1.0: - version "5.1.0" - resolved "https://registry.npmjs.org/webpack-subresource-integrity/-/webpack-subresource-integrity-5.1.0.tgz" - integrity sha512-sacXoX+xd8r4WKsy9MvH/q/vBtEHr86cpImXwyg74pFIpERKt6FmB8cXpeuh0ZLgclOlHI4Wcll7+R5L02xk9Q== - dependencies: - typed-assert "^1.0.8" - -webpack@5.80.0: - version "5.80.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.80.0.tgz#3e660b4ab572be38c5e954bdaae7e2bf76010fdc" - integrity sha512-OIMiq37XK1rWO8mH9ssfFKZsXg4n6klTEDL7S8/HqbAOBBaiy8ABvXvz0dDCXeEF9gqwxSvVk611zFPjS8hJxA== - dependencies: - "@types/eslint-scope" "^3.7.3" - "@types/estree" "^1.0.0" - "@webassemblyjs/ast" "^1.11.5" - "@webassemblyjs/wasm-edit" "^1.11.5" - "@webassemblyjs/wasm-parser" "^1.11.5" - acorn "^8.7.1" - acorn-import-assertions "^1.7.6" - browserslist "^4.14.5" - chrome-trace-event "^1.0.2" - enhanced-resolve "^5.13.0" - es-module-lexer "^1.2.1" - eslint-scope "5.1.1" - events "^3.2.0" - glob-to-regexp "^0.4.1" - graceful-fs "^4.2.9" - json-parse-even-better-errors "^2.3.1" - loader-runner "^4.2.0" - mime-types "^2.1.27" - neo-async "^2.6.2" - schema-utils "^3.1.2" - tapable "^2.1.1" - terser-webpack-plugin "^5.3.7" - watchpack "^2.4.0" - webpack-sources "^3.2.3" - -websocket-driver@>=0.5.1, websocket-driver@^0.7.4: - version "0.7.4" - resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" - integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== - dependencies: - http-parser-js ">=0.5.1" - safe-buffer ">=5.1.0" - websocket-extensions ">=0.1.1" - -websocket-extensions@>=0.1.1: - version "0.1.4" - resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" - integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-collection@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/which-collection/-/which-collection-1.0.1.tgz#70eab71ebbbd2aefaf32f917082fc62cdcb70906" - integrity sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A== - dependencies: - is-map "^2.0.1" - is-set "^2.0.1" - is-weakmap "^2.0.1" - is-weakset "^2.0.1" - -which-typed-array@^1.1.9: - version "1.1.9" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.9.tgz#307cf898025848cf995e795e8423c7f337efbde6" - integrity sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA== - dependencies: - available-typed-arrays "^1.0.5" - call-bind "^1.0.2" - for-each "^0.3.3" - gopd "^1.0.1" - has-tostringtag "^1.0.0" - is-typed-array "^1.1.10" - -which@^1.2.1: - version "1.3.1" - resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -which@^2.0.1, which@^2.0.2: - version "2.0.2" - resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -which@^3.0.0: - version "3.0.0" - resolved "https://registry.npmjs.org/which/-/which-3.0.0.tgz" - integrity sha512-nla//68K9NU6yRiwDY/Q8aU6siKlSs64aEC7+IV56QoAuyQT2ovsJcgGYGyqMOmI/CGN1BOR6mM5EN0FBO+zyQ== - dependencies: - isexe "^2.0.0" - -wide-align@^1.1.5: - version "1.1.5" - resolved "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz" - integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== - dependencies: - string-width "^1.0.2 || 2 || 3 || 4" - -wildcard@^2.0.0: - version "2.0.0" - resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz" - integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== - -word-wrap@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" - integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== - -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrap-ansi@^8.1.0: - version "8.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214" - integrity sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ== - dependencies: - ansi-styles "^6.1.0" - string-width "^5.0.1" - strip-ansi "^7.0.1" - -wrappy@1: - version "1.0.2" - resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" - integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== - -ws@^8.13.0: - version "8.13.0" - resolved "https://registry.yarnpkg.com/ws/-/ws-8.13.0.tgz#9a9fb92f93cf41512a0735c8f4dd09b8a1211cd0" - integrity sha512-x9vcZYTrFPC7aSIbj7sRCYo7L/Xb8Iy+pW0ng0wt2vCJv7M9HOMy0UoN3rr+IFC7hb7vXoqS+P9ktyLLLhO+LA== - -ws@~8.2.3: - version "8.2.3" - resolved "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz" - integrity sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== - -yargs-parser@21.1.1, yargs-parser@^21.1.1: - version "21.1.1" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz" - integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw== - -yargs-parser@^20.2.2: - version "20.2.9" - resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz" - integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== - -yargs@17.7.2, yargs@^17.6.2: - version "17.7.2" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.7.2.tgz#991df39aca675a192b816e1e0363f9d75d2aa269" - integrity sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yargs@^16.1.1: - version "16.2.0" - resolved "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^17.2.1: - version "17.6.2" - resolved "https://registry.npmjs.org/yargs/-/yargs-17.6.2.tgz" - integrity sha512-1/9UrdHjDZc0eOU0HxOHoS78C69UD3JRMvzlJ7S79S2nTaWRA/whGCTV8o9e/N/1Va9YIV7Q4sOxD8VV4pCWOw== - dependencies: - cliui "^8.0.1" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.3" - y18n "^5.0.5" - yargs-parser "^21.1.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== - -zone.js@^0.13.0: - version "0.13.0" - resolved "https://registry.yarnpkg.com/zone.js/-/zone.js-0.13.0.tgz#4c735cb8ef49312b58c0ad13451996dc2b202a6d" - integrity sha512-7m3hNNyswsdoDobCkYNAy5WiUulkMd3+fWaGT9ij6iq3Zr/IwJo4RMCYPSDjT+r7tnPErmY9sZpKhWQ8S5k6XQ== - dependencies: - tslib "^2.3.0" diff --git a/aio/content/errors/NG0100.md b/aio/content/errors/NG0100.md deleted file mode 100644 index d3d962fbf4c..00000000000 --- a/aio/content/errors/NG0100.md +++ /dev/null @@ -1,30 +0,0 @@ -@name Expression Changed After Checked -@category runtime -@videoUrl https://www.youtube.com/embed/O47uUnJjbJc -@shortDescription Expression has changed after it was checked - -@description - -Angular throws an `ExpressionChangedAfterItHasBeenCheckedError` when an expression value has been changed after change detection has completed. Angular only throws this error in development mode. - -In development mode, Angular performs an additional check after each change detection run, to ensure the bindings haven't changed. This catches errors where the view is left in an inconsistent state. This can occur, for example, if a method or getter returns a different value each time it is called, or if a child component changes values on its parent. If either of these occurs, this is a sign that change detection is not stabilized. Angular throws the error to ensure data is always reflected correctly in the view, which prevents erratic UI behavior or a possible infinite loop. - -This error commonly occurs when you've added template expressions or have begun to implement lifecycle hooks like `ngAfterViewInit` or `ngOnChanges`. It is also common when dealing with loading status and asynchronous operations, or when a child component changes its parent bindings. - -@debugging - -The [source maps](https://developer.mozilla.org/docs/Tools/Debugger/How_to/Use_a_source_map) generated by the CLI are very useful when debugging. Navigate up the call stack until you find a template expression where the value displayed in the error has changed. - -Ensure that there are no changes to the bindings in the template after change detection is run. This often means refactoring to use the correct [component lifecycle hook](guide/lifecycle-hooks) for your use case. If the issue exists within `ngAfterViewInit`, the recommended solution is to use a constructor or `ngOnInit` to set initial values, or use `ngAfterContentInit` for other value bindings. - -If you are binding to methods in the view, ensure that the invocation does not update any of the other bindings in the template. - -Read more about which solution is right for you in ['Everything you need to know about the "ExpressionChangedAfterItHasBeenCheckedError" error'](https://indepth.dev/posts/1001/everything-you-need-to-know-about-the-expressionchangedafterithasbeencheckederror-error) and why this is useful at ['Angular Debugging "Expression has changed after it was checked": Simple Explanation (and Fix)'](https://blog.angular-university.io/angular-debugging). - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG01101.md b/aio/content/errors/NG01101.md deleted file mode 100644 index b44cc1c70be..00000000000 --- a/aio/content/errors/NG01101.md +++ /dev/null @@ -1,30 +0,0 @@ -@name Wrong Async Validator Return Type -@category runtime -@shortDescription Async validator must return a Promise or Observable - -@description -Async validators must return a promise or an observable, and emit/resolve them whether the validation fails or succeeds. In particular, they must implement the [AsyncValidatorFn API](api/forms/AsyncValidator) - -```typescript -export function isTenAsync(control: AbstractControl): - Observable { - const v: number = control.value; - if (v !== 10) { - // Emit an object with a validation error. - return of({ 'notTen': true, 'requiredValue': 10 }); - } - // Emit null, to indicate no error occurred. - return of(null); - } -``` - -@debugging -Did you mistakenly use a synchronous validator instead of an async validator? - - - - - - - -@reviewed 2022-06-28 diff --git a/aio/content/errors/NG01203.md b/aio/content/errors/NG01203.md deleted file mode 100644 index 79c70e88c6e..00000000000 --- a/aio/content/errors/NG01203.md +++ /dev/null @@ -1,28 +0,0 @@ -@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. `
    `)? -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. diff --git a/aio/content/errors/NG0200.md b/aio/content/errors/NG0200.md deleted file mode 100644 index 891d7a1cc99..00000000000 --- a/aio/content/errors/NG0200.md +++ /dev/null @@ -1,21 +0,0 @@ -@name Circular Dependency in DI -@category runtime -@videoUrl https://www.youtube.com/embed/CpLOm4o_FzM -@shortDescription Circular dependency in DI detected while instantiating a provider - -@description -A cyclic dependency exists when a [dependency of a service](guide/hierarchical-dependency-injection) directly or indirectly depends on the service itself. For example, if `UserService` depends on `EmployeeService`, which also depends on `UserService`. Angular will have to instantiate `EmployeeService` to create `UserService`, which depends on `UserService`, itself. - -@debugging -Use the call stack to determine where the cyclical dependency exists. -You will be able to see if any child dependencies rely on the original file by [mapping out](guide/dependency-injection-in-action) the component, module, or service's dependencies, and identifying the loop causing the problem. - -Break this loop \(or circle\) of dependency to resolve this error. This most commonly means removing or refactoring the dependencies to not be reliant on one another. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG0201.md b/aio/content/errors/NG0201.md deleted file mode 100644 index 4a499cf46f6..00000000000 --- a/aio/content/errors/NG0201.md +++ /dev/null @@ -1,30 +0,0 @@ -@name No Provider Found -@category runtime -@videoUrl https://www.youtube.com/embed/lAlOryf1-WU -@shortDescription No provider for {token} found! - -@description -You see this error when you try to inject a service but have not declared a corresponding provider. A provider is a mapping that supplies a value that you can inject into the constructor of a class in your application. - -Read more on providers in our [Dependency Injection guide](guide/dependency-injection). - -@debugging -Work backwards from the object where the error states that a [provider](guide/architecture-services) is missing: `No provider for ${this}!`. This is commonly thrown in [services](tutorial/tour-of-heroes/toh-pt4), which require non-existing providers. - -To fix the error ensure that your service is registered in the list of providers of an `NgModule` or has the `@Injectable` decorator with a `providedIn` property at top. - -The most common solution is to add a provider in `@Injectable` using `providedIn`: - - - -@Injectable({ providedIn: 'app' }) - - - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG0203.md b/aio/content/errors/NG0203.md deleted file mode 100644 index 474f86d8de0..00000000000 --- a/aio/content/errors/NG0203.md +++ /dev/null @@ -1,71 +0,0 @@ -@name `inject()` must be called from an injection context -@category runtime -@shortDescription `inject()` must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`. - -@description -You see this error when you try to use the [`inject`](api/core/inject) function outside of the allowed [injection context](guide/dependency-injection-context). The injection context is available during the class creation and initialization. It is also available to functions -used with `runInInjectionContext`. - -In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a field initializer: - -```typescript -@Injectable({providedIn: 'root'}) -export class Car { - radio: Radio|undefined; - - // OK: field initializer - spareTyre = inject(Tyre); - - constructor() { - // OK: constructor body - this.radio = inject(Radio); - } -} -``` - -It is also legal to call [`inject`](api/core/inject) from a provider's factory: - -```typescript -providers: [ - {provide: Car, useFactory: () => { - // OK: a class factory - const engine = inject(Engine); - return new Car(engine); - }} -] -``` - -Calls to the [`inject`](api/core/inject) function outside of the class creation or `runInInjectionContext` will result in error. Most notably, calls to `inject()` are disallowed after a class instance was created, in methods (including lifecycle hooks): - -```typescript -@Component({ ... }) -export class CarComponent { - ngOnInit() { - // ERROR: too late, the component instance was already created - const engine = inject(Engine); - engine.start(); - } -} -``` - -@debugging - -Work backwards from the stack trace of the error to identify a place where the disallowed call to `inject()` is located. - -To fix the error move the [`inject`](api/core/inject) call to an allowed place (usually a class constructor or a field initializer). - -**Note:** If you are running in a test context, `TestBed.runInInjectionContext` will enable `inject()` to succeed. - -```typescript -TestBed.runInInjectionContext(() => { - // ... -}); -``` - - - - - - - -@reviewed 2023-04-11 diff --git a/aio/content/errors/NG0209.md b/aio/content/errors/NG0209.md deleted file mode 100644 index f9d2593fd56..00000000000 --- a/aio/content/errors/NG0209.md +++ /dev/null @@ -1,17 +0,0 @@ -@name Invalid multi provider -@category runtime -@shortDescription Expected provider to be `multi: true` but did not get an Array - -@description - -The Angular runtime will throw this error when it injects a token intended to be used with `multi: true` but -a non-Array was found instead. For example, `ENVIRONMENT_INITIALIZER` should be provided -like `{provide: ENVIRONMENT_INITIALIZER, multi: true, useValue: () => {...}}`. - - - - - - - -@reviewed 2022-11-28 \ No newline at end of file diff --git a/aio/content/errors/NG02200.md b/aio/content/errors/NG02200.md deleted file mode 100644 index a1ece33f74e..00000000000 --- a/aio/content/errors/NG02200.md +++ /dev/null @@ -1,16 +0,0 @@ -@name Missing Iterable Differ -@category runtime -@shortDescription Cannot find a differ for object in ngFor - -@description -`NgFor` could not find an iterable differ for the value passed in. Make sure it's an iterable, like an `Array`. - -@debugging -When using ngFor in a template, you must use some type of Iterable, like `Array`, `Set`, `Map`, etc. -If you're trying to iterate over the keys in an object, you should look at the [KeyValue pipe](/api/common/KeyValuePipe) instead. - - - - - - diff --git a/aio/content/errors/NG02800.md b/aio/content/errors/NG02800.md deleted file mode 100644 index caec0da07bd..00000000000 --- a/aio/content/errors/NG02800.md +++ /dev/null @@ -1,23 +0,0 @@ -@name JSONP support in HttpClient configuration -@category runtime -@shortDescription Missing JSONP support in HttpClient configuration - -@description -Angular produces this error when you attempt a `JSONP` request without providing the necessary support for it in the `HttpClient` configuration. -To enable `JSONP` support, you can do one of the following: -- add the `withJsonpSupport()` as an argument during the `provideHttpClient` function call (e.g. `provideHttpClient(withJsonpSupport())`) when `bootstrapApplication` is used -- import the `HttpClientJsonpModule` in your root AppModule, when NgModule-based bootstrap is used. - - -@debugging -Make sure that the JSONP support is added into your application either by calling the `withJsonpSupport()` function (when the `provideHttpClient()` is used) or importing the `HttpClientJsonpModule` module as described above. - -See [Make a JSONP request](/guide/http-make-jsonp-request) for more info. - - - - - - - -@reviewed 2023-05-02 diff --git a/aio/content/errors/NG0300.md b/aio/content/errors/NG0300.md deleted file mode 100644 index 4530c50da46..00000000000 --- a/aio/content/errors/NG0300.md +++ /dev/null @@ -1,31 +0,0 @@ -@name Selector Collision -@category runtime -@videoUrl https://www.youtube.com/embed/z_3Z5mOm59I -@shortDescription Multiple components match with the same tagname - -@description -Two or more components use the same [element selector](guide/component-overview#specifying-a-components-css-selector). Because there can only be a single component associated with an element, selectors must be unique strings to prevent ambiguity for Angular. - -@debugging -Use the element name from the error message to search for places where you're using the same [selector declaration](guide/architecture-components) in your codebase: - - - -@Component({ - selector: 'YOUR_STRING', - … -}) - - - -Ensure that each component has a unique CSS selector. This will guarantee that Angular renders the component you expect. - -If you're having trouble finding multiple components with this selector tag name, check for components from imported component libraries, such as Angular Material. Make sure you're following the [best practices](guide/styleguide#component-selectors) for your selectors to prevent collisions. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG0301.md b/aio/content/errors/NG0301.md deleted file mode 100644 index d5cb32135a9..00000000000 --- a/aio/content/errors/NG0301.md +++ /dev/null @@ -1,40 +0,0 @@ -@name Export Not Found -@category runtime -@videoUrl https://www.youtube.com/embed/fUSAg4kp2WQ -@shortDescription Export not found! - -@description -Angular can't find a directive with `{{ PLACEHOLDER }}` export name. The export name is specified in the `exportAs` property of the directive decorator. This is common when using FormsModule or Material modules in templates and you've forgotten to [import the corresponding modules](guide/sharing-ngmodules). - -
    - -This is the runtime equivalent of a common compiler error [NG8003: No directive found with export](errors/NG8003). - -
    - -@debugging -Use the export name to trace the templates or modules using this export. - -Ensure that all dependencies are [properly imported and declared in your NgModules](guide/sharing-ngmodules). For example, if the export not found is `ngForm`, we need to import `FormsModule` and declare it in the list of imports in `*.module.ts` to resolve the error. - - - -import { FormsModule } from '@angular/forms'; - -@NgModule({ - … - imports: [ - FormsModule, - … - - - -If you recently added an import, you may need to restart your server to see these changes. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG0302.md b/aio/content/errors/NG0302.md deleted file mode 100644 index 71ad185a32b..00000000000 --- a/aio/content/errors/NG0302.md +++ /dev/null @@ -1,32 +0,0 @@ -@name Pipe Not Found -@category runtime -@videoUrl https://www.youtube.com/embed/maI2u6Sxk9M -@videoCaption Note: The video predates standalone pipes, please refer to additional instructions below if you use standalone pipes. -@shortDescription Pipe not found! - -@description -Angular can't find a pipe with this name. - -The [pipe](guide/pipes-overview) referenced in the template has not been named or declared properly. - -To use the pipe: - - Ensure the name used in a template matches the name defined in the pipe decorator. - - Either mark it as standalone by adding the `standalone: true` flag to the pipe's decorator or declare it as a part of an `NgModule` by adding to that module's declarations array. - - Import it in the standalone components and/or the `NgModules` where it is needed. - -@debugging -Use the pipe name to trace where the pipe is declared and used. - -To resolve this error: - - If the pipe is local to the `NgModule`, give it a unique name in the pipe's decorator and declared it in the `NgModule`. - - If the pipe is standalone or is declared in another `NgModule`, add it to the `imports` field of the standalone component or the current `NgModule`. - -If you recently added an import or declaration, you may need to restart your server to see these changes. - - - - - - - -@reviewed 2022-05-22 diff --git a/aio/content/errors/NG0403.md b/aio/content/errors/NG0403.md deleted file mode 100644 index 3fd5bec8130..00000000000 --- a/aio/content/errors/NG0403.md +++ /dev/null @@ -1,42 +0,0 @@ -@name Bootstrapped NgModule doesn't specify which component to initialize -@category runtime -@shortDescription An NgModule that was used for bootstrapping does not specify which component should be initialized. - -@description -This error means that an NgModule that was used for bootstrapping an application is missing key information for Angular to proceed with the bootstrap process. - -The error happens when the NgModule `bootstrap` property is missing (or is an empty array) in the `@NgModule` annotation and there is no `ngDoBootstrap` lifecycle hook defined on that NgModule class. - -More information about the bootstrapping process can be found in [this guide](guide/bootstrapping). - -The following examples will trigger the error. - -```typescript -@NgModule({ - declarations: [AppComponent], - imports: [BrowserModule, AppRoutingModule], - providers: [], -}) -export class AppModule {} - -// The `AppModule` is used for bootstrapping, but the `@NgModule.bootstrap` field is missing. -platformBrowser().bootstrapModule(AppModule); -``` - -```typescript -@NgModule({ - declarations: [AppComponent], - imports: [BrowserModule, AppRoutingModule], - providers: [], - bootstrap: [], -}) -export class AppModule {} - -// The `AppModule` is used for bootstrapping, but the `@NgModule.bootstrap` field contains an empty array. -platformBrowser().bootstrapModule(AppModule); -``` - -@debugging -Please make sure that the NgModule that is used for bootstrapping is setup correctly: -- either the `bootstrap` property exists (and contains a non-empty array) in the `@NgModule` annotation -- or the `ngDoBootstrap` method exists on the NgModule class diff --git a/aio/content/errors/NG0500.md b/aio/content/errors/NG0500.md deleted file mode 100644 index d217eed6f1d..00000000000 --- a/aio/content/errors/NG0500.md +++ /dev/null @@ -1,44 +0,0 @@ -@name Hydration Node Mismatch -@category runtime -@shortDescription During hydration, Angular expected a DOM node, but either the actual DOM was different or was not found. - -@description -This error means that during the hydration process, Angular expected a DOM structure as rendered and annotated during server side rendering. However, on the client, the DOM tree was different than the server rendered DOM tree. - -This error typically happens due to direct DOM manipulation using native browser APIs that alter the DOM structure outside of what Angular produced. It will also occur if you use `innerHTML` or `outerHTML` to set HTML content, which similarly alters the DOM structure outside of what Angular produced. You can resolve this by refactoring the component to use native Angular APIs instead of native APIs. If that's not possible, you can add the `ngSkipHydration` attribute to your component's host node, which will disable hydration for the component and its children. `ngSkipHydration` should only be used as a last resort and should be considered a bug that needs to be fixed. - -More information about hydration can be found in [this guide](guide/hydration). - -The following example will trigger the error. - -```typescript -@Component({ - standalone: true, - selector: 'example-cmp', - template: '
    world
    ', -}) -export class ExampleCmp { - hostElement = inject(ElementRef).nativeElement; - - ngOnInit() { - // Create a new

    element with the `Hello` text inside - const newNode = document.createElement('p'); - newNode.innerHTML = 'Hello'; - - // Insert the

    before the first element. Since Angular has no information - // about the

    element, it will be looking for the

    element at the first - // element position instead. As a result, a hydration mismatch error would be - // thrown. Instead, update component's template to create the

    element. - this.hostElement.insertBefore(newNode, this.hostElement.firstChild); - } -} -``` - -@debugging -The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs. - -Check that your template has valid HTML structure. See more information in the [hydration guide](guide/hydration#valid-html-structure). - -You can add the `ngSkipHydration` attribute to your component host node as a possible workaround. - -If your application works in development environment, but you see hydration errors in production builds, make sure that the generated HTML that is delivered to a browser contains comment nodes produced by Angular during the rendering on the server. Those comment nodes are used by Angular runtime as anchors for view containers (with and without hydration) and hydration process expects them to be present at their original locations. If you have a custom logic to remove comment nodes from the HTML generated by the server-side rendering or you've configured your CDN to remove them before serving the content - disable the comment nodes removal and check if hydration errors are gone. diff --git a/aio/content/errors/NG0501.md b/aio/content/errors/NG0501.md deleted file mode 100644 index 6a4192d219e..00000000000 --- a/aio/content/errors/NG0501.md +++ /dev/null @@ -1,9 +0,0 @@ -@name Hydration Missing Siblings -@category runtime -@shortDescription During hydration, Angular expected more sibling DOM nodes to be present than what was found. - -@description -This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected more siblings present in the DOM structure at a particular location. Please refer to the [error NG0500](errors/NG0500) page for additional information. - -@debugging -See the [error NG0500](errors/NG0500) for more information on how to debug this error. diff --git a/aio/content/errors/NG0502.md b/aio/content/errors/NG0502.md deleted file mode 100644 index f5b715063a4..00000000000 --- a/aio/content/errors/NG0502.md +++ /dev/null @@ -1,9 +0,0 @@ -@name Hydration Missing Node -@category runtime -@shortDescription During hydration, Angular expected to find a DOM node, but it did not exist. - -@description -This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected a node to be present in the DOM structure at a particular location and none was found. Please refer to the [error NG0500](errors/NG0500) page for additional information. - -@debugging -See the [error NG0500](errors/NG0500) for more information on how to debug this error. \ No newline at end of file diff --git a/aio/content/errors/NG0503.md b/aio/content/errors/NG0503.md deleted file mode 100644 index 67708f3d915..00000000000 --- a/aio/content/errors/NG0503.md +++ /dev/null @@ -1,49 +0,0 @@ -@name Hydration Unsupported Projection of DOM Nodes -@category runtime -@shortDescription During serialization, Angular detected DOM nodes that were created outside of Angular's context and used for content projection. - -@description -This error means that during the server side serialization process, Angular encountered nodes that were created outside of Angular's context (i.e. using native DOM APIs) and found those nodes were provided as projectible nodes. They were likely provided using `ViewContainerRef.createComponent` or `createComponent` APIs. Angular hydration does not support this use case. - -More information about hydration can be found in [this guide](guide/hydration). - -The following examples will trigger the error. - -```typescript -@Component({ - standalone: true, - selector: 'dynamic', - template: ` - -`, -}) -class DynamicComponent { -} - -@Component({ - standalone: true, - selector: 'app', - template: `

    `, -}) -class SimpleComponent { - @ViewChild('target', {read: ViewContainerRef}) vcr!: ViewContainerRef; - envInjector = inject(EnvironmentInjector); - - ngAfterViewInit() { - const div = document.createElement('div'); - const p = document.createElement('p'); - // In this test we create DOM nodes outside of Angular context - // (i.e. not using Angular APIs) and try to content-project them. - // This is an unsupported pattern and an exception will be thrown. - const compRef = createComponent(DynamicComponent, { - environmentInjector: this.envInjector, - projectableNodes: [[div, p]] - }); - } -} -``` - -@debugging -The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs. - -You can add the `ngSkipHydration` attribute to your component host node as a possible workaround. diff --git a/aio/content/errors/NG0504.md b/aio/content/errors/NG0504.md deleted file mode 100644 index 029b53c6c87..00000000000 --- a/aio/content/errors/NG0504.md +++ /dev/null @@ -1,55 +0,0 @@ -@name Skip hydration flag is applied to an invalid node -@category runtime -@shortDescription The ngSkipHydration attribute was added to an element that is not a component host. - -@description -This error occurs when the `ngSkipHydration` attribute was added to an inappropriate DOM node. The `ngSkipHydration` attribute can only be applied to component host nodes either directly in the template or via a host binding. It cannot be applied to other DOM nodes and will have no effect if done so other than causing this error. - -More information about hydration can be found in [this guide](guide/hydration). - -The following examples will trigger the error. - -**Example 1** - -In this example, the `ngSkipHydration` attribute is applied to a `
    ` using host bindings of a directive. Since the `
    ` doesn't act as a component host node, Angular will throw an error. - -```typescript -@Directive({ - standalone: true, - selector: '[dir]', - host: {ngSkipHydration: 'true'}, -}) -class Dir { -} - -@Component({ - standalone: true, - selector: 'app', - imports: [Dir], - template: ` -
    - `, -}) -class SimpleComponent { -} -``` - -**Example 2** - -In this example, the `ngSkipHydration` is applied to a `
    ` as an attribute via a template. -Since the `
    ` doesn't act as a component host node, Angular will throw an error. - -```typescript -@Component({ - standalone: true, - selector: 'app', - template: ` -
    - `, -}) -class SimpleComponent { -} -``` - -@debugging -Remove the `ngSkipHydration` attribute from any invalid DOM nodes. Alternatively, move the `ngSkipHydration` attribute to the component host node either in a template or via a host binding. diff --git a/aio/content/errors/NG0505.md b/aio/content/errors/NG0505.md deleted file mode 100644 index 5905866216c..00000000000 --- a/aio/content/errors/NG0505.md +++ /dev/null @@ -1,26 +0,0 @@ -@name No hydration info in server response -@category runtime -@shortDescription No hydration info is present in server response. - -@description -This error occurs when hydration is enabled on the client, but the server response -doesn't contain special serialized information about the application that hydration -logic relies on. - -This can happen when the `provideClientHydration()` function is included in the client -part of the application configuration, but is missing in the server part of the configuration. - -In applications with the default project structure (generated by the `ng new`), -the `provideClientHydration()` call is added either into the `providers` array of -the main `AppModule` (which is imported into the server module) or into a set of -providers that are included into both client and server configurations. - -If you have a custom setup where client and server configuration are independent -and do not share common set of providers, make sure that the `provideClientHydration()` -is also included into the set of providers used to bootstrap an application on the server. - -More information about hydration can be found in [this guide](guide/hydration). - -@debugging -Verify that the `provideClientHydration()` call is included into a set of providers -that is used to bootstrap an application on the server. diff --git a/aio/content/errors/NG0506.md b/aio/content/errors/NG0506.md deleted file mode 100644 index fb3522f41bd..00000000000 --- a/aio/content/errors/NG0506.md +++ /dev/null @@ -1,53 +0,0 @@ -@name NgZone remains unstable -@category runtime -@shortDescription NgZone remains unstable after a long period of time - -@description -This warning occurs when hydration is enabled on the client but the NgZone remains unstable for a long period of time. - -The {@link ApplicationRef#isStable} API uses NgZone to report when an application becomes `stable` and `unstable`. An application is considered stable when there are no pending microtasks or macrotasks. - -Angular Hydration relies on a signal from Zone.js when it becomes stable inside an application: - -* during the server-side rendering (SSR) to start the serialization process -* in a browser this signal is used to start the post-hydration cleanup to remove DOM nodes that remained unclaimed - -This warning is displayed when the `ApplicationRef.isStable()` doesn't emit `true` within 10 seconds. If this is intentional and your application becomes stable later, you can ignore this warning. - -**Macrotasks** - -Macrotasks include functions like `setInterval`, `setTimeout`, `requestAnimationFrame` etc. -If one of these functions is called in the initialization phase of the app or the bootstrapped components, the application will remain unstable. - -```typescript -@Component({ - standalone: true, - selector: 'app', - template: ``, -}) -class SimpleComponent { - constructor() { - setInterval(() => { ... }, 1000) - - // or - - setTimeout(() => { ... }, 10_000) - } -} -``` - -If these functions need to be called in the initialization phase, invoking them outside the angular zone solves the issue. - -```typescript -class SimpleComponent { - constructor() { - inject(NgZone).runOutsideAngular(() => { - setInterval(() => {}, 1000); - }) - } -} -``` - -@debugging - -Verify that you don't have any long standing microtask or macrotasks. \ No newline at end of file diff --git a/aio/content/errors/NG0507.md b/aio/content/errors/NG0507.md deleted file mode 100644 index 4b8648ee306..00000000000 --- a/aio/content/errors/NG0507.md +++ /dev/null @@ -1,12 +0,0 @@ -@name HTML content was altered after server-side rendering -@category runtime -@shortDescription HTML content was altered after server-side rendering - -@description -Angular throws this error when it detects that the content generated by server-side rendering (SSR) was altered after the rendering. The process of hydration relies on the content to be untouched after SSR, which also includes whitespaces and comment nodes. Those whitespaces and comment nodes must be retained in the HTML generated by the SSR process. Learn more in the [Hydration guide](guide/hydration#constraints). - -@debugging - -Typically this happens in the following cases: -* Some CDN providers have a built-in feature to remove whitespaces and comment nodes from HTML as an optimization. Please verify if there is such an option in CDN configuration and turn it off. -* If you use custom post-processing of HTML generated by SSR (as a build step), make sure that this process doesn't remove whitespaces and comment nodes. diff --git a/aio/content/errors/NG05104.md b/aio/content/errors/NG05104.md deleted file mode 100644 index aa0e851af4f..00000000000 --- a/aio/content/errors/NG05104.md +++ /dev/null @@ -1,33 +0,0 @@ -@name Root element was not found. -@category runtime -@shortDescription Root element was not found during bootstrap. - -@description -Bootstrapped components are defined in the `bootstrap` property of an `@NgModule` decorator or as the first parameter of `bootstrapApplication` for standalone components. - -This error happens when Angular tries to bootstrap one of these components but cannot find its corresponding node in the DOM. - -@debugging - -This issue occurs when the selector mismatches the tag - -```typescript -@Component({ - selector: 'my-app', - ... -}) -class AppComponent {} -``` - -```html - - - -``` -Replace the tag with the correct one: - -```html - - - -``` \ No newline at end of file diff --git a/aio/content/errors/NG0602.md b/aio/content/errors/NG0602.md deleted file mode 100644 index 723672c922a..00000000000 --- a/aio/content/errors/NG0602.md +++ /dev/null @@ -1,62 +0,0 @@ -@name Disallowed function call inside reactive context -@category runtime -@shortDescription A disallowed function is called inside a reactive context - -@description -A function that is not allowed to run inside a reactive context was called from within a reactive context. - -For example, an `effect` cannot be scheduled from within a `computed` or an actively executing effect. -Avoid calling functions like `effect` as part of template expressions, as those execute in their own reactive context. - -Computed expressions are expected to be pure. -Pure means that expression do not trigger any side effects. -Side effects are operations like scheduling `afterRender`, creating a new `effect`, or subscribing to observables. - -Some operations are explicitly banned inside reactive contexts in order to avoid common pitfalls. -As an example, using `afterRender` inside a `computed` will schedule new render hooks every time the computed expression evaluates. -This is likely not intended and could degrade application performance. - -### Fixing the error - -This error guide is non-exhaustive. -It captures a few common scenarios and how to address the error. - -#### `afterRender` -Move the call for `afterRender` outside of the reactive context. - -A good place to schedule the after render hook is in the component's class constructor. -Alternatively, use `untracked` to leave the reactive context and explicitly opt-out of this error. - -#### `effect` -Move the call for `effect` outside of the reactive context. - -A good place to schedule an effect is in a `@Component`'s class constructor. - -#### `toSignal` -Move the call for `toSignal` outside of the reactive context. - -```typescript -result = computed(() => { - const dataSignal = toSignal(dataObservable$); - return doSomething(dataSignal()); -}); -``` - -can be refactored into: - -```typescript -dataSignal = toSignal(dataObservable$); -result = computed(() => doSomething(dataSignal())); -``` - -Alternatively, if this is not possible, consider manually subscribing to the observable. - -As a last resort, use `untracked` to leave the reactive context. -Be careful as leaving the reactive context can result in signal reads to be ignored inside `untracked`. - -@debugging - -The error message mentions the function that was unexpectedly called. -Look for this function call in your application code. - -Alternatively, the stack trace in your browser will show where the function was invoked and where it's located. diff --git a/aio/content/errors/NG0910.md b/aio/content/errors/NG0910.md deleted file mode 100644 index 840bf4eba75..00000000000 --- a/aio/content/errors/NG0910.md +++ /dev/null @@ -1,71 +0,0 @@ -@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 ` -``` - -or when it's an attribute bindings: - -```html - -``` - -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 ` -``` - -If you need to have different values for these attributes (depending on various conditions), -you can use an `*ngIf` or an `*ngSwitch` on an ` - - -``` - - - - - - - -@reviewed 2022-05-27 diff --git a/aio/content/errors/NG0912.md b/aio/content/errors/NG0912.md deleted file mode 100644 index 18197971948..00000000000 --- a/aio/content/errors/NG0912.md +++ /dev/null @@ -1,65 +0,0 @@ -@name Component ID generation collision -@category runtime -@shortDescription Component ID generation collision detected - -@description -When creating components, Angular generates a unique component ID for each component. This is generated using the Angular component metadata, including but not limited: selectors, the number of host bindings, class property names, view and content queries. When two components metadata are identical (often times sharing the same selector), an ID generation collision will occur. - -Component IDs are used in Angular internally: -- for extra annotations of DOM nodes for style encapsulation -- during [hydration](guide/hydration) to restore an application state after [server-side rendering](guide/ssr). - -To avoid issues that might be caused by the component ID collision, it's recommended to resolve them as described below. - -** Example of a Component ID collision ** - -```typescript -@Component({ - selector: 'my-component', - template: 'complex-template', -}) -class SomeComponent {} - -@Component({ - selector: 'my-component', - template: 'empty-template', -}) -class SomeMockedComponent {} -``` -Having these two components defined will trigger an ID generation collision and during development a warning will be displayed. - -@debugging - -The warning message includes the class name of the two components whose IDs are colliding. - -The problem can be resolved using one of the solutions below: - -1. Change the selector of one of the two components. For example by using a pseudo-selector with no effect like `:not()` and a different tag name. - -```typescript -@Component({ - selector: 'my-component:not(p)', - template: 'empty-template', -}) -class SomeMockedComponent {} -``` - -2. Add an extra host attribute to one of the components. - -```typescript -@Component({ - selector: 'my-component', - template: 'complex-template', - host: {'some-binding': 'some-value'}, -}) -class SomeComponent {} -``` - - - - - - - - -@reviewed 2023-04-25 diff --git a/aio/content/errors/NG0913.md b/aio/content/errors/NG0913.md deleted file mode 100644 index 889e2db858b..00000000000 --- a/aio/content/errors/NG0913.md +++ /dev/null @@ -1,39 +0,0 @@ -@name Runtime Performance Warnings -@category runtime -@shortDescription Performance-harming image elements detected at runtime - -@description -After an application is loaded, Angular checks included `` elements for performance-harming misconfiguration. This warning can be triggered two ways: - -### Oversized images -When images are loaded, the **intrinsic size** of the downloaded file is checked against the actual size of the image on the page. The actual size is calculated using the **rendered size** of the image with CSS applied, multiplied by the [pixel device ratio](https://web.dev/codelab-density-descriptors/#pixel-density). If the downloaded image is much larger (more than 1200px too large in either dimension), this warning is triggered. Downloading oversized images can slow down page loading and have a negative effect on [Core Web Vitals](https://web.dev/vitals/). - -### Lazy-loaded LCP element -The largest contentful element on a page during load is considered the "LCP Element", which relates to [Largest Contentful Paint](https://web.dev/lcp/), one of the Core Web Vitals. Lazy loading an LCP element will have a strong negative effect on page performance. With this strategy, the browser has to complete layout calculations to determine whether the element is in the viewport before starting the image download. As a result, a warning is triggered when Angular detects that the LCP element has been given the `loading="lazy"` attribute. - -@debugging -Use the image URL provided in the console warning to find the `` element in question. -### Ways to fix oversized images -* Use a smaller source image -* Add a [`srcset`](https://web.dev/learn/design/responsive-images/#responsive-images-with-srcset) if multiple sizes are needed for different layouts. -* Switch to use Angular's built-in image directive ([`NgOptimizedImage`](https://angular.io/api/common/NgOptimizedImage)), which generates [srcsets automatically](https://angular.io/guide/image-directive#request-images-at-the-correct-size-with-automatic-srcset). -### Ways to fix lazy-loaded LCP element - -* Change the `loading` attribute to a different value such as `"eager"`. -* Switch to use Angular's built-in image directive ([`NgOptimizedImage`](https://angular.io/api/common/NgOptimizedImage)), which allows for easily [prioritizing LCP images](https://angular.io/guide/image-directive#step-4-mark-images-as-priority). - -### Disabling Image Performance Warnings -Both warnings can be disabled individually, site-wide, using a provider at the root of your application: - - -providers: [ - { - provide: IMAGE_CONFIG, - useValue: { - disableImageSizeWarning: true, - disableImageLazyLoadWarning: true - } - }, -], - - diff --git a/aio/content/errors/NG0950.md b/aio/content/errors/NG0950.md deleted file mode 100644 index 8b6020753a2..00000000000 --- a/aio/content/errors/NG0950.md +++ /dev/null @@ -1,18 +0,0 @@ -@name Input is required but no value is available yet. -@category runtime -@shortDescription A required input is accessed before a value is set. - -@description -A required input was accessed but no value was bound. - -This can happen when a required input is accessed too early in your directive or component. -This is commonly happening when the input is read as part of class construction. - -Inputs are guaranteed to be available in the `ngOnInit` lifecycle hook and afterwards. - -## Fixing the error - -Access the required input in reactive contexts. -For example, in the template itself, inside a `computed`, or inside an effect. - -Alternatively, access the input inside the `ngOnInit` lifecycle hook, or later. diff --git a/aio/content/errors/NG0951.md b/aio/content/errors/NG0951.md deleted file mode 100644 index ff94b45c860..00000000000 --- a/aio/content/errors/NG0951.md +++ /dev/null @@ -1,23 +0,0 @@ -@name Child query result is required but no value is available. -@category runtime -@shortDescription Required child query result was accessed before query results were calculated or query has no matches. - -@description -Required child query (`contentChild.required` or `viewChild.required`) result was accessed before query results were calculated or query has no matches. - -This can happen in two distinct situations: -* query results were accessed before a given query could collect results; -* a query was executed but didn't match any nodes and has no results as a consequence. - -Content queries and view queries each calculate their results at different points in time: -* `contentChild` results are available after a _host_ view (template where a directive declaring a query is used) is created; -* `viewChild` results are available after a template of a component declaring a query is created. - -Accessing query results before they're available results in the error described on this page. Most notably, query results are _never_ available in a constructor of the component or directive declaring a query. - -## Fixing the error - -`contentChild` query results can be accessed in the `AfterContentChecked` lifecycle hook, or later. -`viewChild` query results can be accessed in the `AfterViewChecked` lifecycle hook, or later. - -Make sure that a required query matches at least one node and has results at all. You can verify this by accessing query results in the lifecycle hooks listed above. diff --git a/aio/content/errors/NG1001.md b/aio/content/errors/NG1001.md deleted file mode 100644 index 0d1df5e1bd9..00000000000 --- a/aio/content/errors/NG1001.md +++ /dev/null @@ -1,42 +0,0 @@ -@name Argument Not Literal -@category compiler -@shortDescription Decorator argument is not an object literal - -@description -To make the metadata extraction in the Angular compiler faster, the decorators `@NgModule`, `@Pipe`, `@Component`, `@Directive`, and `@Injectable` accept only object literals as arguments. - -This is an [intentional change in Ivy](https://github.com/angular/angular/issues/30840#issuecomment-498869540), which enforces stricter argument requirements for decorators than View Engine. -Ivy requires this approach because it compiles decorators by moving the expressions into other locations in the class output. - -@debugging -Move all declarations: - - - -const moduleDefinition = {…} - -@NgModule(moduleDefinition) -export class AppModule { - constructor() {} -} - - - -into the decorator: - - - -@NgModule({…}) -export class AppModule { - constructor() {} -} - - - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG2003.md b/aio/content/errors/NG2003.md deleted file mode 100644 index c6507577bb1..00000000000 --- a/aio/content/errors/NG2003.md +++ /dev/null @@ -1,20 +0,0 @@ -@name Missing Token -@category compiler -@shortDescription No suitable injection token for parameter - -@description -There is no injection token for a constructor parameter at compile time. [InjectionTokens](api/core/InjectionToken) are tokens that can be used in a Dependency Injection Provider. - -@debugging -Look at the parameter that throws the error, and all uses of the class. -This error is commonly thrown when a constructor defines parameters with primitive types such as `string`, `number`, `boolean`, and `Object`. - -Use the `@Injectable` method or `@Inject` decorator from `@angular/core` to ensure that the type you are injecting is reified \(has a runtime representation\). Make sure to add a provider to this decorator so that you do not throw [NG0201: No Provider Found](errors/NG0201). - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG2009.md b/aio/content/errors/NG2009.md deleted file mode 100644 index 9ec6317c24f..00000000000 --- a/aio/content/errors/NG2009.md +++ /dev/null @@ -1,40 +0,0 @@ -@name Invalid Shadow DOM selector -@category compiler -@shortDescription Component selector does not match shadow DOM requirements - -@description - -The selector of a component using `ViewEncapsulation.ShadowDom` doesn't match the custom element tag name requirements. - -In order for a tag name to be considered a valid custom element name, it has to: - -* Be in lower case. -* Contain a hyphen. -* Start with a letter \(a-z\). - -@debugging -Rename your component's selector so that it matches the requirements. - -**Before:** - - - -@Component({ - selector: 'comp', - encapsulation: ViewEncapsulation.ShadowDom - … -}) - - - -**After:** - - - -@Component({ - selector: 'app-comp', - encapsulation: ViewEncapsulation.ShadowDom - … -}) - - diff --git a/aio/content/errors/NG3003.md b/aio/content/errors/NG3003.md deleted file mode 100644 index 374ea9de70f..00000000000 --- a/aio/content/errors/NG3003.md +++ /dev/null @@ -1,62 +0,0 @@ -@name Import Cycle Detected -@category compiler -@shortDescription Import cycles would need to be created to compile this component - -@description - -A component, directive, or pipe that is referenced by this component would require the compiler to add an import that would lead to a cycle of imports. -For example, consider a scenario where a `ParentComponent` references a `ChildComponent` in its template: - - - - - -There is already an import from `child.component.ts` to `parent.component.ts` since the `ChildComponent` references the `ParentComponent` in its constructor. - -
    - -**NOTE**:
    -The parent component's template contains ``. -The generated code for this template must therefore contain a reference to the `ChildComponent` class. -In order to make this reference, the compiler would have to add an import from `parent.component.ts` to `child.component.ts`, which would cause an import cycle: - - - -parent.component.ts -> child.component.ts -> parent.component.ts - - - -
    - -### Remote Scoping - -If you are using NgModules, to avoid adding imports that create cycles, additional code is added to the `NgModule` class where the component that wires up the dependencies is declared. - -This is known as "remote scoping". - -### Libraries - -Unfortunately, "remote scoping" code is side-effectful —which prevents tree shaking— and cannot be used in libraries. -So when building libraries using the `"compilationMode": "partial"` setting, any component that would require a cyclic import will cause this `NG3003` compiler error to be raised. - -@debugging - -The cycle that would be generated is shown as part of the error message. -For example: - - - -The component ChildComponent is used in the template but importing it would create a cycle: -/parent.component.ts -> /child.component.ts -> /parent.component.ts - - - -Use this to identify how the referenced component, pipe, or directive has a dependency back to the component being compiled. -Here are some ideas for fixing the problem: - -* Try to rearrange your dependencies to avoid the cycle. - For example, using an intermediate interface that is stored in an independent file that can be imported to both dependent files without causing an import cycle. -* Move the classes that reference each other into the same file, to avoid any imports between them. -* Convert import statements to type-only imports \(using `import type` syntax\) if the imported declarations are only used as types, as type-only imports do not contribute to cycles. - -@reviewed 2023-08-30 diff --git a/aio/content/errors/NG5000.md b/aio/content/errors/NG5000.md deleted file mode 100644 index f5d2f078ac3..00000000000 --- a/aio/content/errors/NG5000.md +++ /dev/null @@ -1,14 +0,0 @@ -@name Hydration with unsupported Zone.js instance. -@category runtime -@shortDescription Hydration was enabled with unsupported Zone.js instance. - -@description -This warning means that the hydration was enabled for an application that was configured to use an unsupported version of Zone.js: either a custom or a "noop" one (see more info [here](api/core/BootstrapOptions#ngZone)). - -Hydration relies on a signal from Zone.js when it becomes stable inside an application, so that Angular can start the serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed). - -Providing a custom or a "noop" Zone.js implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration. - -If you use a custom Zone.js implementation, make sure that the "onStable" event is emitted at the right time and does not result in incorrect application behavior with hydration. - -More information about hydration can be found in the [hydration guide](guide/hydration). diff --git a/aio/content/errors/NG6100.md b/aio/content/errors/NG6100.md deleted file mode 100644 index 1983769efc4..00000000000 --- a/aio/content/errors/NG6100.md +++ /dev/null @@ -1,26 +0,0 @@ -@name NgModule.id Set to module.id anti-pattern -@category compiler -@shortDescription Setting NgModule.id to module.id is a common anti-pattern - -@description -Using `module.id` as an NgModule `id` is a common anti-pattern and is likely not serving a useful purpose in your code. - -NgModules can be declared with an `id`: - -```typescript -@NgModule({ - id: 'my_module' -}) -export class MyModule {} -``` - -Declaring an `id` makes the NgModule available for lookup via the `getNgModuleById()` operation. This functionality is rarely used, mainly in very specific bundling scenarios when lazily loading NgModules without obtaining direct references to them. In most Angular code, ES dynamic `import()` (`import('./path/to/module')`) should be used instead, as this provides a direct reference to the NgModule being loaded without the need for a global registration side effect. - -If you are not using `getNgModuleById`, you do not need to provide `id`s for your NgModules. Providing one has a significant drawback: it makes the NgModule non-tree-shakable, which can have an impact on your bundle size. - -In particular, the pattern of specifying `id: module.id` results from a misunderstanding of `@NgModule.id`. In earlier versions of Angular, it was sometimes necessary to include the property `moduleId: module.id` in `@Component` metadata. - -Using `module.id` for `@NgModule.id` likely results from confusion between `@Component.moduleId` and `@NgModule.id`. `module.id` would not typically be useful for `getNgModuleById()` operations as the `id` needs to be a well-known string, and `module.id` is usually opaque to consumers. - -@debugging -You can remove the `id: module.id` declaration from your NgModules. The compiler ignores this declaration and issues this warning instead. \ No newline at end of file diff --git a/aio/content/errors/NG8001.md b/aio/content/errors/NG8001.md deleted file mode 100644 index f1ac202e2f3..00000000000 --- a/aio/content/errors/NG8001.md +++ /dev/null @@ -1,31 +0,0 @@ -@name Invalid Element -@category compiler -@shortDescription Unknown HTML element or component - -@description -One or more elements cannot be resolved during compilation because the element is not defined by the HTML spec, or there is no component or directive with such element selector. - -
    - -This is the compiler equivalent of a common runtime error `NG0304: '${tagName}' is not a known element: ...`. - -
    - -@debugging -Use the element name in the error to find the file(s) where the element is being used. - -Check that the name and selector are correct. - -Make sure that the component is correctly imported inside your NgModule or standalone component, by checking its presence in the `imports` field. If the component is declared in an NgModule (meaning that it is not standalone) make sure that it is exported correctly from it, by checking its presence in the `exports` field. - -When using custom elements or web components, ensure that you add [`CUSTOM_ELEMENTS_SCHEMA`](api/core/CUSTOM_ELEMENTS_SCHEMA) to the application module. - -If this does not resolve the error, check the imported libraries for any recent changes to the exports and properties you are using, and restart your server. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG8002.md b/aio/content/errors/NG8002.md deleted file mode 100644 index 51c0f035a40..00000000000 --- a/aio/content/errors/NG8002.md +++ /dev/null @@ -1,27 +0,0 @@ -@name Invalid Attribute -@category compiler -@videoUrl https://www.youtube.com/embed/wfLkB3RsSJM -@shortDescription Unknown attribute or input - -@description -An attribute or property cannot be resolved during compilation. - -This error arises when attempting to bind to a property that does not exist. -Any property binding must correspond to either: - -* A native property on the HTML element, or -* An `@Input()` property of a component or directive applied to the element. - -The runtime error for this is `NG0304: '${tagName}' is not a known element: …'`. - -@debugging -Look at documentation for the specific [binding syntax](guide/binding-syntax) used. This is usually a typo or incorrect import. -There may also be a missing direction with property selector 'name' or missing input. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/NG8003.md b/aio/content/errors/NG8003.md deleted file mode 100644 index 53cfe7d51ae..00000000000 --- a/aio/content/errors/NG8003.md +++ /dev/null @@ -1,42 +0,0 @@ -@name Missing Reference Target -@category compiler -@videoUrl https://www.youtube.com/embed/fUSAg4kp2WQ -@shortDescription No directive found with export - -@description -Angular can't find a directive with `{{ PLACEHOLDER }}` export name. -This is common with a missing import or a missing [`exportAs`](api/core/Directive#exportAs) on a directive. - -
    - -This is the compiler equivalent of a common runtime error [NG0301: Export Not Found](errors/NG0301). - -
    - -@debugging -Use the string name of the export not found to trace the templates or modules using this export. - -Ensure that all dependencies are properly imported and declared in our Modules. -For example, if the export not found is `ngForm`, we will need to import `FormsModule` and declare it in our list of imports in `*.module.ts` to resolve the missing export error. - - - -import { FormsModule } from '@angular/forms'; - -@NgModule({ - … - imports: [ - FormsModule, - … - - - -If you recently added an import, you will need to restart your server to see these changes. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/errors/index.md b/aio/content/errors/index.md deleted file mode 100644 index ecff113c4a2..00000000000 --- a/aio/content/errors/index.md +++ /dev/null @@ -1 +0,0 @@ -# Errors List \ No newline at end of file diff --git a/aio/content/examples/.eslintrc.json b/aio/content/examples/.eslintrc.json deleted file mode 100644 index 3a94305ee73..00000000000 --- a/aio/content/examples/.eslintrc.json +++ /dev/null @@ -1,212 +0,0 @@ -{ - "root": true, - "ignorePatterns": ["*.js", "styleguide/**/*.avoid.ts"], - "overrides": [ - { - "files": ["*.html"], - "extends": ["plugin:@angular-eslint/template/recommended"], - "rules": { - "@angular-eslint/template/alt-text": "error", - "@angular-eslint/template/elements-content": "error", - "@angular-eslint/template/label-has-associated-control": "error", - "@angular-eslint/template/table-scope": "error", - "@angular-eslint/template/valid-aria": "error", - "@angular-eslint/template/click-events-have-key-events": "error", - "@angular-eslint/template/eqeqeq": "off", - "@angular-eslint/template/mouse-events-have-key-events": "error", - "@angular-eslint/template/no-autofocus": "error", - "@angular-eslint/template/no-distracting-elements": "error", - "@angular-eslint/template/no-positive-tabindex": "error" - } - }, - { - "files": ["*.ts"], - "extends": [ - "plugin:@angular-eslint/template/process-inline-templates" - ], - "parserOptions": { - "createDefaultProgram": false, - "project": "content/examples/tsconfig.eslint.json" - }, - "plugins": [ - "@typescript-eslint", - "@angular-eslint", "eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow"], - "rules": { - "@typescript-eslint/interface-name-prefix": "off", - "@typescript-eslint/explicit-member-accessibility": "off", - "sort-keys": "off", - "@angular-eslint/component-class-suffix": "error", - - "@angular-eslint/contextual-lifecycle": "error", - "@angular-eslint/directive-class-suffix": "error", - - "@angular-eslint/no-conflicting-lifecycle": "error", - "@angular-eslint/no-host-metadata-property": "error", - "@angular-eslint/no-input-rename": "error", - "@angular-eslint/no-inputs-metadata-property": "error", - "@angular-eslint/no-output-native": "error", - "@angular-eslint/no-output-on-prefix": "error", - "@angular-eslint/no-output-rename": "error", - "@angular-eslint/no-outputs-metadata-property": "error", - "@angular-eslint/use-lifecycle-interface": "error", - "@angular-eslint/use-pipe-transform-interface": "error", - "@typescript-eslint/adjacent-overload-signatures": "error", - "@typescript-eslint/array-type": "off", - - "@typescript-eslint/consistent-type-assertions": "error", - "@typescript-eslint/no-empty-function": "off", - "@typescript-eslint/no-empty-interface": "error", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/no-inferrable-types": [ - "error", - { - "ignoreParameters": true - } - ], - "@typescript-eslint/no-misused-new": "error", - "@typescript-eslint/no-namespace": "error", - "@typescript-eslint/no-parameter-properties": "off", - "@typescript-eslint/no-use-before-define": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/prefer-for-of": "error", - "@typescript-eslint/prefer-function-type": "error", - "@typescript-eslint/prefer-namespace-keyword": "error", - "@typescript-eslint/triple-slash-reference": [ - "error", - { - "path": "always", - "types": "prefer-import", - "lib": "always" - } - ], - "@typescript-eslint/unified-signatures": "error", - "complexity": "off", - "constructor-super": "error", - "eqeqeq": ["error", "smart"], - "guard-for-in": "error", - "id-blacklist": [ - "error", - "any", - "Number", - "number", - "String", - "string", - "Boolean", - "boolean", - "Undefined", - "undefined" - ], - "id-match": "error", - "import/no-deprecated": "warn", - "jsdoc/no-types": "error", - "max-classes-per-file": "off", - "no-bitwise": "error", - "no-caller": "error", - "no-cond-assign": "error", - - "no-debugger": "error", - "no-empty": "off", - "no-eval": "error", - "no-fallthrough": "error", - "no-invalid-this": "off", - "no-new-wrappers": "error", - "no-restricted-imports": [ - "error", - { - "name": "rxjs/Rx", - "message": "Please import directly from 'rxjs' instead" - } - ], - "no-throw-literal": "error", - "no-undef-init": "error", - "no-unsafe-finally": "error", - "no-unused-labels": "error", - "no-var": "error", - "object-shorthand": "error", - "one-var": ["error", "never"], - "prefer-const": "error", - "radix": "error", - "use-isnan": "error", - "valid-typeof": "off", - "arrow-body-style": "error", - "arrow-parens": "off", - "comma-dangle": "off", - "curly": "error", - "eol-last": "error", - "jsdoc/check-alignment": "error", - "new-parens": "error", - "no-multiple-empty-lines": "off", - "no-trailing-spaces": "error", - "quote-props": ["error", "as-needed"], - "space-before-function-paren": [ - "error", - { - "anonymous": "never", - "asyncArrow": "always", - "named": "never" - } - ], - "@typescript-eslint/semi": ["error", "always"], - "@typescript-eslint/type-annotation-spacing": "error", - - "@typescript-eslint/ban-types": "error", - "@angular-eslint/component-selector": [ - "error", - { - "type": "element", - "prefix": "", // TODO: Fix the code and change the prefix to `"app"` (or whatever makes sense). - "style": "kebab-case" - } - ], - "@angular-eslint/directive-selector": [ - "error", - { - "type": "attribute", - "prefix": ["app", "toh"], - "style": "camelCase" - } - ], - "dot-notation": "off", - "@typescript-eslint/dot-notation": ["error", {"allowIndexSignaturePropertyAccess": true}], - "indent": "off", - "max-len": ["error", {"code": 120, "ignoreUrls": true}], - "@typescript-eslint/member-delimiter-style": [ - "error", - { - "singleline": { - "delimiter": "comma", - "requireLast": false - } - } - ], - "@typescript-eslint/member-ordering": "off", - "@typescript-eslint/naming-convention": "off", - "no-console": ["error", {"allow": ["log", "warn", "error"]}], - "no-empty-function": "off", - "@typescript-eslint/no-non-null-assertion": "off", // TODO: Fix the code violating this rule and enable it. - "no-restricted-syntax": [ - "error", - { - "selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]", - "message": "Don't keep jasmine focus methods." - } - ], - "no-shadow": "off", - "@typescript-eslint/no-shadow": "error", - "no-tabs": "error", - "no-underscore-dangle": "off", - "no-unused-expressions": "off", - "@typescript-eslint/no-unused-expressions": "error", - "no-use-before-define": "off", - "prefer-arrow/prefer-arrow-functions": "off", - "quotes": "off", - "@typescript-eslint/quotes": [ - "error", - "single", - {"avoidEscape": true, "allowTemplateLiterals": true} - ], - "semi": "error" - } - } - ] -} diff --git a/aio/content/examples/BUILD.bazel b/aio/content/examples/BUILD.bazel deleted file mode 100644 index 7404df96b56..00000000000 --- a/aio/content/examples/BUILD.bazel +++ /dev/null @@ -1,21 +0,0 @@ -load("//aio/content/examples:examples.bzl", "EXAMPLES") - -package(default_visibility = ["//visibility:public"]) - -filegroup( - name = "examples", - srcs = glob( - ["**"], - exclude = ["BUILD.bazel"], - ) + ["//aio/content/examples/%s:files" % example for example in EXAMPLES.keys()], -) - -filegroup( - name = "all-stackblitz", - srcs = ["//aio/content/examples/%s:stackblitz" % example for example in EXAMPLES.keys() if EXAMPLES[example]["stackblitz"]], -) - -filegroup( - name = "all-example-zips", - srcs = ["//aio/content/examples/%s:example-zip" % example for example in EXAMPLES.keys() if EXAMPLES[example]["zip"]], -) diff --git a/aio/content/examples/accessibility/BUILD.bazel b/aio/content/examples/accessibility/BUILD.bazel deleted file mode 100644 index 71c6c6887ef..00000000000 --- a/aio/content/examples/accessibility/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "accessibility", -) diff --git a/aio/content/examples/accessibility/e2e/src/app.e2e-spec.ts b/aio/content/examples/accessibility/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 9f95e2f9f25..00000000000 --- a/aio/content/examples/accessibility/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Accessibility example e2e tests', () => { - - beforeEach(() => browser.get('')); - - it('should display Accessibility Example', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Accessibility Example'); - }); - - it('should take a number and change progressbar width', async () => { - await element(by.css('input')).sendKeys('16'); - expect(await element(by.css('input')).getAttribute('value')).toEqual('16'); - expect(await element(by.css('app-example-progressbar div')).getCssValue('width')).toBe('48px'); - }); - -}); diff --git a/aio/content/examples/accessibility/example-config.json b/aio/content/examples/accessibility/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/accessibility/src/app/app.component.css b/aio/content/examples/accessibility/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/accessibility/src/app/app.component.html b/aio/content/examples/accessibility/src/app/app.component.html deleted file mode 100755 index 69984ba3d0b..00000000000 --- a/aio/content/examples/accessibility/src/app/app.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    Accessibility Example

    - - - - - - - - diff --git a/aio/content/examples/accessibility/src/app/app.component.ts b/aio/content/examples/accessibility/src/app/app.component.ts deleted file mode 100755 index 2d7cf55c707..00000000000 --- a/aio/content/examples/accessibility/src/app/app.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {Component} from '@angular/core'; -import {ExampleProgressbarComponent} from './progress-bar.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [ExampleProgressbarComponent], -}) -export class AppComponent { - progress = 0; - - setProgress($event: Event) { - this.progress = +($event.target as HTMLInputElement).value; - } -} diff --git a/aio/content/examples/accessibility/src/app/progress-bar.component.css b/aio/content/examples/accessibility/src/app/progress-bar.component.css deleted file mode 100755 index 976ef616556..00000000000 --- a/aio/content/examples/accessibility/src/app/progress-bar.component.css +++ /dev/null @@ -1,12 +0,0 @@ - :host { - display: block; - width: 300px; - height: 25px; - border: 1px solid black; - margin-top: 16px; - } - - .bar { - background: blue; - height: 100%; - } \ No newline at end of file diff --git a/aio/content/examples/accessibility/src/app/progress-bar.component.ts b/aio/content/examples/accessibility/src/app/progress-bar.component.ts deleted file mode 100755 index a135654080d..00000000000 --- a/aio/content/examples/accessibility/src/app/progress-bar.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable @angular-eslint/no-host-metadata-property */ -// #docregion progressbar-component -import {Component, Input} from '@angular/core'; - -/** - * Example progressbar component. - */ -@Component({ - standalone: true, - selector: 'app-example-progressbar', - template: '
    ', - styleUrls: ['./progress-bar.component.css'], - host: { - // Sets the role for this component to "progressbar" - role: 'progressbar', - - // Sets the minimum and maximum values for the progressbar role. - 'aria-valuemin': '0', - 'aria-valuemax': '100', - - // Binding that updates the current value of the progressbar. - '[attr.aria-valuenow]': 'value', - }, -}) -export class ExampleProgressbarComponent { - /** Current value of the progressbar. */ - @Input() value = 0; -} - -// #enddocregion progressbar-component diff --git a/aio/content/examples/accessibility/src/index.html b/aio/content/examples/accessibility/src/index.html deleted file mode 100644 index 1bafe4f7474..00000000000 --- a/aio/content/examples/accessibility/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Accessibility Example - - - - - - Loading... - - diff --git a/aio/content/examples/accessibility/src/main.ts b/aio/content/examples/accessibility/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/accessibility/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/accessibility/stackblitz.json b/aio/content/examples/accessibility/stackblitz.json deleted file mode 100644 index e9852d46243..00000000000 --- a/aio/content/examples/accessibility/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Accessibility", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": ["Accessibility"] -} diff --git a/aio/content/examples/ajs-quick-reference/.angular-cli.1.json b/aio/content/examples/ajs-quick-reference/.angular-cli.1.json deleted file mode 100644 index d4a67ca369b..00000000000 --- a/aio/content/examples/ajs-quick-reference/.angular-cli.1.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "project": { - "name": "angular.io-example" - }, - "apps": [ - { - "root": "src", - "outDir": "dist", - "assets": [ - "assets", - "favicon.ico" - ], - "index": "index.html", - "main": "main.ts", - "polyfills": "polyfills.ts", - "test": "test.ts", - "tsconfig": "tsconfig.app.json", - "testTsconfig": "tsconfig.spec.json", - "prefix": "app", - // #docregion styles - "styles": [ - "styles.css" - ], - // #enddocregion styles - "scripts": [], - "environmentSource": "environments/environment.ts", - "environments": { - "dev": "environments/environment.ts", - "prod": "environments/environment.prod.ts" - } - } - ], - "e2e": { - "protractor": { - "config": "./protractor.conf.js" - } - }, - "lint": [ - { - "project": "src/tsconfig.app.json", - "exclude": "**/node_modules/**" - }, - { - "project": "src/tsconfig.spec.json", - "exclude": "**/node_modules/**" - }, - { - "project": "e2e/tsconfig.e2e.json", - "exclude": "**/node_modules/**" - } - ], - "test": { - "karma": { - "config": "./karma.conf.js" - } - }, - "defaults": { - "styleExt": "css", - "component": {} - } -} diff --git a/aio/content/examples/ajs-quick-reference/BUILD.bazel b/aio/content/examples/ajs-quick-reference/BUILD.bazel deleted file mode 100644 index 9352f66b80b..00000000000 --- a/aio/content/examples/ajs-quick-reference/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "ajs-quick-reference", -) diff --git a/aio/content/examples/ajs-quick-reference/e2e/src/app.e2e-spec.ts b/aio/content/examples/ajs-quick-reference/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 83c28d496a9..00000000000 --- a/aio/content/examples/ajs-quick-reference/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,109 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('AngularJS to Angular Quick Reference Tests', () => { - - beforeAll(() => browser.get('')); - - it('should display no poster images after bootstrap', async () => { - await testImagesAreDisplayed(false); - }); - - it('should display proper movie data', async () => { - // We check only a few samples - const expectedSamples: any[] = [ - {row: 0, column: 0, element: 'img', attr: 'src', value: 'images/hero.svg', contains: true}, - {row: 0, column: 2, value: 'Celeritas'}, - {row: 1, column: 3, matches: /Dec 1[678], 2015/}, // absorb timezone dif; we care about date format - {row: 1, column: 5, value: '$14.95'}, - {row: 2, column: 4, value: 'PG-13'}, - {row: 2, column: 7, value: '100%'}, - {row: 2, column: 0, element: 'img', attr: 'src', value: 'images/ng-logo.svg', contains: true}, - ]; - - // Go through the samples - const movieRows = getMovieRows(); - for (const sample of expectedSamples) { - const tableCell = movieRows.get(sample.row) - .all(by.tagName('td')).get(sample.column); - // Check the cell or its nested element - const elementToCheck = sample.element - ? tableCell.element(by.tagName(sample.element)) - : tableCell; - - // Check element attribute or text - const valueToCheck = sample.attr - ? await elementToCheck.getAttribute(sample.attr) - : await elementToCheck.getText(); - - // Test for equals/contains/match - if (sample.contains) { - expect(valueToCheck).toContain(sample.value); - } else if (sample.matches) { - expect(valueToCheck).toMatch(sample.matches); - } else { - expect(valueToCheck).toEqual(sample.value); - } - } - }); - - it('should display images after Show Poster', async () => { - await testPosterButtonClick('Show Poster', true); - }); - - it('should hide images after Hide Poster', async () => { - await testPosterButtonClick('Hide Poster', false); - }); - - it('should display no movie when no favorite hero is specified', async () => { - await testFavoriteHero(null, 'Please enter your favorite hero.'); - }); - - it('should display no movie for Magneta', async () => { - await testFavoriteHero('Magneta', 'No movie, sorry!'); - }); - - it('should display a movie for Dr Nice', async () => { - await testFavoriteHero('Dr Nice', 'Excellent choice!'); - }); - - async function testImagesAreDisplayed(isDisplayed: boolean) { - const expectedMovieCount = 3; - - const movieRows = getMovieRows(); - expect(await movieRows.count()).toBe(expectedMovieCount); - for (let i = 0; i < expectedMovieCount; i++) { - const movieImage = movieRows.get(i).element(by.css('td > img')); - expect(await movieImage.isDisplayed()).toBe(isDisplayed); - } - } - - async function testPosterButtonClick(expectedButtonText: string, isDisplayed: boolean) { - const posterButton = element(by.css('app-movie-list tr > th > button')); - expect(await posterButton.getText()).toBe(expectedButtonText); - - await posterButton.click(); - await testImagesAreDisplayed(isDisplayed); - } - - function getMovieRows() { - return element.all(by.css('app-movie-list tbody > tr')); - } - - async function testFavoriteHero(heroName: string | null, expectedLabel: string) { - const movieListComp = element(by.tagName('app-movie-list')); - const heroInput = movieListComp.element(by.tagName('input')); - const favoriteHeroLabel = movieListComp.element(by.tagName('h3')); - const resultLabel = movieListComp.element(by.css('span > p')); - - await heroInput.clear(); - await heroInput.sendKeys(heroName || ''); - - expect(await resultLabel.getText()).toBe(expectedLabel); - if (heroName) { - expect(await favoriteHeroLabel.isDisplayed()).toBe(true); - expect(await favoriteHeroLabel.getText()).toContain(heroName); - } else { - expect(await favoriteHeroLabel.isDisplayed()).toBe(false); - } - } -}); diff --git a/aio/content/examples/ajs-quick-reference/example-config.json b/aio/content/examples/ajs-quick-reference/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/ajs-quick-reference/src/app/app.component.css b/aio/content/examples/ajs-quick-reference/src/app/app.component.css deleted file mode 100644 index e454e9ea87f..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/app.component.css +++ /dev/null @@ -1,9 +0,0 @@ -.active {font-style: italic;} -.shazam {font-weight: bold;} - -img {height: 100px;} - -table td { - padding: 4px; - border: 1px solid #e0e0e0; -} diff --git a/aio/content/examples/ajs-quick-reference/src/app/app.component.html b/aio/content/examples/ajs-quick-reference/src/app/app.component.html deleted file mode 100644 index bb7dbad3cd8..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/app.component.html +++ /dev/null @@ -1,112 +0,0 @@ - -

    {{title}}

    - -

    Routed Movies

    - - - -
    - -

    Example Snippets

    - - -
    - - [ngClass] active -
    - -
    - - [ngClass] active and boldly important -
    - -
    - - [class.active] -
    - -

    - -Angular Docs - - -

    -
    - - - - -

    Image toggle event type was {{eventType}}

    -
    - -

    -
    - - - -
    - -

    - -
    - - color preference #1 -
    - -
    - - color preference #2 -
    - -

    Movie as JSON

    - -
    {{movie | json}}
    - - -

    Movie Titles via local variable

    - - - - - - -
    {{movie.title}}
    - -

    Sliced Movies with pipes

    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    {{movie.title | uppercase}}{{movie.title | lowercase}}{{movie.releaseDate | date}}{{movie.price | currency:'USD':true}}{{movie.starRating | number}}{{movie.starRating | number:'1.1-2'}}{{movie.approvalRating | percent: '1.0-2'}}
    diff --git a/aio/content/examples/ajs-quick-reference/src/app/app.component.ts b/aio/content/examples/ajs-quick-reference/src/app/app.component.ts deleted file mode 100644 index 7af2cfee1ba..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/app.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component } from '@angular/core'; -import { - NgFor, NgIf, NgClass, NgStyle, - CurrencyPipe, DatePipe, DecimalPipe, JsonPipe, LowerCasePipe, PercentPipe, SlicePipe, UpperCasePipe -} from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { RouterLink, RouterOutlet} from '@angular/router'; - -import { MovieService } from './movie.service'; -import { IMovie } from './movie'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - FormsModule, - NgFor, NgIf, NgClass, NgStyle, - CurrencyPipe, DatePipe, DecimalPipe, JsonPipe, LowerCasePipe, PercentPipe, SlicePipe, UpperCasePipe, - RouterLink, RouterOutlet - ], - styleUrls: [ './app.component.css' ] -}) -export class AppComponent { - - angularDocsUrl = 'https://angular.io/'; - colorPreference = 'red'; - eventType = ''; - isActive = true; - isImportant = true; - movie: IMovie; - movies: IMovie[] = []; - showImage = true; - title = 'AngularJS to Angular Quick Ref Cookbook'; - toggleImage(event?: UIEvent) { - this.showImage = !this.showImage; - this.eventType = (event && event.type) || 'not provided'; - } - - constructor(movieService: MovieService) { - this.movies = movieService.getMovies(); - this.movie = this.movies[0]; - } -} diff --git a/aio/content/examples/ajs-quick-reference/src/app/app.config.ts b/aio/content/examples/ajs-quick-reference/src/app/app.config.ts deleted file mode 100644 index 864f25f8bda..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/app.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideRouter, Routes } from '@angular/router'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { MovieListComponent } from './movie-list.component'; - -const routes: Routes = [ - { path: '', redirectTo: '/movies', pathMatch: 'full' }, - { path: 'movies', component: MovieListComponent } -]; - -export const appConfig: ApplicationConfig = { - providers: [ - provideRouter(routes), - provideProtractorTestingSupport(), // essential for e2e testing - ], -}; diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.css b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.css deleted file mode 100644 index d635cff06af..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.css +++ /dev/null @@ -1,51 +0,0 @@ -div { - font-family:Arial, Helvetica, sans-serif; - margin:20px; -} - -table { - font-family:Arial, Helvetica, sans-serif; - color:#666; - font-size:14px; - text-shadow: 1px 1px 0 #fff; - margin:20px; - border:#ccc 1px solid; - - border-radius:3px; -} -table th { - padding:21px 25px 22px 25px; - border-top:1px solid #fafafa; - border-bottom:1px solid #e0e0e0; - border-left: 1px solid #e0e0e0; - font-weight: bold; -} -table th:first-child { - text-align: left; - padding-left:20px; - border-left: 0; -} -table tr { - text-align: center; - padding-left:20px; -} -table td:first-child { - text-align: left; - padding-left:20px; - border-left: 0; -} -table td { - padding:18px; - border-top: 1px solid #ffffff; - border-bottom:1px solid #e0e0e0; - border-left: 1px solid #e0e0e0; -} -table tr:last-child td { - border-bottom:0; -} -table tr:last-child td:first-child { - border-bottom-left-radius:3px; -} -table tr:last-child td:last-child { - border-bottom-right-radius:3px; -} diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html deleted file mode 100644 index 4613652a640..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.html +++ /dev/null @@ -1,77 +0,0 @@ - -
    -

    Movie List

    -
    Who is your favorite hero?
    -
    - - - - - - -

    - Excellent choice! -

    -

    - No movie, sorry! -

    -

    - Please enter your favorite hero. -

    -
    - -
    -
    - - -

    - - Your favorite hero is: {{favoriteHero}} - -

    - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - TitleHeroRelease DateRatingPriceStar ratingApproval rating
    - - {{movie.title}}{{movie.hero}}{{movie.releaseDate | date}}{{movie.mpaa | uppercase}}{{movie.price | currency:'USD':true}}{{movie.starRating | number:'1.1-2'}}{{movie.approvalRating | percent: '1.0-0'}}
    -
    diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts b/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts deleted file mode 100644 index 2e6a97f43d3..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/movie-list.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -import { - NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, - CurrencyPipe, DatePipe, DecimalPipe, PercentPipe, UpperCasePipe -} from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { IMovie } from './movie'; -import { MovieService } from './movie.service'; - -// #docregion component -@Component({ - standalone: true, - selector: 'app-movie-list', - templateUrl: './movie-list.component.html', - imports: [ - FormsModule, - NgFor, NgIf, NgSwitch, NgSwitchCase, NgSwitchDefault, - CurrencyPipe, DatePipe, DecimalPipe, PercentPipe, UpperCasePipe - ], -// #docregion style-url - styleUrls: [ './movie-list.component.css' ], -// #enddocregion style-url -}) -// #enddocregion component -// #docregion class -export class MovieListComponent { -// #enddocregion class - favoriteHero: string | undefined; - showImage = false; - movies: IMovie[]; - -// #docregion di - constructor(movieService: MovieService) { -// #enddocregion di - this.movies = movieService.getMovies(); -// #docregion di - } -// #enddocregion di - - toggleImage(): void { - this.showImage = !this.showImage; - } - - checkMovieHero(value: string): boolean { - return this.movies.filter(movie => movie.hero === value).length > 0 ; - } -// #docregion class -} -// #enddocregion class diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts b/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts deleted file mode 100644 index ca30896d150..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/movie.service.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { IMovie } from './movie'; - -@Injectable({providedIn: 'root'}) -export class MovieService { - getMovies(): IMovie[] { - return [ - { - hero: 'Celeritas', - imageurl: 'assets/images/hero.svg', - movieId: 1, - mpaa: 'pg-13', - releaseDate: '2015-12-19T00:00:00', - title: 'Celeritas Reigns', - price: 12.95, - starRating: 4.925, - approvalRating: .97 - }, - { - hero: 'Dr Nice', - imageurl: 'assets/images/villain.svg', - movieId: 2, - mpaa: 'pg-13', - releaseDate: '2015-12-18T00:00:00', - title: 'No More Dr Nice', - price: 14.95, - starRating: 4.6, - approvalRating: .94 - }, - { - hero: 'Angular', - imageurl: 'assets/images/ng-logo.svg', - movieId: 3, - mpaa: 'pg-13', - releaseDate: '2015-12-17T00:00:00', - title: 'Angular to the Rescue', - price: 15.95, - starRating: 4.98, - approvalRating: .9995 - } - ]; - } -} diff --git a/aio/content/examples/ajs-quick-reference/src/app/movie.ts b/aio/content/examples/ajs-quick-reference/src/app/movie.ts deleted file mode 100644 index 0e6f3215200..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/app/movie.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* Defines the movie entity */ -export interface IMovie { - approvalRating: number; - hero: string; - imageurl: string; - movieId: number; - mpaa: string; - price: number; - releaseDate: string; - starRating: number; - title: string; -} diff --git a/aio/content/examples/ajs-quick-reference/src/assets/images/hero.svg b/aio/content/examples/ajs-quick-reference/src/assets/images/hero.svg deleted file mode 100644 index f0a002fc724..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/assets/images/hero.svg +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - image/svg+xml - - - - - - Layer 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/ajs-quick-reference/src/assets/images/ng-logo.svg b/aio/content/examples/ajs-quick-reference/src/assets/images/ng-logo.svg deleted file mode 100644 index ac78f203d21..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/assets/images/ng-logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/aio/content/examples/ajs-quick-reference/src/assets/images/villain.svg b/aio/content/examples/ajs-quick-reference/src/assets/images/villain.svg deleted file mode 100644 index 75851ef7d96..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/assets/images/villain.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/ajs-quick-reference/src/index.html b/aio/content/examples/ajs-quick-reference/src/index.html deleted file mode 100644 index 5aafc885c9e..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - AngularJS to Angular Quick Reference - - - - - - - - diff --git a/aio/content/examples/ajs-quick-reference/src/main.ts b/aio/content/examples/ajs-quick-reference/src/main.ts deleted file mode 100644 index b22b12f3184..00000000000 --- a/aio/content/examples/ajs-quick-reference/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/ajs-quick-reference/stackblitz.json b/aio/content/examples/ajs-quick-reference/stackblitz.json deleted file mode 100644 index 6b91b367d27..00000000000 --- a/aio/content/examples/ajs-quick-reference/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "AngularJS to Angular Quick Reference", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "tags":["cookbook", "angularjs"] -} diff --git a/aio/content/examples/angular-compiler-options/BUILD.bazel b/aio/content/examples/angular-compiler-options/BUILD.bazel deleted file mode 100644 index 6f74c8cba9c..00000000000 --- a/aio/content/examples/angular-compiler-options/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "angular-compiler-options", -) diff --git a/aio/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts b/aio/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts deleted file mode 100644 index bd99243f892..00000000000 --- a/aio/content/examples/angular-compiler-options/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { AppPage } from './app.po'; -import { browser, logging } from 'protractor'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - // Add your e2e tests here - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/angular-compiler-options/example-config.json b/aio/content/examples/angular-compiler-options/example-config.json deleted file mode 100644 index 58b92eaf03d..00000000000 --- a/aio/content/examples/angular-compiler-options/example-config.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "projectType": "cli", - "overrideBoilerplate": [ - "tsconfig.json", - "tsconfig.app.json" - ], - "tests": [ - { - "cmd": "yarn", - "args": [ - "e2e", - "--protractor-config=e2e/protractor-bazel.conf.js", - "--no-webdriver-update", - "--port=0" - ] - } - ] - } - \ No newline at end of file diff --git a/aio/content/examples/angular-compiler-options/src/app/app.component.css b/aio/content/examples/angular-compiler-options/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/angular-compiler-options/src/app/app.component.html b/aio/content/examples/angular-compiler-options/src/app/app.component.html deleted file mode 100644 index 60dbe3a500a..00000000000 --- a/aio/content/examples/angular-compiler-options/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Replace the src folder in this {{title}} with yours.

    \ No newline at end of file diff --git a/aio/content/examples/angular-compiler-options/src/app/app.component.spec.ts b/aio/content/examples/angular-compiler-options/src/app/app.component.spec.ts deleted file mode 100644 index 0509746ff04..00000000000 --- a/aio/content/examples/angular-compiler-options/src/app/app.component.spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - // Add your unit tests here -}); diff --git a/aio/content/examples/angular-compiler-options/src/app/app.component.ts b/aio/content/examples/angular-compiler-options/src/app/app.component.ts deleted file mode 100644 index d2e081e6e4d..00000000000 --- a/aio/content/examples/angular-compiler-options/src/app/app.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'example'; -} diff --git a/aio/content/examples/angular-compiler-options/src/index.html b/aio/content/examples/angular-compiler-options/src/index.html deleted file mode 100644 index 9a54a12cd4d..00000000000 --- a/aio/content/examples/angular-compiler-options/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Ponyracer - - - - - - - - diff --git a/aio/content/examples/angular-compiler-options/src/main.ts b/aio/content/examples/angular-compiler-options/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/angular-compiler-options/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/angular-compiler-options/stackblitz.json b/aio/content/examples/angular-compiler-options/stackblitz.json deleted file mode 100644 index c3de0afae15..00000000000 --- a/aio/content/examples/angular-compiler-options/stackblitz.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "description": "Angular Compiler Options", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*", - "!doc-files/**/*", - "!tsconfig.json", - "!tsconfig.app.json" - ], - "tags": [ - [ - "angular", - "compiler", - "options" - ] - ] -} diff --git a/aio/content/examples/angular-compiler-options/tsconfig.app.json b/aio/content/examples/angular-compiler-options/tsconfig.app.json deleted file mode 100644 index 888ba6c0f28..00000000000 --- a/aio/content/examples/angular-compiler-options/tsconfig.app.json +++ /dev/null @@ -1,44 +0,0 @@ -// #docplaster ... -/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */ -// #docregion angular-compiler-options-app -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - // #enddocregion angular-compiler-options-app - "types": [] - }, - "files": [ - "src/main.ts" - ], - "include": [ - "src/**/*.d.ts" - ], - "exclude": [ - "src/test.ts", - "src/**/*.spec.ts", - "src/**/*-specs.ts", - "src/**/*.avoid.ts", - "src/**/*.0.ts", - "src/**/*.1.ts", - "src/**/*.1b.ts", - "src/**/*.2.ts", - "src/**/*.3.ts", - "src/**/*.4.ts", - "src/**/*.5.ts", - "src/**/*.6.ts", - "src/**/*.7.ts", - "src/**/testing" - ], - // #docregion angular-compiler-options-app - "angularCompilerOptions": { - "strictTemplates": true, - "preserveWhitespaces": true, - // #enddocregion angular-compiler-options-app - "sourceMap": true, - "declaration": false, - // #docregion angular-compiler-options-app - "disableTypeScriptVersionCheck": true - } - } - // #enddocregion angular-compiler-options-app diff --git a/aio/content/examples/angular-compiler-options/tsconfig.json b/aio/content/examples/angular-compiler-options/tsconfig.json deleted file mode 100644 index 4fd2e3a6860..00000000000 --- a/aio/content/examples/angular-compiler-options/tsconfig.json +++ /dev/null @@ -1,40 +0,0 @@ -// #docplaster ... -/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */ -// #docregion angular-compiler-options -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - // #enddocregion angular-compiler-options - "outDir": "./dist/out-tsc", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "es2020", - "module": "es2020", - "lib": [ - "es2020", - "dom" - ] - // #docregion angular-compiler-options - }, - "angularCompilerOptions": { - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - // #enddocregion angular-compiler-options - "strictInputAccessModifiers": true, - "strictTemplates": true, - // #docregion angular-compiler-options - "disableTypeScriptVersionCheck": true - } -} -// #enddocregion angular-compiler-options diff --git a/aio/content/examples/angular-linker-plugin/webpack.config.mjs b/aio/content/examples/angular-linker-plugin/webpack.config.mjs deleted file mode 100644 index 430a57d171b..00000000000 --- a/aio/content/examples/angular-linker-plugin/webpack.config.mjs +++ /dev/null @@ -1,26 +0,0 @@ -// #docplaster ... -// #docregion webpack-config -import linkerPlugin from '@angular/compiler-cli/linker/babel'; - -export default { - // #enddocregion webpack-config - // #docregion webpack-config - module: { - rules: [ - { - test: /\.m?js$/, - use: { - loader: 'babel-loader', - options: { - plugins: [linkerPlugin], - compact: false, - cacheDirectory: true, - } - } - } - ] - } - // #enddocregion webpack-config - // #docregion webpack-config -} -// #enddocregion webpack-config diff --git a/aio/content/examples/animations/BUILD.bazel b/aio/content/examples/animations/BUILD.bazel deleted file mode 100644 index 4e8f6ba7c0c..00000000000 --- a/aio/content/examples/animations/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "animations", -) diff --git a/aio/content/examples/animations/e2e/src/app.e2e-spec.ts b/aio/content/examples/animations/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 620e50d8936..00000000000 --- a/aio/content/examples/animations/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,296 +0,0 @@ -import { browser } from 'protractor'; -import { logging } from 'selenium-webdriver'; -import * as openClose from './open-close.po'; -import * as statusSlider from './status-slider.po'; -import * as toggle from './toggle.po'; -import * as enterLeave from './enter-leave.po'; -import * as auto from './auto.po'; -import * as filterStagger from './filter-stagger.po'; -import * as heroGroups from './hero-groups'; -import { getLinkById, sleepFor } from './util'; -import { getComponentSection, getToggleButton } from './querying.po'; - -describe('Animation Tests', () => { - const routingAnimationDuration = 350; - - const openCloseHref = getLinkById('open-close'); - const statusSliderHref = getLinkById('status'); - const toggleHref = getLinkById('toggle'); - const enterLeaveHref = getLinkById('enter-leave'); - const autoHref = getLinkById('auto'); - const filterHref = getLinkById('heroes'); - const heroGroupsHref = getLinkById('hero-groups'); - const queryingHref = getLinkById('querying'); - - const newPageSleepFor = (ms = 0) => sleepFor(ms + routingAnimationDuration); - - beforeAll(() => browser.get('')); - - describe('Open/Close Component', () => { - const closedHeight = '100px'; - const openHeight = '200px'; - - beforeAll(async () => { - await openCloseHref.click(); - await newPageSleepFor(300); - }); - - it('should be open', async () => { - const toggleButton = openClose.getToggleButton(); - const container = openClose.getComponentContainer(); - let text = await container.getText(); - - if (text.includes('Closed')) { - await toggleButton.click(); - await browser.wait(async () => await container.getCssValue('height') === openHeight, 2000); - } - - text = await container.getText(); - const containerHeight = await container.getCssValue('height'); - - expect(text).toContain('The box is now Open!'); - expect(containerHeight).toBe(openHeight); - }); - - it('should be closed', async () => { - const toggleButton = openClose.getToggleButton(); - const container = openClose.getComponentContainer(); - let text = await container.getText(); - - if (text.includes('Open')) { - await toggleButton.click(); - await browser.wait(async () => await container.getCssValue('height') === closedHeight, 2000); - } - - text = await container.getText(); - const containerHeight = await container.getCssValue('height'); - - expect(text).toContain('The box is now Closed!'); - expect(containerHeight).toBe(closedHeight); - }); - - it('should log animation events', async () => { - const toggleButton = openClose.getToggleButton(); - const loggingCheckbox = openClose.getLoggingCheckbox(); - await loggingCheckbox.click(); - await toggleButton.click(); - - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - const animationMessages = logs.filter(({ message }) => message.includes('Animation')); - - expect(animationMessages.length).toBeGreaterThan(0); - }); - }); - - describe('Status Slider Component', () => { - const activeColor = 'rgba(117, 70, 0, 1)'; - const inactiveColor = 'rgba(0, 0, 255, 1)'; - - beforeAll(async () => { - await statusSliderHref.click(); - await newPageSleepFor(2000); - }); - - it('should be inactive with a blue background', async () => { - const toggleButton = statusSlider.getToggleButton(); - const container = statusSlider.getComponentContainer(); - let text = await container.getText(); - - if (text === 'Active') { - await toggleButton.click(); - await browser.wait(async () => await container.getCssValue('backgroundColor') === inactiveColor, 3000); - } - - text = await container.getText(); - const bgColor = await container.getCssValue('backgroundColor'); - - expect(text).toBe('Inactive'); - expect(bgColor).toBe(inactiveColor); - }); - - it('should be active with an orange background', async () => { - const toggleButton = statusSlider.getToggleButton(); - const container = statusSlider.getComponentContainer(); - let text = await container.getText(); - - if (text === 'Inactive') { - await toggleButton.click(); - await browser.wait(async () => await container.getCssValue('backgroundColor') === activeColor, 3000); - } - - text = await container.getText(); - const bgColor = await container.getCssValue('backgroundColor'); - - expect(text).toBe('Active'); - expect(bgColor).toBe(activeColor); - }); - }); - - describe('Toggle Animations Component', () => { - beforeAll(async () => { - await toggleHref.click(); - await newPageSleepFor(); - }); - - it('should disabled animations on the child element', async () => { - const toggleButton = toggle.getToggleAnimationsButton(); - - await toggleButton.click(); - - const container = toggle.getComponentContainer(); - const cssClasses = await container.getAttribute('class'); - - expect(cssClasses).toContain('ng-animate-disabled'); - }); - }); - - describe('Enter/Leave Component', () => { - beforeAll(async () => { - await enterLeaveHref.click(); - await newPageSleepFor(100); - }); - - it('should attach a flyInOut trigger to the list of items', async () => { - const heroesList = enterLeave.getHeroesList(); - const hero = heroesList.get(0); - const cssClasses = await hero.getAttribute('class'); - const transform = await hero.getCssValue('transform'); - - expect(cssClasses).toContain('ng-trigger-flyInOut'); - expect(transform).toBe('matrix(1, 0, 0, 1, 0, 0)'); - }); - - it('should remove the hero from the list when clicked', async () => { - const heroesList = enterLeave.getHeroesList(); - const total = await heroesList.count(); - const hero = heroesList.get(0); - - await hero.click(); - await browser.wait(async () => await heroesList.count() < total, 2000); - }); - }); - - describe('Auto Calculation Component', () => { - beforeAll(async () => { - await autoHref.click(); - await newPageSleepFor(); - }); - - it('should attach a shrinkOut trigger to the list of items', async () => { - const heroesList = auto.getHeroesList(); - const hero = heroesList.get(0); - const cssClasses = await hero.getAttribute('class'); - - expect(cssClasses).toContain('ng-trigger-shrinkOut'); - }); - - it('should remove the hero from the list when clicked', async () => { - const heroesList = auto.getHeroesList(); - const total = await heroesList.count(); - const hero = heroesList.get(0); - - await hero.click(); - await browser.wait(async () => await heroesList.count() < total, 2000); - }); - }); - - describe('Filter/Stagger Component', () => { - beforeAll(async () => { - await filterHref.click(); - await newPageSleepFor(); - }); - - it('should attach a filterAnimations trigger to the list container', async () => { - const heroesList = filterStagger.getComponentContainer(); - const cssClasses = await heroesList.getAttribute('class'); - - expect(cssClasses).toContain('ng-trigger-filterAnimation'); - }); - - it('should filter down the list when a search is performed', async () => { - const heroesList = filterStagger.getHeroesList(); - const total = await heroesList.count(); - - const input = filterStagger.getInput(); - await input.sendKeys('Mag'); - - await browser.wait(async () => await heroesList.count() === 2, 5000); - - const newTotal = await heroesList.count(); - expect(newTotal).toBeLessThan(total); - }); - }); - - describe('Hero Groups Component', () => { - beforeAll(async () => { - await heroGroupsHref.click(); - await newPageSleepFor(400); - }); - - it('should attach a flyInOut trigger to the list of items', async () => { - const heroesList = heroGroups.getHeroesList(); - const hero = heroesList.get(0); - const cssClasses = await hero.getAttribute('class'); - const transform = await hero.getCssValue('transform'); - const opacity = await hero.getCssValue('opacity'); - - expect(cssClasses).toContain('ng-trigger-flyInOut'); - expect(transform).toBe('matrix(1, 0, 0, 1, 0, 0)'); - expect(opacity).toBe('1'); - }); - - it('should remove the hero from the list when clicked', async () => { - const heroesList = heroGroups.getHeroesList(); - const total = await heroesList.count(); - const hero = heroesList.get(0); - - await hero.click(); - await browser.wait(async () => await heroesList.count() < total, 2000); - }); - }); - - describe('Querying Component', () => { - const queryingAnimationDuration = 2500; - - beforeAll(async () => { - await queryingHref.click(); - await newPageSleepFor(queryingAnimationDuration); - }); - - it('should toggle the section', async () => { - const toggleButton = getToggleButton(); - const section = getComponentSection(); - - expect(await section.isPresent()).toBe(true); - - // toggling off - await toggleButton.click(); - await newPageSleepFor(queryingAnimationDuration); - expect(await section.isPresent()).toBe(false); - - // toggling on - await toggleButton.click(); - await newPageSleepFor(queryingAnimationDuration); - expect(await section.isPresent()).toBe(true); - await newPageSleepFor(queryingAnimationDuration); - }); - - it(`should disable the button for the animation's duration`, async () => { - const toggleButton = getToggleButton(); - expect(await toggleButton.isEnabled()).toBe(true); - - // toggling off - await toggleButton.click(); - expect(await toggleButton.isEnabled()).toBe(false); - await newPageSleepFor(queryingAnimationDuration); - expect(await toggleButton.isEnabled()).toBe(true); - - // toggling on - await toggleButton.click(); - expect(await toggleButton.isEnabled()).toBe(false); - await newPageSleepFor(queryingAnimationDuration); - expect(await toggleButton.isEnabled()).toBe(true); - }); - - }); -}); diff --git a/aio/content/examples/animations/e2e/src/auto.po.ts b/aio/content/examples/animations/e2e/src/auto.po.ts deleted file mode 100644 index fbaa38e85bb..00000000000 --- a/aio/content/examples/animations/e2e/src/auto.po.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-hero-list-auto-page'); -} - -export function getComponent() { - return by.css('app-hero-list-auto'); -} - -export function getComponentContainer() { - const findContainer = () => by.css('ul'); - return locate(getComponent(), findContainer()); -} - -export function getHeroesList() { - return getComponentContainer().all(by.css('li')); -} diff --git a/aio/content/examples/animations/e2e/src/enter-leave.po.ts b/aio/content/examples/animations/e2e/src/enter-leave.po.ts deleted file mode 100644 index 62ac5858c22..00000000000 --- a/aio/content/examples/animations/e2e/src/enter-leave.po.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-hero-list-enter-leave-page'); -} - -export function getComponent() { - return by.css('app-hero-list-enter-leave'); -} - -export function getComponentContainer() { - const findContainer = () => by.css('ul'); - return locate(getComponent(), findContainer()); -} - -export function getHeroesList() { - return getComponentContainer().all(by.css('li')); -} diff --git a/aio/content/examples/animations/e2e/src/filter-stagger.po.ts b/aio/content/examples/animations/e2e/src/filter-stagger.po.ts deleted file mode 100644 index f6bd1e2df8f..00000000000 --- a/aio/content/examples/animations/e2e/src/filter-stagger.po.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-hero-list-page'); -} - -export function getComponentContainer() { - const findContainer = () => by.css('ul'); - return locate(getPage(), findContainer()); -} - -export function getHeroesList() { - return getComponentContainer().all(by.css('li')); -} - -export function getInput() { - const input = () => by.css('input'); - return locate(getPage(), input()); -} diff --git a/aio/content/examples/animations/e2e/src/hero-groups.ts b/aio/content/examples/animations/e2e/src/hero-groups.ts deleted file mode 100644 index 69700adcc63..00000000000 --- a/aio/content/examples/animations/e2e/src/hero-groups.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-hero-list-groups-page'); -} - -export function getComponent() { - return by.css('app-hero-list-groups'); -} - -export function getComponentContainer() { - const findContainer = () => by.css('ul'); - return locate(getComponent(), findContainer()); -} - -export function getHeroesList() { - return getComponentContainer().all(by.css('li')); -} diff --git a/aio/content/examples/animations/e2e/src/open-close.po.ts b/aio/content/examples/animations/e2e/src/open-close.po.ts deleted file mode 100644 index 82ae5ab7db6..00000000000 --- a/aio/content/examples/animations/e2e/src/open-close.po.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-open-close-page'); -} - -export function getComponent() { - return by.css('app-open-close'); -} - -export function getToggleButton() { - const toggleButton = () => by.buttonText('Toggle Open/Close'); - return locate(getComponent(), toggleButton()); -} - -export function getLoggingCheckbox() { - const loggingCheckbox = () => by.css('section > input[type="checkbox"]'); - return locate(getPage(), loggingCheckbox()); -} - -export function getComponentContainer() { - const findContainer = () => by.css('div'); - return locate(getComponent(), findContainer()); -} diff --git a/aio/content/examples/animations/e2e/src/querying.po.ts b/aio/content/examples/animations/e2e/src/querying.po.ts deleted file mode 100644 index aa7ad828ba3..00000000000 --- a/aio/content/examples/animations/e2e/src/querying.po.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getComponent() { - return by.css('app-querying'); -} - -export function getToggleButton() { - const toggleButton = () => by.className('toggle'); - return locate(getComponent(), toggleButton()); -} - -export function getComponentSection() { - const findSection = () => by.css('section'); - return locate(getComponent(), findSection()); -} diff --git a/aio/content/examples/animations/e2e/src/status-slider.po.ts b/aio/content/examples/animations/e2e/src/status-slider.po.ts deleted file mode 100644 index 43e1d582b38..00000000000 --- a/aio/content/examples/animations/e2e/src/status-slider.po.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-status-slider-page'); -} - -export function getComponent() { - return by.css('app-status-slider'); -} - -export function getToggleButton() { - const toggleButton = () => by.buttonText('Toggle Status'); - return locate(getComponent(), toggleButton()); -} - -export function getComponentContainer() { - const findContainer = () => by.css('div'); - return locate(getComponent(), findContainer()); -} diff --git a/aio/content/examples/animations/e2e/src/toggle.po.ts b/aio/content/examples/animations/e2e/src/toggle.po.ts deleted file mode 100644 index 28575a55a25..00000000000 --- a/aio/content/examples/animations/e2e/src/toggle.po.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { by } from 'protractor'; -import { locate } from './util'; - -export function getPage() { - return by.css('app-toggle-animations-child-page'); -} - -export function getComponent() { - return by.css('app-open-close-toggle'); -} - -export function getToggleButton() { - const toggleButton = () => by.buttonText('Toggle Open/Closed'); - return locate(getComponent(), toggleButton()); -} - -export function getToggleAnimationsButton() { - const toggleAnimationsButton = () => by.buttonText('Toggle Animations'); - return locate(getComponent(), toggleAnimationsButton()); -} - -export function getComponentContainer() { - const findContainer = () => by.css('div'); - return locate(getComponent()).all(findContainer()).get(0); -} diff --git a/aio/content/examples/animations/e2e/src/util.ts b/aio/content/examples/animations/e2e/src/util.ts deleted file mode 100644 index 8942c1ed6aa..00000000000 --- a/aio/content/examples/animations/e2e/src/util.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Locator, ElementFinder, browser, by, element } from 'protractor'; - -/** - * - * locate(finder1, finder2) => element(finder1).element(finder2).element(finderN); - */ -export function locate(locator: Locator, ...locators: Locator[]) { - return locators.reduce( - (current: ElementFinder, next: Locator) => current.element(next), - element(locator)) as ElementFinder; -} - -export async function sleepFor(time = 1000) { - return await browser.sleep(time); -} - -export function getLinkById(id: string) { - return element(by.css(`a[id=${id}]`)); -} diff --git a/aio/content/examples/animations/example-config.json b/aio/content/examples/animations/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/animations/src/app/about.component.css b/aio/content/examples/animations/src/app/about.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/animations/src/app/about.component.html b/aio/content/examples/animations/src/app/about.component.html deleted file mode 100755 index 6ef2412703a..00000000000 --- a/aio/content/examples/animations/src/app/about.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - Angular's animations library makes it easy to define and apply animation effects such as page and list transitions. -

    diff --git a/aio/content/examples/animations/src/app/about.component.ts b/aio/content/examples/animations/src/app/about.component.ts deleted file mode 100755 index ce81010d0bd..00000000000 --- a/aio/content/examples/animations/src/app/about.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-about', - templateUrl: './about.component.html', - styleUrls: ['./about.component.css'] -}) -export class AboutComponent {} diff --git a/aio/content/examples/animations/src/app/animations.1.ts b/aio/content/examples/animations/src/app/animations.1.ts deleted file mode 100644 index 507d4d7c897..00000000000 --- a/aio/content/examples/animations/src/app/animations.1.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docplaster -// #docregion animation-const, trigger-const -import { animation, style, animate, trigger, transition, useAnimation } from '@angular/animations'; -// #enddocregion trigger-const - -export const transitionAnimation = animation([ - style({ - height: '{{ height }}', - opacity: '{{ opacity }}', - backgroundColor: '{{ backgroundColor }}' - }), - animate('{{ time }}') -]); -// #enddocregion animation-const - -// #docregion trigger-const -export const triggerAnimation = trigger('openClose', [ - transition('open => closed', [ - useAnimation(transitionAnimation, { - params: { - height: 0, - opacity: 1, - backgroundColor: 'red', - time: '1s' - } - }) - ]) -]); -// #enddocregion trigger-const diff --git a/aio/content/examples/animations/src/app/animations.ts b/aio/content/examples/animations/src/app/animations.ts deleted file mode 100755 index 163417d3563..00000000000 --- a/aio/content/examples/animations/src/app/animations.ts +++ /dev/null @@ -1,71 +0,0 @@ -import { - animation, trigger, animateChild, group, - transition, animate, style, query -} from '@angular/animations'; - -export const transitionAnimation = animation([ - style({ - height: '{{ height }}', - opacity: '{{ opacity }}', - backgroundColor: '{{ backgroundColor }}' - }), - animate('{{ time }}') -]); - -// Routable animations -// #docregion route-animations -export const slideInAnimation = -// #docregion style-view - trigger('routeAnimations', [ - transition('HomePage <=> AboutPage', [ - style({ position: 'relative' }), - query(':enter, :leave', [ - style({ - position: 'absolute', - top: 0, - left: 0, - width: '100%' - }) - ]), -// #enddocregion style-view -// #docregion query - query(':enter', [ - style({ left: '-100%' }) - ], { optional: true }), - query(':leave', animateChild(), { optional: true }), - group([ - query(':leave', [ - animate('300ms ease-out', style({ left: '100%' })) - ], { optional: true }), - query(':enter', [ - animate('300ms ease-out', style({ left: '0%' })) - ], { optional: true }), - ]), - ]), - transition('* <=> *', [ - style({ position: 'relative' }), - query(':enter, :leave', [ - style({ - position: 'absolute', - top: 0, - left: 0, - width: '100%' - }) - ], { optional: true }), - query(':enter', [ - style({ left: '-100%' }) - ], { optional: true }), - query(':leave', animateChild(), { optional: true }), - group([ - query(':leave', [ - animate('200ms ease-out', style({ left: '100%', opacity: 0 })) - ], { optional: true }), - query(':enter', [ - animate('300ms ease-out', style({ left: '0%' })) - ], { optional: true }), - query('@*', animateChild(), { optional: true }) - ]), - ]) - // #enddocregion query - ]); - // #enddocregion route-animations diff --git a/aio/content/examples/animations/src/app/app.component.1.ts b/aio/content/examples/animations/src/app/app.component.1.ts deleted file mode 100755 index 3b2d7b14599..00000000000 --- a/aio/content/examples/animations/src/app/app.component.1.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docplaster -import { Component, HostBinding } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: 'app.component.html', - styleUrls: ['app.component.css'], - animations: [ - // animation triggers go here - ] -}) -export class AppComponent { - @HostBinding('@.disabled') public animationsDisabled = false; - - toggleAnimations() { - this.animationsDisabled = !this.animationsDisabled; - } -} diff --git a/aio/content/examples/animations/src/app/app.component.css b/aio/content/examples/animations/src/app/app.component.css deleted file mode 100644 index de51b7b5db4..00000000000 --- a/aio/content/examples/animations/src/app/app.component.css +++ /dev/null @@ -1,15 +0,0 @@ -nav a { - padding: .7rem; -} - -h1 { - margin-bottom: .3rem; -} - -form { - margin-bottom: 2rem; -} - -nav { - padding-bottom: 3rem; -} diff --git a/aio/content/examples/animations/src/app/app.component.html b/aio/content/examples/animations/src/app/app.component.html deleted file mode 100644 index 59e6584e973..00000000000 --- a/aio/content/examples/animations/src/app/app.component.html +++ /dev/null @@ -1,27 +0,0 @@ -

    Animations

    - - - - - - - -
    - -
    - diff --git a/aio/content/examples/animations/src/app/app.component.ts b/aio/content/examples/animations/src/app/app.component.ts deleted file mode 100755 index da38efa951d..00000000000 --- a/aio/content/examples/animations/src/app/app.component.ts +++ /dev/null @@ -1,52 +0,0 @@ -// #docplaster -// #docregion imports -import { Component, HostBinding } from '@angular/core'; -import { - trigger, - state, - style, - animate, - transition, - // ... -} from '@angular/animations'; - -// #enddocregion imports -import { ChildrenOutletContexts, RouterLink, RouterOutlet } from '@angular/router'; -import { slideInAnimation } from './animations'; - -// #docregion decorator, toggle-app-animations, define -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: 'app.component.html', - styleUrls: ['app.component.css'], - imports: [RouterLink, RouterOutlet], - animations: [ -// #enddocregion decorator - slideInAnimation -// #docregion decorator -// #enddocregion toggle-app-animations, define - // animation triggers go here -// #docregion toggle-app-animations, define - ] -}) -// #enddocregion decorator, define -export class AppComponent { - @HostBinding('@.disabled') - public animationsDisabled = false; -// #enddocregion toggle-app-animations - -// #docregion get-route-animations-data - constructor(private contexts: ChildrenOutletContexts) {} - - getRouteAnimationData() { - return this.contexts.getContext('primary')?.route?.snapshot?.data?.['animation']; - } -// #enddocregion get-route-animations-data - - toggleAnimations() { - this.animationsDisabled = !this.animationsDisabled; - } -// #docregion toggle-app-animations -} -// #enddocregion toggle-app-animations diff --git a/aio/content/examples/animations/src/app/app.config.ts b/aio/content/examples/animations/src/app/app.config.ts deleted file mode 100644 index ebcf6bad161..00000000000 --- a/aio/content/examples/animations/src/app/app.config.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { routes } from './app.routes'; -import { provideRouter } from '@angular/router'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; -import { provideAnimations } from '@angular/platform-browser/animations'; - - -export const appConfig: ApplicationConfig = { - providers: [ - // needed for supporting e2e tests - provideProtractorTestingSupport(), - provideRouter(routes), - provideAnimations(), - ] -}; diff --git a/aio/content/examples/animations/src/app/app.module.1.ts b/aio/content/examples/animations/src/app/app.module.1.ts deleted file mode 100644 index d2ba898f789..00000000000 --- a/aio/content/examples/animations/src/app/app.module.1.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; - -@NgModule({ - imports: [ - BrowserModule, - BrowserAnimationsModule - ], - declarations: [ ], - bootstrap: [ ] -}) -export class AppModule { } diff --git a/aio/content/examples/animations/src/app/app.routes.ts b/aio/content/examples/animations/src/app/app.routes.ts deleted file mode 100644 index ae0b88a7952..00000000000 --- a/aio/content/examples/animations/src/app/app.routes.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Routes } from '@angular/router'; -import { OpenClosePageComponent } from './open-close-page.component'; -import { StatusSliderPageComponent } from './status-slider-page.component'; -import { ToggleAnimationsPageComponent } from './toggle-animations-page.component'; -import { HeroListPageComponent } from './hero-list-page.component'; -import { HeroListGroupPageComponent } from './hero-list-group-page.component'; -import { HeroListEnterLeavePageComponent } from './hero-list-enter-leave-page.component'; -import { HeroListAutoCalcPageComponent } from './hero-list-auto-page.component'; -import { InsertRemoveComponent } from './insert-remove.component'; -import { QueryingComponent } from './querying.component'; -import { HomeComponent } from './home.component'; -import { AboutComponent } from './about.component'; - -// #docregion route-animation-data -export const routes: Routes = [ - { path: '', pathMatch: 'full', redirectTo: '/enter-leave' }, - { - path: 'open-close', - component: OpenClosePageComponent, - data: { animation: 'openClosePage' } - }, - { - path: 'status', - component: StatusSliderPageComponent, - data: { animation: 'statusPage' } - }, - { - path: 'toggle', - component: ToggleAnimationsPageComponent, - data: { animation: 'togglePage' } - }, - { - path: 'heroes', - component: HeroListPageComponent, - data: { animation: 'filterPage' } - }, - { - path: 'hero-groups', - component: HeroListGroupPageComponent, - data: { animation: 'heroGroupPage' } - }, - { - path: 'enter-leave', - component: HeroListEnterLeavePageComponent, - data: { animation: 'enterLeavePage' } - }, - { - path: 'auto', - component: HeroListAutoCalcPageComponent, - data: { animation: 'autoPage' } - }, - { - path: 'insert-remove', - component: InsertRemoveComponent, - data: { animation: 'insertRemovePage' } - }, - { - path: 'querying', - component: QueryingComponent, - data: { animation: 'queryingPage' } - }, - { - path: 'home', - component: HomeComponent, - data: { animation: 'HomePage' } - }, - { - path: 'about', - component: AboutComponent, - data: { animation: 'AboutPage' } - }, -]; -// #enddocregion route-animation-data diff --git a/aio/content/examples/animations/src/app/hero-list-auto-page.component.ts b/aio/content/examples/animations/src/app/hero-list-auto-page.component.ts deleted file mode 100755 index 8356f946bd5..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-auto-page.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component } from '@angular/core'; -import { HEROES } from './mock-heroes'; -import { HeroListAutoComponent } from './hero-list-auto.component'; - -@Component({ - standalone: true, - selector: 'app-hero-list-auto-page', - template: ` -
    -

    Automatic Calculation

    - - -
    - `, - imports: [HeroListAutoComponent] -}) -export class HeroListAutoCalcPageComponent { - heroes = HEROES.slice(); - - onRemove(id: number) { - this.heroes = this.heroes.filter(hero => hero.id !== id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-auto.component.html b/aio/content/examples/animations/src/app/hero-list-auto.component.html deleted file mode 100644 index 0f6c9fb5750..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-auto.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
      -
    • - -
    • -
    diff --git a/aio/content/examples/animations/src/app/hero-list-auto.component.ts b/aio/content/examples/animations/src/app/hero-list-auto.component.ts deleted file mode 100755 index 4d891b04df0..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-auto.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - Component, - Input, - Output, - EventEmitter -} from '@angular/core'; -import { - trigger, - state, - style, - animate, - transition -} from '@angular/animations'; - -import { Hero } from './hero'; -import { NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-hero-list-auto', - templateUrl: 'hero-list-auto.component.html', - styleUrls: ['./hero-list-page.component.css'], - imports: [NgFor], - // #docregion auto-calc - animations: [ - trigger('shrinkOut', [ - state('in', style({ height: '*' })), - transition('* => void', [ - style({ height: '*' }), - animate(250, style({ height: 0 })) - ]) - ]) - ] - // #enddocregion auto-calc -}) -export class HeroListAutoComponent { - @Input() heroes: Hero[] = []; - - @Output() remove = new EventEmitter(); - - removeHero(id: number) { - this.remove.emit(id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-enter-leave-page.component.ts b/aio/content/examples/animations/src/app/hero-list-enter-leave-page.component.ts deleted file mode 100755 index d615f906be2..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-enter-leave-page.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component } from '@angular/core'; -import { HEROES } from './mock-heroes'; -import { HeroListEnterLeaveComponent } from './hero-list-enter-leave.component'; - -@Component({ - standalone: true, - selector: 'app-hero-list-enter-leave-page', - template: ` -
    -

    Enter/Leave

    - - -
    - `, - imports: [HeroListEnterLeaveComponent] -}) -export class HeroListEnterLeavePageComponent { - heroes = HEROES.slice(); - - onRemove(id: number) { - this.heroes = this.heroes.filter(hero => hero.id !== id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-enter-leave.component.ts b/aio/content/examples/animations/src/app/hero-list-enter-leave.component.ts deleted file mode 100755 index d787d584b31..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-enter-leave.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { - Component, - Input, - Output, - EventEmitter -} from '@angular/core'; -import { - trigger, - state, - style, - animate, - transition -} from '@angular/animations'; - -import { Hero } from './hero'; -import { NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-hero-list-enter-leave', - template: ` -
      -
    • - -
    • -
    - `, - styleUrls: ['./hero-list-page.component.css'], - imports: [NgFor], - // #docregion animationdef - animations: [ - trigger('flyInOut', [ - state('in', style({ transform: 'translateX(0)' })), - transition('void => *', [ - style({ transform: 'translateX(-100%)' }), - animate(100) - ]), - transition('* => void', [ - animate(100, style({ transform: 'translateX(100%)' })) - ]) - ]) - ] - // #enddocregion animationdef -}) -export class HeroListEnterLeaveComponent { - @Input() heroes: Hero[] = []; - - @Output() remove = new EventEmitter(); - - removeHero(id: number) { - this.remove.emit(id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-group-page.component.ts b/aio/content/examples/animations/src/app/hero-list-group-page.component.ts deleted file mode 100755 index 083f7a40156..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-group-page.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component } from '@angular/core'; -import { HEROES } from './mock-heroes'; -import { HeroListGroupsComponent } from './hero-list-groups.component'; - -@Component({ - standalone: true, - selector: 'app-hero-list-groups-page', - template: ` -
    -

    Hero List Group

    - - -
    - `, - imports: [HeroListGroupsComponent] -}) -export class HeroListGroupPageComponent { - heroes = HEROES.slice(); - - onRemove(id: number) { - this.heroes = this.heroes.filter(hero => hero.id !== id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-groups.component.ts b/aio/content/examples/animations/src/app/hero-list-groups.component.ts deleted file mode 100755 index 87cf915e9b0..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-groups.component.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { - Component, - Input, - Output, - EventEmitter -} from '@angular/core'; -import { - trigger, - state, - style, - animate, - transition, - group -} from '@angular/animations'; - -import { Hero } from './hero'; -import { NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-hero-list-groups', - template: ` -
      -
    • - -
    • -
    - `, - styleUrls: ['./hero-list-page.component.css'], - imports: [NgFor], - // #docregion animationdef - animations: [ - trigger('flyInOut', [ - state('in', style({ - width: '*', - transform: 'translateX(0)', opacity: 1 - })), - transition(':enter', [ - style({ width: 10, transform: 'translateX(50px)', opacity: 0 }), - group([ - animate('0.3s 0.1s ease', style({ - transform: 'translateX(0)', - width: '*' - })), - animate('0.3s ease', style({ - opacity: 1 - })) - ]) - ]), - transition(':leave', [ - group([ - animate('0.3s ease', style({ - transform: 'translateX(50px)', - width: 10 - })), - animate('0.3s 0.2s ease', style({ - opacity: 0 - })) - ]) - ]) - ]) - ] - // #enddocregion animationdef -}) -export class HeroListGroupsComponent { - @Input() heroes: Hero[] = []; - - @Output() remove = new EventEmitter(); - - removeHero(id: number) { - this.remove.emit(id); - } -} diff --git a/aio/content/examples/animations/src/app/hero-list-page.component.css b/aio/content/examples/animations/src/app/hero-list-page.component.css deleted file mode 100644 index d06d58bf148..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-page.component.css +++ /dev/null @@ -1,80 +0,0 @@ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -.heroes li { - display: flex; - align-items: center; - width: 100%; - overflow: hidden; -} - -.heroes .inner { - flex: 1; - background-color: #EEE; - margin: .5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; -} - -.heroes button.inner { - cursor: pointer; - font-size: inherit; -} - -.heroes button.inner:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: .1em; -} - -.heroes button.inner:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.inner.selected { - background-color: black; - color: white; -} - -.heroes button.inner.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.inner.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - min-width: max-content; - padding: 0.5rem 0; -} - -label { - display: block; - padding-bottom: .5rem; -} - -input { - font-size: 100%; - margin-bottom: 1rem; -} diff --git a/aio/content/examples/animations/src/app/hero-list-page.component.html b/aio/content/examples/animations/src/app/hero-list-page.component.html deleted file mode 100644 index b6b2af8e426..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-page.component.html +++ /dev/null @@ -1,18 +0,0 @@ - -

    Filter/Stagger

    - - - - - -
      -
    • -
      - {{ hero.id }} - {{ hero.name }} -
      -
    • -
    - diff --git a/aio/content/examples/animations/src/app/hero-list-page.component.ts b/aio/content/examples/animations/src/app/hero-list-page.component.ts deleted file mode 100755 index cc490ec0fcf..00000000000 --- a/aio/content/examples/animations/src/app/hero-list-page.component.ts +++ /dev/null @@ -1,83 +0,0 @@ -// #docplaster -// #docregion -import { Component, HostBinding, OnInit } from '@angular/core'; -import { trigger, transition, animate, style, query, stagger } from '@angular/animations'; -import { HEROES } from './mock-heroes'; -import { Hero } from './hero'; -import { NgFor } from '@angular/common'; - -// #docregion filter-animations -@Component({ -// #enddocregion filter-animations - standalone: true, - imports: [NgFor], - selector: 'app-hero-list-page', - templateUrl: 'hero-list-page.component.html', - styleUrls: ['hero-list-page.component.css'], -// #docregion page-animations, filter-animations - animations: [ -// #enddocregion filter-animations - trigger('pageAnimations', [ - transition(':enter', [ - query('.hero', [ - style({opacity: 0, transform: 'translateY(-100px)'}), - stagger(30, [ - animate('500ms cubic-bezier(0.35, 0, 0.25, 1)', - style({ opacity: 1, transform: 'none' })) - ]) - ]) - ]) - ]), -// #enddocregion page-animations -// #docregion increment -// #docregion filter-animations - trigger('filterAnimation', [ - transition(':enter, * => 0, * => -1', []), - transition(':increment', [ - query(':enter', [ - style({ opacity: 0, width: 0 }), - stagger(50, [ - animate('300ms ease-out', style({ opacity: 1, width: '*' })), - ]), - ], { optional: true }) - ]), - transition(':decrement', [ - query(':leave', [ - stagger(50, [ - animate('300ms ease-out', style({ opacity: 0, width: 0 })), - ]), - ]) - ]), - ]), - // #enddocregion increment - ] -}) -export class HeroListPageComponent implements OnInit { -// #enddocregion filter-animations - @HostBinding('@pageAnimations') - public animatePage = true; - -// #docregion filter-animations - heroesTotal = -1; - - get heroes() { return this._heroes; } - private _heroes: Hero[] = []; - - ngOnInit() { - this._heroes = HEROES; - } - - updateCriteria(criteria: string) { - criteria = criteria ? criteria.trim() : ''; - - this._heroes = HEROES.filter(hero => hero.name.toLowerCase().includes(criteria.toLowerCase())); - const newTotal = this.heroes.length; - - if (this.heroesTotal !== newTotal) { - this.heroesTotal = newTotal; - } else if (!criteria) { - this.heroesTotal = -1; - } - } -} -// #enddocregion filter-animations diff --git a/aio/content/examples/animations/src/app/hero-list.component.css b/aio/content/examples/animations/src/app/hero-list.component.css deleted file mode 100644 index b256521e49c..00000000000 --- a/aio/content/examples/animations/src/app/hero-list.component.css +++ /dev/null @@ -1,27 +0,0 @@ -ul { - list-style-type: none; - padding: 0; -} - -li { - display: block; - width: 120px; - line-height: 50px; - padding: 0 10px; - box-sizing: border-box; - background-color: #eee; - border-radius: 4px; - margin: 10px; - cursor: pointer; - overflow: hidden; - white-space: nowrap; -} - -.active { - background-color: #cfd8dc; - transform: scale(1.1); -} -.inactive { - background-color: #eee; - transform: scale(1); -} diff --git a/aio/content/examples/animations/src/app/hero.ts b/aio/content/examples/animations/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/animations/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/animations/src/app/home.component.css b/aio/content/examples/animations/src/app/home.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/animations/src/app/home.component.html b/aio/content/examples/animations/src/app/home.component.html deleted file mode 100644 index 0fb44758d81..00000000000 --- a/aio/content/examples/animations/src/app/home.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - Welcome to Animations in Angular! -

    diff --git a/aio/content/examples/animations/src/app/home.component.ts b/aio/content/examples/animations/src/app/home.component.ts deleted file mode 100755 index 81acda4cdd2..00000000000 --- a/aio/content/examples/animations/src/app/home.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.css'] -}) -export class HomeComponent {} diff --git a/aio/content/examples/animations/src/app/insert-remove.component.css b/aio/content/examples/animations/src/app/insert-remove.component.css deleted file mode 100644 index bc0cb127de0..00000000000 --- a/aio/content/examples/animations/src/app/insert-remove.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - display: block; -} - -.insert-remove-container { - border: 1px solid #dddddd; - margin-top: 1em; - padding: 20px 20px 0px 20px; - color: #000000; - font-weight: bold; - font-size: 20px; -} diff --git a/aio/content/examples/animations/src/app/insert-remove.component.html b/aio/content/examples/animations/src/app/insert-remove.component.html deleted file mode 100644 index ad3b19ce0c2..00000000000 --- a/aio/content/examples/animations/src/app/insert-remove.component.html +++ /dev/null @@ -1,13 +0,0 @@ - - -

    Insert/Remove

    - - - - -
    -

    The box is inserted

    -
    - diff --git a/aio/content/examples/animations/src/app/insert-remove.component.ts b/aio/content/examples/animations/src/app/insert-remove.component.ts deleted file mode 100755 index 760c81748b3..00000000000 --- a/aio/content/examples/animations/src/app/insert-remove.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -import { trigger, transition, animate, style } from '@angular/animations'; -import { NgIf } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-insert-remove', - imports: [NgIf], - animations: [ -// #docregion enter-leave-trigger - trigger('myInsertRemoveTrigger', [ - transition(':enter', [ - style({ opacity: 0 }), - animate('100ms', style({ opacity: 1 })), - ]), - transition(':leave', [ - animate('100ms', style({ opacity: 0 })) - ]) - ]), -// #enddocregion enter-leave-trigger - ], - templateUrl: 'insert-remove.component.html', - styleUrls: ['insert-remove.component.css'] -}) -export class InsertRemoveComponent { - isShown = false; - - toggle() { - this.isShown = !this.isShown; - } -} diff --git a/aio/content/examples/animations/src/app/mock-heroes.ts b/aio/content/examples/animations/src/app/mock-heroes.ts deleted file mode 100644 index 6ffcaa980e8..00000000000 --- a/aio/content/examples/animations/src/app/mock-heroes.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/animations/src/app/open-close-page.component.ts b/aio/content/examples/animations/src/app/open-close-page.component.ts deleted file mode 100755 index d9b23597055..00000000000 --- a/aio/content/examples/animations/src/app/open-close-page.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { OpenCloseComponent } from './open-close.component'; - -@Component({ - standalone: true, - selector: 'app-open-close-page', - template: ` -
    -

    Open Close Component

    - - - - -
    - `, - imports: [OpenCloseComponent] -}) -export class OpenClosePageComponent { - logging = false; - - toggleLogging() { - this.logging = !this.logging; - } -} diff --git a/aio/content/examples/animations/src/app/open-close.component.1.html b/aio/content/examples/animations/src/app/open-close.component.1.html deleted file mode 100644 index b6960b0d196..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.1.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - -
    -

    The box is now {{ isOpen ? 'Open' : 'Closed' }}!

    -
    - diff --git a/aio/content/examples/animations/src/app/open-close.component.1.ts b/aio/content/examples/animations/src/app/open-close.component.1.ts deleted file mode 100644 index f4503fd116d..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.1.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component } from '@angular/core'; -import { trigger, transition, state, animate, style, keyframes } from '@angular/animations'; - -@Component({ - standalone: true, - selector: 'app-open-close', - animations: [ -// #docregion trigger - trigger('openClose', [ - state('open', style({ - height: '200px', - opacity: 1, - backgroundColor: 'yellow' - })), - state('closed', style({ - height: '100px', - opacity: 0.5, - backgroundColor: 'green' - })), - // ... - transition('* => *', [ - animate('1s', keyframes ( [ - style({ opacity: 0.1, offset: 0.1 }), - style({ opacity: 0.6, offset: 0.2 }), - style({ opacity: 1, offset: 0.5 }), - style({ opacity: 0.2, offset: 0.7 }) - ])) - ]) - ]) -// #enddocregion trigger - ], - templateUrl: 'open-close.component.html', - styleUrls: ['open-close.component.css'] -}) -export class OpenCloseKeyframeComponent { - isOpen = false; - - toggle() { - this.isOpen = !this.isOpen; - } -} diff --git a/aio/content/examples/animations/src/app/open-close.component.2.html b/aio/content/examples/animations/src/app/open-close.component.2.html deleted file mode 100644 index 1a8e22b3c53..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.2.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - -
    - -

    The box is now {{ isOpen ? 'Open' : 'Closed' }}!

    - -
    - diff --git a/aio/content/examples/animations/src/app/open-close.component.2.ts b/aio/content/examples/animations/src/app/open-close.component.2.ts deleted file mode 100644 index 65fbf72f5c8..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.2.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component } from '@angular/core'; -import { trigger, transition, state, animate, style } from '@angular/animations'; - -@Component({ - standalone: true, - selector: 'app-open-close-boolean', -// #docregion trigger-boolean - animations: [ - trigger('openClose', [ - state('true', style({ height: '*' })), - state('false', style({ height: '0px' })), - transition('false <=> true', animate(500)) - ]) - ], -// #enddocregion trigger-boolean - templateUrl: 'open-close.component.2.html', - styleUrls: ['open-close.component.css'] -}) -export class OpenCloseBooleanComponent { - isOpen = false; - - toggle() { - this.isOpen = !this.isOpen; - } -} diff --git a/aio/content/examples/animations/src/app/open-close.component.3.html b/aio/content/examples/animations/src/app/open-close.component.3.html deleted file mode 100644 index b8398457757..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.3.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - -
    - -

    The box is now {{ isOpen ? 'Open' : 'Closed' }}!

    - -
    - diff --git a/aio/content/examples/animations/src/app/open-close.component.3.ts b/aio/content/examples/animations/src/app/open-close.component.3.ts deleted file mode 100755 index 6dec541700d..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.3.ts +++ /dev/null @@ -1,28 +0,0 @@ -// #docplaster -// #docregion reusable -import { Component } from '@angular/core'; -import { transition, trigger, useAnimation } from '@angular/animations'; -import { transitionAnimation } from './animations'; - -@Component({ - standalone: true, - selector: 'app-open-close-reusable', - animations: [ - trigger('openClose', [ - transition('open => closed', [ - useAnimation(transitionAnimation, { - params: { - height: 0, - opacity: 1, - backgroundColor: 'red', - time: '1s' - } - }) - ]) - ]) - ], - templateUrl: 'open-close.component.html', - styleUrls: ['open-close.component.css'] -}) -// #enddocregion reusable -export class OpenCloseReusableComponent { } diff --git a/aio/content/examples/animations/src/app/open-close.component.4.html b/aio/content/examples/animations/src/app/open-close.component.4.html deleted file mode 100644 index a2ee2e27eec..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.4.html +++ /dev/null @@ -1,12 +0,0 @@ - - -
    -
    -

    The box is now {{ isOpen ? 'Open' : 'Closed' }}!

    -
    -
    - \ No newline at end of file diff --git a/aio/content/examples/animations/src/app/open-close.component.4.ts b/aio/content/examples/animations/src/app/open-close.component.4.ts deleted file mode 100755 index 854412ea317..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.4.ts +++ /dev/null @@ -1,48 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { trigger, transition, state, animate, style } from '@angular/animations'; - -// #docregion toggle-animation -@Component({ -// #enddocregion toggle-animation - standalone: true, - selector: 'app-open-close-toggle', - templateUrl: 'open-close.component.4.html', - styleUrls: ['open-close.component.css'], - // #docregion toggle-animation - animations: [ - trigger('childAnimation', [ - // ... -// #enddocregion toggle-animation - state('open', style({ - width: '250px', - opacity: 1, - backgroundColor: 'yellow' - })), - state('closed', style({ - width: '100px', - opacity: 0.8, - backgroundColor: 'blue' - })), - transition('* => *', [ - animate('1s') - ]), -// #docregion toggle-animation - ]), - ], -}) -export class OpenCloseChildComponent { - isDisabled = false; - isOpen = false; -// #enddocregion toggle-animation - toggleAnimations() { - this.isDisabled = !this.isDisabled; - } - - toggle() { - this.isOpen = !this.isOpen; - } -// #docregion toggle-animation -} -// #enddocregion toggle-animation diff --git a/aio/content/examples/animations/src/app/open-close.component.css b/aio/content/examples/animations/src/app/open-close.component.css deleted file mode 100644 index c7401b7f181..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.css +++ /dev/null @@ -1,13 +0,0 @@ -:host { - display: block; - margin-top: 1rem; -} - -.open-close-container { - border: 1px solid #dddddd; - margin-top: 1em; - padding: 20px 20px 0px 20px; - color: #000000; - font-weight: bold; - font-size: 20px; -} diff --git a/aio/content/examples/animations/src/app/open-close.component.html b/aio/content/examples/animations/src/app/open-close.component.html deleted file mode 100644 index 4ecd2be0b3b..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
    -

    The box is now {{ isOpen ? 'Open' : 'Closed' }}!

    -
    diff --git a/aio/content/examples/animations/src/app/open-close.component.ts b/aio/content/examples/animations/src/app/open-close.component.ts deleted file mode 100755 index 5d6032f089c..00000000000 --- a/aio/content/examples/animations/src/app/open-close.component.ts +++ /dev/null @@ -1,109 +0,0 @@ -// #docplaster -import { Component, Input } from '@angular/core'; -import { trigger, transition, state, animate, style, AnimationEvent } from '@angular/animations'; - -// #docregion component, events1 -@Component({ - standalone: true, - selector: 'app-open-close', -// #docregion trigger-wildcard1, trigger-transition - animations: [ - trigger('openClose', [ -// #docregion state1 - // ... -// #enddocregion events1 - state('open', style({ - height: '200px', - opacity: 1, - backgroundColor: 'yellow' - })), -// #enddocregion state1 -// #docregion state2 - state('closed', style({ - height: '100px', - opacity: 0.8, - backgroundColor: 'blue' - })), -// #enddocregion state2, trigger-wildcard1 -// #docregion transition1 - transition('open => closed', [ - animate('1s') - ]), -// #enddocregion transition1 -// #docregion transition2 - transition('closed => open', [ - animate('0.5s') - ]), -// #enddocregion transition2, component -// #docregion trigger-wildcard1 - transition('* => closed', [ - animate('1s') - ]), - transition('* => open', [ - animate('0.5s') - ]), -// #enddocregion trigger-wildcard1 -// #docregion trigger-wildcard2 - transition('open <=> closed', [ - animate('0.5s') - ]), -// #enddocregion trigger-wildcard2 -// #docregion transition4 - transition ('* => open', [ - animate ('1s', - style ({ opacity: '*' }), - ), - ]), -// #enddocregion transition4 - transition('* => *', [ - animate('1s') - ]), -// #enddocregion trigger-transition -// #docregion component, trigger-wildcard1, events1 - ]), - ], -// #enddocregion trigger-wildcard1 - templateUrl: 'open-close.component.html', - styleUrls: ['open-close.component.css'] -}) -// #docregion events -export class OpenCloseComponent { -// #enddocregion events1, events, component - @Input() logging = false; -// #docregion component - isOpen = true; - - toggle() { - this.isOpen = !this.isOpen; - } - -// #enddocregion component -// #docregion events1, events - onAnimationEvent(event: AnimationEvent) { -// #enddocregion events1, events - if (!this.logging) { - return; - } -// #docregion events - // openClose is trigger name in this example - console.warn(`Animation Trigger: ${event.triggerName}`); - - // phaseName is "start" or "done" - console.warn(`Phase: ${event.phaseName}`); - - // in our example, totalTime is 1000 (number of milliseconds in a second) - console.warn(`Total time: ${event.totalTime}`); - - // in our example, fromState is either "open" or "closed" - console.warn(`From: ${event.fromState}`); - - // in our example, toState either "open" or "closed" - console.warn(`To: ${event.toState}`); - - // the HTML element itself, the button in this case - console.warn(`Element: ${event.element}`); -// #docregion events1 - } -// #docregion component -} -// #enddocregion component diff --git a/aio/content/examples/animations/src/app/querying.component.css b/aio/content/examples/animations/src/app/querying.component.css deleted file mode 100644 index 3ee3c939363..00000000000 --- a/aio/content/examples/animations/src/app/querying.component.css +++ /dev/null @@ -1,31 +0,0 @@ -section { - border: 1px solid black; - overflow: hidden; -} - -section > * { - margin: 1rem; -} - -.hero { - display: flex; - align-items: center; - border-radius: 4px; - color: black; - background-color: #DDD; -} - -.hero .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.5rem; - background-color: #3d5157; - margin-right: .8em; - border-radius: 4px 0 0 4px; - align-self: stretch; -} - -.hero .name { - height: min-content; -} diff --git a/aio/content/examples/animations/src/app/querying.component.ts b/aio/content/examples/animations/src/app/querying.component.ts deleted file mode 100755 index 65db2ecf960..00000000000 --- a/aio/content/examples/animations/src/app/querying.component.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { - Component, -} from '@angular/core'; -import { - trigger, - style, - animate, - transition, - group, - query, - animateChild, - keyframes -} from '@angular/animations'; - -import { HEROES } from './mock-heroes'; -import { NgIf } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-querying', - template: ` - -
    -

    I am a simple child element

    -

    I am a child element that enters and leaves with its parent

    -

    I am a child element with an animation trigger

    -
    - {{ hero.id }} - {{ hero.name }} (heroes are always animated!) -
    -
    - `, - styleUrls: ['./querying.component.css'], - imports: [NgIf], - animations: [ - trigger('query', [ - transition(':enter', [ - style({ height: 0 }), - group([ - animate(500, style({ height: '*' })), - query(':enter', [ - style({ opacity: 0, transform: 'scale(0)'}), - animate(2000, style({ opacity: 1, transform: 'scale(1)' })) - ]), - query('.hero', [ - style({ transform: 'translateX(-100%)'}), - animate('.7s 500ms ease-in', style({ transform: 'translateX(0)' })) - ]), - ]), - query('@animateMe', animateChild()), - ]), - transition(':leave', [ - style({ height: '*' }), - query('@animateMe', animateChild()), - group([ - animate('500ms 500ms', style({ height: '0', padding: '0' })), - query(':leave', [ - style({ opacity: 1, transform: 'scale(1)'}), - animate('1s', style({ opacity: 0, transform: 'scale(0)' })) - ]), - query('.hero', [ - style({ transform: 'translateX(0)'}), - animate('.7s ease-out', style({ transform: 'translateX(-100%)' })) - ]), - ]), - ]), - ]), - trigger('animateMe', [ - transition('* <=> *', animate('500ms cubic-bezier(.68,-0.73,.26,1.65)', keyframes([ - style({ backgroundColor: 'transparent', color: '*', offset: 0 }), - style({ backgroundColor: 'blue', color: 'white', offset: 0.2 }), - style({ backgroundColor: 'transparent', color: '*', offset: 1 }) - ]))) - ]), - ] -}) -export class QueryingComponent { - toggleDisabled = false; - show = true; - hero = HEROES[0]; -} diff --git a/aio/content/examples/animations/src/app/status-slider-page.component.ts b/aio/content/examples/animations/src/app/status-slider-page.component.ts deleted file mode 100755 index 4ea4a044f93..00000000000 --- a/aio/content/examples/animations/src/app/status-slider-page.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { StatusSliderComponent } from './status-slider.component'; - -@Component({ - standalone: true, - selector: 'app-status-slider-page', - template: ` -
    -

    Status Slider

    - -
    - `, - imports: [StatusSliderComponent] -}) -export class StatusSliderPageComponent {} diff --git a/aio/content/examples/animations/src/app/status-slider.component.css b/aio/content/examples/animations/src/app/status-slider.component.css deleted file mode 100644 index b29dcd21136..00000000000 --- a/aio/content/examples/animations/src/app/status-slider.component.css +++ /dev/null @@ -1,13 +0,0 @@ -:host { - display: block; -} - -.box { - width: 300px; - border: 5px solid black; - display: block; - line-height: 300px; - text-align: center; - font-size: 50px; - color: white; -} diff --git a/aio/content/examples/animations/src/app/status-slider.component.html b/aio/content/examples/animations/src/app/status-slider.component.html deleted file mode 100644 index 263b3af4dfa..00000000000 --- a/aio/content/examples/animations/src/app/status-slider.component.html +++ /dev/null @@ -1,7 +0,0 @@ - - -
    - {{ status == 'active' ? 'Active' : 'Inactive' }} -
    diff --git a/aio/content/examples/animations/src/app/status-slider.component.ts b/aio/content/examples/animations/src/app/status-slider.component.ts deleted file mode 100755 index 600f88d81b3..00000000000 --- a/aio/content/examples/animations/src/app/status-slider.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { Component } from '@angular/core'; -import { trigger, transition, state, animate, style, keyframes } from '@angular/animations'; - -@Component({ - standalone: true, - selector: 'app-status-slider', - templateUrl: 'status-slider.component.html', - styleUrls: ['status-slider.component.css'], - animations: [ - trigger('slideStatus', [ - state('inactive', style({ backgroundColor: 'blue' })), - state('active', style({ backgroundColor: '#754600' })), - -// #docregion keyframesWithOffsets - transition('* => active', [ - animate('2s', keyframes([ - style({ backgroundColor: 'blue', offset: 0}), - style({ backgroundColor: 'red', offset: 0.8}), - style({ backgroundColor: '#754600', offset: 1.0}) - ])), - ]), - transition('* => inactive', [ - animate('2s', keyframes([ - style({ backgroundColor: '#754600', offset: 0}), - style({ backgroundColor: 'red', offset: 0.2}), - style({ backgroundColor: 'blue', offset: 1.0}) - ])) - ]), -// #enddocregion keyframesWithOffsets - -// #docregion keyframes - transition('* => active', [ - animate('2s', keyframes([ - style({ backgroundColor: 'blue' }), - style({ backgroundColor: 'red' }), - style({ backgroundColor: 'orange' }) - ])) -// #enddocregion keyframes - ]), - ]) - ] -}) -export class StatusSliderComponent { - status: 'active' | 'inactive' = 'inactive'; - - toggle() { - if (this.status === 'active') { - this.status = 'inactive'; - } else { - this.status = 'active'; - } - } -} diff --git a/aio/content/examples/animations/src/app/toggle-animations-page.component.ts b/aio/content/examples/animations/src/app/toggle-animations-page.component.ts deleted file mode 100755 index 906799949bf..00000000000 --- a/aio/content/examples/animations/src/app/toggle-animations-page.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { OpenCloseChildComponent } from './open-close.component.4'; - -@Component({ - standalone: true, - selector: 'app-toggle-animations-child-page', - template: ` -
    -

    Toggle Animations

    - - -
    - `, - imports: [OpenCloseChildComponent] -}) -export class ToggleAnimationsPageComponent {} diff --git a/aio/content/examples/animations/src/index.html b/aio/content/examples/animations/src/index.html deleted file mode 100644 index c1078687e7a..00000000000 --- a/aio/content/examples/animations/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Animations - - - - - - - - - diff --git a/aio/content/examples/animations/src/main.ts b/aio/content/examples/animations/src/main.ts deleted file mode 100755 index 41893baf92f..00000000000 --- a/aio/content/examples/animations/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/animations/stackblitz.json b/aio/content/examples/animations/stackblitz.json deleted file mode 100644 index c39e11adda7..00000000000 --- a/aio/content/examples/animations/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Angular Animations Guide", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2,3].*" - ], - "file": "src/app/app.component.ts", - "tags": ["animations"] -} diff --git a/aio/content/examples/architecture/BUILD.bazel b/aio/content/examples/architecture/BUILD.bazel deleted file mode 100644 index 60279c2ee16..00000000000 --- a/aio/content/examples/architecture/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "architecture", -) diff --git a/aio/content/examples/architecture/e2e/src/app.e2e-spec.ts b/aio/content/examples/architecture/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 87fc395773b..00000000000 --- a/aio/content/examples/architecture/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,96 +0,0 @@ -import { protractor, browser, element, by, ElementFinder } from 'protractor'; - -const nameSuffix = 'X'; - -interface Hero { - id: number; - name: string; -} - -describe('Architecture', () => { - - const expectedTitle = 'Architecture of Angular'; - const expectedH2 = ['Hero List', 'Sales Tax Calculator']; - - beforeAll(() => browser.get('')); - - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h2 '${expectedH2}'`, async () => { - const h2 = await element.all(by.css('h2')).map((elt: any) => elt.getText()); - expect(h2).toEqual(expectedH2); - }); - - describe('Hero', heroTests); - describe('Salex tax', salesTaxTests); -}); - -function heroTests() { - - const targetHero: Hero = { id: 2, name: 'Dr Nice' }; - - it('has the right number of heroes', async () => { - const page = getPageElts(); - expect(await page.heroes.count()).toEqual(3); - }); - - it('has no hero details initially', async () => { - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeFalsy('no hero detail'); - }); - - it('shows selected hero details', async () => { - await element(by.cssContainingText('li', targetHero.name)).click(); - const page = getPageElts(); - const hero = await heroFromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name); - }); - - it(`shows updated hero name in details`, async () => { - const input = element.all(by.css('input')).first(); - await input.sendKeys(nameSuffix); - const page = getPageElts(); - const hero = await heroFromDetail(page.heroDetail); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName); - }); -} - -function salesTaxTests() { - it('has no sales tax initially', async () => { - const page = getPageElts(); - expect(await page.salesTaxDetail.isPresent()).toBeFalsy('no sales tax info'); - }); - - it('shows sales tax', async () => { - const page = getPageElts(); - await page.salesTaxAmountInput.sendKeys('10', protractor.Key.ENTER); - expect(await page.salesTaxDetail.getText()).toEqual('The sales tax is $1.00'); - }); -} - -// Helper functions - -function getPageElts() { - return { - heroes: element.all(by.css('app-root li')), - heroDetail: element(by.css('app-root app-hero-detail')), - salesTaxAmountInput: element(by.css('app-root app-sales-tax input')), - salesTaxDetail: element(by.css('app-root app-sales-tax div')) - }; -} - -async function heroFromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('app-hero-detail h2')).getText(); - return { - id: +id.slice(id.indexOf(' ') + 1), - name: name.substring(0, name.lastIndexOf(' ')), - }; -} diff --git a/aio/content/examples/architecture/example-config.json b/aio/content/examples/architecture/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/architecture/src/app/app.component.ts b/aio/content/examples/architecture/src/app/app.component.ts deleted file mode 100644 index d7e30cc7594..00000000000 --- a/aio/content/examples/architecture/src/app/app.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion import -import { Component } from '@angular/core'; -// #enddocregion import - -import { HeroListComponent } from './hero-list.component'; -import { SalesTaxComponent } from './sales-tax.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    Architecture Example

    - - - `, - imports: [HeroListComponent, SalesTaxComponent] -}) -export class AppComponent { } diff --git a/aio/content/examples/architecture/src/app/backend.service.ts b/aio/content/examples/architecture/src/app/backend.service.ts deleted file mode 100644 index 9e2a7e19877..00000000000 --- a/aio/content/examples/architecture/src/app/backend.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable, Type } from '@angular/core'; - -import { Logger } from './logger.service'; -import { Hero } from './hero'; - -const HEROES = [ - new Hero('Windstorm', 'Weather mastery'), - new Hero('Dr Nice', 'Killing them with kindness'), - new Hero('Magneta', 'Manipulates metallic objects') - ]; - -@Injectable({providedIn: 'root'}) -export class BackendService { - constructor(private logger: Logger) {} - - getAll(type: Type): PromiseLike { - if (type === Hero) { - // TODO: get from the database - return Promise.resolve(HEROES); - } - const err = new Error('Cannot get object of this type'); - this.logger.error(err); - throw err; - } -} diff --git a/aio/content/examples/architecture/src/app/hero-detail.component.html b/aio/content/examples/architecture/src/app/hero-detail.component.html deleted file mode 100644 index 6881c4115ac..00000000000 --- a/aio/content/examples/architecture/src/app/hero-detail.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -

    {{hero.name}} Detail

    -
    Id: {{hero.id}}
    - - - - - - - diff --git a/aio/content/examples/architecture/src/app/hero-detail.component.ts b/aio/content/examples/architecture/src/app/hero-detail.component.ts deleted file mode 100644 index f70ff7179a6..00000000000 --- a/aio/content/examples/architecture/src/app/hero-detail.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { FormsModule } from '@angular/forms'; - -import { Hero } from './hero'; - -@Component({ - standalone: true, - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - imports: [FormsModule] -}) -export class HeroDetailComponent { - @Input() hero!: Hero; -} diff --git a/aio/content/examples/architecture/src/app/hero-list.component.1.html b/aio/content/examples/architecture/src/app/hero-list.component.1.html deleted file mode 100644 index f7a56acf1ea..00000000000 --- a/aio/content/examples/architecture/src/app/hero-list.component.1.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - -
  • - diff --git a/aio/content/examples/architecture/src/app/hero-list.component.html b/aio/content/examples/architecture/src/app/hero-list.component.html deleted file mode 100644 index 10ae1d6f10c..00000000000 --- a/aio/content/examples/architecture/src/app/hero-list.component.html +++ /dev/null @@ -1,13 +0,0 @@ - -

    Hero List

    - -

    Select a hero from the list to see details.

    -
      -
    • - -
    • -
    - - diff --git a/aio/content/examples/architecture/src/app/hero-list.component.ts b/aio/content/examples/architecture/src/app/hero-list.component.ts deleted file mode 100644 index 766237f0a77..00000000000 --- a/aio/content/examples/architecture/src/app/hero-list.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgFor, NgIf } from '@angular/common'; - -import { Hero } from './hero'; -import { HeroDetailComponent } from './hero-detail.component'; -import { HeroService } from './hero.service'; - -// #docregion metadata, providers -@Component({ - standalone: true, - selector: 'app-hero-list', - templateUrl: './hero-list.component.html', - imports: [ NgFor, NgIf, HeroDetailComponent ], - providers: [ HeroService ] -}) -// #enddocregion providers -// #docregion class -export class HeroListComponent implements OnInit { - // #enddocregion metadata - heroes: Hero[] = []; - selectedHero: Hero | undefined; - - // #docregion ctor - constructor(private service: HeroService) { } - // #enddocregion ctor - - ngOnInit() { - this.heroes = this.service.getHeroes(); - } - - selectHero(hero: Hero) { this.selectedHero = hero; } - // #docregion metadata -} diff --git a/aio/content/examples/architecture/src/app/hero.service.ts b/aio/content/examples/architecture/src/app/hero.service.ts deleted file mode 100644 index 0959cf07f89..00000000000 --- a/aio/content/examples/architecture/src/app/hero.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { Hero } from './hero'; -import { BackendService } from './backend.service'; -import { Logger } from './logger.service'; - -// #docregion provide -@Injectable({providedIn: 'root'}) -// #docregion class -export class HeroService { -// #enddocregion provide - private heroes: Hero[] = []; - - constructor( - private backend: BackendService, - private logger: Logger) { } - - getHeroes() { - this.backend.getAll(Hero).then( (heroes: Hero[]) => { - this.logger.log(`Fetched ${heroes.length} heroes.`); - this.heroes.push(...heroes); // fill cache - }); - return this.heroes; - } -} diff --git a/aio/content/examples/architecture/src/app/hero.ts b/aio/content/examples/architecture/src/app/hero.ts deleted file mode 100644 index b89557aa71d..00000000000 --- a/aio/content/examples/architecture/src/app/hero.ts +++ /dev/null @@ -1,10 +0,0 @@ -let nextId = 1; - -export class Hero { - id: number; - constructor( - public name: string, - public power?: string) { - this.id = nextId++; - } -} diff --git a/aio/content/examples/architecture/src/app/logger.service.ts b/aio/content/examples/architecture/src/app/logger.service.ts deleted file mode 100644 index a20ca2e22d5..00000000000 --- a/aio/content/examples/architecture/src/app/logger.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({providedIn: 'root'}) -// #docregion class -export class Logger { - log(msg: any) { console.log(msg); } - error(msg: any) { console.error(msg); } - warn(msg: any) { console.warn(msg); } -} diff --git a/aio/content/examples/architecture/src/app/mini-app.ts b/aio/content/examples/architecture/src/app/mini-app.ts deleted file mode 100644 index 254e3a73701..00000000000 --- a/aio/content/examples/architecture/src/app/mini-app.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docplaster -// A mini-application -import { Injectable } from '@angular/core'; - -@Injectable() -export class Logger { - log(message: string) { console.log(message); } -} - -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - template: 'Welcome to Angular' -}) -export class AppComponent { - constructor(logger: Logger) { - logger.log('Let the fun begin!'); - } -} - -// #docregion imports, module -import { NgModule } from '@angular/core'; -// #docregion import-browser-module -import { BrowserModule } from '@angular/platform-browser'; -// #enddocregion imports, import-browser-module -@NgModule({ -// #docregion ngmodule-imports - imports: [ BrowserModule ], -// #enddocregion ngmodule-imports - providers: [ Logger ], - declarations: [ AppComponent ], - exports: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -// #docregion export -export class AppModule { } -// #enddocregion export,module - -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/architecture/src/app/sales-tax.component.ts b/aio/content/examples/architecture/src/app/sales-tax.component.ts deleted file mode 100644 index 3804c94eabf..00000000000 --- a/aio/content/examples/architecture/src/app/sales-tax.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component } from '@angular/core'; -import { NgIf, CurrencyPipe } from '@angular/common'; - -import { SalesTaxService } from './sales-tax.service'; - -@Component({ - standalone: true, - selector: 'app-sales-tax', - template: ` -

    Sales Tax Calculator

    -

    Enter a number and press enter to calculate tax.

    - - -
    -

    The sales tax is - {{ getTax(amountBox.value) | currency:'USD':true:'1.2-2' }}

    -
    - `, - imports: [NgIf, CurrencyPipe] -}) -export class SalesTaxComponent { - constructor(private salesTaxService: SalesTaxService) { } - - getTax(value: string | number) { - return this.salesTaxService.getVAT(value); - } -} diff --git a/aio/content/examples/architecture/src/app/sales-tax.service.ts b/aio/content/examples/architecture/src/app/sales-tax.service.ts deleted file mode 100644 index 6ad99eccc87..00000000000 --- a/aio/content/examples/architecture/src/app/sales-tax.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { TaxRateService } from './tax-rate.service'; - -@Injectable({providedIn: 'root'}) -export class SalesTaxService { - constructor(private rateService: TaxRateService) { } - - getVAT(value: string | number) { - const amount = (typeof value === 'string') ? - parseFloat(value) : value; - return (amount || 0) * this.rateService.getRate('VAT'); - } -} diff --git a/aio/content/examples/architecture/src/app/tax-rate.service.ts b/aio/content/examples/architecture/src/app/tax-rate.service.ts deleted file mode 100644 index 6413337b76a..00000000000 --- a/aio/content/examples/architecture/src/app/tax-rate.service.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({providedIn: 'root'}) -export class TaxRateService { - getRate(rateName: string) { return 0.10; } // 10% everywhere -} diff --git a/aio/content/examples/architecture/src/assets/architecture.css b/aio/content/examples/architecture/src/assets/architecture.css deleted file mode 100644 index 9e8651ad075..00000000000 --- a/aio/content/examples/architecture/src/assets/architecture.css +++ /dev/null @@ -1,31 +0,0 @@ -ul { - padding-left: 0; -} - -li { - list-style-type: none; - border: 1px solid #444; - margin-bottom: .5rem; - display: flex; -} - -li button { - background-color: aliceblue; - flex: 1; - padding: 1rem; - margin: 0; - text-align: left; - border-radius: 0; -} - -li button:hover, li button:active { - background-color: #444; - color: white; - cursor: pointer; -} - -label { - display: block; - padding-bottom: .4rem; - margin-top: 1rem; -} diff --git a/aio/content/examples/architecture/src/index.html b/aio/content/examples/architecture/src/index.html deleted file mode 100644 index 6d0d7e09a53..00000000000 --- a/aio/content/examples/architecture/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Architecture of Angular - - - - - - - - - - diff --git a/aio/content/examples/architecture/src/main.ts b/aio/content/examples/architecture/src/main.ts deleted file mode 100644 index 5a2dcb1b362..00000000000 --- a/aio/content/examples/architecture/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/architecture/stackblitz.json b/aio/content/examples/architecture/stackblitz.json deleted file mode 100644 index dedea09cd24..00000000000 --- a/aio/content/examples/architecture/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Intro to Angular", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/hero-list.component.html" -} diff --git a/aio/content/examples/attribute-binding/BUILD.bazel b/aio/content/examples/attribute-binding/BUILD.bazel deleted file mode 100644 index a8a69e016a7..00000000000 --- a/aio/content/examples/attribute-binding/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "attribute-binding", -) diff --git a/aio/content/examples/attribute-binding/e2e/src/app.e2e-spec.ts b/aio/content/examples/attribute-binding/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 539cf65fc4d..00000000000 --- a/aio/content/examples/attribute-binding/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Attribute binding example', () => { - - beforeEach(() => browser.get('')); - - it('should display Property Binding with Angular', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Attribute, class, and style bindings'); - }); - - it('should display a table', async () => { - expect(await element.all(by.css('table')).isPresent()).toBe(true); - }); - - it('should display an Aria button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toBe('Create and set an attribute with Aria'); - }); - - it('should display a black background on div', async () => { - const div = element.all(by.css('div')).get(1); - expect(await div.getCssValue('background-color')).toEqual('rgba(0, 0, 0, 1)'); - }); - - it('should display a black div with a light blue double border', async () => { - const div = element.all(by.css('div')).get(1); - expect(await div.getCssValue('border')).toEqual('16px double rgb(87, 209, 255)'); - }); - - it('should display a div with many classes', async () => { - const div = element.all(by.css('div')).get(1); - expect(await div.getAttribute('class')).toContain('special'); - expect(await div.getAttribute('class')).toContain('clearance'); - }); - -}); diff --git a/aio/content/examples/attribute-binding/example-config.json b/aio/content/examples/attribute-binding/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/attribute-binding/src/app/app.component.css b/aio/content/examples/attribute-binding/src/app/app.component.css deleted file mode 100644 index b3ad1d6079d..00000000000 --- a/aio/content/examples/attribute-binding/src/app/app.component.css +++ /dev/null @@ -1,32 +0,0 @@ -.special { - background-color: black; - color: #ffffff; - margin-bottom: .5rem; - padding: 1rem; -} - -.clearance { - border: 1rem double #57d1ff; -} - -/* Styles for demo */ - -comp-with-host-binding { - display: block; - margin: 1rem 0; -} - -td { - padding: 1rem; - text-align: center; -} - -h3 { - padding: 1rem 0 .75rem 0; -} - -.readability { - background-color: black; - padding: .5rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/attribute-binding/src/app/app.component.html b/aio/content/examples/attribute-binding/src/app/app.component.html deleted file mode 100644 index 86bf7d687d1..00000000000 --- a/aio/content/examples/attribute-binding/src/app/app.component.html +++ /dev/null @@ -1,72 +0,0 @@ - -

    Attribute, class, and style bindings

    -

    Attribute binding

    - - - - - - - - - - - - - -
    One-Two
    Three-Four
    FiveSix
    - -
    - - - - -
    - -
    - -

    Styling precedence

    - - -

    Basic specificity

    - - -
    Some text.
    - - -
    Some text.
    - - - -

    Source specificity

    - - - - - - - -
    - -
    - - -

    Dynamic vs static

    - - -
    Some text.
    - - -
    Some text.
    - - - -
    - - - -
    - - diff --git a/aio/content/examples/attribute-binding/src/app/app.component.ts b/aio/content/examples/attribute-binding/src/app/app.component.ts deleted file mode 100644 index e9a9a11be62..00000000000 --- a/aio/content/examples/attribute-binding/src/app/app.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import {Component} from '@angular/core'; -import {CompWithHostBindingComponent} from './comp-with-host-binding.component'; -import {MyInputWithAttributeDecoratorComponent} from './my-input-with-attribute-decorator.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [CompWithHostBindingComponent, MyInputWithAttributeDecoratorComponent], -}) -export class AppComponent { - actionName = 'Create and set an attribute'; - isSpecial = true; - canSave = true; - classExpression = 'special clearance'; - styleExpression = 'border: solid red 3px'; - color = 'blue'; - border = '.5rem dashed black'; -} diff --git a/aio/content/examples/attribute-binding/src/app/comp-with-host-binding.component.ts b/aio/content/examples/attribute-binding/src/app/comp-with-host-binding.component.ts deleted file mode 100644 index 7e8e4a20f50..00000000000 --- a/aio/content/examples/attribute-binding/src/app/comp-with-host-binding.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {Component, HostBinding} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'comp-with-host-binding', - template: 'I am a component!', -}) -export class CompWithHostBindingComponent { - @HostBinding('class.special') - isSpecial = false; - - @HostBinding('style.color') - color = 'pink'; - - // #docregion hostbinding - @HostBinding('style.width') - width = '200px'; - // #enddocregion hostbinding -} diff --git a/aio/content/examples/attribute-binding/src/app/my-input-with-attribute-decorator.component.ts b/aio/content/examples/attribute-binding/src/app/my-input-with-attribute-decorator.component.ts deleted file mode 100644 index c1974cffe96..00000000000 --- a/aio/content/examples/attribute-binding/src/app/my-input-with-attribute-decorator.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Attribute, Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-my-input-with-attribute-decorator', - template: '

    The type of the input is: {{ type }}

    ', -}) -export class MyInputWithAttributeDecoratorComponent { - constructor(@Attribute('type') public type: string) {} -} diff --git a/aio/content/examples/attribute-binding/src/app/single-and-multiple-style-binding.component.ts b/aio/content/examples/attribute-binding/src/app/single-and-multiple-style-binding.component.ts deleted file mode 100644 index f5c0e3e9e79..00000000000 --- a/aio/content/examples/attribute-binding/src/app/single-and-multiple-style-binding.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -@Component({ - standalone: true, - selector: 'app-nav-bar', - template: ` `, -}) -export class NavBarComponent { - navStyle = 'font-size: 1.2rem; color: cornflowerblue;'; - linkStyle = 'underline'; - activeLinkStyle = 'overline'; - /* . . . */ -} diff --git a/aio/content/examples/attribute-binding/src/index.html b/aio/content/examples/attribute-binding/src/index.html deleted file mode 100644 index 833b4414bfb..00000000000 --- a/aio/content/examples/attribute-binding/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - AttributeBinding - - - - - - - - diff --git a/aio/content/examples/attribute-binding/src/main.ts b/aio/content/examples/attribute-binding/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/attribute-binding/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/attribute-binding/stackblitz.json b/aio/content/examples/attribute-binding/stackblitz.json deleted file mode 100644 index 1a0178b68a8..00000000000 --- a/aio/content/examples/attribute-binding/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Attribute Binding", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Attribute Binding"] -} diff --git a/aio/content/examples/attribute-directives/BUILD.bazel b/aio/content/examples/attribute-directives/BUILD.bazel deleted file mode 100644 index 39887442c44..00000000000 --- a/aio/content/examples/attribute-directives/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "attribute-directives", -) diff --git a/aio/content/examples/attribute-directives/e2e/src/app.e2e-spec.ts b/aio/content/examples/attribute-directives/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 771543102c9..00000000000 --- a/aio/content/examples/attribute-directives/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Attribute directives', () => { - - const title = 'My First Attribute Directive'; - - beforeAll(() => browser.get('')); - - it(`should display correct title: ${title}`, async () => { - expect(await element(by.css('h1')).getText()).toEqual(title); - }); - - it('should be able to select green highlight', async () => { - const highlightedEle = element(by.cssContainingText('p', 'Highlight me!')); - const lightGreen = 'rgba(144, 238, 144, 1)'; - const getBgColor = () => highlightedEle.getCssValue('background-color'); - - expect(await highlightedEle.getCssValue('background-color')).not.toEqual(lightGreen); - - const greenRb = element.all(by.css('input')).get(0); - await greenRb.click(); - await browser.actions().mouseMove(highlightedEle).perform(); - - // Wait for up to 4s for the background color to be updated, - // to account for slow environments (e.g. CI). - await browser.wait(async () => await getBgColor() === lightGreen, 4000); - }); -}); diff --git a/aio/content/examples/attribute-directives/example-config.json b/aio/content/examples/attribute-directives/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/attribute-directives/src/app/app.component.1.html b/aio/content/examples/attribute-directives/src/app/app.component.1.html deleted file mode 100644 index 9a9bfccd738..00000000000 --- a/aio/content/examples/attribute-directives/src/app/app.component.1.html +++ /dev/null @@ -1,10 +0,0 @@ - -

    My First Attribute Directive

    - -

    Highlight me!

    - - -

    Highlighted in yellow

    -

    Highlighted in orange

    - -

    Highlighted with parent component's color

    diff --git a/aio/content/examples/attribute-directives/src/app/app.component.1.ts b/aio/content/examples/attribute-directives/src/app/app.component.1.ts deleted file mode 100644 index 1916b3b1ca3..00000000000 --- a/aio/content/examples/attribute-directives/src/app/app.component.1.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.1.html', -}) -// #docregion class -export class AppComponent { - color = 'yellow'; -} diff --git a/aio/content/examples/attribute-directives/src/app/app.component.avoid.html b/aio/content/examples/attribute-directives/src/app/app.component.avoid.html deleted file mode 100644 index 464e8f30e56..00000000000 --- a/aio/content/examples/attribute-directives/src/app/app.component.avoid.html +++ /dev/null @@ -1,3 +0,0 @@ - -

    This is invalid

    - \ No newline at end of file diff --git a/aio/content/examples/attribute-directives/src/app/app.component.html b/aio/content/examples/attribute-directives/src/app/app.component.html deleted file mode 100644 index c8eb07c6a6b..00000000000 --- a/aio/content/examples/attribute-directives/src/app/app.component.html +++ /dev/null @@ -1,38 +0,0 @@ - -

    My First Attribute Directive

    - -

    Pick a highlight color

    -
    - Green - Yellow - Cyan -
    - -

    Highlight me!

    - - - -

    - Highlight me too! -

    - - -
    -

    Mouse over the following lines to see fixed highlights

    - -

    Highlighted in yellow

    -

    Highlighted in orange

    - -
    - -

    ngNonBindable

    - -

    Use ngNonBindable to stop evaluation.

    -

    This should not evaluate: {{ 1 + 1 }}

    - - - -

    ngNonBindable with a directive

    -
    This should not evaluate: {{ 1 +1 }}, but will highlight yellow. -
    - diff --git a/aio/content/examples/attribute-directives/src/app/app.component.ts b/aio/content/examples/attribute-directives/src/app/app.component.ts deleted file mode 100644 index 46c5a0afee2..00000000000 --- a/aio/content/examples/attribute-directives/src/app/app.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -import {HighlightDirective} from './highlight.directive'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [HighlightDirective], -}) -// #docregion class -export class AppComponent { - color = ''; -} diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.0.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.0.ts deleted file mode 100644 index 61e74c0ab82..00000000000 --- a/aio/content/examples/attribute-directives/src/app/highlight.directive.0.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import {Directive} from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[appHighlight]', -}) -export class HighlightDirective {} diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.1.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.1.ts deleted file mode 100644 index 17603ea6d4d..00000000000 --- a/aio/content/examples/attribute-directives/src/app/highlight.directive.1.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import {Directive, ElementRef} from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[appHighlight]', -}) -export class HighlightDirective { - constructor(private el: ElementRef) { - this.el.nativeElement.style.backgroundColor = 'yellow'; - } -} diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts deleted file mode 100644 index 09ad0c27e3b..00000000000 --- a/aio/content/examples/attribute-directives/src/app/highlight.directive.2.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docplaster -// #docregion imports -import {Directive, ElementRef, HostListener} from '@angular/core'; -// #enddocregion imports -import {Input} from '@angular/core'; -// #docregion - -@Directive({ - standalone: true, - selector: '[appHighlight]', -}) -export class HighlightDirective { - constructor(private el: ElementRef) {} - - // #docregion mouse-methods - @HostListener('mouseenter') onMouseEnter() { - this.highlight('yellow'); - } - - @HostListener('mouseleave') onMouseLeave() { - this.highlight(''); - } - - private highlight(color: string) { - this.el.nativeElement.style.backgroundColor = color; - } - // #enddocregion mouse-methods -} -// #enddocregion diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.3.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.3.ts deleted file mode 100644 index 4a01a98c055..00000000000 --- a/aio/content/examples/attribute-directives/src/app/highlight.directive.3.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion, imports -import {Directive, ElementRef, HostListener, Input} from '@angular/core'; -// #enddocregion imports - -@Directive({ - standalone: true, - selector: '[appHighlight]', -}) -export class HighlightDirective { - constructor(private el: ElementRef) {} - - // #docregion input - @Input() appHighlight = ''; - // #enddocregion input - - // #docregion mouse-enter - @HostListener('mouseenter') onMouseEnter() { - this.highlight(this.appHighlight || 'red'); - } - // #enddocregion mouse-enter - - @HostListener('mouseleave') onMouseLeave() { - this.highlight(''); - } - - private highlight(color: string) { - this.el.nativeElement.style.backgroundColor = color; - } -} diff --git a/aio/content/examples/attribute-directives/src/app/highlight.directive.ts b/aio/content/examples/attribute-directives/src/app/highlight.directive.ts deleted file mode 100644 index ebb9e5e8816..00000000000 --- a/aio/content/examples/attribute-directives/src/app/highlight.directive.ts +++ /dev/null @@ -1,29 +0,0 @@ -import {Directive, ElementRef, HostListener, Input} from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[appHighlight]', -}) -export class HighlightDirective { - constructor(private el: ElementRef) {} - - // #docregion defaultColor - @Input() defaultColor = ''; - // #enddocregion defaultColor - - @Input() appHighlight = ''; - - // #docregion mouse-enter - @HostListener('mouseenter') onMouseEnter() { - this.highlight(this.appHighlight || this.defaultColor || 'red'); - } - // #enddocregion mouse-enter - - @HostListener('mouseleave') onMouseLeave() { - this.highlight(''); - } - - private highlight(color: string) { - this.el.nativeElement.style.backgroundColor = color; - } -} diff --git a/aio/content/examples/attribute-directives/src/index.html b/aio/content/examples/attribute-directives/src/index.html deleted file mode 100644 index 12cabb63626..00000000000 --- a/aio/content/examples/attribute-directives/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - Attribute Directives - - - - - - - diff --git a/aio/content/examples/attribute-directives/src/main.ts b/aio/content/examples/attribute-directives/src/main.ts deleted file mode 100644 index f2f107a9eb5..00000000000 --- a/aio/content/examples/attribute-directives/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/attribute-directives/stackblitz.json b/aio/content/examples/attribute-directives/stackblitz.json deleted file mode 100644 index 0c60ff1eba8..00000000000 --- a/aio/content/examples/attribute-directives/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Attribute Directive", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2,3].*" - ], - "file": "src/app/highlight.directive.ts", - "tags": ["attribute", "directive"] -} diff --git a/aio/content/examples/binding-syntax/BUILD.bazel b/aio/content/examples/binding-syntax/BUILD.bazel deleted file mode 100644 index f8b91fc75cf..00000000000 --- a/aio/content/examples/binding-syntax/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "binding-syntax", -) diff --git a/aio/content/examples/binding-syntax/e2e/src/app.e2e-spec.ts b/aio/content/examples/binding-syntax/e2e/src/app.e2e-spec.ts deleted file mode 100644 index fb85e02ce8a..00000000000 --- a/aio/content/examples/binding-syntax/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { browser, element, by } from 'protractor'; -import { logging } from 'selenium-webdriver'; - -describe('Binding syntax e2e tests', () => { - - beforeEach(() => browser.get('')); - - - // helper function used to test what's logged to the console - async function logChecker(contents: string) { - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - const messages = logs.filter(({ message }) => message.indexOf(contents) !== -1 ? true : false); - expect(messages.length).toBeGreaterThan(0); - } - - - it('should display Binding syntax', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Binding syntax'); - }); - - it('should display Save button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toBe('Save'); - }); - - it('should display HTML attributes and DOM properties', async () => { - expect(await element.all(by.css('h2')).get(1).getText()).toBe('HTML attributes and DOM properties'); - }); - - it('should display 1. Use the inspector...', async () => { - expect(await element.all(by.css('p')).get(0).getText()).toContain('1. Use the inspector'); - }); - - it('should display Disabled property vs. attribute', async () => { - expect(await element.all(by.css('h3')).get(0).getText()).toBe('Disabled property vs. attribute'); - }); - - - it('should log a message including Sarah', async () => { - const attributeButton = element.all(by.css('button')).get(1); - await attributeButton.click(); - const contents = 'Sarah'; - await logChecker(contents); - }); - - it('should log a message including Sarah for DOM property', async () => { - const DOMPropertyButton = element.all(by.css('button')).get(2); - await DOMPropertyButton.click(); - const contents = 'Sarah'; - await logChecker(contents); - }); - - it('should log a message including Sally for DOM property', async () => { - const DOMPropertyButton = element.all(by.css('button')).get(2); - const input = element(by.css('input')); - await input.sendKeys('Sally'); - await DOMPropertyButton.click(); - const contents = 'Sally'; - await logChecker(contents); - }); - - it('should log a message that Test Button works', async () => { - const testButton = element.all(by.css('button')).get(3); - await testButton.click(); - const contents = 'Test'; - await logChecker(contents); - }); - - it('should toggle Test Button disabled', async () => { - const toggleButton = element.all(by.css('button')).get(4); - await toggleButton.click(); - const contents = 'true'; - await logChecker(contents); - }); -}); diff --git a/aio/content/examples/binding-syntax/example-config.json b/aio/content/examples/binding-syntax/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/binding-syntax/src/app/app.component.css b/aio/content/examples/binding-syntax/src/app/app.component.css deleted file mode 100644 index 30428daac53..00000000000 --- a/aio/content/examples/binding-syntax/src/app/app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -div { - padding: .25rem 0; -} diff --git a/aio/content/examples/binding-syntax/src/app/app.component.html b/aio/content/examples/binding-syntax/src/app/app.component.html deleted file mode 100644 index 2d30c87a466..00000000000 --- a/aio/content/examples/binding-syntax/src/app/app.component.html +++ /dev/null @@ -1,45 +0,0 @@ - -
    -

    Binding syntax

    -
    - -
    -

    Button disabled state bound to isUnchanged property

    - - - - -
    - -
    - -
    -

    HTML attributes and DOM properties

    -

    1. Use the inspector to see the HTML attribute and DOM property values. Click the buttons to log values to the console.

    - - -
    - Won't change. -
    - -
    - Changeable. Angular works with these. -
    - -

    2. Change the name in the input and click the buttons again.

    -
    - -
    - -
    -

    Disabled property vs. attribute

    -

    Use the inspector to see the Test Button work and its disabled property toggle.

    -
    - -
    -
    - -
    - -
    diff --git a/aio/content/examples/binding-syntax/src/app/app.component.ts b/aio/content/examples/binding-syntax/src/app/app.component.ts deleted file mode 100644 index 1b11666adb2..00000000000 --- a/aio/content/examples/binding-syntax/src/app/app.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import {Component, ViewChild, ElementRef} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - @ViewChild('bindingInput') bindingInput!: ElementRef; - - isUnchanged = true; - - getHTMLAttributeValue(): any { - console.warn('HTML attribute value: ' + this.bindingInput.nativeElement.getAttribute('value')); - } - - getDOMPropertyValue(): any { - console.warn('DOM property value: ' + this.bindingInput.nativeElement.value); - } - - working(): any { - console.warn('Test Button works!'); - } - - toggleDisabled(): any { - const testButton = document.getElementById('testButton') as HTMLInputElement; - testButton.disabled = !testButton.disabled; - console.warn(testButton.disabled); - } -} diff --git a/aio/content/examples/binding-syntax/src/index.html b/aio/content/examples/binding-syntax/src/index.html deleted file mode 100644 index 5c5d71481f7..00000000000 --- a/aio/content/examples/binding-syntax/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Angular binding syntax example - - - - - Loading... - - - diff --git a/aio/content/examples/binding-syntax/src/main.ts b/aio/content/examples/binding-syntax/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/binding-syntax/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/binding-syntax/stackblitz.json b/aio/content/examples/binding-syntax/stackblitz.json deleted file mode 100644 index 49fb8fc01a2..00000000000 --- a/aio/content/examples/binding-syntax/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Binding Syntax", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Binding Syntax"] -} diff --git a/aio/content/examples/bootstrapping/BUILD.bazel b/aio/content/examples/bootstrapping/BUILD.bazel deleted file mode 100644 index 56b9b95d8ae..00000000000 --- a/aio/content/examples/bootstrapping/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "bootstrapping", -) diff --git a/aio/content/examples/bootstrapping/bs-config.1.json b/aio/content/examples/bootstrapping/bs-config.1.json deleted file mode 100644 index 4e585952675..00000000000 --- a/aio/content/examples/bootstrapping/bs-config.1.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "server": { - "baseDir": "src", - "routes": { - "/node_modules": "node_modules" - } - } -} diff --git a/aio/content/examples/bootstrapping/e2e/src/app.e2e-spec.ts b/aio/content/examples/bootstrapping/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 78e8b1ee46b..00000000000 --- a/aio/content/examples/bootstrapping/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('feature-modules App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display message saying app works', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('app works!'); - }); -}); diff --git a/aio/content/examples/bootstrapping/example-config.json b/aio/content/examples/bootstrapping/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/bootstrapping/src/app/app.component.css b/aio/content/examples/bootstrapping/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/bootstrapping/src/app/app.component.html b/aio/content/examples/bootstrapping/src/app/app.component.html deleted file mode 100644 index b6931b538a2..00000000000 --- a/aio/content/examples/bootstrapping/src/app/app.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - {{title}} -

    diff --git a/aio/content/examples/bootstrapping/src/app/app.component.ts b/aio/content/examples/bootstrapping/src/app/app.component.ts deleted file mode 100644 index ff63e050488..00000000000 --- a/aio/content/examples/bootstrapping/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'app works!'; -} diff --git a/aio/content/examples/bootstrapping/src/app/app.module.ts b/aio/content/examples/bootstrapping/src/app/app.module.ts deleted file mode 100644 index b7d1a9bbae5..00000000000 --- a/aio/content/examples/bootstrapping/src/app/app.module.ts +++ /dev/null @@ -1,32 +0,0 @@ -// #docplaster -// imports -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; - -import { AppComponent } from './app.component'; -// #docregion directive-import -import { ItemDirective } from './item.directive'; -// #enddocregion directive-import - - -// @NgModule decorator with its metadata -@NgModule({ -// #docregion declarations - declarations: [ - AppComponent, - ItemDirective - ], - // #enddocregion declarations - // #docregion imports - imports: [ - BrowserModule, - FormsModule, - HttpClientModule - ], - // #enddocregion imports - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/bootstrapping/src/app/item.directive.ts b/aio/content/examples/bootstrapping/src/app/item.directive.ts deleted file mode 100644 index e8083bb05e7..00000000000 --- a/aio/content/examples/bootstrapping/src/app/item.directive.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docplaster -// #docregion directive - - -import { Directive } from '@angular/core'; - -@Directive({ - selector: '[appItem]' -}) -export class ItemDirective { -// code goes here - constructor() { } - -} -// #enddocregion directive diff --git a/aio/content/examples/bootstrapping/src/index.html b/aio/content/examples/bootstrapping/src/index.html deleted file mode 100644 index 6dd1234dd1e..00000000000 --- a/aio/content/examples/bootstrapping/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - NgmoduleDemo - - - - - - Loading... - - diff --git a/aio/content/examples/bootstrapping/src/main.ts b/aio/content/examples/bootstrapping/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/bootstrapping/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/bootstrapping/stackblitz.json b/aio/content/examples/bootstrapping/stackblitz.json deleted file mode 100644 index 3167ca83876..00000000000 --- a/aio/content/examples/bootstrapping/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Bootstrapping", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["ngmodules"] -} diff --git a/aio/content/examples/built-in-directives/BUILD.bazel b/aio/content/examples/built-in-directives/BUILD.bazel deleted file mode 100644 index 7b2219477f5..00000000000 --- a/aio/content/examples/built-in-directives/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "built-in-directives", -) diff --git a/aio/content/examples/built-in-directives/e2e/src/app.e2e-spec.ts b/aio/content/examples/built-in-directives/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 5914222617d..00000000000 --- a/aio/content/examples/built-in-directives/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Built-in Directives', () => { - - beforeAll(() => browser.get('')); - - it('should have title Built-in Directives', async () => { - const title = element.all(by.css('h1')).get(0); - expect(await title.getText()).toEqual('Built-in Directives'); - }); - - it('should change first Teapot header', async () => { - const firstLabel = element.all(by.css('p')).get(0); - const firstInput = element.all(by.css('input')).get(0); - - expect(await firstLabel.getText()).toEqual('Current item name: Teapot'); - await firstInput.sendKeys('abc'); - expect(await firstLabel.getText()).toEqual('Current item name: Teapotabc'); - }); - - - it('should modify sentence when modified checkbox checked', async () => { - const modifiedChkbxLabel = element.all(by.css('input[type="checkbox"]')).get(1); - const modifiedSentence = element.all(by.css('div')).get(1); - - await modifiedChkbxLabel.click(); - expect(await modifiedSentence.getText()).toContain('modified'); - }); - - it('should modify sentence when normal checkbox checked', async () => { - const normalChkbxLabel = element.all(by.css('input[type="checkbox"]')).get(4); - const normalSentence = element.all(by.css('div')).get(7); - - await normalChkbxLabel.click(); - expect(await normalSentence.getText()).toContain('normal weight and, extra large'); - }); - - it('should toggle app-item-detail', async () => { - const toggleButton = element.all(by.css('button')).get(3); - const toggledDiv = element.all(by.css('app-item-detail')).get(0); - - await toggleButton.click(); - expect(await toggledDiv.isDisplayed()).toBe(true); - }); - - it('should hide app-item-detail', async () => { - const hiddenMessage = element.all(by.css('p')).get(10); - const hiddenDiv = element.all(by.css('app-item-detail')).get(2); - - expect(await hiddenMessage.getText()).toContain('in the DOM'); - expect(await hiddenDiv.isDisplayed()).toBe(true); - }); - - it('should have 10 lists each containing the string Teapot', async () => { - const listDiv = element.all(by.cssContainingText('.box', 'Teapot')); - expect(await listDiv.count()).toBe(10); - }); - - it('should switch case', async () => { - const tvRadioButton = element.all(by.css('input[type="radio"]')).get(3); - const tvDiv = element(by.css('app-lost-item')); - - const fishbowlRadioButton = element.all(by.css('input[type="radio"]')).get(4); - const fishbowlDiv = element(by.css('app-unknown-item')); - - await tvRadioButton.click(); - expect(await tvDiv.getText()).toContain('Television'); - await fishbowlRadioButton.click(); - expect(await fishbowlDiv.getText()).toContain('mysterious'); - }); - -}); - diff --git a/aio/content/examples/built-in-directives/example-config.json b/aio/content/examples/built-in-directives/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/built-in-directives/src/app/app.component.css b/aio/content/examples/built-in-directives/src/app/app.component.css deleted file mode 100644 index 52cccf1628a..00000000000 --- a/aio/content/examples/built-in-directives/src/app/app.component.css +++ /dev/null @@ -1,75 +0,0 @@ - -button { - font-size: 100%; - margin: 0 2px; -} - -div[ng-reflect-ng-switch], app-unknown-item { - margin: .5rem 0; - display: block; -} - -#noTrackByCnt, -#withTrackByCnt { - color: darkred; - max-width: 450px; - margin: 4px; -} - -img { - height: 100px; -} - -.box { - border: 1px solid black; - padding: 6px; - max-width: 450px; -} - -.child-div { - margin-left: 1em; - font-weight: normal; -} - -.context { - margin-left: 1em; -} - -.hidden { - display: none; -} - -.parent-div { - margin-top: 1em; - font-weight: bold; -} - -.course { - font-weight: bold; - font-size: x-large; -} - -.helpful { - color: red; -} - -.saveable { - color: limegreen; -} - -.study, -.modified { - font-family: "Brush Script MT", cursive; - font-size: 2rem; -} - -.toe { - margin-left: 1em; - font-style: italic; -} - - -.to-toc { - margin-top: 10px; - display: block; -} diff --git a/aio/content/examples/built-in-directives/src/app/app.component.html b/aio/content/examples/built-in-directives/src/app/app.component.html deleted file mode 100644 index 510bd04f4d8..00000000000 --- a/aio/content/examples/built-in-directives/src/app/app.component.html +++ /dev/null @@ -1,238 +0,0 @@ -

    Built-in Directives

    - -

    Built-in attribute directives

    - -

    NgModel (two-way) Binding

    - -

    NgModel examples

    -

    Current item name: {{currentItem.name}}

    -

    - - -

    - -

    - - - - -

    - -

    - - -

    - -

    - -

    -
    - -

    NgClass Binding

    - -

    currentClasses is {{currentClasses | json}}

    - -
    This div is initially saveable, unchanged, and special.
    - -
      -
    • - - -
    • -
    • - -
    • -
    • - -
    • -
    - - -
    - This div should be {{ canSave ? "": "not"}} saveable, - {{ isUnchanged ? "unchanged" : "modified" }} and - {{ isSpecial ? "": "not"}} special after clicking "Refresh".
    -

    - - -
    This div is special
    - -
    Helpful study course
    -
    Study course
    - - - -

    NgStyle Binding

    -
    - This div is x-large or smaller. -
    - -

    [ngStyle] binding to currentStyles - CSS property names

    -

    currentStyles is {{currentStyles | json}}

    - - -
    - This div is initially italic, normal weight, and extra large (24px). -
    - - - - -
    - | - | - - -

    -
    - This div should be {{ canSave ? "italic": "plain"}}, - {{ isUnchanged ? "normal weight" : "bold" }} and, - {{ isSpecial ? "extra large": "normal size"}} after clicking "Refresh".
    - -
    -

    Built-in structural directives

    -

    NgIf Binding

    -
    -

    If isActive is true, app-item-detail will render:

    - - - - - -
    -

    If currentCustomer isn't null, say hello to Laura:

    - -
    Hello, {{currentCustomer.name}}
    - -

    nullCustomer is null by default. NgIf guards against null. Give it a value to show it:

    - -
    Hello, {{nullCustomer}}
    - - - - -

    NgIf binding with template (no *)

    - -Add {{currentItem.name}} with template -
    - -

    Show/hide vs. NgIf

    - -
    Show with class
    -
    Hide with class
    - -

    ItemDetail is in the DOM but hidden

    - - -
    Show with style
    -
    Hide with style
    - - -
    -

    NgFor Binding

    - -
    - -
    {{item.name}}
    - -
    - -

    *ngFor with ItemDetailComponent element

    -
    - - - -
    - - -

    *ngFor with index

    -

    with semi-colon separator

    -
    - -
    {{i + 1}} - {{item.name}}
    - -
    - -

    with comma separator

    -
    -
    {{i + 1}} - {{item.name}}
    -
    - -

    *ngFor trackBy

    - - - - -

    without trackBy

    -
    -
    ({{item.id}}) {{item.name}}
    - -
    - Item DOM elements change #{{itemsNoTrackByCount}} without trackBy -
    -
    - -

    with trackBy

    -
    -
    ({{item.id}}) {{item.name}}
    - -
    - Item DOM elements change #{{itemsWithTrackByCount}} with trackBy -
    -
    - -


    - -

    with trackBy and semi-colon separator

    -
    - -
    - ({{item.id}}) {{item.name}} -
    - -
    - -

    with trackBy and comma separator

    -
    -
    ({{item.id}}) {{item.name}}
    -
    - -

    with trackBy and space separator

    -
    -
    ({{item.id}}) {{item.name}}
    -
    - -

    with generic trackById function

    -
    -
    ({{item.id}}) {{item.name}}
    -
    - -

    NgSwitch Binding

    - -

    Pick your favorite item

    -
    - -
    - - -
    - - - - - - -
    Are you as bright as {{currentItem.name}}?
    - - - -
    - - diff --git a/aio/content/examples/built-in-directives/src/app/app.component.ts b/aio/content/examples/built-in-directives/src/app/app.component.ts deleted file mode 100644 index 5de91e6431d..00000000000 --- a/aio/content/examples/built-in-directives/src/app/app.component.ts +++ /dev/null @@ -1,147 +0,0 @@ -import {Component, OnInit} from '@angular/core'; -// #docregion import-common-module -import {CommonModule} from '@angular/common'; -// #enddocregion import-common-module -// #docregion import-forms-module -import {FormsModule} from '@angular/forms'; // <--- JavaScript import from Angular -// #enddocregion import-forms-module -import {Item} from './item'; -import {ItemDetailComponent} from './item-detail/item-detail.component'; -import {ItemSwitchComponents} from './item-switch.component'; -import {StoutItemComponent} from './item-switch.component'; - -// #docregion import-common-module, import-forms-module -@Component({ - standalone: true, - // #enddocregion import-common-module, import-forms-module - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - - // #docregion import-common-module, import-forms-module - imports: [ - CommonModule, // <-- import into the component - // #enddocregion import-common-module - FormsModule, // <--- import into the component - // #enddocregion import-forms-module - ItemDetailComponent, - ItemSwitchComponents, - StoutItemComponent, - // #docregion import-common-module, import-forms-module - ], -}) -export class AppComponent implements OnInit { - // #enddocregion import-common-module, import-forms-module - canSave = true; - isSpecial = true; - isUnchanged = true; - - isActive = true; - nullCustomer: string | null = null; - currentCustomer = { - name: 'Laura', - }; - - item!: Item; // defined to demonstrate template context precedence - items: Item[] = []; - - // #docregion item - currentItem!: Item; - // #enddocregion item - - // trackBy change counting - itemsNoTrackByCount = 0; - itemsWithTrackByCount = 0; - itemsWithTrackByCountReset = 0; - itemIdIncrement = 1; - - // #docregion setClasses - currentClasses: Record = {}; - // #enddocregion setClasses - - // #docregion setStyles - currentStyles: Record = {}; - // #enddocregion setStyles - - ngOnInit() { - this.resetItems(); - this.setCurrentClasses(); - this.setCurrentStyles(); - this.itemsNoTrackByCount = 0; - } - - setUppercaseName(name: string) { - this.currentItem.name = name.toUpperCase(); - } - - // #docregion setClasses - setCurrentClasses() { - // CSS classes: added/removed per current state of component properties - this.currentClasses = { - saveable: this.canSave, - modified: !this.isUnchanged, - special: this.isSpecial, - }; - } - // #enddocregion setClasses - - // #docregion setStyles - setCurrentStyles() { - // CSS styles: set per current state of component properties - this.currentStyles = { - 'font-style': this.canSave ? 'italic' : 'normal', - 'font-weight': !this.isUnchanged ? 'bold' : 'normal', - 'font-size': this.isSpecial ? '24px' : '12px', - }; - } - // #enddocregion setStyles - - isActiveToggle() { - this.isActive = !this.isActive; - } - - giveNullCustomerValue() { - this.nullCustomer = 'Kelly'; - } - - resetItems() { - this.items = Item.items.map((item) => item.clone()); - this.currentItem = this.items[0]; - this.item = this.currentItem; - } - - resetList() { - this.resetItems(); - this.itemsWithTrackByCountReset = 0; - this.itemsNoTrackByCount = ++this.itemsNoTrackByCount; - } - - changeIds() { - this.items.forEach((i) => (i.id += 1 * this.itemIdIncrement)); - this.itemsWithTrackByCountReset = -1; - this.itemsNoTrackByCount = ++this.itemsNoTrackByCount; - this.itemsWithTrackByCount = ++this.itemsWithTrackByCount; - } - - clearTrackByCounts() { - this.resetItems(); - this.itemsNoTrackByCount = 0; - this.itemsWithTrackByCount = 0; - this.itemIdIncrement = 1; - } - // #docregion trackByItems - trackByItems(index: number, item: Item): number { - return item.id; - } - // #enddocregion trackByItems - - trackById(index: number, item: any): number { - return item.id; - } - - getValue(event: Event): string { - return (event.target as HTMLInputElement).value; - } - // #docregion import-common-module, import-forms-module -} -// #enddocregion import-common-module, import-forms-module diff --git a/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.css b/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.html b/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.html deleted file mode 100644 index 3586d503af4..00000000000 --- a/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.html +++ /dev/null @@ -1,3 +0,0 @@ -
    - {{item?.name}} -
    diff --git a/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.ts b/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.ts deleted file mode 100644 index fe45d852917..00000000000 --- a/aio/content/examples/built-in-directives/src/app/item-detail/item-detail.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component, Input} from '@angular/core'; - -import {Item} from '../item'; - -@Component({ - standalone: true, - selector: 'app-item-detail', - templateUrl: './item-detail.component.html', - styleUrls: ['./item-detail.component.css'], -}) -export class ItemDetailComponent { - @Input() item!: Item; -} diff --git a/aio/content/examples/built-in-directives/src/app/item-switch.component.ts b/aio/content/examples/built-in-directives/src/app/item-switch.component.ts deleted file mode 100644 index 32b5c9a5e8b..00000000000 --- a/aio/content/examples/built-in-directives/src/app/item-switch.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -import {Component, Input} from '@angular/core'; -import {Item} from './item'; - -@Component({ - standalone: true, - selector: 'app-stout-item', - template: "I'm a little {{item.name}}, short and stout!", -}) - -// #docregion input -export class StoutItemComponent { - @Input() item!: Item; -} -// #enddocregion input - -@Component({ - standalone: true, - selector: 'app-best-item', - template: 'This is the brightest {{item.name}} in town.', -}) -export class BestItemComponent { - @Input() item!: Item; -} - -@Component({ - standalone: true, - selector: 'app-device-item', - template: 'Which is the slimmest {{item.name}}?', -}) -export class DeviceItemComponent { - @Input() item!: Item; -} - -@Component({ - standalone: true, - selector: 'app-lost-item', - template: 'Has anyone seen my {{item.name}}?', -}) -export class LostItemComponent { - @Input() item!: Item; -} - -@Component({ - standalone: true, - selector: 'app-unknown-item', - template: '{{message}}', -}) -export class UnknownItemComponent { - @Input() item!: Item; - get message() { - return this.item && this.item.name - ? `${this.item.name} is strange and mysterious.` - : 'A mystery wrapped in a fishbowl.'; - } -} - -export const ItemSwitchComponents = [ - StoutItemComponent, - BestItemComponent, - DeviceItemComponent, - LostItemComponent, - UnknownItemComponent, -]; diff --git a/aio/content/examples/built-in-directives/src/app/item.ts b/aio/content/examples/built-in-directives/src/app/item.ts deleted file mode 100644 index 2913de9b521..00000000000 --- a/aio/content/examples/built-in-directives/src/app/item.ts +++ /dev/null @@ -1,30 +0,0 @@ -export class Item { - static nextId = 0; - - static items: Item[] = [ - new Item( - 0, - 'Teapot', - 'stout' - ), - new Item(1, 'Lamp', 'bright'), - new Item(2, 'Phone', 'slim' ), - new Item(3, 'Television', 'vintage' ), - new Item(4, 'Fishbowl') - ]; - - - constructor( - public id: number, - public name?: string, - public feature?: string, - public url?: string, - public rate = 100, - ) { - this.id = id ? id : Item.nextId++; - } - - clone(): Item { - return Object.assign(new Item(this.id), this); - } -} diff --git a/aio/content/examples/built-in-directives/src/index.html b/aio/content/examples/built-in-directives/src/index.html deleted file mode 100644 index 543813ff01b..00000000000 --- a/aio/content/examples/built-in-directives/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - BuiltInDirectives - - - - - - - - diff --git a/aio/content/examples/built-in-directives/src/main.ts b/aio/content/examples/built-in-directives/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/built-in-directives/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/built-in-directives/stackblitz.json b/aio/content/examples/built-in-directives/stackblitz.json deleted file mode 100644 index 6824495335c..00000000000 --- a/aio/content/examples/built-in-directives/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Built-in Directives", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Built-in Directives"] -} diff --git a/aio/content/examples/built-in-template-functions/BUILD.bazel b/aio/content/examples/built-in-template-functions/BUILD.bazel deleted file mode 100644 index 4696eb44ef1..00000000000 --- a/aio/content/examples/built-in-template-functions/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "built-in-template-functions", -) diff --git a/aio/content/examples/built-in-template-functions/e2e/src/app.e2e-spec.ts b/aio/content/examples/built-in-template-functions/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 03e4a2e5e37..00000000000 --- a/aio/content/examples/built-in-template-functions/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Built Template Functions Example', () => { - beforeAll(() => browser.get('')); - - it('should have title Built-in Template Functions', async () => { - const title = element.all(by.css('h1')).get(0); - expect(await title.getText()).toEqual('Built-in Template Functions'); - }); - - it('should display $any( ) in h2', async () => { - const header = element(by.css('h2')); - expect(await header.getText()).toContain('$any( )'); - }); - -}); diff --git a/aio/content/examples/built-in-template-functions/example-config.json b/aio/content/examples/built-in-template-functions/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/built-in-template-functions/src/app/app.component.css b/aio/content/examples/built-in-template-functions/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/built-in-template-functions/src/app/app.component.html b/aio/content/examples/built-in-template-functions/src/app/app.component.html deleted file mode 100644 index 0a10c023e4b..00000000000 --- a/aio/content/examples/built-in-template-functions/src/app/app.component.html +++ /dev/null @@ -1,15 +0,0 @@ -

    {{title}}

    - -

    $any( ) type cast function and an undeclared member

    - -

    There is no such member as bestByDate in the following two examples, so nothing renders:

    - -

    The item's undeclared best by date is: {{$any(item).bestByDate}}

    - - -

    using this

    - -

    The item's undeclared best by date is: {{$any(this).bestByDate}}

    - - - diff --git a/aio/content/examples/built-in-template-functions/src/app/app.component.ts b/aio/content/examples/built-in-template-functions/src/app/app.component.ts deleted file mode 100644 index 84c1c62612b..00000000000 --- a/aio/content/examples/built-in-template-functions/src/app/app.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'Built-in Template Functions'; - - item = { - name: 'Telephone', - origin: 'Sweden', - price: 98, - }; -} diff --git a/aio/content/examples/built-in-template-functions/src/index.html b/aio/content/examples/built-in-template-functions/src/index.html deleted file mode 100644 index 55b10c2347a..00000000000 --- a/aio/content/examples/built-in-template-functions/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Built-in Template Functions Example - - - - - - Loading... - - diff --git a/aio/content/examples/built-in-template-functions/src/main.ts b/aio/content/examples/built-in-template-functions/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/built-in-template-functions/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/built-in-template-functions/stackblitz.json b/aio/content/examples/built-in-template-functions/stackblitz.json deleted file mode 100644 index d77c2c273f4..00000000000 --- a/aio/content/examples/built-in-template-functions/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Built-in Template Functions", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Built-in Template Functions"] -} diff --git a/aio/content/examples/cli-builder/src/my-builder.spec.ts b/aio/content/examples/cli-builder/src/my-builder.spec.ts deleted file mode 100644 index ac4c79fba87..00000000000 --- a/aio/content/examples/cli-builder/src/my-builder.spec.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docregion -import { Architect } from '@angular-devkit/architect'; -import { TestingArchitectHost } from '@angular-devkit/architect/testing'; -import { schema } from '@angular-devkit/core'; -import { promises as fs } from 'fs'; -import { join } from 'path'; - -describe('Copy File Builder', () => { - let architect: Architect; - let architectHost: TestingArchitectHost; - - beforeEach(async () => { - const registry = new schema.CoreSchemaRegistry(); - registry.addPostTransform(schema.transforms.addUndefinedDefaults); - - // TestingArchitectHost() takes workspace and current directories. - // Since we don't use those, both are the same in this case. - architectHost = new TestingArchitectHost(__dirname, __dirname); - architect = new Architect(architectHost, registry); - - // This will either take a Node package name, or a path to the directory - // for the package.json file. - await architectHost.addBuilderFromPackage(join(__dirname, '..')); - }); - - it('can copy files', async () => { - // A "run" can have multiple outputs, and contains progress information. - const run = await architect.scheduleBuilder('@example/copy-file:copy', { - source: 'package.json', - destination: 'package-copy.json', - }); - - // The "result" member (of type BuilderOutput) is the next output. - const output = await run.result; - - // Stop the builder from running. This stops Architect from keeping - // the builder-associated states in memory, since builders keep waiting - // to be scheduled. - await run.stop(); - - // Expect that the copied file is the same as its source. - const sourceContent = await fs.readFile('package.json', 'utf8'); - const destinationContent = await fs.readFile('package-copy.json', 'utf8'); - expect(destinationContent).toBe(sourceContent); - }); -}); -// #enddocregion diff --git a/aio/content/examples/cli-builder/src/my-builder.ts b/aio/content/examples/cli-builder/src/my-builder.ts deleted file mode 100644 index b7603078d47..00000000000 --- a/aio/content/examples/cli-builder/src/my-builder.ts +++ /dev/null @@ -1,44 +0,0 @@ -// #docplaster -// #docregion builder, builder-skeleton, handling-output, progress-reporting -import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect'; -import { JsonObject } from '@angular-devkit/core'; -// #enddocregion builder-skeleton -import { promises as fs } from 'fs'; -// #docregion builder-skeleton - -interface Options extends JsonObject { - source: string; - destination: string; -} - -export default createBuilder(copyFileBuilder); - -async function copyFileBuilder( - options: Options, - context: BuilderContext, -): Promise { - // #enddocregion builder, builder-skeleton, handling-output - // #docregion report-status - context.reportStatus(`Copying ${options.source} to ${options.destination}.`); - // #docregion builder, handling-output - try { - await fs.copyFile(options.source, options.destination); - } catch (err) { - // #enddocregion builder - context.logger.error('Failed to copy file.'); - // #docregion builder - return { - success: false, - error: err.message, - }; - } - - // #enddocregion builder, handling-output - context.reportStatus('Done.'); - // #docregion builder, handling-output - return { success: true }; - // #enddocregion report-status - // #docregion builder-skeleton -} - -// #enddocregion builder, builder-skeleton, handling-output, progress-reporting diff --git a/aio/content/examples/comparing-observables/BUILD.bazel b/aio/content/examples/comparing-observables/BUILD.bazel deleted file mode 100644 index 1e9634c5976..00000000000 --- a/aio/content/examples/comparing-observables/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "comparing-observables", -) diff --git a/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1902bcde0a4..00000000000 --- a/aio/content/examples/comparing-observables/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/observables/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/comparing-observables/example-config.json b/aio/content/examples/comparing-observables/example-config.json deleted file mode 100644 index 3aa2059b4d0..00000000000 --- a/aio/content/examples/comparing-observables/example-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": ["tsc", "--project", "tsconfig.spec.json", "--module", "commonjs"] - }, - { - "cmd": "yarn", - "args": ["jasmine", "out-tsc/**/*.spec.js"] - } - ] -} diff --git a/aio/content/examples/comparing-observables/src/observables.spec.ts b/aio/content/examples/comparing-observables/src/observables.spec.ts deleted file mode 100644 index 35e93d51967..00000000000 --- a/aio/content/examples/comparing-observables/src/observables.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { docRegionOperators, docRegionObservable, docRegionError, docRegionUnsubscribe } from './observables'; - -describe('observables', () => { - it('should print 2', (doneFn: DoneFn) => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - const observable = docRegionObservable(consoleSpy); - observable.subscribe(() => { - expect(consoleSpy.log).toHaveBeenCalledTimes(1); - expect(consoleSpy.log).toHaveBeenCalledWith(2); - doneFn(); - }); - }); - - it('should close the subscription', () => { - const subscription = docRegionUnsubscribe(); - expect(subscription.closed).toBeTruthy(); - }); - - it('should transform an observable with operators', (doneFn: DoneFn) => { - const results = [] as (number | string)[]; - const observable = docRegionOperators(); - observable.subscribe({ - next: value => results.push(value), - complete: () => { - expect(results).toEqual([0, 2, 4, 'Ta Da!']); - doneFn(); - } - }); - }); - - it('should handle errors', (doneFn: DoneFn) => { - const consoleSpy = jasmine.createSpyObj('console', ['error']); - docRegionError(consoleSpy); - expect(consoleSpy.error).toHaveBeenCalledTimes(1); - expect(consoleSpy.error).toHaveBeenCalledWith(new Error('revised error')); - doneFn(); - }); -}); diff --git a/aio/content/examples/comparing-observables/src/observables.ts b/aio/content/examples/comparing-observables/src/observables.ts deleted file mode 100644 index 924849d60dc..00000000000 --- a/aio/content/examples/comparing-observables/src/observables.ts +++ /dev/null @@ -1,82 +0,0 @@ -// #docplaster - -import { - Observable, concat, interval, of, - catchError, delay, map, take, -} from 'rxjs'; - -export function docRegionObservable(console: Console) { - // #docregion observable - - // declare a publishing operation - const observable = new Observable(observer => { - // Subscriber fn... - // #enddocregion observable - // The below code is used for unit testing only - observer.next(2); - // #docregion observable - }); - - // initiate execution - observable.subscribe(value => { - // observer handles notifications - // #enddocregion observable - // The below code is used for unit testing only - console.log(value); - // #docregion observable - }); - - // #enddocregion observable - return observable; -} - -export function docRegionUnsubscribe() { - const observable = new Observable(() => { - // Subscriber fn... - }); - // #docregion unsubscribe - - const subscription = observable.subscribe(() => { - // observer handles notifications - }); - - subscription.unsubscribe(); - - // #enddocregion unsubscribe - return subscription; -} - -export function docRegionError(console = window.console) { - // #docregion error - const observable = new Observable(() => { - throw new Error('my error'); - }); - - observable.pipe( - catchError(error => of(42)), // recover within the operator - map(() => { throw new Error('another error'); }), // oops - catchError(error => { throw new Error('revised error'); }) // modify and rethrow - ).subscribe({ - error: err => console.error(err) // report error in subscribe - }); - // #enddocregion error -} - -export function docRegionOperators() { - // #docregion operators - /** Emit 0, 2, 4 every 10ms */ - const observable1$ = interval(10).pipe( - map(value => 2 * value), // double the interval values: 0, 1, 2, ... - take(3) // take only the first 3 emitted values - ); - - /** Emit 'Ta Da!' after 10ms */ - const observable2$ = of('Ta Da!').pipe(delay(10)); - - /** Observable processes all of observable1 first, then all of observable2. - * Emits 0, 2, 4, 'Ta Da! after about 40ms' */ - const combined$ = concat(observable1$, observable2$); - // #enddocregion operators - - return combined$; -} diff --git a/aio/content/examples/comparing-observables/src/promises.spec.ts b/aio/content/examples/comparing-observables/src/promises.spec.ts deleted file mode 100644 index c2d2e8f0f98..00000000000 --- a/aio/content/examples/comparing-observables/src/promises.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { docRegionError, docRegionPromise } from './promises'; - -describe('promises', () => { - it('should print -4', (doneFn: DoneFn) => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - const pr = docRegionPromise(consoleSpy, 2); - pr.then((value) => { - expect(consoleSpy.log).toHaveBeenCalledTimes(1); - expect(consoleSpy.log).toHaveBeenCalledWith(2); - expect(value).toBe(-4); - doneFn(); - }); - }); - - it('should throw an error', (doneFn: DoneFn) => { - const consoleSpy = jasmine.createSpyObj('console', ['error']); - const pr = docRegionError(consoleSpy); - pr.then( - (value) => { - doneFn.fail(`should not have succeeded with ${value}`); - }, - (err) => { - expect(consoleSpy.error).toHaveBeenCalledTimes(1); - expect(consoleSpy.error).toHaveBeenCalledWith('Error: revised error'); - expect(err.toString()).toEqual('Error: revised error'); - doneFn(); - }); - }); -}); diff --git a/aio/content/examples/comparing-observables/src/promises.ts b/aio/content/examples/comparing-observables/src/promises.ts deleted file mode 100644 index f38f5211e76..00000000000 --- a/aio/content/examples/comparing-observables/src/promises.ts +++ /dev/null @@ -1,48 +0,0 @@ -// #docplaster - -export function docRegionPromise(console: Console, inputValue: number) { - // #docregion promise - // initiate execution - let promise = new Promise(resolve => { - // Executer fn... - // #enddocregion promise - // The below is used in the unit tests. - resolve(inputValue); - // #docregion promise - }); - // #enddocregion promise - promise = - // #docregion promise - promise.then(value => { - // handle result here - // #enddocregion promise - // The below is used in the unit tests. - console.log(value); - return value; - // #docregion promise - }); - // #enddocregion promise - promise = - // #docregion chain - promise - .then(value => 2 * value) - .then(value => -value); - // #enddocregion chain - - return promise; -} - -export function docRegionError(console = window.console) { - // #docregion error - const promise = Promise.reject('my error') // promise that errors - .catch(error => 42) // recover from error - .then(() => { throw new Error('another error'); }) // oops - .then(null, error => { throw new Error('revised error'); }) // modify and rethrow - .catch(error => { - console.error(error.toString()); // report error ... - throw error; // and rethrow so promise remains "rejected" - }); - - // #enddocregion error - return promise; -} diff --git a/aio/content/examples/component-interaction/BUILD.bazel b/aio/content/examples/component-interaction/BUILD.bazel deleted file mode 100644 index 3365ce3809c..00000000000 --- a/aio/content/examples/component-interaction/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "component-interaction", -) diff --git a/aio/content/examples/component-interaction/e2e/src/app.e2e-spec.ts b/aio/content/examples/component-interaction/e2e/src/app.e2e-spec.ts deleted file mode 100644 index c91c7814921..00000000000 --- a/aio/content/examples/component-interaction/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,239 +0,0 @@ -import { browser, by, element } from 'protractor'; - -describe('Component Communication Cookbook Tests', () => { - - beforeEach(() => browser.get(browser.baseUrl)); - - describe('Parent-to-child communication', () => { - // #docregion parent-to-child - // ... - const heroNames = ['Dr. IQ', 'Magneta', 'Bombasto']; - const masterName = 'Master'; - - it('should pass properties to children properly', async () => { - const parent = element(by.tagName('app-hero-parent')); - const heroes = parent.all(by.tagName('app-hero-child')); - - for (let i = 0; i < heroNames.length; i++) { - const childTitle = await heroes.get(i).element(by.tagName('h3')).getText(); - const childDetail = await heroes.get(i).element(by.tagName('p')).getText(); - expect(childTitle).toEqual(heroNames[i] + ' says:'); - expect(childDetail).toContain(masterName); - } - }); - // ... - // #enddocregion parent-to-child - }); - - describe('Parent-to-child communication with setter', () => { - // #docregion parent-to-child-setter - // ... - it('should display trimmed, non-empty names', async () => { - const nonEmptyNameIndex = 0; - const nonEmptyName = '"Dr. IQ"'; - const parent = element(by.tagName('app-name-parent')); - const hero = parent.all(by.tagName('app-name-child')).get(nonEmptyNameIndex); - - const displayName = await hero.element(by.tagName('h3')).getText(); - expect(displayName).toEqual(nonEmptyName); - }); - - it('should replace empty name with default name', async () => { - const emptyNameIndex = 1; - const defaultName = '""'; - const parent = element(by.tagName('app-name-parent')); - const hero = parent.all(by.tagName('app-name-child')).get(emptyNameIndex); - - const displayName = await hero.element(by.tagName('h3')).getText(); - expect(displayName).toEqual(defaultName); - }); - // ... - // #enddocregion parent-to-child-setter - }); - - describe('Parent-to-child communication with ngOnChanges', () => { - // #docregion parent-to-child-onchanges - // ... - // Test must all execute in this exact order - it('should set expected initial values', async () => { - const actual = await getActual(); - - const initialLabel = 'Version 1.23'; - const initialLog = 'Initial value of major set to 1, Initial value of minor set to 23'; - - expect(actual.label).toBe(initialLabel); - expect(actual.count).toBe(1); - expect(await actual.logs.get(0).getText()).toBe(initialLog); - }); - - it("should set expected values after clicking 'Minor' twice", async () => { - const repoTag = element(by.tagName('app-version-parent')); - const newMinorButton = repoTag.all(by.tagName('button')).get(0); - - await newMinorButton.click(); - await newMinorButton.click(); - - const actual = await getActual(); - - const labelAfter2Minor = 'Version 1.25'; - const logAfter2Minor = 'minor changed from 24 to 25'; - - expect(actual.label).toBe(labelAfter2Minor); - expect(actual.count).toBe(3); - expect(await actual.logs.get(2).getText()).toBe(logAfter2Minor); - }); - - it("should set expected values after clicking 'Major' once", async () => { - const repoTag = element(by.tagName('app-version-parent')); - const newMajorButton = repoTag.all(by.tagName('button')).get(1); - - await newMajorButton.click(); - const actual = await getActual(); - - const labelAfterMajor = 'Version 2.0'; - const logAfterMajor = 'major changed from 1 to 2, minor changed from 23 to 0'; - - expect(actual.label).toBe(labelAfterMajor); - expect(actual.count).toBe(2); - expect(await actual.logs.get(1).getText()).toBe(logAfterMajor); - }); - - async function getActual() { - const versionTag = element(by.tagName('app-version-child')); - const label = await versionTag.element(by.tagName('h3')).getText(); - const ul = versionTag.element((by.tagName('ul'))); - const logs = ul.all(by.tagName('li')); - - return { - label, - logs, - count: await logs.count(), - }; - } - // ... - // #enddocregion parent-to-child-onchanges - }); - - describe('Child-to-parent communication', () => { - // #docregion child-to-parent - // ... - it('should not emit the event initially', async () => { - const voteLabel = element(by.tagName('app-vote-taker')).element(by.tagName('h3')); - expect(await voteLabel.getText()).toBe('Agree: 0, Disagree: 0'); - }); - - it('should process Agree vote', async () => { - const voteLabel = element(by.tagName('app-vote-taker')).element(by.tagName('h3')); - const agreeButton1 = element.all(by.tagName('app-voter')).get(0) - .all(by.tagName('button')).get(0); - - await agreeButton1.click(); - - expect(await voteLabel.getText()).toBe('Agree: 1, Disagree: 0'); - }); - - it('should process Disagree vote', async () => { - const voteLabel = element(by.tagName('app-vote-taker')).element(by.tagName('h3')); - const agreeButton1 = element.all(by.tagName('app-voter')).get(1) - .all(by.tagName('button')).get(1); - - await agreeButton1.click(); - - expect(await voteLabel.getText()).toBe('Agree: 0, Disagree: 1'); - }); - // ... - // #enddocregion child-to-parent - }); - - describe('Parent calls child via local var', () => { - countDownTimerTests('app-countdown-parent-lv'); - }); - - describe('Parent calls ViewChild', () => { - countDownTimerTests('app-countdown-parent-vc'); - }); - - function countDownTimerTests(parentTag: string) { - // #docregion countdown-timer-tests - // ... - // The tests trigger periodic asynchronous operations (via `setInterval()`), which will prevent - // the app from stabilizing. See https://angular.io/api/core/ApplicationRef#is-stable-examples - // for more details. - // To allow the tests to complete, we will disable automatically waiting for the Angular app to - // stabilize. - beforeEach(() => browser.waitForAngularEnabled(false)); - afterEach(() => browser.waitForAngularEnabled(true)); - - it('timer and parent seconds should match', async () => { - const parent = element(by.tagName(parentTag)); - const startButton = parent.element(by.buttonText('Start')); - const seconds = parent.element(by.className('seconds')); - const timer = parent.element(by.tagName('app-countdown-timer')); - - await startButton.click(); - - // Wait for `` to be populated with any text. - await browser.wait(() => timer.getText(), 2000); - - expect(await timer.getText()).toContain(await seconds.getText()); - }); - - it('should stop the countdown', async () => { - const parent = element(by.tagName(parentTag)); - const startButton = parent.element(by.buttonText('Start')); - const stopButton = parent.element(by.buttonText('Stop')); - const timer = parent.element(by.tagName('app-countdown-timer')); - - await startButton.click(); - expect(await timer.getText()).not.toContain('Holding'); - - await stopButton.click(); - expect(await timer.getText()).toContain('Holding'); - }); - // ... - // #enddocregion countdown-timer-tests - } - - describe('Parent and children communicate via a service', () => { - // #docregion bidirectional-service - // ... - it('should announce a mission', async () => { - const missionControl = element(by.tagName('app-mission-control')); - const announceButton = missionControl.all(by.tagName('button')).get(0); - const history = missionControl.all(by.tagName('li')); - - await announceButton.click(); - - expect(await history.count()).toBe(1); - expect(await history.get(0).getText()).toMatch(/Mission.* announced/); - }); - - it('should confirm the mission by Lovell', async () => { - await testConfirmMission(1, 'Lovell'); - }); - - it('should confirm the mission by Haise', async () => { - await testConfirmMission(3, 'Haise'); - }); - - it('should confirm the mission by Swigert', async () => { - await testConfirmMission(2, 'Swigert'); - }); - - async function testConfirmMission(buttonIndex: number, astronaut: string) { - const missionControl = element(by.tagName('app-mission-control')); - const announceButton = missionControl.all(by.tagName('button')).get(0); - const confirmButton = missionControl.all(by.tagName('button')).get(buttonIndex); - const history = missionControl.all(by.tagName('li')); - - await announceButton.click(); - await confirmButton.click(); - - expect(await history.count()).toBe(2); - expect(await history.get(1).getText()).toBe(`${astronaut} confirmed the mission`); - } - // ... - // #enddocregion bidirectional-service - }); - -}); diff --git a/aio/content/examples/component-interaction/example-config.json b/aio/content/examples/component-interaction/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/component-interaction/src/app/app.component.html b/aio/content/examples/component-interaction/src/app/app.component.html deleted file mode 100644 index c2dca86a608..00000000000 --- a/aio/content/examples/component-interaction/src/app/app.component.html +++ /dev/null @@ -1,50 +0,0 @@ -

    Component Communication Cookbook

    - -Pass data from parent to child with input binding ("Heroes")
    -Intercept input property changes with a setter ("Master")
    -Intercept input property changes with ngOnChanges ("Source code version")
    -Parent listens for child event ("Colonize Universe")
    -Parent to child via local variable("Countdown to Liftoff")
    -Parent calls ViewChild("Countdown to Liftoff")
    -Parent and children communicate via a service ("Mission Control")
    - -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top - -
    -
    - -
    -Back to Top diff --git a/aio/content/examples/component-interaction/src/app/app.component.ts b/aio/content/examples/component-interaction/src/app/app.component.ts deleted file mode 100644 index 968036cb8c2..00000000000 --- a/aio/content/examples/component-interaction/src/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/component-interaction/src/app/app.module.ts b/aio/content/examples/component-interaction/src/app/app.module.ts deleted file mode 100644 index caecee59e5d..00000000000 --- a/aio/content/examples/component-interaction/src/app/app.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppComponent } from './app.component'; -import { AstronautComponent } from './astronaut.component'; -import { CountdownLocalVarParentComponent, CountdownViewChildParentComponent } from './countdown-parent.component'; -import { CountdownTimerComponent } from './countdown-timer.component'; -import { HeroChildComponent } from './hero-child.component'; -import { HeroParentComponent } from './hero-parent.component'; -import { MissionControlComponent } from './missioncontrol.component'; -import { NameChildComponent } from './name-child.component'; -import { NameParentComponent } from './name-parent.component'; -import { VersionChildComponent } from './version-child.component'; -import { VersionParentComponent } from './version-parent.component'; -import { VoterComponent } from './voter.component'; -import { VoteTakerComponent } from './votetaker.component'; - - -@NgModule({ - imports: [ - BrowserModule, - ], - declarations: [ - AppComponent, - AstronautComponent, - CountdownLocalVarParentComponent, - CountdownTimerComponent, - CountdownViewChildParentComponent, - HeroChildComponent, - HeroParentComponent, - MissionControlComponent, - NameChildComponent, - NameParentComponent, - VersionChildComponent, - VersionParentComponent, - VoterComponent, - VoteTakerComponent, - ], - bootstrap: [ AppComponent ], -}) -export class AppModule { } diff --git a/aio/content/examples/component-interaction/src/app/astronaut.component.ts b/aio/content/examples/component-interaction/src/app/astronaut.component.ts deleted file mode 100644 index 4d25994f32e..00000000000 --- a/aio/content/examples/component-interaction/src/app/astronaut.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docregion -import { Component, Input, OnDestroy } from '@angular/core'; - -import { MissionService } from './mission.service'; -import { Subscription } from 'rxjs'; - -@Component({ - selector: 'app-astronaut', - template: ` -

    - {{astronaut}}: {{mission}} - -

    - ` -}) -export class AstronautComponent implements OnDestroy { - @Input() astronaut = ''; - mission = ''; - confirmed = false; - announced = false; - subscription: Subscription; - - constructor(private missionService: MissionService) { - this.subscription = missionService.missionAnnounced$.subscribe( - mission => { - this.mission = mission; - this.announced = true; - this.confirmed = false; - }); - } - - confirm() { - this.confirmed = true; - this.missionService.confirmMission(this.astronaut); - } - - ngOnDestroy() { - // prevent memory leak when component destroyed - this.subscription.unsubscribe(); - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts b/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts deleted file mode 100644 index 03b6574bc3c..00000000000 --- a/aio/content/examples/component-interaction/src/app/countdown-parent.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -// #docplaster -// #docregion vc -import { AfterViewInit, ViewChild } from '@angular/core'; -// #docregion lv -import { Component } from '@angular/core'; -import { CountdownTimerComponent } from './countdown-timer.component'; - -// #enddocregion lv -// #enddocregion vc - -//// Local variable, #timer, version -// #docregion lv -@Component({ - selector: 'app-countdown-parent-lv', - template: ` -

    Countdown to Liftoff (via local variable)

    - - -
    {{timer.seconds}}
    - - `, - styleUrls: ['../assets/demo.css'] -}) -export class CountdownLocalVarParentComponent { } -// #enddocregion lv - -//// View Child version -// #docregion vc -@Component({ - selector: 'app-countdown-parent-vc', - template: ` -

    Countdown to Liftoff (via ViewChild)

    - - -
    {{ seconds() }}
    - - `, - styleUrls: ['../assets/demo.css'] -}) -export class CountdownViewChildParentComponent implements AfterViewInit { - - @ViewChild(CountdownTimerComponent) - private timerComponent!: CountdownTimerComponent; - - seconds() { return 0; } - - ngAfterViewInit() { - // Redefine `seconds()` to get from the `CountdownTimerComponent.seconds` ... - // but wait a tick first to avoid one-time devMode - // unidirectional-data-flow-violation error - setTimeout(() => this.seconds = () => this.timerComponent.seconds, 0); - } - - start() { this.timerComponent.start(); } - stop() { this.timerComponent.stop(); } -} -// #enddocregion vc diff --git a/aio/content/examples/component-interaction/src/app/countdown-timer.component.ts b/aio/content/examples/component-interaction/src/app/countdown-timer.component.ts deleted file mode 100644 index 1e8785cea29..00000000000 --- a/aio/content/examples/component-interaction/src/app/countdown-timer.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -// #docregion -import { Component, OnDestroy } from '@angular/core'; - -@Component({ - selector: 'app-countdown-timer', - template: '

    {{message}}

    ' -}) -export class CountdownTimerComponent implements OnDestroy { - message = ''; - seconds = 11; - - ngOnDestroy() { this.clearTimer?.(); } - - start() { this.countDown(); } - stop() { - this.clearTimer?.(); - this.message = `Holding at T-${this.seconds} seconds`; - } - - private clearTimer: VoidFunction | undefined; - - private countDown() { - this.clearTimer?.(); - const interval = setInterval(() => { - this.seconds -= 1; - if (this.seconds === 0) { - this.message = 'Blast off!'; - } else { - if (this.seconds < 0) { this.seconds = 10; } // reset - this.message = `T-${this.seconds} seconds and counting`; - } - }, 1000); - this.clearTimer = () => clearInterval(interval); - } -} diff --git a/aio/content/examples/component-interaction/src/app/hero-child.component.ts b/aio/content/examples/component-interaction/src/app/hero-child.component.ts deleted file mode 100644 index 66062ee0641..00000000000 --- a/aio/content/examples/component-interaction/src/app/hero-child.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// #docregion -import { Component, Input } from '@angular/core'; - -import { Hero } from './hero'; - -@Component({ - selector: 'app-hero-child', - template: ` -

    {{hero.name}} says:

    -

    I, {{hero.name}}, am at your service, {{masterName}}.

    - ` -}) -export class HeroChildComponent { - @Input() hero!: Hero; - @Input('master') masterName = ''; // eslint-disable-line @angular-eslint/no-input-rename -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/hero-parent.component.ts b/aio/content/examples/component-interaction/src/app/hero-parent.component.ts deleted file mode 100644 index e65b0171424..00000000000 --- a/aio/content/examples/component-interaction/src/app/hero-parent.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { HEROES } from './hero'; - -@Component({ - selector: 'app-hero-parent', - template: ` -

    {{master}} controls {{heroes.length}} heroes

    - - - - ` -}) -export class HeroParentComponent { - heroes = HEROES; - master = 'Master'; -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/hero.ts b/aio/content/examples/component-interaction/src/app/hero.ts deleted file mode 100644 index e75c718badb..00000000000 --- a/aio/content/examples/component-interaction/src/app/hero.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface Hero { - name: string; -} - -export const HEROES = [ - {name: 'Dr. IQ'}, - {name: 'Magneta'}, - {name: 'Bombasto'} -]; diff --git a/aio/content/examples/component-interaction/src/app/mission.service.ts b/aio/content/examples/component-interaction/src/app/mission.service.ts deleted file mode 100644 index 1c450fd88d3..00000000000 --- a/aio/content/examples/component-interaction/src/app/mission.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { Subject } from 'rxjs'; - -@Injectable() -export class MissionService { - - // Observable string sources - private missionAnnouncedSource = new Subject(); - private missionConfirmedSource = new Subject(); - - // Observable string streams - missionAnnounced$ = this.missionAnnouncedSource.asObservable(); - missionConfirmed$ = this.missionConfirmedSource.asObservable(); - - // Service message commands - announceMission(mission: string) { - this.missionAnnouncedSource.next(mission); - } - - confirmMission(astronaut: string) { - this.missionConfirmedSource.next(astronaut); - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts b/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts deleted file mode 100644 index 12268c96998..00000000000 --- a/aio/content/examples/component-interaction/src/app/missioncontrol.component.ts +++ /dev/null @@ -1,46 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { MissionService } from './mission.service'; - -@Component({ - selector: 'app-mission-control', - template: ` -

    Mission Control

    - - - - - -

    History

    -
      -
    • {{event}}
    • -
    - `, - providers: [MissionService] -}) -export class MissionControlComponent { - astronauts = ['Lovell', 'Swigert', 'Haise']; - history: string[] = []; - missions = ['Fly to the moon!', - 'Fly to mars!', - 'Fly to Vegas!']; - nextMission = 0; - - constructor(private missionService: MissionService) { - missionService.missionConfirmed$.subscribe( - astronaut => { - this.history.push(`${astronaut} confirmed the mission`); - }); - } - - announce() { - const mission = this.missions[this.nextMission++]; - this.missionService.announceMission(mission); - this.history.push(`Mission "${mission}" announced`); - if (this.nextMission >= this.missions.length) { this.nextMission = 0; } - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/name-child.component.ts b/aio/content/examples/component-interaction/src/app/name-child.component.ts deleted file mode 100644 index 6bcbec4cc6f..00000000000 --- a/aio/content/examples/component-interaction/src/app/name-child.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component, Input } from '@angular/core'; - -@Component({ - selector: 'app-name-child', - template: '

    "{{name}}"

    ' -}) -export class NameChildComponent { - @Input() - get name(): string { return this._name; } - set name(name: string) { - this._name = (name && name.trim()) || ''; - } - private _name = ''; -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/name-parent.component.ts b/aio/content/examples/component-interaction/src/app/name-parent.component.ts deleted file mode 100644 index cb795a4a790..00000000000 --- a/aio/content/examples/component-interaction/src/app/name-parent.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-name-parent', - template: ` -

    Master controls {{names.length}} names

    - - - ` -}) -export class NameParentComponent { - // Displays 'Dr. IQ', '', 'Bombasto' - names = ['Dr. IQ', ' ', ' Bombasto ']; -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/version-child.component.ts b/aio/content/examples/component-interaction/src/app/version-child.component.ts deleted file mode 100644 index 60f37c6cc4e..00000000000 --- a/aio/content/examples/component-interaction/src/app/version-child.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -/* eslint-disable guard-for-in */ -// #docregion -import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; - -@Component({ - selector: 'app-version-child', - template: ` -

    Version {{major}}.{{minor}}

    -

    Change log:

    -
      -
    • {{change}}
    • -
    - ` -}) -export class VersionChildComponent implements OnChanges { - @Input() major = 0; - @Input() minor = 0; - changeLog: string[] = []; - - ngOnChanges(changes: SimpleChanges) { - const log: string[] = []; - for (const propName in changes) { - const changedProp = changes[propName]; - const to = JSON.stringify(changedProp.currentValue); - if (changedProp.isFirstChange()) { - log.push(`Initial value of ${propName} set to ${to}`); - } else { - const from = JSON.stringify(changedProp.previousValue); - log.push(`${propName} changed from ${from} to ${to}`); - } - } - this.changeLog.push(log.join(', ')); - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/version-parent.component.ts b/aio/content/examples/component-interaction/src/app/version-parent.component.ts deleted file mode 100644 index 0cea88dfff1..00000000000 --- a/aio/content/examples/component-interaction/src/app/version-parent.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-version-parent', - template: ` -

    Source code version

    - - - - ` -}) -export class VersionParentComponent { - major = 1; - minor = 23; - - newMinor() { - this.minor++; - } - - newMajor() { - this.major++; - this.minor = 0; - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/voter.component.ts b/aio/content/examples/component-interaction/src/app/voter.component.ts deleted file mode 100644 index 862dff58c84..00000000000 --- a/aio/content/examples/component-interaction/src/app/voter.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -@Component({ - selector: 'app-voter', - template: ` -

    {{name}}

    - - - ` -}) -export class VoterComponent { - @Input() name = ''; - @Output() voted = new EventEmitter(); - didVote = false; - - vote(agreed: boolean) { - this.voted.emit(agreed); - this.didVote = true; - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/app/votetaker.component.ts b/aio/content/examples/component-interaction/src/app/votetaker.component.ts deleted file mode 100644 index 5e606f4c17c..00000000000 --- a/aio/content/examples/component-interaction/src/app/votetaker.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-vote-taker', - template: ` -

    Should mankind colonize the Universe?

    -

    Agree: {{agreed}}, Disagree: {{disagreed}}

    - - - - ` -}) -export class VoteTakerComponent { - agreed = 0; - disagreed = 0; - voters = ['Dr. IQ', 'Celeritas', 'Bombasto']; - - onVoted(agreed: boolean) { - if (agreed) { - this.agreed++; - } else { - this.disagreed++; - } - } -} -// #enddocregion diff --git a/aio/content/examples/component-interaction/src/assets/demo.css b/aio/content/examples/component-interaction/src/assets/demo.css deleted file mode 100644 index b63a8b38dd4..00000000000 --- a/aio/content/examples/component-interaction/src/assets/demo.css +++ /dev/null @@ -1,9 +0,0 @@ -/* Component Communication cookbook specific styles */ -.seconds { - background-color: black; - color: red; - font-size: 3em; - margin: 0.3em 0; - text-align: center; - width: 1.5em; -} diff --git a/aio/content/examples/component-interaction/src/index.html b/aio/content/examples/component-interaction/src/index.html deleted file mode 100644 index cb5f519b8c6..00000000000 --- a/aio/content/examples/component-interaction/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Passing information from parent to child - - - - - - - - - diff --git a/aio/content/examples/component-interaction/src/main.ts b/aio/content/examples/component-interaction/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/component-interaction/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/component-interaction/stackblitz.json b/aio/content/examples/component-interaction/stackblitz.json deleted file mode 100644 index 421ac6f9730..00000000000 --- a/aio/content/examples/component-interaction/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Component Communication Cookbook samples", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "tags":["cookbook", "component"] -} diff --git a/aio/content/examples/component-overview/BUILD.bazel b/aio/content/examples/component-overview/BUILD.bazel deleted file mode 100644 index 5bb908f9cac..00000000000 --- a/aio/content/examples/component-overview/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "component-overview", -) diff --git a/aio/content/examples/component-overview/e2e/src/app.e2e-spec.ts b/aio/content/examples/component-overview/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 4ddd1bcef10..00000000000 --- a/aio/content/examples/component-overview/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Component Overview', () => { - - beforeAll(() => browser.get('')); - - it('should display component overview works ', async () => { - expect(await element(by.css('p')).getText()).toEqual('component-overview works!'); - }); - -}); diff --git a/aio/content/examples/component-overview/example-config.json b/aio/content/examples/component-overview/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/component-overview/src/app/app.component.css b/aio/content/examples/component-overview/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/component-overview/src/app/app.component.html b/aio/content/examples/component-overview/src/app/app.component.html deleted file mode 100644 index c940e3dc207..00000000000 --- a/aio/content/examples/component-overview/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/aio/content/examples/component-overview/src/app/app.component.spec.ts b/aio/content/examples/component-overview/src/app/app.component.spec.ts deleted file mode 100644 index 480f13947bc..00000000000 --- a/aio/content/examples/component-overview/src/app/app.component.spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { TestBed } from '@angular/core/testing'; -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ - AppComponent - ], - }).compileComponents(); - }); - - it('should create the app', () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - }); - - it("should have as title 'component-overview'", () => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('component-overview'); - }); - - it('should render title', () => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('.content span')?.textContent).toContain('component-overview app is running!'); - }); -}); diff --git a/aio/content/examples/component-overview/src/app/app.component.ts b/aio/content/examples/component-overview/src/app/app.component.ts deleted file mode 100644 index 29cfb38dc37..00000000000 --- a/aio/content/examples/component-overview/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'component-overview'; -} diff --git a/aio/content/examples/component-overview/src/app/app.module.ts b/aio/content/examples/component-overview/src/app/app.module.ts deleted file mode 100644 index e22e3e1854d..00000000000 --- a/aio/content/examples/component-overview/src/app/app.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - -import { AppComponent } from './app.component'; -import { ComponentOverviewComponent } from './component-overview/component-overview.component'; - -@NgModule({ - declarations: [ - AppComponent, - ComponentOverviewComponent - ], - imports: [ - BrowserModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.1.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.1.ts deleted file mode 100644 index 3e6d5d1fd27..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.1.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -// #docregion template -@Component({ - selector: 'app-component-overview', - template: '

    Hello World!

    ', -}) -// #enddocregion template - -export class ComponentOverviewComponent { - -} - diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts deleted file mode 100644 index 7dd81ad5f78..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.2.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -// #docregion templatebacktick -@Component({ - selector: 'app-component-overview', - template: ` -

    Hello World!

    -

    This template definition spans multiple lines.

    - ` -}) -// #enddocregion templatebacktick -export class ComponentOverviewComponent { - -} - diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.3.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.3.ts deleted file mode 100644 index b1b8b3706ca..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.3.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -// #docregion styles -@Component({ - selector: 'app-component-overview', - template: '

    Hello World!

    ', - styles: ['h1 { font-weight: normal; }'] -}) -// #enddocregion styles - -export class ComponentOverviewComponent { - -} - diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.4.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.4.ts deleted file mode 100644 index 15e40002cfc..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.4.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -// #docregion standalonedeclaration -@Component({ - selector: 'app-component-overview', - template: '

    Hello World!

    ', - styles: ['h1 { font-weight: normal; }'], - standalone: true -}) -// #enddocregion standalonedeclaration - -export class ComponentOverviewComponent { - -} - diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.css b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.html b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.html deleted file mode 100644 index ffe09040176..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.html +++ /dev/null @@ -1 +0,0 @@ -

    component-overview works!

    diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.spec.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.spec.ts deleted file mode 100644 index e3a03232318..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { ComponentOverviewComponent } from './component-overview.component'; - -describe('ComponentOverviewComponent', () => { - let component: ComponentOverviewComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [ ComponentOverviewComponent ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(ComponentOverviewComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.ts deleted file mode 100644 index 7e1e3597a12..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docplaster -// #docregion import -import { Component } from '@angular/core'; -// #enddocregion import - -// #docregion decorator, decorator-skeleton, selector, templateUrl -@Component({ -// #enddocregion decorator-skeleton - selector: 'app-component-overview', -// #enddocregion selector - templateUrl: './component-overview.component.html', -// #enddocregion templateUrl - styleUrls: ['./component-overview.component.css'] -// #docregion decorator-skeleton, selector, templateUrl -}) -// #enddocregion decorator, decorator-skeleton, selector, templateUrl - -// #docregion class -export class ComponentOverviewComponent { - -} -// #enddocregion class diff --git a/aio/content/examples/component-overview/src/app/component-overview/component-overview.module.ts b/aio/content/examples/component-overview/src/app/component-overview/component-overview.module.ts deleted file mode 100644 index 414939b4fa0..00000000000 --- a/aio/content/examples/component-overview/src/app/component-overview/component-overview.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docplaster -import {NgModule} from '@angular/core'; -// #docregion componentmoduledeclaration -// Your component path -import {ComponentOverviewComponent} from './component-overview.component'; - -@NgModule({ - declarations: [ - // Existing Components - ComponentOverviewComponent - ] - // Rest of the Module Content -}) -// #enddocregion componentmoduledeclaration -export class ComponentOverviewModule {} diff --git a/aio/content/examples/component-overview/src/index.html b/aio/content/examples/component-overview/src/index.html deleted file mode 100644 index 4d595040b0b..00000000000 --- a/aio/content/examples/component-overview/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - ComponentOverview - - - - - - - - diff --git a/aio/content/examples/component-overview/src/main.ts b/aio/content/examples/component-overview/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/component-overview/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/component-overview/stackblitz.json b/aio/content/examples/component-overview/stackblitz.json deleted file mode 100644 index 865a94123af..00000000000 --- a/aio/content/examples/component-overview/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Component Overview", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "tags":["overview", "component"] -} diff --git a/aio/content/examples/component-styles/BUILD.bazel b/aio/content/examples/component-styles/BUILD.bazel deleted file mode 100644 index 8dc62082512..00000000000 --- a/aio/content/examples/component-styles/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "component-styles", -) diff --git a/aio/content/examples/component-styles/e2e/src/app.e2e-spec.ts b/aio/content/examples/component-styles/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 7ad9e315ca7..00000000000 --- a/aio/content/examples/component-styles/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Component Style Tests', () => { - - beforeAll(() => browser.get('')); - - it('scopes component styles to component view', async () => { - const componentH1 = element(by.css('app-root > h1')); - const externalH1 = element(by.css('body > h1')); - - // Note: sometimes webdriver returns the fontWeight as "normal", - // other times as "400", both of which are equal in CSS terms. - expect(await componentH1.getCssValue('fontWeight')).toMatch(/normal|400/); - expect(await externalH1.getCssValue('fontWeight')).not.toMatch(/normal|400/); - }); - - it('styles both view and content children with /deep/', async () => { - const viewH3 = element(by.css('app-hero-team h3')); - const contentH3 = element(by.css('app-hero-controls h3')); - - expect(await viewH3.getCssValue('fontStyle')).toEqual('italic'); - expect(await contentH3.getCssValue('fontStyle')).toEqual('italic'); - }); - - it('includes styles loaded with CSS @import', async () => { - const host = element(by.css('app-hero-details')); - - expect(await host.getCssValue('padding')).toEqual('10px'); - }); - - it('processes template inline styles', async () => { - const button = element(by.css('app-hero-controls button')); - const externalButton = element(by.css('body > button')); - expect(await button.getCssValue('backgroundColor')).toEqual('rgba(255, 255, 255, 1)'); // #ffffff - expect(await externalButton.getCssValue('backgroundColor')).not.toEqual('rgba(255, 255, 255, 1)'); - }); - - it('processes template s', async () => { - const li = element(by.css('app-hero-team li:first-child')); - const externalLi = element(by.css('body > ul li')); - - expect(await li.getCssValue('listStyleType')).toEqual('square'); - expect(await externalLi.getCssValue('listStyleType')).not.toEqual('square'); - }); - -}); diff --git a/aio/content/examples/component-styles/example-config.json b/aio/content/examples/component-styles/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/component-styles/src/app/app.module.ts b/aio/content/examples/component-styles/src/app/app.module.ts deleted file mode 100644 index 31c72cbbf2b..00000000000 --- a/aio/content/examples/component-styles/src/app/app.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { HeroAppComponent } from './hero-app.component'; -import { HeroAppMainComponent } from './hero-app-main.component'; -import { HeroDetailsComponent } from './hero-details.component'; -import { HeroControlsComponent } from './hero-controls.component'; -import { QuestSummaryComponent } from './quest-summary.component'; -import { HeroTeamComponent } from './hero-team.component'; - -@NgModule({ - imports: [ BrowserModule ], - declarations: [ - HeroAppComponent, - HeroAppMainComponent, - HeroDetailsComponent, - HeroControlsComponent, - QuestSummaryComponent, - HeroTeamComponent - ], - bootstrap: [ HeroAppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/component-styles/src/app/hero-app-main.component.ts b/aio/content/examples/component-styles/src/app/hero-app-main.component.ts deleted file mode 100644 index c5476cdc2ff..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-app-main.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { Hero } from './hero'; - -@Component({ - selector: 'app-hero-main', - template: ` - - - - - ` -}) -export class HeroAppMainComponent { - @Input() hero!: Hero; -} diff --git a/aio/content/examples/component-styles/src/app/hero-app.component.1.ts b/aio/content/examples/component-styles/src/app/hero-app.component.1.ts deleted file mode 100644 index a89786c5d39..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-app.component.1.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, HostBinding } from '@angular/core'; -import { Hero } from './hero'; - -// #docregion -@Component({ - selector: 'app-root', - template: ` -

    Tour of Heroes

    - - `, - styleUrls: ['./hero-app.component.css'] -}) -export class HeroAppComponent { -// #enddocregion - hero = new Hero( - 'Human Torch', - ['Mister Fantastic', 'Invisible Woman', 'Thing'] - ); - - @HostBinding('class') get themeClass() { - return 'theme-light'; - } -// #docregion -} -// #enddocregion diff --git a/aio/content/examples/component-styles/src/app/hero-app.component.css b/aio/content/examples/component-styles/src/app/hero-app.component.css deleted file mode 100644 index 39671e32a93..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -h1 { - font-weight: normal; -} diff --git a/aio/content/examples/component-styles/src/app/hero-app.component.ts b/aio/content/examples/component-styles/src/app/hero-app.component.ts deleted file mode 100644 index dd72cc5dfc8..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-app.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, HostBinding } from '@angular/core'; -import { Hero } from './hero'; - -// #docregion -@Component({ - selector: 'app-root', - template: ` -

    Tour of Heroes

    - - `, - styles: ['h1 { font-weight: normal; }'] -}) -export class HeroAppComponent { -// #enddocregion - hero = new Hero( - 'Human Torch', - ['Mister Fantastic', 'Invisible Woman', 'Thing'] - ); - - @HostBinding('class') get themeClass() { - return 'theme-light'; - } -// #docregion -} -// #enddocregion diff --git a/aio/content/examples/component-styles/src/app/hero-controls.component.ts b/aio/content/examples/component-styles/src/app/hero-controls.component.ts deleted file mode 100644 index a9a1c6ab688..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-controls.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Hero } from './hero'; - -// #docregion inlinestyles -@Component({ - selector: 'app-hero-controls', - template: ` - -

    Controls

    - - ` -}) -// #enddocregion inlinestyles -export class HeroControlsComponent { - @Input() hero!: Hero; - - activate() { - this.hero.active = true; - } -} diff --git a/aio/content/examples/component-styles/src/app/hero-details-box.css b/aio/content/examples/component-styles/src/app/hero-details-box.css deleted file mode 100644 index f240073005d..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-details-box.css +++ /dev/null @@ -1,3 +0,0 @@ -:host { - padding: 10px; -} diff --git a/aio/content/examples/component-styles/src/app/hero-details.component.css b/aio/content/examples/component-styles/src/app/hero-details.component.css deleted file mode 100644 index 60b6b7e8901..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-details.component.css +++ /dev/null @@ -1,33 +0,0 @@ -/* #docregion import */ -/* The AOT compiler needs the `./` to show that this is local */ -@import './hero-details-box.css'; -/* #enddocregion import */ - - -/* #docregion host */ -:host { - font-style: italic; -} -/* #enddocregion host */ - -/* #docregion hostfunction */ -:host { - font-style: italic; -} - -:host(.active) { - font-weight: bold; -} -/* #enddocregion hostfunction */ - -/* #docregion hostcontext */ -:host-context(.active) { - font-style: italic; -} -/* #enddocregion hostcontext */ - -/* #docregion deep */ -:host ::ng-deep h3 { - font-style: italic; -} -/* #enddocregion deep */ diff --git a/aio/content/examples/component-styles/src/app/hero-details.component.ts b/aio/content/examples/component-styles/src/app/hero-details.component.ts deleted file mode 100644 index dd530bca87b..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-details.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Hero } from './hero'; - -@Component({ - selector: 'app-hero-details', - template: ` -

    {{hero.name}}

    - - - `, - styleUrls: ['./hero-details.component.css'] -}) -export class HeroDetailsComponent { - @Input() hero!: Hero; -} diff --git a/aio/content/examples/component-styles/src/app/hero-team.component.ts b/aio/content/examples/component-styles/src/app/hero-team.component.ts deleted file mode 100644 index 412d08483e2..00000000000 --- a/aio/content/examples/component-styles/src/app/hero-team.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Hero } from './hero'; - -// #docregion stylelink -@Component({ - selector: 'app-hero-team', - template: ` - - -

    Team

    -
      -
    • - {{member}} -
    • -
    ` -}) -// #enddocregion stylelink -export class HeroTeamComponent { - @Input() hero!: Hero; -} diff --git a/aio/content/examples/component-styles/src/app/hero.ts b/aio/content/examples/component-styles/src/app/hero.ts deleted file mode 100644 index bed3ccaed24..00000000000 --- a/aio/content/examples/component-styles/src/app/hero.ts +++ /dev/null @@ -1,7 +0,0 @@ -export class Hero { - active = false; - - constructor(public name: string, - public team: string[]) { - } -} diff --git a/aio/content/examples/component-styles/src/app/host-selector-example.component.ts b/aio/content/examples/component-styles/src/app/host-selector-example.component.ts deleted file mode 100644 index 33dc07ba4ba..00000000000 --- a/aio/content/examples/component-styles/src/app/host-selector-example.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -// #docregion -@Component({ - selector: 'app-main', - template: ` -

    It Works!

    -
    - Start editing to see some magic happen :) -
    - ` -}) -export class HostSelectorExampleComponent { - -} -// #enddocregion diff --git a/aio/content/examples/component-styles/src/app/quest-summary.component.css b/aio/content/examples/component-styles/src/app/quest-summary.component.css deleted file mode 100644 index 207fa981dd4..00000000000 --- a/aio/content/examples/component-styles/src/app/quest-summary.component.css +++ /dev/null @@ -1,5 +0,0 @@ -:host { - display: block; - background-color: green; - color: white; -} diff --git a/aio/content/examples/component-styles/src/app/quest-summary.component.html b/aio/content/examples/component-styles/src/app/quest-summary.component.html deleted file mode 100644 index ace27d2a1cb..00000000000 --- a/aio/content/examples/component-styles/src/app/quest-summary.component.html +++ /dev/null @@ -1 +0,0 @@ -

    No quests in progress

    diff --git a/aio/content/examples/component-styles/src/app/quest-summary.component.ts b/aio/content/examples/component-styles/src/app/quest-summary.component.ts deleted file mode 100644 index ab55c1583b9..00000000000 --- a/aio/content/examples/component-styles/src/app/quest-summary.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -// #docregion -@Component({ - selector: 'app-quest-summary', - templateUrl: './quest-summary.component.html', - styleUrls: ['./quest-summary.component.css'] -}) -export class QuestSummaryComponent { } -// #enddocregion diff --git a/aio/content/examples/component-styles/src/assets/hero-team.component.css b/aio/content/examples/component-styles/src/assets/hero-team.component.css deleted file mode 100644 index b87679886bf..00000000000 --- a/aio/content/examples/component-styles/src/assets/hero-team.component.css +++ /dev/null @@ -1,3 +0,0 @@ -li { - list-style-type: square; -} diff --git a/aio/content/examples/component-styles/src/index.html b/aio/content/examples/component-styles/src/index.html deleted file mode 100644 index 0480f3aec0c..00000000000 --- a/aio/content/examples/component-styles/src/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Component Styles - - - - - -

    External H1 Title for E2E test

    - - -
      -
    • External list for E2E test
    • -
    - - - diff --git a/aio/content/examples/component-styles/src/main.ts b/aio/content/examples/component-styles/src/main.ts deleted file mode 100644 index 49432aa0877..00000000000 --- a/aio/content/examples/component-styles/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/component-styles/stackblitz.json b/aio/content/examples/component-styles/stackblitz.json deleted file mode 100644 index 7f8050448fa..00000000000 --- a/aio/content/examples/component-styles/stackblitz.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Component Styles", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.native.*", - "!**/*.[1].*" - ], - "file": "src/app/hero-app.component.ts", - "tags": ["CSS"] -} diff --git a/aio/content/examples/content-projection/BUILD.bazel b/aio/content/examples/content-projection/BUILD.bazel deleted file mode 100644 index 6a5b2290e49..00000000000 --- a/aio/content/examples/content-projection/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "content-projection", -) diff --git a/aio/content/examples/content-projection/e2e/src/app.e2e-spec.ts b/aio/content/examples/content-projection/e2e/src/app.e2e-spec.ts deleted file mode 100644 index f9e6001d4b7..00000000000 --- a/aio/content/examples/content-projection/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Component Overview', () => { - - beforeAll(() => browser.get('')); - - it('should display Angular and Content Projection ', async () => { - expect(await element(by.css('h2')).getText()).toEqual('Angular and Content Projection'); - }); - -}); diff --git a/aio/content/examples/content-projection/example-config.json b/aio/content/examples/content-projection/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/content-projection/src/app/app.component.css b/aio/content/examples/content-projection/src/app/app.component.css deleted file mode 100644 index b7edde24e59..00000000000 --- a/aio/content/examples/content-projection/src/app/app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -p { - font-family: Lato; - } \ No newline at end of file diff --git a/aio/content/examples/content-projection/src/app/app.component.html b/aio/content/examples/content-projection/src/app/app.component.html deleted file mode 100644 index c832414d6ed..00000000000 --- a/aio/content/examples/content-projection/src/app/app.component.html +++ /dev/null @@ -1,41 +0,0 @@ -

    Angular and Content Projection

    - - - -

    Is content projection cool?

    -
    - - -
    - - - -

    - Is content projection cool? -

    -

    Let's learn about content projection!

    -
    - - -
    - -

    Here's a zippy

    - - - - - - It depends on what you do with it. - - - - -
    - -

    Let's learn about content projection!

    - - -

    Is content projection cool?

    -
    - -
    diff --git a/aio/content/examples/content-projection/src/app/app.component.ts b/aio/content/examples/content-projection/src/app/app.component.ts deleted file mode 100644 index f45969e5cde..00000000000 --- a/aio/content/examples/content-projection/src/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent {} diff --git a/aio/content/examples/content-projection/src/app/app.module.ts b/aio/content/examples/content-projection/src/app/app.module.ts deleted file mode 100644 index 79afe462dac..00000000000 --- a/aio/content/examples/content-projection/src/app/app.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { - ZippyComponent, - ZippyContentDirective, - ZippyToggleDirective, -} from './example-zippy.component'; -import { ZippyBasicComponent } from './zippy-basic/zippy-basic.component'; -import { ZippyMultislotComponent } from './zippy-multislot/zippy-multislot.component'; -import { ZippyNgprojectasComponent } from './zippy-ngprojectas/zippy-ngprojectas.component'; - -@NgModule({ - imports: [BrowserModule, FormsModule], - declarations: [ - AppComponent, - ZippyComponent, - ZippyToggleDirective, - ZippyContentDirective, - ZippyBasicComponent, - ZippyMultislotComponent, - ZippyNgprojectasComponent, - ], - bootstrap: [AppComponent] -}) -export class AppModule {} diff --git a/aio/content/examples/content-projection/src/app/example-zippy.component.ts b/aio/content/examples/content-projection/src/app/example-zippy.component.ts deleted file mode 100644 index 02ea3adf391..00000000000 --- a/aio/content/examples/content-projection/src/app/example-zippy.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Component, Directive, Input, TemplateRef, ContentChild, HostBinding, HostListener } from '@angular/core'; - -@Directive({ - selector: 'button[appExampleZippyToggle]', -}) -export class ZippyToggleDirective { - @HostBinding('attr.aria-expanded') ariaExpanded = this.zippy.expanded; - @HostBinding('attr.aria-controls') ariaControls = this.zippy.contentId; - @HostListener('click') toggleZippy() { - this.zippy.expanded = !this.zippy.expanded; - } - constructor(public zippy: ZippyComponent) {} -} - -let nextId = 0; - -// #docregion zippycontentdirective -@Directive({ - selector: '[appExampleZippyContent]' -}) -export class ZippyContentDirective { - constructor(public templateRef: TemplateRef) {} -} -// #enddocregion zippycontentdirective - -@Component({ - selector: 'app-example-zippy', - templateUrl: 'example-zippy.template.html', -}) -export class ZippyComponent { - contentId = `zippy-${nextId++}`; - @Input() expanded = false; - // #docregion contentchild - @ContentChild(ZippyContentDirective) content!: ZippyContentDirective; - // #enddocregion contentchild -} diff --git a/aio/content/examples/content-projection/src/app/example-zippy.template.html b/aio/content/examples/content-projection/src/app/example-zippy.template.html deleted file mode 100644 index b3addf3eb99..00000000000 --- a/aio/content/examples/content-projection/src/app/example-zippy.template.html +++ /dev/null @@ -1,8 +0,0 @@ - - -
    - - - -
    - diff --git a/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts b/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts deleted file mode 100644 index e113405fcac..00000000000 --- a/aio/content/examples/content-projection/src/app/zippy-basic/zippy-basic.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-zippy-basic', - template: ` -

    Single-slot content projection

    - - ` -}) -export class ZippyBasicComponent {} diff --git a/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts b/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts deleted file mode 100644 index 473dd60ada6..00000000000 --- a/aio/content/examples/content-projection/src/app/zippy-multislot/zippy-multislot.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-zippy-multislot', - template: ` -

    Multi-slot content projection

    - - Default: - - - Question: - - ` -}) -export class ZippyMultislotComponent {} diff --git a/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts b/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts deleted file mode 100644 index edd765bd9ff..00000000000 --- a/aio/content/examples/content-projection/src/app/zippy-ngprojectas/zippy-ngprojectas.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-zippy-ngprojectas', - template: ` -

    Content projection with ngProjectAs

    - - Default: - - - Question: - - ` -}) -export class ZippyNgprojectasComponent {} diff --git a/aio/content/examples/content-projection/src/index.html b/aio/content/examples/content-projection/src/index.html deleted file mode 100644 index e70cad4e122..00000000000 --- a/aio/content/examples/content-projection/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - ContentProjection - - - - - - - - diff --git a/aio/content/examples/content-projection/src/main.ts b/aio/content/examples/content-projection/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/content-projection/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/content-projection/stackblitz.json b/aio/content/examples/content-projection/stackblitz.json deleted file mode 100644 index 49fb8fc01a2..00000000000 --- a/aio/content/examples/content-projection/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Binding Syntax", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Binding Syntax"] -} diff --git a/aio/content/examples/dependency-injection-in-action/BUILD.bazel b/aio/content/examples/dependency-injection-in-action/BUILD.bazel deleted file mode 100644 index 2e7700dc9d3..00000000000 --- a/aio/content/examples/dependency-injection-in-action/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "dependency-injection-in-action", -) diff --git a/aio/content/examples/dependency-injection-in-action/e2e/src/app.e2e-spec.ts b/aio/content/examples/dependency-injection-in-action/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 4d8f95c51c5..00000000000 --- a/aio/content/examples/dependency-injection-in-action/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -describe('Dependency Injection Cookbook', () => { - - beforeAll(() => browser.get('')); - - it('should render Logged in User example', async () => { - const loggedInUser = element(by.cssContainingText('h3', 'Logged in user')); - expect(await loggedInUser.isPresent()).toBe(true); - }); - - it('"Bombasto" should be the logged in user', async () => { - const loggedInUser = element(by.cssContainingText('div', 'Name: Bombasto')); - expect(await loggedInUser.isPresent()).toBe(true); - }); - - it('should render sorted heroes', async () => { - const sortedHeroes = element(by.cssContainingText('h3', 'Sorted Heroes')); - expect(await sortedHeroes.isPresent()).toBe(true); - - const sortedHeroElems = element.all(by.css('app-sorted-heroes div')); - const sortedHeroNames = await sortedHeroElems.map(elem => elem?.getText()); - expect(sortedHeroNames).toEqual(['Dr Nice', 'Magma', 'RubberMan']); - }); - - it('should render Hero of the Month', async () => { - const heroOfTheMonth = element(by.cssContainingText('h3', 'Hero of the Month')); - expect(await heroOfTheMonth.isPresent()).toBe(true); - }); - - it('should render Hero Bios', async () => { - const heroBios = element(by.cssContainingText('h3', 'Hero Bios')); - expect(await heroBios.isPresent()).toBe(true); - }); - - it("should render Magma's description in Hero Bios", async () => { - const magmaBioElem = element.all(by.css('app-hero-bio')).get(1); - const magmaNameElem = magmaBioElem.element(by.css('h4')); - const magmaDescElem = magmaBioElem.element(by.css('textarea')); - - expect(await magmaNameElem.getText()).toBe('Magma'); - expect(await magmaDescElem.getAttribute('value')).toBe('Hero of all trades'); - }); - - it("should render Magma's phone in Hero Bios and Contacts", async () => { - const magmaPhone = element(by.cssContainingText('div', 'Phone #: 555-555-5555')); - expect(await magmaPhone.isPresent()).toBe(true); - }); - - it('should render Hero-of-the-Month runner-ups', async () => { - const runnersUp = await element(by.id('rups1')).getText(); - expect(runnersUp).toContain('RubberMan, Dr Nice'); - }); - - it('should render DateLogger log entry in Hero-of-the-Month', async () => { - const logs = await element.all(by.id('logs')).get(0).getText(); - expect(logs).toContain('INFO: starting up at'); - }); - - it('should highlight Hero Bios and Contacts container when mouseover', async () => { - const target = element(by.css('div[appHighlight="yellow"]')); - const yellow = 'rgba(255, 255, 0, 1)'; - - expect(await target.getCssValue('background-color')).not.toEqual(yellow); - - await browser.actions().mouseMove(target).perform(); - - // Wait for up to 2s for the background color to be updated, - // to account for slow environments (e.g. CI). - await browser.wait(async () => await target.getCssValue('background-color') === yellow, 2000); - }); - - describe('in Parent Finder', () => { - const cathy1 = element(by.css('alex cathy')); - const craig1 = element(by.css('alex craig')); - const carol1 = element(by.css('alex carol p')); - const carol2 = element(by.css('barry carol p')); - - it('"Cathy" should find "Alex" via the component class', async () => { - expect(await cathy1.getText()).toContain('Found Alex via the component'); - }); - - it('"Craig" should not find "Alex" via the base class', async () => { - expect(await craig1.getText()).toContain('Did not find Alex via the base'); - }); - - it('"Carol" within "Alex" should have "Alex" parent', async () => { - expect(await carol1.getText()).toContain('Alex'); - }); - - it('"Carol" within "Barry" should have "Barry" parent', async () => { - expect(await carol2.getText()).toContain('Barry'); - }); - }); -}); diff --git a/aio/content/examples/dependency-injection-in-action/example-config.json b/aio/content/examples/dependency-injection-in-action/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/dependency-injection-in-action/src/app/app.component.html b/aio/content/examples/dependency-injection-in-action/src/app/app.component.html deleted file mode 100644 index e69f4bed426..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/app.component.html +++ /dev/null @@ -1,42 +0,0 @@ -

    DI Cookbook

    -
    -

    Logged in user

    -
    Name: {{userContext.name}}
    -
    Role: {{userContext.role}}
    -
    - -
    -

    Hero Bios

    - -
    - - -
    -

    Hero Bios and Contacts

    -
    - -
    -
    - - -
    - -
    - -
    -

    Unsorted Heroes

    - -
    - -
    -

    Sorted Heroes

    - -
    - -
    - -
    - -
    - -
    diff --git a/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts deleted file mode 100755 index acbde75ef36..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/app.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; -import { UserContextService } from './user-context.service'; -import { HeroBiosAndContactsComponent, HeroBiosComponent } from './hero-bios.component'; -import { HeroOfTheMonthComponent } from './hero-of-the-month.component'; -import { HeroesBaseComponent, SortedHeroesComponent } from './sorted-heroes.component'; -import { ParentFinderComponent } from './parent-finder.component'; -import { StorageComponent } from './storage.component'; -import { HighlightDirective } from './highlight.directive'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - HeroBiosComponent, - HeroBiosAndContactsComponent, - HeroOfTheMonthComponent, - HeroesBaseComponent, - SortedHeroesComponent, - ParentFinderComponent, - StorageComponent, - HighlightDirective - ] -}) -export class AppComponent { - - private userId = 1; - - constructor(logger: LoggerService, public userContext: UserContextService) { - userContext.loadUser(this.userId); - logger.logInfo('AppComponent initialized'); - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/app.config.ts b/aio/content/examples/dependency-injection-in-action/src/app/app.config.ts deleted file mode 100644 index 8ed035f6800..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/app.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { HashLocationStrategy, LocationStrategy } from '@angular/common'; -import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; -import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; -import { HeroData } from './hero-data'; - -const appConfig: ApplicationConfig = { - providers: [ - // adding protractor support for tests in docs - provideProtractorTestingSupport(), - importProvidersFrom(InMemoryWebApiModule.forRoot(HeroData)), - { provide: LocationStrategy, useClass: HashLocationStrategy }, - ] -}; - -export default appConfig; diff --git a/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts deleted file mode 100644 index 517b231e824..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/date-logger.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -// #docregion date-logger-service -@Injectable({ - providedIn: 'root' -}) -export class DateLoggerService extends LoggerService -{ - override logInfo(msg: any) { super.logInfo(stamp(msg)); } - override logDebug(msg: any) { super.logInfo(stamp(msg)); } - override logError(msg: any) { super.logError(stamp(msg)); } -} - -function stamp(msg: any) { return msg + ' at ' + new Date(); } -// #enddocregion date-logger-service diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-bio.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-bio.component.ts deleted file mode 100755 index acef7d54bc7..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-bio.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -import { Component, Input, OnInit } from '@angular/core'; - -import { HeroCacheService } from './hero-cache.service'; -import { FormsModule, NgModel } from '@angular/forms'; - -// #docregion component -@Component({ - standalone: true, - selector: 'app-hero-bio', - // #docregion template - template: ` -

    {{hero.name}}

    - - `, - // #enddocregion template - providers: [HeroCacheService], - imports: [FormsModule] -}) - -export class HeroBioComponent implements OnInit { - @Input() heroId = 0; - - constructor(private heroCache: HeroCacheService) { } - - ngOnInit() { this.heroCache.fetchCachedHero(this.heroId); } - - get hero() { return this.heroCache.hero; } -} -// #enddocregion component diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts deleted file mode 100755 index 1497d665459..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-bios.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; - -import { HeroService } from './hero.service'; -import { LoggerService } from './logger.service'; -import { HeroBioComponent } from './hero-bio.component'; -import { HeroContactComponent } from './hero-contact.component'; - -//////// HeroBiosComponent //// -// #docregion simple -@Component({ - standalone: true, - selector: 'app-hero-bios', - template: ` - - - `, - providers: [HeroService], - imports: [HeroBioComponent] -}) -export class HeroBiosComponent { -// #enddocregion simple - constructor(logger: LoggerService) { - logger.logInfo('Creating HeroBiosComponent'); - } -// #docregion simple -} -// #enddocregion simple - -//////// HeroBiosAndContactsComponent //// -// #docregion hero-bios-and-contacts -@Component({ - standalone: true, - selector: 'app-hero-bios-and-contacts', - // #docregion template - template: ` - - - `, - // #enddocregion template - providers: [HeroService], - imports: [HeroBioComponent, HeroContactComponent] -}) -export class HeroBiosAndContactsComponent { - constructor(logger: LoggerService) { - logger.logInfo('Creating HeroBiosAndContactsComponent'); - } -} -// #enddocregion hero-bios-and-contacts diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-cache.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-cache.service.ts deleted file mode 100644 index c62157bb002..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-cache.service.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { Hero } from './hero'; -import { HeroService } from './hero.service'; - -// #docregion service -@Injectable() -export class HeroCacheService { - hero!: Hero; - constructor(private heroService: HeroService) {} - - fetchCachedHero(id: number) { - if (!this.hero) { - this.hero = this.heroService.getHeroById(id); - } - return this.hero; - } -} -// #enddocregion service diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts deleted file mode 100755 index e42a63cd66a..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-contact.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion -import { Component, Host, Optional } from '@angular/core'; - -import { HeroCacheService } from './hero-cache.service'; -import { LoggerService } from './logger.service'; -import { NgIf } from '@angular/common'; - -// #docregion component -@Component({ - standalone: true, - selector: 'app-hero-contact', - template: ` -
    Phone #: {{phoneNumber}} - !!!
    `, - imports: [NgIf] -}) -export class HeroContactComponent { - - hasLogger = false; - - constructor( - // #docregion ctor-params - @Host() // limit to the host component's instance of the HeroCacheService - private heroCache: HeroCacheService, - - @Host() // limit search for logger; hides the application-wide logger - @Optional() // ok if the logger doesn't exist - private loggerService?: LoggerService - // #enddocregion ctor-params - ) { - if (loggerService) { - this.hasLogger = true; - loggerService.logInfo('HeroContactComponent can log!'); - } - } - - get phoneNumber() { return this.heroCache.hero.phone; } - -} -// #enddocregion component diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-data.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-data.ts deleted file mode 100644 index 98ca87160e3..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-data.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export class HeroData { - createDb() { - const heroes = [ - new Hero(1, 'Windstorm'), - new Hero(2, 'Bombasto'), - new Hero(3, 'Magneta'), - new Hero(4, 'Tornado') - ]; - return {heroes}; - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.1.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.1.ts deleted file mode 100755 index 47d015bee7c..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.1.ts +++ /dev/null @@ -1,23 +0,0 @@ -// Illustrative (not used), mini-version of the actual HeroOfTheMonthComponent -// Injecting with the MinimalLogger "interface-class" -import { Component, NgModule } from '@angular/core'; -import { LoggerService } from './logger.service'; -import { MinimalLogger } from './minimal-logger.service'; -import { NgFor } from '@angular/common'; - -// #docregion -@Component({ - standalone: true, - selector: 'app-hero-of-the-month', - templateUrl: './hero-of-the-month.component.html', - // TODO: move this aliasing, `useExisting` provider to the AppModule - providers: [{ provide: MinimalLogger, useExisting: LoggerService }], - imports: [NgFor] -}) -export class HeroOfTheMonthComponent { - logs: string[] = []; - constructor(logger: MinimalLogger) { - logger.logInfo('starting up'); - } -} -// #enddocregion diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.html b/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.html deleted file mode 100644 index f0ae619d6ad..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    {{title}}

    -
    Winner: {{heroOfTheMonth.name}}
    -
    Reason for award: {{heroOfTheMonth.description}}
    -
    Runners-up: {{runnersUp}}
    - -

    Logs:

    -
    -
    {{log}}
    -
    diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts deleted file mode 100755 index b533d392aa9..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero-of-the-month.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -// #docplaster -// #docregion injection-token -import { InjectionToken } from '@angular/core'; - -export const TITLE = new InjectionToken('title'); -// #enddocregion injection-token - -// #docregion hero-of-the-month -import { Component, Inject } from '@angular/core'; - -import { DateLoggerService } from './date-logger.service'; -import { Hero } from './hero'; -import { HeroService } from './hero.service'; -import { LoggerService } from './logger.service'; -import { MinimalLogger } from './minimal-logger.service'; -import { RUNNERS_UP, - runnersUpFactory } from './runners-up'; -import { NgFor } from '@angular/common'; - -// #enddocregion hero-of-the-month -// #docregion some-hero -const someHero = new Hero(42, 'Magma', 'Had a great month!', '555-555-5555'); -// #enddocregion some-hero - -// #docregion hero-of-the-month -@Component({ - standalone: true, - selector: 'app-hero-of-the-month', - templateUrl: './hero-of-the-month.component.html', - providers: [ - // #docregion use-value - { provide: Hero, useValue: someHero }, - // #docregion provide-injection-token - { provide: TITLE, useValue: 'Hero of the Month' }, - // #enddocregion provide-injection-token - // #enddocregion use-value - // #docregion use-class - { provide: HeroService, useClass: HeroService }, - { provide: LoggerService, useClass: DateLoggerService }, - // #enddocregion use-class - // #docregion use-existing - { provide: MinimalLogger, useExisting: LoggerService }, - // #enddocregion use-existing - // #docregion provide-injection-token, use-factory - { provide: RUNNERS_UP, useFactory: runnersUpFactory(2), deps: [Hero, HeroService] } - // #enddocregion provide-injection-token, use-factory - ], - imports: [NgFor] -}) -export class HeroOfTheMonthComponent { - logs: string[] = []; - - constructor( - logger: MinimalLogger, - public heroOfTheMonth: Hero, - @Inject(RUNNERS_UP) public runnersUp: string, - @Inject(TITLE) public title: string) - { - this.logs = logger.logs; - logger.logInfo('starting up'); - } -} -// #enddocregion hero-of-the-month diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero.service.ts deleted file mode 100644 index 9630f823609..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero.service.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { Hero } from './hero'; - -@Injectable({ - providedIn: 'root' -}) -export class HeroService { - - // TODO: move to database - private heroes: Array = [ - new Hero(1, 'RubberMan', 'Hero of many talents', '123-456-7899'), - new Hero(2, 'Magma', 'Hero of all trades', '555-555-5555'), - new Hero(3, 'Dr Nice', 'The name says it all', '111-222-3333') - ]; - - getHeroById(id: number): Hero { - return this.heroes.find(hero => hero.id === id)!; - } - - getAllHeroes(): Array { - return this.heroes; - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/hero.ts b/aio/content/examples/dependency-injection-in-action/src/app/hero.ts deleted file mode 100644 index c17069e7270..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/hero.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -export class Hero { - constructor( - public id: number, - public name: string, - public description?: string, - public phone?: string) { - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/highlight.directive.ts b/aio/content/examples/dependency-injection-in-action/src/app/highlight.directive.ts deleted file mode 100755 index 6fe0db5e633..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/highlight.directive.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docplaster -// #docregion -import { Directive, ElementRef, HostListener, Input } from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[appHighlight]' -}) -export class HighlightDirective { - - @Input('appHighlight') highlightColor = ''; - - private el: HTMLElement; - - constructor(el: ElementRef) { - this.el = el.nativeElement; - } - - @HostListener('mouseenter') onMouseEnter() { - this.highlight(this.highlightColor || 'cyan'); - } - - @HostListener('mouseleave') onMouseLeave() { - this.highlight(''); - } - - private highlight(color: string) { - this.el.style.backgroundColor = color; - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/logger.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/logger.service.ts deleted file mode 100644 index a6ef12f44d0..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/logger.service.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class LoggerService { - logs: string[] = []; - - logInfo(msg: any) { this.log(`INFO: ${msg}`); } - logDebug(msg: any) { this.log(`DEBUG: ${msg}`); } - logError(msg: any) { this.log(`ERROR: ${msg}`, true); } - - private log(msg: any, isErr = false) { - this.logs.push(msg); - if (isErr) { - console.error(msg); - } else { - console.log(msg); - } - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/minimal-logger.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/minimal-logger.service.ts deleted file mode 100644 index 1b92d9b5a18..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/minimal-logger.service.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -// Class used as a "narrowing" interface that exposes a minimal logger -// Other members of the actual implementation are invisible -export abstract class MinimalLogger { - abstract logs: string[]; - abstract logInfo: (msg: string) => void; -} -// #enddocregion - -/* -// Transpiles to: -// #docregion minimal-logger-transpiled - var MinimalLogger = (function () { - function MinimalLogger() {} - return MinimalLogger; - }()); - exports("MinimalLogger", MinimalLogger); -// #enddocregion minimal-logger-transpiled -*/ - -// See https://stackoverflow.com/questions/43154832/unexpected-token-export-in-angular-app-with-systemjs-and-typescript/ -export const _ = 0; diff --git a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts deleted file mode 100755 index 6ed2e90e9ba..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/parent-finder.component.ts +++ /dev/null @@ -1,213 +0,0 @@ -/* eslint-disable space-before-function-paren */ -// #docplaster -// #docregion -import { Component, forwardRef, Optional, SkipSelf } from '@angular/core'; - -// A component base class (see AlexComponent) -export abstract class Base { name = 'Count Basie'; } - -// Marker class, used as an interface -// #docregion parent -export abstract class Parent { abstract name: string; } -// #enddocregion parent - -const DifferentParent = Parent; - -// Helper method to provide the current component instance in the name of a `parentType`. -// The `parentType` defaults to `Parent` when omitting the second parameter. -export function provideParent - (component: any, parentType?: any) { - return { provide: parentType || Parent, useExisting: forwardRef(() => component) }; - } - -// Simpler syntax version that always provides the component in the name of `Parent`. -export function provideTheParent - (component: any) { - return { provide: Parent, useExisting: forwardRef(() => component) }; - } - -///////// C - Child ////////// -const templateC = ` -
    -

    {{name}}

    -

    My parent is {{parent?.name}}

    -
    `; - -@Component({ - standalone: true, - selector: 'carol', - template: templateC -}) -// #docregion carol-class -export class CarolComponent { - name = 'Carol'; - // #docregion carol-ctor - constructor( @Optional() public parent?: Parent ) { } - // #enddocregion carol-ctor -} -// #enddocregion carol-class - -@Component({ - standalone: true, - selector: 'chris', - template: templateC -}) -export class ChrisComponent { - name = 'Chris'; - constructor( @Optional() public parent?: Parent ) { } -} - -////// Craig /////////// -/** - * Show we cannot inject a parent by its base class. - */ -// #docregion craig -@Component({ - standalone: true, - selector: 'craig', - template: ` -
    -

    Craig

    - {{alex ? 'Found' : 'Did not find'}} Alex via the base class. -
    ` -}) -export class CraigComponent { - constructor( @Optional() public alex?: Base ) { } -} -// #enddocregion craig - -//////// B - Parent ///////// -// #docregion barry -const templateB = ` -
    -
    -

    {{name}}

    -

    My parent is {{parent?.name}}

    -
    - - -
    `; - -@Component({ - standalone: true, - selector: 'barry', - template: templateB, - providers: [{ provide: Parent, useExisting: forwardRef(() => BarryComponent) }], - imports: [CarolComponent, ChrisComponent] -}) -export class BarryComponent implements Parent { - name = 'Barry'; -// #docregion barry-ctor - constructor( @SkipSelf() @Optional() public parent?: Parent ) { } -// #enddocregion barry-ctor -} -// #enddocregion barry - -@Component({ - standalone: true, - selector: 'bob', - template: templateB, - providers: [ provideParent(BobComponent) ], - imports: [CarolComponent, ChrisComponent] -}) -export class BobComponent implements Parent { - name = 'Bob'; - constructor( @SkipSelf() @Optional() public parent?: Parent ) { } -} - -@Component({ - standalone: true, - selector: 'beth', - template: templateB, - providers: [ provideParent(BethComponent, DifferentParent) ], - imports: [CarolComponent, ChrisComponent] -}) -export class BethComponent implements Parent { - name = 'Beth'; - constructor( @SkipSelf() @Optional() public parent?: Parent ) { } -} - -////// Cathy /////////// -/** - * Show we can inject a parent by component type - */ -// #docregion cathy -@Component({ - standalone: true, - selector: 'cathy', - template: ` -
    -

    Cathy

    - {{alex ? 'Found' : 'Did not find'}} Alex via the component class.
    -
    ` -}) -export class CathyComponent { - constructor( @Optional() public alex?: AlexComponent ) { } -} -// #enddocregion cathy - -///////// A - Grandparent ////// - -// #docregion alex-1 -@Component({ - standalone: true, - selector: 'alex', - template: ` -
    -

    {{name}}

    - - - -
    `, -// #enddocregion alex-1 -// #docregion alex-providers - providers: [{ provide: Parent, useExisting: forwardRef(() => AlexComponent) }], -// #enddocregion alex-providers -// #docregion alex-1 - imports: [CathyComponent, CraigComponent, CarolComponent] -}) -// #enddocregion alex-1 -// TODO: Add `... implements Parent` to class signature -// #docregion alex-1 -// #docregion alex-class-signature -export class AlexComponent extends Base -// #enddocregion alex-class-signature -{ - override name = 'Alex'; -} -// #enddocregion alex-1 - -///// - -@Component({ - standalone: true, - selector: 'alice', - template: ` -
    -

    {{name}}

    - - - - -
    `, - providers: [ provideParent(AliceComponent) ], - imports: [BarryComponent, BethComponent, BobComponent, CarolComponent] -}) -// #docregion alice-class-signature -export class AliceComponent implements Parent -// #enddocregion alice-class-signature -{ - name = 'Alice'; -} - -///////// ParentFinder ////// -@Component({ - standalone: true, - selector: 'app-parent-finder', - template: ` -

    Parent Finder

    - - `, - imports: [AlexComponent, AliceComponent] -}) -export class ParentFinderComponent { } diff --git a/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts b/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts deleted file mode 100644 index a94c25fc824..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/runners-up.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -// #docregion -import { InjectionToken } from '@angular/core'; - -import { Hero } from './hero'; -import { HeroService } from './hero.service'; - -export const RUNNERS_UP = new InjectionToken('RunnersUp'); - -// #docregion factory-synopsis -export function runnersUpFactory(take: number) { - return (winner: Hero, heroService: HeroService): string => - /* ... */ -// #enddocregion factory-synopsis - heroService - .getAllHeroes() - .filter((hero) => hero.name !== winner.name) - .map(hero => hero.name) - .slice(0, Math.max(0, take)) - .join(', '); -// #docregion factory-synopsis -} -// #enddocregion factory-synopsis diff --git a/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts deleted file mode 100755 index 14e6567dc90..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/sorted-heroes.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; - -import { Hero } from './hero'; -import { HeroService } from './hero.service'; -import { NgFor } from '@angular/common'; - -/////// HeroesBaseComponent ///// -// #docregion heroes-base -@Component({ - standalone: true, - selector: 'app-unsorted-heroes', - template: '
    {{hero.name}}
    ', - providers: [HeroService], - imports: [NgFor] -}) -export class HeroesBaseComponent implements OnInit { - constructor(private heroService: HeroService) { } - - heroes: Hero[] = []; - - ngOnInit() { - this.heroes = this.heroService.getAllHeroes(); - this.afterGetHeroes(); - } - - // Post-process heroes in derived class override. - protected afterGetHeroes() {} - -} -// #enddocregion heroes-base - -/////// SortedHeroesComponent ///// -// #docregion sorted-heroes -@Component({ - standalone: true, - selector: 'app-sorted-heroes', - template: '
    {{hero.name}}
    ', - providers: [HeroService], - imports: [NgFor] -}) -export class SortedHeroesComponent extends HeroesBaseComponent { - constructor(heroService: HeroService) { - super(heroService); - } - - protected override afterGetHeroes() { - this.heroes = this.heroes.sort((h1, h2) => h1.name < h2.name ? -1 : - (h1.name > h2.name ? 1 : 0)); - } -} -// #enddocregion sorted-heroes diff --git a/aio/content/examples/dependency-injection-in-action/src/app/storage.component.ts b/aio/content/examples/dependency-injection-in-action/src/app/storage.component.ts deleted file mode 100755 index 1b34f6fbd7b..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/storage.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docregion -import { Component, OnInit, Self, SkipSelf } from '@angular/core'; -import { BROWSER_STORAGE, BrowserStorageService } from './storage.service'; - -@Component({ - standalone: true, - selector: 'app-storage', - template: ` - Open the inspector to see the local/session storage keys: - -

    Session Storage

    - - -

    Local Storage

    - - `, - providers: [ - BrowserStorageService, - { provide: BROWSER_STORAGE, useFactory: () => sessionStorage } - ] -}) -export class StorageComponent { - - constructor( - @Self() private sessionStorageService: BrowserStorageService, - @SkipSelf() private localStorageService: BrowserStorageService, - ) { } - - setSession() { - this.sessionStorageService.set('hero', 'Dr Nice - Session'); - } - - setLocal() { - this.localStorageService.set('hero', 'Dr Nice - Local'); - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts deleted file mode 100644 index a31f5a39055..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/storage.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Inject, Injectable, InjectionToken } from '@angular/core'; - -export const BROWSER_STORAGE = new InjectionToken('Browser Storage', { - providedIn: 'root', - factory: () => localStorage -}); - -@Injectable({ - providedIn: 'root' -}) -export class BrowserStorageService { - constructor(@Inject(BROWSER_STORAGE) public storage: Storage) {} - - get(key: string) { - return this.storage.getItem(key); - } - - set(key: string, value: string) { - this.storage.setItem(key, value); - } - - remove(key: string) { - this.storage.removeItem(key); - } - - clear() { - this.storage.clear(); - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts deleted file mode 100644 index dd725a55814..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/user-context.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { LoggerService } from './logger.service'; -import { UserService } from './user.service'; - -@Injectable({ - providedIn: 'root' -}) -export class UserContextService { - name = ''; - role = ''; - loggedInSince: Date; - - constructor(private userService: UserService, private loggerService: LoggerService) { - this.loggedInSince = new Date(); - } - - loadUser(userId: number) { - const user = this.userService.getUserById(userId); - this.name = user.name; - this.role = user.role; - - this.loggerService.logDebug('loaded User'); - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/app/user.service.ts b/aio/content/examples/dependency-injection-in-action/src/app/user.service.ts deleted file mode 100644 index 09c1c7b4cd7..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/app/user.service.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class UserService { - - getUserById(userId: number): any { - return {name: 'Bombasto', role: 'Admin'}; - } -} diff --git a/aio/content/examples/dependency-injection-in-action/src/assets/sample.css b/aio/content/examples/dependency-injection-in-action/src/assets/sample.css deleted file mode 100644 index a8b59efd05d..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/assets/sample.css +++ /dev/null @@ -1,26 +0,0 @@ -.di-component{ - padding: 10px; - width:300px; - margin-bottom: 10px; -} -div[myHighlight] { - padding: 2px 8px; -} - -/* Parent Finder */ -.a, .b, .c { - margin: 6px 2px 6px; - padding: 4px 6px; -} -.a { - border: solid 2px black; -} -.b { - background: lightblue; - border: solid 1px darkblue; - display: flex; -} -.c { - background: pink; - border: solid 1px red; -} \ No newline at end of file diff --git a/aio/content/examples/dependency-injection-in-action/src/index.html b/aio/content/examples/dependency-injection-in-action/src/index.html deleted file mode 100644 index 8b36042f0cb..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - Dependency Injection - - - - - - - - - diff --git a/aio/content/examples/dependency-injection-in-action/src/main.ts b/aio/content/examples/dependency-injection-in-action/src/main.ts deleted file mode 100755 index a7cd02bef85..00000000000 --- a/aio/content/examples/dependency-injection-in-action/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfig from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/dependency-injection-in-action/stackblitz.json b/aio/content/examples/dependency-injection-in-action/stackblitz.json deleted file mode 100644 index 7ba10e6ce54..00000000000 --- a/aio/content/examples/dependency-injection-in-action/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Dependency Injection", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/app.component.ts", - "tags":["cookbook"] -} diff --git a/aio/content/examples/dependency-injection/BUILD.bazel b/aio/content/examples/dependency-injection/BUILD.bazel deleted file mode 100644 index 6e1562e945f..00000000000 --- a/aio/content/examples/dependency-injection/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "dependency-injection", -) diff --git a/aio/content/examples/dependency-injection/e2e/src/app.e2e-spec.ts b/aio/content/examples/dependency-injection/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 404a11811c3..00000000000 --- a/aio/content/examples/dependency-injection/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,190 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -describe('Dependency Injection Tests', () => { - - let expectedMsg: string; - let expectedMsgRx: RegExp; - - beforeAll(() => browser.get('')); - - describe('Cars:', () => { - - it('DI car displays as expected', async () => { - expectedMsg = 'DI car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#di')).getText()).toEqual(expectedMsg); - }); - - it('No DI car displays as expected', async () => { - expectedMsg = 'No DI car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#nodi')).getText()).toEqual(expectedMsg); - }); - - it('Injector car displays as expected', async () => { - expectedMsg = 'Injector car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#injector')).getText()).toEqual(expectedMsg); - }); - - it('Factory car displays as expected', async () => { - expectedMsg = 'Factory car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#factory')).getText()).toEqual(expectedMsg); - }); - - it('Simple car displays as expected', async () => { - expectedMsg = 'Simple car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#simple')).getText()).toEqual(expectedMsg); - }); - - it('Super car displays as expected', async () => { - expectedMsg = 'Super car with 12 cylinders and Flintstone tires.'; - expect(await element(by.css('#super')).getText()).toEqual(expectedMsg); - }); - - it('Test car displays as expected', async () => { - expectedMsg = 'Test car with 8 cylinders and YokoGoodStone tires.'; - expect(await element(by.css('#test')).getText()).toEqual(expectedMsg); - }); - }); - - describe('Other Injections:', () => { - it('DI car displays as expected', async () => { - expectedMsg = 'DI car with 4 cylinders and Flintstone tires.'; - expect(await element(by.css('#car')).getText()).toEqual(expectedMsg); - }); - - it('Hero displays as expected', async () => { - expectedMsg = 'Dr. Nice'; - expect(await element(by.css('#hero')).getText()).toEqual(expectedMsg); - }); - - it('Optional injection displays as expected', async () => { - expectedMsg = "R.O.U.S.'s? I don't think they exist!";; - expect(await element(by.css('#rodent')).getText()).toEqual(expectedMsg); - }); - }); - - describe('Tests:', () => { - - it('Tests display as expected', async () => { - expectedMsgRx = /Tests passed/; - expect(await element(by.css('#tests')).getText()).toMatch(expectedMsgRx); - }); - - }); - - describe('Provider variations:', () => { - - it('P1 (class) displays as expected', async () => { - expectedMsg = 'Hello from logger provided with Logger class'; - expect(await element(by.css('#p1')).getText()).toEqual(expectedMsg); - }); - - it('P3 (provide) displays as expected', async () => { - expectedMsg = 'Hello from logger provided with useClass:Logger'; - expect(await element(by.css('#p3')).getText()).toEqual(expectedMsg); - }); - - it('P4 (useClass:BetterLogger) displays as expected', async () => { - expectedMsg = 'Hello from logger provided with useClass:BetterLogger'; - expect(await element(by.css('#p4')).getText()).toEqual(expectedMsg); - }); - - it('P5 (useClass:EvenBetterLogger - dependency) displays as expected', async () => { - expectedMsg = 'Message to Bob: Hello from EvenBetterlogger'; - expect(await element(by.css('#p5')).getText()).toEqual(expectedMsg); - }); - - it('P6a (no alias) displays as expected', async () => { - expectedMsg = 'Hello OldLogger (but we want NewLogger)'; - expect(await element(by.css('#p6a')).getText()).toEqual(expectedMsg); - }); - - it('P6b (alias) displays as expected', async () => { - expectedMsg = 'Hello from NewLogger (via aliased OldLogger)'; - expect(await element(by.css('#p6b')).getText()).toEqual(expectedMsg); - }); - - it('P7 (useValue) displays as expected', async () => { - expectedMsg = 'Silent logger says "Shhhhh!". Provided via "useValue"'; - expect(await element(by.css('#p7')).getText()).toEqual(expectedMsg); - }); - - it('P8 (useFactory) displays as expected', async () => { - expectedMsg = 'Hero service injected successfully via heroServiceProvider'; - expect(await element(by.css('#p8')).getText()).toEqual(expectedMsg); - }); - - it('P9 (InjectionToken) displays as expected', async () => { - expectedMsg = 'APP_CONFIG Application title is Dependency Injection'; - expect(await element(by.css('#p9')).getText()).toEqual(expectedMsg); - }); - - it('P10 (optional dependency) displays as expected', async () => { - expectedMsg = 'Optional logger was not available'; - expect(await element(by.css('#p10')).getText()).toEqual(expectedMsg); - }); - }); - - describe('User/Heroes:', () => { - it('User is Bob - unauthorized', async () => { - expectedMsgRx = /Bob, is not authorized/; - expect(await element(by.css('#user')).getText()).toMatch(expectedMsgRx); - }); - - it('should have button', async () => { - expect(await element.all(by.cssContainingText('button', 'Next User')) - .get(0).isDisplayed()).toBe(true, "'Next User' button should be displayed"); - }); - - it('unauthorized user should have multiple unauthorized heroes', async () => { - const heroes = element.all(by.css('#unauthorized app-hero-list div')); - expect(await heroes.count()).toBeGreaterThan(0); - }); - - it('unauthorized user should have no secret heroes', async () => { - const heroes = element.all(by.css('#unauthorized app-hero-list div')); - expect(await heroes.count()).toBeGreaterThan(0); - - const filteredHeroes = heroes.filter(async elem => /secret/.test(await elem.getText())); - expect(await filteredHeroes.count()).toEqual(0); - }); - - it('unauthorized user should have no authorized heroes listed', async () => { - expect(await element.all(by.css('#authorized app-hero-list div')).count()).toEqual(0); - }); - - describe('after button click', () => { - - beforeAll(async () => { - const buttonEle = element.all(by.cssContainingText('button', 'Next User')).get(0); - await buttonEle.click(); - }); - - it('User is Alice - authorized', async () => { - expectedMsgRx = /Alice, is authorized/; - expect(await element(by.css('#user')).getText()).toMatch(expectedMsgRx); - }); - - it('authorized user should have multiple authorized heroes ', async () => { - const heroes = element.all(by.css('#authorized app-hero-list div')); - expect(await heroes.count()).toBeGreaterThan(0); - }); - - it('authorized user should have multiple authorized heroes with tree-shakeable HeroesService', async () => { - const heroes = element.all(by.css('#tspAuthorized app-hero-list div')); - expect(await heroes.count()).toBeGreaterThan(0); - }); - - it('authorized user should have secret heroes', async () => { - const heroes = element.all(by.css('#authorized app-hero-list div')); - expect(await heroes.count()).toBeGreaterThan(0); - - const filteredHeroes = heroes.filter(async elem => /secret/.test(await elem.getText())); - expect(await filteredHeroes.count()).toBeGreaterThan(0); - }); - - it('authorized user should have no unauthorized heroes listed', async () => { - expect(await element.all(by.css('#unauthorized app-hero-list div')).count()).toEqual(0); - }); - }); - }); -}); diff --git a/aio/content/examples/dependency-injection/example-config.json b/aio/content/examples/dependency-injection/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/dependency-injection/src/app/app-config.ts b/aio/content/examples/dependency-injection/src/app/app-config.ts deleted file mode 100644 index 81c0479ffdf..00000000000 --- a/aio/content/examples/dependency-injection/src/app/app-config.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* - Must put this interface in its own file instead of app.config.ts - or else TypeScript gives a (bogus) warning: - WARNING in ./src/app/... .ts - "export 'AppConfig' was not found in './app.config' -*/ -export interface AppConfig { - apiEndpoint: string; - title: string; -} diff --git a/aio/content/examples/dependency-injection/src/app/app.component.1.ts b/aio/content/examples/dependency-injection/src/app/app.component.1.ts deleted file mode 100755 index 9539441cb76..00000000000 --- a/aio/content/examples/dependency-injection/src/app/app.component.1.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { CarComponent } from './car/car.component'; -import { HeroesComponent } from './heroes/heroes.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    {{title}}

    - - - `, - imports: [CarComponent, HeroesComponent] -}) - -export class AppComponent { - title = 'Dependency Injection'; -} diff --git a/aio/content/examples/dependency-injection/src/app/app.component.2.ts b/aio/content/examples/dependency-injection/src/app/app.component.2.ts deleted file mode 100755 index 384ae9a4f5d..00000000000 --- a/aio/content/examples/dependency-injection/src/app/app.component.2.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, Inject } from '@angular/core'; - -import { APP_CONFIG, AppConfig } from './injection.config'; -import { CarComponent } from './car/car.component'; -import { HeroesComponent } from './heroes/heroes.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    {{title}}

    - - - `, - imports: [CarComponent, HeroesComponent] -}) -export class AppComponent { - title: string; - - // #docregion ctor - constructor(@Inject(APP_CONFIG) config: AppConfig) { - this.title = config.title; - } - // #enddocregion ctor -} diff --git a/aio/content/examples/dependency-injection/src/app/app.component.ts b/aio/content/examples/dependency-injection/src/app/app.component.ts deleted file mode 100755 index a28c01f1010..00000000000 --- a/aio/content/examples/dependency-injection/src/app/app.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Component, Inject } from '@angular/core'; - -import { APP_CONFIG, AppConfig } from './injection.config'; -import { UserService } from './user.service'; -import { HeroesComponent } from './heroes/heroes.component'; -import { HeroesTspComponent } from './heroes/heroes-tsp.component'; -import { ProvidersComponent } from './providers.component'; -import { CarComponent } from './car/car.component'; -import { InjectorComponent } from './injector.component'; -import { TestComponent } from './test.component'; -import { NgIf } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    {{title}}

    - - - -

    User

    -

    - {{userInfo}} - -

    - - - - - `, - imports: [ - HeroesComponent, - HeroesTspComponent, - ProvidersComponent, - CarComponent, - InjectorComponent, - TestComponent, - NgIf - ] -}) -export class AppComponent { - title: string; - - constructor( - @Inject(APP_CONFIG) config: AppConfig, - private userService: UserService) { - this.title = config.title; - } - - get isAuthorized() { return this.user.isAuthorized; } - nextUser() { this.userService.getNewUser(); } - get user() { return this.userService.user; } - - get userInfo() { - return `Current user, ${this.user.name}, is ` + - `${this.isAuthorized ? '' : 'not'} authorized. `; - } -} diff --git a/aio/content/examples/dependency-injection/src/app/app.config.ts b/aio/content/examples/dependency-injection/src/app/app.config.ts deleted file mode 100644 index 572d5d76b93..00000000000 --- a/aio/content/examples/dependency-injection/src/app/app.config.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { Logger } from './logger.service'; -import { UserService } from './user.service'; -import { APP_CONFIG, HERO_DI_CONFIG } from './injection.config'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -const appConfig: ApplicationConfig = { - providers: [ - provideProtractorTestingSupport(), - Logger, - UserService, - { provide: APP_CONFIG, useValue: HERO_DI_CONFIG } - ] -}; - -export default appConfig; diff --git a/aio/content/examples/dependency-injection/src/app/car/car-creations.ts b/aio/content/examples/dependency-injection/src/app/car/car-creations.ts deleted file mode 100644 index 5c4119278c8..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car-creations.ts +++ /dev/null @@ -1,36 +0,0 @@ -// Examples with car and engine variations - -import { Car, Engine, Tires } from './car'; - -///////// example 1 //////////// -export function simpleCar() { - // Simple car with 4 cylinders and Flintstone tires. - const car = new Car(new Engine(), new Tires()); - car.description = 'Simple'; - return car; -} - - -///////// example 2 //////////// -class Engine2 { - constructor(public cylinders: number) { } -} - -export function superCar() { - // Super car with 12 cylinders and Flintstone tires. - const bigCylinders = 12; - const car = new Car(new Engine2(bigCylinders), new Tires()); - car.description = 'Super'; - return car; -} - -/////////// example 3 ////////// -class MockEngine extends Engine { override cylinders = 8; } -class MockTires extends Tires { override make = 'YokoGoodStone'; } - -export function testCar() { - // Test car with 8 cylinders and YokoGoodStone tires. - const car = new Car(new MockEngine(), new MockTires()); - car.description = 'Test'; - return car; -} diff --git a/aio/content/examples/dependency-injection/src/app/car/car-factory.ts b/aio/content/examples/dependency-injection/src/app/car/car-factory.ts deleted file mode 100644 index ed759137e6e..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car-factory.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import { Engine, Tires, Car } from './car'; - -// BAD pattern! -export class CarFactory { - createCar() { - const car = new Car(this.createEngine(), this.createTires()); - car.description = 'Factory'; - return car; - } - - createEngine() { - return new Engine(); - } - - createTires() { - return new Tires(); - } -} diff --git a/aio/content/examples/dependency-injection/src/app/car/car-injector.ts b/aio/content/examples/dependency-injection/src/app/car/car-injector.ts deleted file mode 100644 index ba2449b6ff8..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car-injector.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Injector } from '@angular/core'; - -import { Car, Engine, Tires } from './car'; -import { Logger } from '../logger.service'; - -export function useInjector() { - let injector: Injector; - /* - // Cannot instantiate an Injector like this! - let injector = new Injector([ - { provide: Car, deps: [Engine, Tires] }, - { provide: Engine, deps: [] }, - { provide: Tires, deps: [] } - ]); - */ - injector = Injector.create({ - providers: [ - { provide: Car, deps: [Engine, Tires] }, - { provide: Engine, deps: [] }, - { provide: Tires, deps: [] } - ] - }); - const car = injector.get(Car); - car.description = 'Injector'; - - injector = Injector.create({ - providers: [{ provide: Logger, deps: [] }] - }); - const logger = injector.get(Logger); - logger.log('Injector car.drive() said: ' + car.drive()); - return car; -} diff --git a/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts b/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts deleted file mode 100644 index 07a5864fa1f..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car-no-di.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Car without DI -import { Engine, Tires } from './car'; - -export class Car { - - public engine: Engine; - public tires: Tires; - public description = 'No DI'; - - constructor() { - this.engine = new Engine(); - this.tires = new Tires(); - } - - // Method using the engine and tires - drive() { - return `${this.description} car with ` + - `${this.engine.cylinders} cylinders and ${this.tires.make} tires.`; - } -} diff --git a/aio/content/examples/dependency-injection/src/app/car/car.component.ts b/aio/content/examples/dependency-injection/src/app/car/car.component.ts deleted file mode 100755 index ab6a0a1bb80..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { Car, Engine, Tires } from './car'; -import { Car as CarNoDi } from './car-no-di'; -import { CarFactory } from './car-factory'; - -import { testCar, - simpleCar, - superCar } from './car-creations'; - -import { useInjector } from './car-injector'; - - -@Component({ - standalone: true, - selector: 'app-car', - template: ` -

    Cars

    -
    {{car.drive()}}
    -
    {{noDiCar.drive()}}
    -
    {{injectorCar.drive()}}
    -
    {{factoryCar.drive()}}
    -
    {{simpleCar.drive()}}
    -
    {{superCar.drive()}}
    -
    {{testCar.drive()}}
    - `, - providers: [Car, Engine, Tires] -}) -export class CarComponent { - factoryCar = (new CarFactory()).createCar(); - injectorCar = useInjector(); - noDiCar = new CarNoDi(); - simpleCar = simpleCar(); - superCar = superCar(); - testCar = testCar(); - - constructor(public car: Car) {} -} diff --git a/aio/content/examples/dependency-injection/src/app/car/car.ts b/aio/content/examples/dependency-injection/src/app/car/car.ts deleted file mode 100644 index 04b87c02841..00000000000 --- a/aio/content/examples/dependency-injection/src/app/car/car.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Injectable } from '@angular/core'; - -export class Engine { - public cylinders = 4; -} - -export class Tires { - public make = 'Flintstone'; - public model = 'Square'; -} - -@Injectable() -export class Car { - public description = 'DI'; - - constructor(public engine: Engine, public tires: Tires) { } - - // Method using the engine and tires - drive() { - return `${this.description} car with ` + - `${this.engine.cylinders} cylinders and ${this.tires.make} tires.`; - } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/dummy.module.ts b/aio/content/examples/dependency-injection/src/app/heroes/dummy.module.ts deleted file mode 100644 index 2e1f0017712..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/dummy.module.ts +++ /dev/null @@ -1,35 +0,0 @@ - -/// Dummy modules to satisfy Angular Language Service -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -//////// - -import { HeroListComponent as HeroListComponent1 } from './hero-list.component.1'; - -@NgModule({ - imports: [ CommonModule ], - declarations: [ HeroListComponent1 ], - exports: [ HeroListComponent1 ] -}) -export class DummyModule1 {} - -///////// - -import { HeroListComponent as HeroListComponent2 } from './hero-list.component.2'; - -@NgModule({ - imports: [ CommonModule ], - declarations: [ HeroListComponent2 ] -}) -export class DummyModule2 {} - -///////// - -import { HeroesComponent as HeroesComponent1 } from './heroes.component.1'; - -@NgModule({ - imports: [ CommonModule, DummyModule1 ], - declarations: [ HeroesComponent1 ] -}) -export class DummyModule3 {} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts deleted file mode 100755 index aebdbd71ce8..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.1.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { HEROES } from './mock-heroes'; - -@Component({ - standalone: true, - selector: 'app-hero-list', - template: ` -
    - {{hero.id}} - {{hero.name}} -
    - ` -}) -export class HeroListComponent { - heroes = HEROES; -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts deleted file mode 100755 index 5cad197b602..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.2.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { Hero } from './hero'; -// #enddocregion -import { HeroService } from './hero.service.1'; -/* -// #docregion -import { HeroService } from './hero.service'; -// #enddocregion -*/ -// #docregion - -@Component({ - standalone: true, - selector: 'app-hero-list', - template: ` -
    - {{hero.id}} - {{hero.name}} -
    - ` -}) -export class HeroListComponent { - heroes: Hero[]; - - constructor(heroService: HeroService) { - this.heroes = heroService.getHeroes(); - } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.ts deleted file mode 100755 index 2ba17868751..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero-list.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Hero } from './hero'; -import { HeroService } from './hero.service'; -import { NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-hero-list', - template: ` -
    - {{hero.id}} - {{hero.name}} - ({{hero.isSecret ? 'secret' : 'public'}}) -
    - `, - imports: [NgFor] -}) -export class HeroListComponent { - heroes: Hero[]; - - // #docregion ctor-signature - constructor(heroService: HeroService) - // #enddocregion ctor-signature - { - this.heroes = heroService.getHeroes(); - } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.0.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.0.ts deleted file mode 100644 index eeb7fad3019..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.0.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.1.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.1.ts deleted file mode 100644 index 3ee96adca1a..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.1.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HEROES } from './mock-heroes'; - -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - getHeroes() { return HEROES; } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts deleted file mode 100644 index f0eb33de0cb..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.2.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HEROES } from './mock-heroes'; -import { Logger } from '../logger.service'; - -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - - constructor(private logger: Logger) { } - - getHeroes() { - this.logger.log('Getting heroes ...'); - return HEROES; - } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.3.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.3.ts deleted file mode 100644 index 402c5292ea5..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.3.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HEROES } from './mock-heroes'; - -@Injectable({ - // declares that this service should be created - // by the root application injector. - providedIn: 'root', -}) -export class HeroService { - getHeroes() { return HEROES; } -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.5.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.5.ts deleted file mode 100644 index 5ab112158a7..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.5.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -import { EnvironmentInjector, inject, Injectable, runInInjectionContext } from '@angular/core'; - -@Injectable({providedIn: - 'root' -}) -export class SomeService {} - - // #docregion run-in-context -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - private environmentInjector = inject(EnvironmentInjector); - - someMethod() { - runInInjectionContext(this.environmentInjector, () => { - inject(SomeService); // Do what you need with the injected service - }); - } -} -// #enddocregion run-in-context diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.provider.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.provider.ts deleted file mode 100644 index ff07716d3f3..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.provider.ts +++ /dev/null @@ -1,17 +0,0 @@ -// #docregion -import { HeroService } from './hero.service'; -import { Logger } from '../logger.service'; -import { UserService } from '../user.service'; - -// #docregion factory -const heroServiceFactory = (logger: Logger, userService: UserService) => - new HeroService(logger, userService.user.isAuthorized); -// #enddocregion factory - -// #docregion provider -export const heroServiceProvider = - { provide: HeroService, - useFactory: heroServiceFactory, - deps: [Logger, UserService] - }; -// #enddocregion provider diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.service.ts deleted file mode 100644 index 7d022131536..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HEROES } from './mock-heroes'; -import { Logger } from '../logger.service'; -import { UserService } from '../user.service'; - -@Injectable({ - providedIn: 'root', - useFactory: (logger: Logger, userService: UserService) => - new HeroService(logger, userService.user.isAuthorized), - deps: [Logger, UserService], -}) -export class HeroService { - // #docregion internals - constructor( - private logger: Logger, - private isAuthorized: boolean) { } - - getHeroes() { - const auth = this.isAuthorized ? 'authorized ' : 'unauthorized'; - this.logger.log(`Getting heroes for ${auth} user.`); - return HEROES.filter(hero => this.isAuthorized || !hero.isSecret); - } - // #enddocregion internals -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/hero.ts b/aio/content/examples/dependency-injection/src/app/heroes/hero.ts deleted file mode 100644 index 1128cf6be22..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/hero.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; - isSecret: boolean; -} diff --git a/aio/content/examples/dependency-injection/src/app/heroes/heroes-tsp.component.ts b/aio/content/examples/dependency-injection/src/app/heroes/heroes-tsp.component.ts deleted file mode 100755 index f0be2bd82c3..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/heroes-tsp.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component } from '@angular/core'; -import { HeroListComponent } from './hero-list.component'; - -/** - * A version of `HeroesComponent` that does not provide the `HeroService` (and thus relies on its - * `Injectable`-declared provider) in order to function. - * - * TSP stands for Tree-Shakeable Provider. - */ -@Component({ - standalone: true, - selector: 'app-heroes-tsp', - template: ` -

    Heroes

    - - `, - imports: [HeroListComponent] -}) -export class HeroesTspComponent { } diff --git a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts b/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts deleted file mode 100755 index 5b3b2200d70..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.1.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -import { HeroService } from './hero.service'; -import { HeroListComponent } from './hero-list.component'; - -@Component({ - standalone: true, - selector: 'app-heroes', - providers: [ HeroService ], - template: ` -

    Heroes

    - - `, - imports: [HeroListComponent] -}) -export class HeroesComponent { } diff --git a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.ts b/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.ts deleted file mode 100755 index 6d87b5f9d4f..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { heroServiceProvider } from './hero.service.provider'; -import { HeroListComponent } from './hero-list.component'; - -@Component({ - standalone: true, - selector: 'app-heroes', - providers: [ heroServiceProvider ], - template: ` -

    Heroes

    - - `, - imports: [HeroListComponent] -}) -export class HeroesComponent { } diff --git a/aio/content/examples/dependency-injection/src/app/heroes/mock-heroes.ts b/aio/content/examples/dependency-injection/src/app/heroes/mock-heroes.ts deleted file mode 100644 index c6eb57c4811..00000000000 --- a/aio/content/examples/dependency-injection/src/app/heroes/mock-heroes.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, isSecret: false, name: 'Dr. Nice' }, - { id: 13, isSecret: false, name: 'Bombasto' }, - { id: 14, isSecret: false, name: 'Celeritas' }, - { id: 15, isSecret: false, name: 'Magneta' }, - { id: 16, isSecret: false, name: 'RubberMan' }, - { id: 17, isSecret: false, name: 'Dynama' }, - { id: 18, isSecret: true, name: 'Dr. IQ' }, - { id: 19, isSecret: true, name: 'Magma' }, - { id: 20, isSecret: true, name: 'Tornado' } -]; diff --git a/aio/content/examples/dependency-injection/src/app/injection.config.ts b/aio/content/examples/dependency-injection/src/app/injection.config.ts deleted file mode 100755 index 3e86786964e..00000000000 --- a/aio/content/examples/dependency-injection/src/app/injection.config.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { AppConfig } from './app-config'; -export { AppConfig } from './app-config'; - -// #docregion token -import { InjectionToken } from '@angular/core'; - -export const APP_CONFIG = new InjectionToken('app.config'); -// #enddocregion token - -export const HERO_DI_CONFIG: AppConfig = { - apiEndpoint: 'api.heroes.com', - title: 'Dependency Injection' -}; diff --git a/aio/content/examples/dependency-injection/src/app/injector.component.ts b/aio/content/examples/dependency-injection/src/app/injector.component.ts deleted file mode 100755 index 00f6a45cb9b..00000000000 --- a/aio/content/examples/dependency-injection/src/app/injector.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -// #docplaster -// #docregion -import { Component, Injector } from '@angular/core'; - -import { Car, Engine, Tires } from './car/car'; -import { Hero } from './heroes/hero'; -import { HeroService } from './heroes/hero.service'; -import { heroServiceProvider } from './heroes/hero.service.provider'; -import { Logger } from './logger.service'; - -@Component({ - standalone: true, - selector: 'app-injectors', - template: ` -

    Other Injections

    -
    {{car.drive()}}
    -
    {{hero.name}}
    -
    {{rodent}}
    - `, - providers: [Car, Engine, Tires, heroServiceProvider, Logger] -}) -export class InjectorComponent { - car: Car; - - heroService: HeroService; - hero: Hero; - - constructor(private injector: Injector) { - this.car = this.injector.get(Car); - this.heroService = this.injector.get(HeroService); - this.hero = this.heroService.getHeroes()[0]; - } - - get rodent() { - const rousDontExist = "R.O.U.S.'s? I don't think they exist!"; - return this.injector.get(ROUS, rousDontExist); - } -} - -/** - * R.O.U.S. - Rodents Of Unusual Size - * // https://www.youtube.com/watch?v=BOv5ZjAOpC8 - */ -class ROUS { } diff --git a/aio/content/examples/dependency-injection/src/app/logger.service.ts b/aio/content/examples/dependency-injection/src/app/logger.service.ts deleted file mode 100644 index 3dd172c5f35..00000000000 --- a/aio/content/examples/dependency-injection/src/app/logger.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class Logger { - logs: string[] = []; // capture logs for testing - - log(message: string) { - this.logs.push(message); - console.log(message); - } -} diff --git a/aio/content/examples/dependency-injection/src/app/providers.component.ts b/aio/content/examples/dependency-injection/src/app/providers.component.ts deleted file mode 100755 index d4327d5765d..00000000000 --- a/aio/content/examples/dependency-injection/src/app/providers.component.ts +++ /dev/null @@ -1,289 +0,0 @@ -/* - * A collection of demo components showing different ways to provide services - * in @Component metadata - */ -import { Component, Inject, Injectable, OnInit } from '@angular/core'; - -import { - APP_CONFIG, - AppConfig, - HERO_DI_CONFIG } from './injection.config'; - -import { HeroService } from './heroes/hero.service'; -import { heroServiceProvider } from './heroes/hero.service.provider'; -import { Logger } from './logger.service'; -import { UserService } from './user.service'; - -const template = '{{log}}'; - -@Component({ - standalone: true, - selector: 'provider-1', - template, - // #docregion providers-logger - providers: [Logger], - // #enddocregion providers-logger -}) -export class Provider1Component { - log: string; - constructor(logger: Logger) { - logger.log('Hello from logger provided with Logger class'); - this.log = logger.logs[0]; - } -} - -////////////////////////////////////////// - -@Component({ - standalone: true, - selector: 'provider-3', - template, - providers: - // #docregion providers-3 - [{ provide: Logger, useClass: Logger }] - // #enddocregion providers-3 -}) -export class Provider3Component { - log: string; - constructor(logger: Logger) { - logger.log('Hello from logger provided with useClass:Logger'); - this.log = logger.logs[0]; - } -} - -////////////////////////////////////////// -export class BetterLogger extends Logger {} - -@Component({ - standalone: true, - selector: 'provider-4', - template, - providers: - // #docregion providers-4 - [{ provide: Logger, useClass: BetterLogger }] - // #enddocregion providers-4 -}) -export class Provider4Component { - log: string; - constructor(logger: Logger) { - logger.log('Hello from logger provided with useClass:BetterLogger'); - this.log = logger.logs[0]; - } -} - -////////////////////////////////////////// - -// #docregion EvenBetterLogger -@Injectable() -export class EvenBetterLogger extends Logger { - constructor(private userService: UserService) { super(); } - - override log(message: string) { - const name = this.userService.user.name; - super.log(`Message to ${name}: ${message}`); - } -} -// #enddocregion EvenBetterLogger - -@Component({ - standalone: true, - selector: 'provider-5', - template, - providers: - // #docregion providers-5 - [ UserService, - { provide: Logger, useClass: EvenBetterLogger }] - // #enddocregion providers-5 -}) -export class Provider5Component { - log: string; - constructor(logger: Logger) { - logger.log('Hello from EvenBetterlogger'); - this.log = logger.logs[0]; - } -} - -////////////////////////////////////////// - -export class NewLogger extends Logger {} - -export class OldLogger { - logs: string[] = []; - log(message: string) { - throw new Error('Should not call the old logger!'); - } -} - -@Component({ - standalone: true, - selector: 'provider-6a', - template, - providers: - [ NewLogger, - // Not aliased! Creates two instances of `NewLogger` - { provide: OldLogger, useClass: NewLogger}] -}) -export class Provider6aComponent { - log: string; - constructor(newLogger: NewLogger, oldLogger: OldLogger) { - if (newLogger === oldLogger) { - throw new Error('expected the two loggers to be different instances'); - } - oldLogger.log('Hello OldLogger (but we want NewLogger)'); - // The newLogger wasn't called so no logs[] - // display the logs of the oldLogger. - this.log = newLogger.logs[0] || oldLogger.logs[0]; - } -} - -@Component({ - standalone: true, - selector: 'provider-6b', - template, - providers: - // #docregion providers-6b - [ NewLogger, - // Alias OldLogger w/ reference to NewLogger - { provide: OldLogger, useExisting: NewLogger}] - // #enddocregion providers-6b -}) -export class Provider6bComponent { - log: string; - constructor(newLogger: NewLogger, oldLogger: OldLogger) { - if (newLogger !== oldLogger) { - throw new Error('expected the two loggers to be the same instance'); - } - oldLogger.log('Hello from NewLogger (via aliased OldLogger)'); - this.log = newLogger.logs[0]; - } -} - -////////////////////////////////////////// - -// An object in the shape of the logger service -function silentLoggerFn() {} - -export const SilentLogger = { - logs: ['Silent logger says "Shhhhh!". Provided via "useValue"'], - log: silentLoggerFn -}; - -@Component({ - standalone: true, - selector: 'provider-7', - template, - providers: - [{ provide: Logger, useValue: SilentLogger }] -}) -export class Provider7Component { - log: string; - constructor(logger: Logger) { - logger.log('Hello from logger provided with useValue'); - this.log = logger.logs[0]; - } -} - -///////////////// - -@Component({ - standalone: true, - selector: 'provider-8', - template, - providers: [heroServiceProvider, Logger, UserService] -}) -export class Provider8Component { - // must be true else this component would have blown up at runtime - log = 'Hero service injected successfully via heroServiceProvider'; - - constructor(heroService: HeroService) { } -} - -///////////////// - -@Component({ - standalone: true, - selector: 'provider-9', - template, - /* - // #docregion providers-9-interface - // Can't use interface as provider token - [{ provide: AppConfig, useValue: HERO_DI_CONFIG })] - // #enddocregion providers-9-interface - */ - // #docregion providers-9 - providers: [{ provide: APP_CONFIG, useValue: HERO_DI_CONFIG }] - // #enddocregion providers-9 -}) -export class Provider9Component implements OnInit { - log = ''; - /* - // #docregion provider-9-ctor-interface - // Can't inject using the interface as the parameter type - constructor(private config: AppConfig){ } - // #enddocregion provider-9-ctor-interface - */ - constructor(@Inject(APP_CONFIG) private config: AppConfig) { } - - ngOnInit() { - this.log = 'APP_CONFIG Application title is ' + this.config.title; - } -} - -////////////////////////////////////////// -// Sample providers 1 to 7 illustrate a required logger dependency. -// Optional logger, can be null -import { Optional } from '@angular/core'; - -const someMessage = 'Hello from the injected logger'; - -@Component({ - standalone: true, - selector: 'provider-10', - template, - providers: [{ provide: Logger, useValue: null }] -}) -export class Provider10Component implements OnInit { - log = ''; - constructor(@Optional() private logger?: Logger) { - if (this.logger) { - this.logger.log(someMessage); - } - } - - ngOnInit() { - this.log = this.logger ? this.logger.logs[0] : 'Optional logger was not available'; - } -} - -///////////////// - -@Component({ - standalone: true, - selector: 'app-providers', - template: ` -

    Provider variations

    -
    -
    -
    -
    -
    -
    -
    -
    -
    -
    - `, - imports: [ - Provider1Component, - Provider3Component, - Provider4Component, - Provider5Component, - Provider6aComponent, - Provider6bComponent, - Provider7Component, - Provider8Component, - Provider9Component, - Provider10Component - ] -}) -export class ProvidersComponent { } diff --git a/aio/content/examples/dependency-injection/src/app/providers.module.ts b/aio/content/examples/dependency-injection/src/app/providers.module.ts deleted file mode 100644 index 5dc27192a8b..00000000000 --- a/aio/content/examples/dependency-injection/src/app/providers.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { - Provider1Component, - Provider3Component, - Provider4Component, - Provider5Component, - Provider6aComponent, - Provider6bComponent, - Provider7Component, - Provider8Component, - Provider9Component, - Provider10Component, - ProvidersComponent, -} from './providers.component'; - -@NgModule({ - declarations: [ - Provider1Component, - Provider3Component, - Provider4Component, - Provider5Component, - Provider6aComponent, - Provider6bComponent, - Provider7Component, - Provider8Component, - Provider9Component, - Provider10Component, - ProvidersComponent, - ], - exports: [ ProvidersComponent ] - }) - export class ProvidersModule {} diff --git a/aio/content/examples/dependency-injection/src/app/test.component.ts b/aio/content/examples/dependency-injection/src/app/test.component.ts deleted file mode 100755 index 4d243e2ac8d..00000000000 --- a/aio/content/examples/dependency-injection/src/app/test.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -// Simulate a simple test -// Reader should look to the testing chapter for the real thing - -import { Component } from '@angular/core'; - -import { Hero } from './heroes/hero'; -import { HeroService } from './heroes/hero.service'; -import { HeroListComponent } from './heroes/hero-list.component'; - -@Component({ - standalone: true, - selector: 'app-tests', - template: ` -

    Tests

    -

    Tests {{results.pass}}: {{results.message}}

    - ` -}) -export class TestComponent { - results = runTests(); -} - -///////////////////////////////////// -function runTests() { - - const expectedHeroes = [{name: 'A'}, {name: 'B'}]; - const mockService = {getHeroes: () => expectedHeroes } as HeroService; - - it('should have heroes when HeroListComponent created', () => { - // Pass the mock to the constructor as the Angular injector would - const component = new HeroListComponent(mockService); - expect(component.heroes.length).toEqual(expectedHeroes.length); - }); - - return testResults; -} - -////////////////////////////////// -// Fake Jasmine infrastructure -let testName: string; -let testResults: {pass: string, message: string}; - -function expect(actual: any) { - return { - toEqual: (expected: any) => { - testResults = actual === expected ? - {pass: 'passed', message: testName} : - {pass: 'failed', message: `${testName}; expected ${actual} to equal ${expected}.`}; - } - }; -} - -function it(label: string, test: () => void) { - testName = label; - test(); -} diff --git a/aio/content/examples/dependency-injection/src/app/tree-shaking/app.module.ts b/aio/content/examples/dependency-injection/src/app/tree-shaking/app.module.ts deleted file mode 100644 index a42ee57bfc3..00000000000 --- a/aio/content/examples/dependency-injection/src/app/tree-shaking/app.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; -import { ServiceModule } from './service-and-module'; - -// #docregion -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forRoot([]), - ServiceModule, - ], -}) -export class AppModule { -} diff --git a/aio/content/examples/dependency-injection/src/app/tree-shaking/service-and-module.ts b/aio/content/examples/dependency-injection/src/app/tree-shaking/service-and-module.ts deleted file mode 100644 index 11100e3ffe9..00000000000 --- a/aio/content/examples/dependency-injection/src/app/tree-shaking/service-and-module.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Injectable, NgModule } from '@angular/core'; - -@Injectable() -export class Service { - doSomething(): void { - } -} - -@NgModule({ - providers: [Service], -}) -export class ServiceModule { -} diff --git a/aio/content/examples/dependency-injection/src/app/tree-shaking/service.0.ts b/aio/content/examples/dependency-injection/src/app/tree-shaking/service.0.ts deleted file mode 100644 index 50607d7375a..00000000000 --- a/aio/content/examples/dependency-injection/src/app/tree-shaking/service.0.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Injectable } from '@angular/core'; - -// #docregion -@Injectable({ - providedIn: 'root', - useFactory: () => new Service('dependency'), -}) -export class Service { - constructor(private dep: string) { - } -} diff --git a/aio/content/examples/dependency-injection/src/app/tree-shaking/service.ts b/aio/content/examples/dependency-injection/src/app/tree-shaking/service.ts deleted file mode 100644 index 2013120432e..00000000000 --- a/aio/content/examples/dependency-injection/src/app/tree-shaking/service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@angular/core'; - -// #docregion -@Injectable({ - providedIn: 'root', -}) -export class Service { -} diff --git a/aio/content/examples/dependency-injection/src/app/user.service.ts b/aio/content/examples/dependency-injection/src/app/user.service.ts deleted file mode 100644 index 35de8c92da8..00000000000 --- a/aio/content/examples/dependency-injection/src/app/user.service.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -export class User { - constructor( - public name: string, - public isAuthorized = false) { } -} - -// TODO: get the user; don't 'new' it. -const alice = new User('Alice', true); -const bob = new User('Bob', false); - -@Injectable({ - providedIn: 'root' -}) -export class UserService { - user = bob; // initial user is Bob - - // swap users - getNewUser() { - return this.user = this.user === bob ? alice : bob; - } -} diff --git a/aio/content/examples/dependency-injection/src/index.html b/aio/content/examples/dependency-injection/src/index.html deleted file mode 100644 index 4736378237d..00000000000 --- a/aio/content/examples/dependency-injection/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Dependency Injection - - - - - - - - - - diff --git a/aio/content/examples/dependency-injection/src/main.ts b/aio/content/examples/dependency-injection/src/main.ts deleted file mode 100755 index a964b873df0..00000000000 --- a/aio/content/examples/dependency-injection/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfig from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/dependency-injection/stackblitz.json b/aio/content/examples/dependency-injection/stackblitz.json deleted file mode 100644 index bb9b63d3087..00000000000 --- a/aio/content/examples/dependency-injection/stackblitz.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Dependency Injection", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0,1,2,3,4].*", - "!**/dummy.module.ts" - ], - "file": "src/app/app.component.ts", - "tags": ["dependency", "di"] -} diff --git a/aio/content/examples/deprecation-guide/BUILD.bazel b/aio/content/examples/deprecation-guide/BUILD.bazel deleted file mode 100644 index 12024c5fb7d..00000000000 --- a/aio/content/examples/deprecation-guide/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "deprecation-guide", -) diff --git a/aio/content/examples/deprecation-guide/e2e/src/app.e2e-spec.ts b/aio/content/examples/deprecation-guide/e2e/src/app.e2e-spec.ts deleted file mode 100644 index bd99243f892..00000000000 --- a/aio/content/examples/deprecation-guide/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { AppPage } from './app.po'; -import { browser, logging } from 'protractor'; - -describe('workspace-project App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - // Add your e2e tests here - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/deprecation-guide/example-config.json b/aio/content/examples/deprecation-guide/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/deprecation-guide/src/app/app.component.html b/aio/content/examples/deprecation-guide/src/app/app.component.html deleted file mode 100644 index ea3ac7a8e92..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/app.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    Deprecation

    - - - - - - - - diff --git a/aio/content/examples/deprecation-guide/src/app/app.component.ts b/aio/content/examples/deprecation-guide/src/app/app.component.ts deleted file mode 100644 index 15d8f7218e6..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/app.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docplaster -import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { NgFor } from '@angular/common'; -import { - FormsModule, - FormControl, -} from '@angular/forms'; -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ FormsModule, NgFor ] -}) -export class AppComponent implements OnInit { - title = 'example'; - value = 'initial value'; - control: FormControl = new FormControl(''); - options = [ - 'repeat-value' - ]; - - // #docregion template-with-input - @Input() tpl !: TemplateRef; - @ContentChild(TemplateRef) inlineTemplate !: TemplateRef; - // #enddocregion template-with-input - - ngOnInit() { - // #docregion template-driven-form-example - - this.value = 'some value'; - - // #enddocregion template-driven-form-example - this.setValue(); - } - - setValue(): void { - // #docregion reactive-form-example - - this.control.setValue('some value'); - - // #enddocregion reactive-form-example - } -} diff --git a/aio/content/examples/deprecation-guide/src/app/app.config.ts b/aio/content/examples/deprecation-guide/src/app/app.config.ts deleted file mode 100644 index baf55bcb2f8..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/app.config.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideRouter } from '@angular/router'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { routes } from './app.routes'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideRouter(routes), - provideProtractorTestingSupport(), // essential for e2e testing - ], -}; diff --git a/aio/content/examples/deprecation-guide/src/app/app.routes.ts b/aio/content/examples/deprecation-guide/src/app/app.routes.ts deleted file mode 100644 index 53cf98e87c9..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/app.routes.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Routes } from '@angular/router'; - -export const routes: Routes = [{ - path: 'lazy', - loadComponent: () => import('./lazy/lazy.component').then(m => m.LazyComponent) - // If you want to use loadChildren for a child route tree, you can do this: - // loadChildren: () => import('./lazy/lazy.routes') -}]; diff --git a/aio/content/examples/deprecation-guide/src/app/lazy/lazy.component.ts b/aio/content/examples/deprecation-guide/src/app/lazy/lazy.component.ts deleted file mode 100644 index 1665ed58fb2..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/lazy/lazy.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-lazy', - template: `

    lazy works!

    ` -}) -export class LazyComponent {} diff --git a/aio/content/examples/deprecation-guide/src/app/lazy/lazy.routes.ts b/aio/content/examples/deprecation-guide/src/app/lazy/lazy.routes.ts deleted file mode 100644 index ef17f3b8b72..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/lazy/lazy.routes.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Route } from '@angular/router'; -import { LazyComponent } from './lazy.component'; - -export default [ - { path: '*', component: LazyComponent }, - // ... more child routes ... -] as Route[]; diff --git a/aio/content/examples/deprecation-guide/src/app/submit-button.component.ts b/aio/content/examples/deprecation-guide/src/app/submit-button.component.ts deleted file mode 100644 index 38c94d89826..00000000000 --- a/aio/content/examples/deprecation-guide/src/app/submit-button.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -// #docplaster -import { Component, Input } from '@angular/core'; -// #docregion submitButton, submitButtonNarrow -@Component({ -// #enddocregion submitButton, submitButtonNarrow - standalone: true, - selector: 'app-submit-button', - template: `

    submit-button works!

    ` - // #docregion submitButton, submitButtonNarrow -}) -export class SubmitButtonComponent { -// #enddocregion submitButtonNarrow - private disabledValue = false; - - @Input() - get disabled(): boolean { - return this.disabledValue; - } - - set disabled(value: boolean|'') { - this.disabledValue = (value === '') || value; - } -} -// #enddocregion submitButton -@Component({ - standalone: true, - selector: 'app-submit-button-valid', - template: `

    submit-button works!

    ` -}) -export class SubmitButtonValidComponent { - - // #docregion submitButtonNarrow - static ngAcceptInputType_disabled: boolean|''; - - private disabledValue = false; - - @Input() - get disabled(): boolean { - return this.disabledValue; - } - // #enddocregion submitButtonNarrow - /* - // #docregion submitButtonNarrow - set disabled(value: boolean) { - this.disabledValue = (value === '') || value; - } - // #enddocregion submitButtonNarrow - */ - // #docregion submitButtonNarrow -} -// #enddocregion submitButtonNarrow diff --git a/aio/content/examples/deprecation-guide/src/deprecated/app.component.html b/aio/content/examples/deprecation-guide/src/deprecated/app.component.html deleted file mode 100644 index f55801106fa..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/app.component.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/aio/content/examples/deprecation-guide/src/deprecated/app.component.ts b/aio/content/examples/deprecation-guide/src/deprecated/app.component.ts deleted file mode 100644 index 526f739e581..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/app.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #docplaster -import { Component, ContentChild, Input, OnInit, TemplateRef } from '@angular/core'; -import { - FormControl, -} from '@angular/forms'; -@Component({ - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent implements OnInit { - title = 'example'; - value = 'initial value'; - control: FormControl = new FormControl(''); - options = [ - 'repeat-value' - ]; - - /* - // #docregion template-with-input-deprecated - @Input() @ContentChild(TemplateRef) tpldeprecated !: TemplateRef; - // #enddocregion template-with-input-deprecated - */ - - @Input() tpl !: TemplateRef; - @ContentChild(TemplateRef) inlineTemplate !: TemplateRef; - - ngOnInit() { - // #docregion deprecated-example - - this.value = 'some value'; - - // #enddocregion deprecated-example - this.setValue(); - } - - setValue(): void { - this.control.setValue('some value'); - } -} diff --git a/aio/content/examples/deprecation-guide/src/deprecated/app.module.ts b/aio/content/examples/deprecation-guide/src/deprecated/app.module.ts deleted file mode 100644 index f8dee6f8836..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/app.module.ts +++ /dev/null @@ -1,75 +0,0 @@ -// #docplaster -import { BrowserModule } from '@angular/platform-browser'; -import { ModuleWithProviders, NgModule } from '@angular/core'; - -import { AppComponent } from '../app/app.component'; -import { FormsModule, ReactiveFormsModule } from '@angular/forms'; -import { RouterModule, Routes } from '@angular/router'; -import { SubmitButtonComponent } from '../app/submit-button.component'; - -// #docregion lazyload-syntax, lazyload-deprecated-syntax -const routes: Routes = [{ - path: 'lazy', - // #enddocregion lazyload-deprecated-syntax - // The new import() syntax - loadChildren: () => import('../app/lazy/lazy.module').then(m => m.LazyModule) - // #enddocregion lazyload-syntax - /* - // #docregion lazyload-deprecated-syntax - // The following string syntax for loadChildren is deprecated - loadChildren: './lazy/lazy.module#LazyModule', - // #enddocregion lazyload-deprecated-syntax - */ - // #docregion lazyload-syntax, lazyload-deprecated-syntax - }]; - // #enddocregion lazyload-syntax, lazyload-deprecated-syntax - -@NgModule({ - declarations: [ - AppComponent, - SubmitButtonComponent - ], - // #docregion reactive-form-no-warning - imports: [ - // #enddocregion reactive-form-no-warning - FormsModule, - BrowserModule, - // #docregion reactive-form-no-warning - ReactiveFormsModule.withConfig({warnOnNgModelWithFormControl: 'never'}) - ], - // #enddocregion reactive-form-no-warning - providers: [], - bootstrap: [AppComponent], - exports: [RouterModule] -}) -export class AppModule { } - -class SomeModule { } -class SomeConfig { } - -// #docplaster ... -// #docregion ModuleWithProvidersGeneric, ModuleWithProvidersNonGeneric -@NgModule({ -// #enddocregion ModuleWithProvidersGeneric, ModuleWithProvidersNonGeneric -// #docregion ModuleWithProvidersGeneric, ModuleWithProvidersNonGeneric -}) -// #docplaster -export class MyModule { - // #enddocregion ModuleWithProvidersGeneric, ModuleWithProvidersNonGeneric - /* - // #docregion ModuleWithProvidersNonGeneric - static forRoot(config: SomeConfig): ModuleWithProviders { - // #enddocregion ModuleWithProvidersNonGeneric - */ - // #docregion ModuleWithProvidersGeneric - static forRoot(config: SomeConfig): ModuleWithProviders { - // #docregion ModuleWithProvidersNonGeneric - return { - ngModule: SomeModule, - providers: [ - {provide: SomeConfig, useValue: config} - ] - }; - } -} -// #enddocregion ModuleWithProvidersGeneric, ModuleWithProvidersNonGeneric diff --git a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy-routing.module.ts b/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy-routing.module.ts deleted file mode 100644 index 82ac2c093ee..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy-routing.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -const routes: Routes = []; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class LazyRoutingModule { } diff --git a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.component.ts b/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.component.ts deleted file mode 100644 index f3835b8a702..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-lazy', - template: `

    lazy works!

    ` -}) -export class LazyComponent {} diff --git a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.module.ts b/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.module.ts deleted file mode 100644 index ddd25eeaf5c..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/lazy/lazy.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { LazyRoutingModule } from './lazy-routing.module'; -import { LazyComponent } from './lazy.component'; - -@NgModule({ - declarations: [ - LazyComponent - ], - imports: [ - CommonModule, - LazyRoutingModule - ] -}) -export class LazyModule { } diff --git a/aio/content/examples/deprecation-guide/src/deprecated/readme.md b/aio/content/examples/deprecation-guide/src/deprecated/readme.md deleted file mode 100644 index 8660310adb6..00000000000 --- a/aio/content/examples/deprecation-guide/src/deprecated/readme.md +++ /dev/null @@ -1,2 +0,0 @@ -This `deprecated` directory holds examples of deprecated code reference in the docs, -all of them for an app built with NgModules. \ No newline at end of file diff --git a/aio/content/examples/deprecation-guide/src/index.html b/aio/content/examples/deprecation-guide/src/index.html deleted file mode 100644 index 9a54a12cd4d..00000000000 --- a/aio/content/examples/deprecation-guide/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Ponyracer - - - - - - - - diff --git a/aio/content/examples/deprecation-guide/src/main.ts b/aio/content/examples/deprecation-guide/src/main.ts deleted file mode 100644 index b22b12f3184..00000000000 --- a/aio/content/examples/deprecation-guide/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/deprecation-guide/stackblitz.json b/aio/content/examples/deprecation-guide/stackblitz.json deleted file mode 100644 index 62bca317a49..00000000000 --- a/aio/content/examples/deprecation-guide/stackblitz.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "description": "Deprecation Guide", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "deprecation", - "guide" - ] - ] -} diff --git a/aio/content/examples/docs-style-guide/BUILD.bazel b/aio/content/examples/docs-style-guide/BUILD.bazel deleted file mode 100644 index 785faad49d1..00000000000 --- a/aio/content/examples/docs-style-guide/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "docs-style-guide", -) diff --git a/aio/content/examples/docs-style-guide/e2e/src/app.e2e-spec.ts b/aio/content/examples/docs-style-guide/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 05f5e145a09..00000000000 --- a/aio/content/examples/docs-style-guide/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Docs Style Guide', () => { - const title = 'Authors Style Guide Sample'; - - beforeAll(() => browser.get('')); - - it(`should display correct title: ${title}`, async () => { - expect(await element(by.css('h1')).getText()).toEqual(title); - }); -}); diff --git a/aio/content/examples/docs-style-guide/example-config.json b/aio/content/examples/docs-style-guide/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/docs-style-guide/package.1.json b/aio/content/examples/docs-style-guide/package.1.json deleted file mode 100644 index 8e5d6c6ec31..00000000000 --- a/aio/content/examples/docs-style-guide/package.1.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "scripts": { - "start": "concurrently \"npm run build:watch\" \"npm run serve\"", - "test": "concurrently \"npm run build:watch\" \"karma start karma.conf.js\"", - "lint": "tslint ./src/**/*.ts -t verbose" - } -} diff --git a/aio/content/examples/docs-style-guide/second.stackblitz.json b/aio/content/examples/docs-style-guide/second.stackblitz.json deleted file mode 100644 index 8018275451e..00000000000 --- a/aio/content/examples/docs-style-guide/second.stackblitz.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Second authors style guide stackblitz (non-executing)", - "files": [ - "src/main.2.ts", - "src/index.2.html", - "src/styles.css" - ], - "main": "src/index.2.html", - "file": "src/index.html", - "tags": ["author", "style guide"] -} diff --git a/aio/content/examples/docs-style-guide/src/app/app.component.css b/aio/content/examples/docs-style-guide/src/app/app.component.css deleted file mode 100644 index ef802dbff6c..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/app.component.css +++ /dev/null @@ -1,73 +0,0 @@ -/* #docregion heroes */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} -/* #enddocregion heroes */ - -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} -.heroes li { - display: flex; -} - -.heroes button { - flex: 1; - cursor: pointer; - position: relative; - left: 0; - background-color: #EEE; - margin: .5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; - height: 1.8em; -} - -.heroes button:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: .1em; -} - -.heroes button:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.selected { - background-color: black; - color: white; -} - -.heroes button.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - align-self: center; -} diff --git a/aio/content/examples/docs-style-guide/src/app/app.component.html b/aio/content/examples/docs-style-guide/src/app/app.component.html deleted file mode 100644 index 010b20a92ed..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/app.component.html +++ /dev/null @@ -1,19 +0,0 @@ -

    {{title}}

    -

    My Heroes

    -
      -
    • - -
    • -
    -
    -

    {{selectedHero.name}} details!

    -
    id: {{selectedHero.id}}
    -
    - -
    -
    diff --git a/aio/content/examples/docs-style-guide/src/app/app.component.ts b/aio/content/examples/docs-style-guide/src/app/app.component.ts deleted file mode 100644 index 731aa52fb79..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/app.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { Hero, HEROES } from './hero'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -// #docregion class, class-skeleton -export class AppComponent { -// #enddocregion class-skeleton - title = 'Authors Style Guide Sample'; - heroes = HEROES; - selectedHero!: Hero; - - onSelect(hero: Hero): void { - this.selectedHero = hero; - } -// #docregion class-skeleton -} -// #enddocregion class, class-skeleton diff --git a/aio/content/examples/docs-style-guide/src/app/app.module.ts b/aio/content/examples/docs-style-guide/src/app/app.module.ts deleted file mode 100644 index 1297f02c478..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/app.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; - -// #docregion class -@NgModule({ - imports: [ BrowserModule, FormsModule ], - declarations: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -// #enddocregion class diff --git a/aio/content/examples/docs-style-guide/src/app/hero.ts b/aio/content/examples/docs-style-guide/src/app/hero.ts deleted file mode 100644 index 290a9d8a597..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/hero.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface Hero { - id: number; - name: string; -} - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' } -]; diff --git a/aio/content/examples/docs-style-guide/src/app/not-great.component.ts b/aio/content/examples/docs-style-guide/src/app/not-great.component.ts deleted file mode 100644 index 64f4f264921..00000000000 --- a/aio/content/examples/docs-style-guide/src/app/not-great.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-not-great', -}) -// #docregion not-great -export class NotGreatComponent { - - buggyFunction() { - // things could be better here... - } -} -// #enddocregion not-great diff --git a/aio/content/examples/docs-style-guide/src/index.2.html b/aio/content/examples/docs-style-guide/src/index.2.html deleted file mode 100644 index a85f58e57e5..00000000000 --- a/aio/content/examples/docs-style-guide/src/index.2.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - Second Authors Style Guide - - -

    Second Authors Style Guide

    -

    Placeholder. Does nothing at all.

    - - diff --git a/aio/content/examples/docs-style-guide/src/index.html b/aio/content/examples/docs-style-guide/src/index.html deleted file mode 100644 index 2705e7ee968..00000000000 --- a/aio/content/examples/docs-style-guide/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Docs Style Guide - - - - - - - - - - diff --git a/aio/content/examples/docs-style-guide/src/main.2.ts b/aio/content/examples/docs-style-guide/src/main.2.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/docs-style-guide/src/main.ts b/aio/content/examples/docs-style-guide/src/main.ts deleted file mode 100644 index 49432aa0877..00000000000 --- a/aio/content/examples/docs-style-guide/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/docs-style-guide/stackblitz.json b/aio/content/examples/docs-style-guide/stackblitz.json deleted file mode 100644 index f19943ee1ee..00000000000 --- a/aio/content/examples/docs-style-guide/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Authors style guide", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2,3].*" - ], - "tags": ["author", "style guide"] -} diff --git a/aio/content/examples/dynamic-component-loader/BUILD.bazel b/aio/content/examples/dynamic-component-loader/BUILD.bazel deleted file mode 100644 index 15f5e5f9eff..00000000000 --- a/aio/content/examples/dynamic-component-loader/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "dynamic-component-loader", -) diff --git a/aio/content/examples/dynamic-component-loader/e2e/src/app.e2e-spec.ts b/aio/content/examples/dynamic-component-loader/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 7b2af5be1a7..00000000000 --- a/aio/content/examples/dynamic-component-loader/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Dynamic Component Loader', () => { - - // The tests trigger periodic asynchronous operations (via `setInterval()`), which will prevent - // the app from stabilizing. See https://angular.io/api/core/ApplicationRef#is-stable-examples - // for more details. - // To allow the tests to complete, we will disable automatically waiting for the Angular app to - // stabilize. - beforeAll(() => browser.waitForAngularEnabled(false)); - afterAll(() => browser.waitForAngularEnabled(true)); - - beforeEach(() => browser.get('')); - - it('should load ad banner', async () => { - const headline = element(by.cssContainingText('h3', 'Featured Hero Profile')); - - expect(await headline.isPresent()).toBe(true); - }); -}); diff --git a/aio/content/examples/dynamic-component-loader/example-config.json b/aio/content/examples/dynamic-component-loader/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts b/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts deleted file mode 100644 index 0d95cb25f46..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/app/ad-banner.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -// #docregion -import { Component, inject } from '@angular/core'; -import { AsyncPipe, NgComponentOutlet } from '@angular/common'; - -import { AdService } from './ad.service'; - -// #docregion component -@Component({ - selector: 'app-ad-banner', - standalone: true, - imports: [NgComponentOutlet, AsyncPipe], - template: ` -
    -

    Advertisements

    - - -
    - ` -}) -export class AdBannerComponent { - private adList = inject(AdService).getAds(); - - private currentAdIndex = 0; - - get currentAd() { - return this.adList[this.currentAdIndex]; - } - - displayNextAd() { - this.currentAdIndex++; - // Reset the current ad index back to `0` when we reach the end of an array. - if (this.currentAdIndex === this.adList.length) { - this.currentAdIndex = 0; - } - } -} -// #enddocregion component diff --git a/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts b/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts deleted file mode 100644 index 13cd6fcf330..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/app/ad.service.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docregion -import { Injectable, Type } from '@angular/core'; -import { HeroProfileComponent } from './hero-profile.component'; -import { HeroJobAdComponent } from './hero-job-ad.component'; - -@Injectable({ providedIn: 'root' }) -export class AdService { - getAds() { - return [ - { - component: HeroProfileComponent, - inputs: { name: 'Dr. IQ', bio: 'Smart as they come' }, - }, - { - component: HeroProfileComponent, - inputs: { name: 'Bombasto', bio: 'Brave as they come' }, - }, - { - component: HeroJobAdComponent, - inputs: { - headline: 'Hiring for several positions', - body: 'Submit your resume today!', - }, - }, - { - component: HeroJobAdComponent, - inputs: { - headline: 'Openings in all departments', - body: 'Apply today', - }, - }, - ] as {component: Type, inputs: Record}[]; - } -} diff --git a/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts b/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts deleted file mode 100644 index ec60b71e727..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/app/hero-job-ad.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable @angular-eslint/no-input-rename */ -// #docregion -import { Component, Input } from '@angular/core'; - -@Component({ - standalone: true, - template: ` -
    -

    {{ headline }}

    - {{ body }} -
    - `, -}) -export class HeroJobAdComponent { - @Input() headline!: string; - @Input() body!: string; -} diff --git a/aio/content/examples/dynamic-component-loader/src/app/hero-profile.component.ts b/aio/content/examples/dynamic-component-loader/src/app/hero-profile.component.ts deleted file mode 100644 index 76fa6da5519..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/app/hero-profile.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable @angular-eslint/no-input-rename */ -// #docregion -import { Component, Input } from '@angular/core'; - -@Component({ - standalone: true, - template: ` -
    -

    Featured Hero Profile

    -

    {{ name }}

    -

    {{ bio }}

    - Hire this hero today! -
    - `, -}) -export class HeroProfileComponent { - @Input() name!: string; - @Input() bio!: string; -} diff --git a/aio/content/examples/dynamic-component-loader/src/assets/sample.css b/aio/content/examples/dynamic-component-loader/src/assets/sample.css deleted file mode 100644 index 5cec6041fce..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/assets/sample.css +++ /dev/null @@ -1,23 +0,0 @@ -.hero-profile { - border: 1px solid gray; - padding: 5px; - padding-bottom: 20px; - padding-left: 20px; - border-radius: 10px; - background-color: lightgreen; - color: black; -} - -.job-ad { - border: 1px solid gray; - padding: 5px; - padding-bottom: 20px; - padding-left: 20px; - border-radius: 10px; - background-color: lightblue; - color: black; -} - -.ad-banner-example { - width: 400px; -} \ No newline at end of file diff --git a/aio/content/examples/dynamic-component-loader/src/index.html b/aio/content/examples/dynamic-component-loader/src/index.html deleted file mode 100644 index 026b17eafb7..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Dynamic Component Loader - - - - - - - - diff --git a/aio/content/examples/dynamic-component-loader/src/main.ts b/aio/content/examples/dynamic-component-loader/src/main.ts deleted file mode 100644 index 6996e76ba45..00000000000 --- a/aio/content/examples/dynamic-component-loader/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -import { bootstrapApplication } from '@angular/platform-browser'; -import { AdBannerComponent } from './app/ad-banner.component'; - -bootstrapApplication(AdBannerComponent); diff --git a/aio/content/examples/dynamic-component-loader/stackblitz.json b/aio/content/examples/dynamic-component-loader/stackblitz.json deleted file mode 100644 index 1c0f0298d8e..00000000000 --- a/aio/content/examples/dynamic-component-loader/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Dynamic Component Loader", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "file": "src/app/ad-banner.component.ts", - "tags":["cookbook component"] -} diff --git a/aio/content/examples/dynamic-form/BUILD.bazel b/aio/content/examples/dynamic-form/BUILD.bazel deleted file mode 100644 index 68e9f81abd9..00000000000 --- a/aio/content/examples/dynamic-form/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "dynamic-form", -) diff --git a/aio/content/examples/dynamic-form/e2e/src/app.e2e-spec.ts b/aio/content/examples/dynamic-form/e2e/src/app.e2e-spec.ts deleted file mode 100644 index a1863426292..00000000000 --- a/aio/content/examples/dynamic-form/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Dynamic Form', () => { - - beforeAll(() => browser.get('')); - - it('should submit form', async () => { - const firstNameElement = element.all(by.css('input[id=firstName]')).get(0); - expect(await firstNameElement.getAttribute('value')).toEqual('Bombasto'); - - const emailElement = element.all(by.css('input[id=emailAddress]')).get(0); - const email = 'test@test.com'; - await emailElement.sendKeys(email); - expect(await emailElement.getAttribute('value')).toEqual(email); - - await element(by.css('select option[value="solid"]')).click(); - await element.all(by.css('button')).get(0).click(); - expect(await element(by.cssContainingText('strong', 'Saved the following values')).isPresent()).toBe(true); - }); - -}); diff --git a/aio/content/examples/dynamic-form/example-config.json b/aio/content/examples/dynamic-form/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/dynamic-form/src/app/app.component.ts b/aio/content/examples/dynamic-form/src/app/app.component.ts deleted file mode 100644 index 68a62edb880..00000000000 --- a/aio/content/examples/dynamic-form/src/app/app.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -import {AsyncPipe} from '@angular/common'; - -import {DynamicFormComponent} from './dynamic-form.component'; - -import {QuestionService} from './question.service'; -import {QuestionBase} from './question-base'; -import {Observable} from 'rxjs'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -
    -

    Job Application for Heroes

    - -
    - `, - providers: [QuestionService], - imports: [AsyncPipe, DynamicFormComponent], -}) -export class AppComponent { - questions$: Observable[]>; - - constructor(service: QuestionService) { - this.questions$ = service.getQuestions(); - } -} diff --git a/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.html b/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.html deleted file mode 100644 index e9ae3c84462..00000000000 --- a/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.html +++ /dev/null @@ -1,17 +0,0 @@ - -
    - - -
    - - - - - -
    - -
    {{question.label}} is required
    -
    diff --git a/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.ts b/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.ts deleted file mode 100644 index 17f3770b288..00000000000 --- a/aio/content/examples/dynamic-form/src/app/dynamic-form-question.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docregion -import {Component, Input} from '@angular/core'; -import {FormGroup, ReactiveFormsModule} from '@angular/forms'; -import {CommonModule} from '@angular/common'; - -import {QuestionBase} from './question-base'; - -@Component({ - standalone: true, - selector: 'app-question', - templateUrl: './dynamic-form-question.component.html', - imports: [CommonModule, ReactiveFormsModule], -}) -export class DynamicFormQuestionComponent { - @Input() question!: QuestionBase; - @Input() form!: FormGroup; - get isValid() { - return this.form.controls[this.question.key].valid; - } -} diff --git a/aio/content/examples/dynamic-form/src/app/dynamic-form.component.html b/aio/content/examples/dynamic-form/src/app/dynamic-form.component.html deleted file mode 100644 index 33c8f0bb512..00000000000 --- a/aio/content/examples/dynamic-form/src/app/dynamic-form.component.html +++ /dev/null @@ -1,17 +0,0 @@ - -
    -
    - -
    - -
    - -
    - -
    -
    - -
    - Saved the following values
    {{payLoad}} -
    -
    diff --git a/aio/content/examples/dynamic-form/src/app/dynamic-form.component.ts b/aio/content/examples/dynamic-form/src/app/dynamic-form.component.ts deleted file mode 100644 index f12b94853bc..00000000000 --- a/aio/content/examples/dynamic-form/src/app/dynamic-form.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -// #docregion -import {Component, Input, OnInit} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormGroup, ReactiveFormsModule} from '@angular/forms'; - -import {DynamicFormQuestionComponent} from './dynamic-form-question.component'; - -import {QuestionBase} from './question-base'; -import {QuestionControlService} from './question-control.service'; - -@Component({ - standalone: true, - selector: 'app-dynamic-form', - templateUrl: './dynamic-form.component.html', - providers: [QuestionControlService], - imports: [CommonModule, DynamicFormQuestionComponent, ReactiveFormsModule], -}) -export class DynamicFormComponent implements OnInit { - @Input() questions: QuestionBase[] | null = []; - form!: FormGroup; - payLoad = ''; - - constructor(private qcs: QuestionControlService) {} - - ngOnInit() { - this.form = this.qcs.toFormGroup(this.questions as QuestionBase[]); - } - - onSubmit() { - this.payLoad = JSON.stringify(this.form.getRawValue()); - } -} diff --git a/aio/content/examples/dynamic-form/src/app/question-base.ts b/aio/content/examples/dynamic-form/src/app/question-base.ts deleted file mode 100644 index 009355819ee..00000000000 --- a/aio/content/examples/dynamic-form/src/app/question-base.ts +++ /dev/null @@ -1,31 +0,0 @@ -// #docregion -export class QuestionBase { - value: T|undefined; - key: string; - label: string; - required: boolean; - order: number; - controlType: string; - type: string; - options: {key: string, value: string}[]; - - constructor(options: { - value?: T; - key?: string; - label?: string; - required?: boolean; - order?: number; - controlType?: string; - type?: string; - options?: {key: string, value: string}[]; - } = {}) { - this.value = options.value; - this.key = options.key || ''; - this.label = options.label || ''; - this.required = !!options.required; - this.order = options.order === undefined ? 1 : options.order; - this.controlType = options.controlType || ''; - this.type = options.type || ''; - this.options = options.options || []; - } -} diff --git a/aio/content/examples/dynamic-form/src/app/question-control.service.ts b/aio/content/examples/dynamic-form/src/app/question-control.service.ts deleted file mode 100644 index 458b1adee69..00000000000 --- a/aio/content/examples/dynamic-form/src/app/question-control.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { FormControl, FormGroup, Validators } from '@angular/forms'; - -import { QuestionBase } from './question-base'; - -@Injectable() -export class QuestionControlService { - toFormGroup(questions: QuestionBase[] ) { - const group: any = {}; - - questions.forEach(question => { - group[question.key] = question.required ? new FormControl(question.value || '', Validators.required) - : new FormControl(question.value || ''); - }); - return new FormGroup(group); - } -} diff --git a/aio/content/examples/dynamic-form/src/app/question-dropdown.ts b/aio/content/examples/dynamic-form/src/app/question-dropdown.ts deleted file mode 100644 index 661de379e93..00000000000 --- a/aio/content/examples/dynamic-form/src/app/question-dropdown.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { QuestionBase } from './question-base'; - -export class DropdownQuestion extends QuestionBase { - override controlType = 'dropdown'; -} diff --git a/aio/content/examples/dynamic-form/src/app/question-textbox.ts b/aio/content/examples/dynamic-form/src/app/question-textbox.ts deleted file mode 100644 index 2cd3669a887..00000000000 --- a/aio/content/examples/dynamic-form/src/app/question-textbox.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { QuestionBase } from './question-base'; - -export class TextboxQuestion extends QuestionBase { - override controlType = 'textbox'; -} diff --git a/aio/content/examples/dynamic-form/src/app/question.service.ts b/aio/content/examples/dynamic-form/src/app/question.service.ts deleted file mode 100644 index e5dcf0edbee..00000000000 --- a/aio/content/examples/dynamic-form/src/app/question.service.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { DropdownQuestion } from './question-dropdown'; -import { QuestionBase } from './question-base'; -import { TextboxQuestion } from './question-textbox'; -import { of } from 'rxjs'; - -@Injectable() -export class QuestionService { - - // TODO: get from a remote source of question metadata - getQuestions() { - - const questions: QuestionBase[] = [ - - new DropdownQuestion({ - key: 'brave', - label: 'Bravery Rating', - options: [ - {key: 'solid', value: 'Solid'}, - {key: 'great', value: 'Great'}, - {key: 'good', value: 'Good'}, - {key: 'unproven', value: 'Unproven'} - ], - order: 3 - }), - - new TextboxQuestion({ - key: 'firstName', - label: 'First name', - value: 'Bombasto', - required: true, - order: 1 - }), - - new TextboxQuestion({ - key: 'emailAddress', - label: 'Email', - type: 'email', - order: 2 - }) - ]; - - return of(questions.sort((a, b) => a.order - b.order)); - } -} diff --git a/aio/content/examples/dynamic-form/src/assets/sample.css b/aio/content/examples/dynamic-form/src/assets/sample.css deleted file mode 100644 index fe2cc284813..00000000000 --- a/aio/content/examples/dynamic-form/src/assets/sample.css +++ /dev/null @@ -1,7 +0,0 @@ -.errorMessage{ - color:red; -} - -.form-row{ - margin-top: 10px; -} \ No newline at end of file diff --git a/aio/content/examples/dynamic-form/src/index.html b/aio/content/examples/dynamic-form/src/index.html deleted file mode 100644 index 20688f24057..00000000000 --- a/aio/content/examples/dynamic-form/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Dynamic Form - - - - - - - - diff --git a/aio/content/examples/dynamic-form/src/main.ts b/aio/content/examples/dynamic-form/src/main.ts deleted file mode 100644 index 3e5e6757a25..00000000000 --- a/aio/content/examples/dynamic-form/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); diff --git a/aio/content/examples/dynamic-form/stackblitz.json b/aio/content/examples/dynamic-form/stackblitz.json deleted file mode 100644 index 19d8f8636ae..00000000000 --- a/aio/content/examples/dynamic-form/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Dynamic Form", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/app.component.ts", - "tags":["cookbook"] -} diff --git a/aio/content/examples/elements/BUILD.bazel b/aio/content/examples/elements/BUILD.bazel deleted file mode 100644 index 190072ee479..00000000000 --- a/aio/content/examples/elements/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "elements", -) diff --git a/aio/content/examples/elements/e2e/src/app.e2e-spec.ts b/aio/content/examples/elements/e2e/src/app.e2e-spec.ts deleted file mode 100644 index e8b25824eb7..00000000000 --- a/aio/content/examples/elements/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { browser, by, element, ElementFinder, ExpectedConditions as EC } from 'protractor'; - -describe('Elements', () => { - const messageInput = element(by.css('input')); - const popupButtons = element.all(by.css('button')); - - // Helpers - const click = async (elem: ElementFinder) => { - // Waiting for the element to be clickable, makes the tests less flaky. - await browser.wait(EC.elementToBeClickable(elem), 5000); - await elem.click(); - }; - const waitForText = async (elem: ElementFinder) => { - // Waiting for the element to have some text, makes the tests less flaky. - await browser.wait(async () => /\S/.test(await elem.getText()), 5000); - }; - - beforeEach(() => browser.get('')); - - describe('popup component', () => { - const popupComponentButton = popupButtons.get(0); - const popupComponent = element(by.css('popup-component')); - const closeButton = popupComponent.element(by.css('button')); - - it('should be displayed on button click', async () => { - expect(await popupComponent.isPresent()).toBe(false); - - await click(popupComponentButton); - expect(await popupComponent.isPresent()).toBe(true); - }); - - it('should display the specified message', async () => { - await messageInput.clear(); - await messageInput.sendKeys('Angular rocks!'); - - await click(popupComponentButton); - await waitForText(popupComponent); - - expect(await popupComponent.getText()).toContain('Popup: Angular rocks!'); - }); - - it('should be closed on "close" button click', async () => { - await click(popupComponentButton); - expect(await popupComponent.isPresent()).toBe(true); - - await click(closeButton); - expect(await popupComponent.isPresent()).toBe(false); - }); - }); - - describe('popup element', () => { - const popupElementButton = popupButtons.get(1); - const popupElement = element(by.css('popup-element')); - const closeButton = popupElement.element(by.css('button')); - - it('should be displayed on button click', async () => { - expect(await popupElement.isPresent()).toBe(false); - - await click(popupElementButton); - expect(await popupElement.isPresent()).toBe(true); - }); - - it('should display the specified message', async () => { - await messageInput.clear(); - await messageInput.sendKeys('Angular rocks!'); - - await click(popupElementButton); - await waitForText(popupElement); - - expect(await popupElement.getText()).toContain('Popup: Angular rocks!'); - }); - - it('should be closed on "close" button click', async () => { - await click(popupElementButton); - expect(await popupElement.isPresent()).toBe(true); - - await click(closeButton); - expect(await popupElement.isPresent()).toBe(false); - }); - }); -}); diff --git a/aio/content/examples/elements/example-config.json b/aio/content/examples/elements/example-config.json deleted file mode 100644 index cc429211738..00000000000 --- a/aio/content/examples/elements/example-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectType": "elements" -} diff --git a/aio/content/examples/elements/src/app/app.component.ts b/aio/content/examples/elements/src/app/app.component.ts deleted file mode 100644 index dec55e1c97d..00000000000 --- a/aio/content/examples/elements/src/app/app.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import {Component, Injector} from '@angular/core'; -import {createCustomElement} from '@angular/elements'; -import {PopupComponent} from './popup.component'; -import {PopupService} from './popup.service'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` - - - - `, - providers: [PopupService], - imports: [PopupComponent], -}) -export class AppComponent { - constructor( - injector: Injector, - public popup: PopupService, - ) { - // Convert `PopupComponent` to a custom element. - const PopupElement = createCustomElement(PopupComponent, {injector}); - // Register the custom element with the browser. - customElements.define('popup-element', PopupElement); - } -} diff --git a/aio/content/examples/elements/src/app/popup.component.ts b/aio/content/examples/elements/src/app/popup.component.ts deleted file mode 100644 index 92a5105e8b0..00000000000 --- a/aio/content/examples/elements/src/app/popup.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -// #docregion -import {Component, EventEmitter, HostBinding, Input, Output} from '@angular/core'; -import {animate, state, style, transition, trigger} from '@angular/animations'; - -@Component({ - standalone: true, - selector: 'my-popup', - template: ` - Popup: {{ message }} - - `, - animations: [ - trigger('state', [ - state('opened', style({transform: 'translateY(0%)'})), - state('void, closed', style({transform: 'translateY(100%)', opacity: 0})), - transition('* => *', animate('100ms ease-in')), - ]), - ], - styles: [ - ` - :host { - position: absolute; - bottom: 0; - left: 0; - right: 0; - background: #009cff; - height: 48px; - padding: 16px; - display: flex; - justify-content: space-between; - align-items: center; - border-top: 1px solid black; - font-size: 24px; - } - - button { - border-radius: 50%; - } - `, - ], -}) -export class PopupComponent { - @HostBinding('@state') - state: 'opened' | 'closed' = 'closed'; - - @Input() - get message(): string { - return this._message; - } - set message(message: string) { - this._message = message; - this.state = 'opened'; - } - private _message = ''; - - @Output() - closed = new EventEmitter(); -} diff --git a/aio/content/examples/elements/src/app/popup.service.ts b/aio/content/examples/elements/src/app/popup.service.ts deleted file mode 100644 index dbc58846bea..00000000000 --- a/aio/content/examples/elements/src/app/popup.service.ts +++ /dev/null @@ -1,56 +0,0 @@ -import {ApplicationRef, createComponent, EnvironmentInjector, Injectable} from '@angular/core'; -import {NgElement, WithProperties} from '@angular/elements'; -import {PopupComponent} from './popup.component'; - -@Injectable() -export class PopupService { - constructor( - private injector: EnvironmentInjector, - private applicationRef: ApplicationRef, - ) {} - - // Previous dynamic-loading method required you to set up infrastructure - // before adding the popup to the DOM. - showAsComponent(message: string) { - // Create element - const popup = document.createElement('popup-component'); - - // Create the component and wire it up with the element - const popupComponentRef = createComponent(PopupComponent, { - environmentInjector: this.injector, - hostElement: popup, - }); - - // Attach to the view so that the change detector knows to run - this.applicationRef.attachView(popupComponentRef.hostView); - - // Listen to the close event - popupComponentRef.instance.closed.subscribe(() => { - document.body.removeChild(popup); - this.applicationRef.detachView(popupComponentRef.hostView); - }); - - // Set the message - popupComponentRef.instance.message = message; - - // Add to the DOM - document.body.appendChild(popup); - } - - // This uses the new custom-element method to add the popup to the DOM. - showAsElement(message: string) { - // Create element - const popupEl: NgElement & WithProperties = document.createElement( - 'popup-element', - ) as any; - - // Listen to the close event - popupEl.addEventListener('closed', () => document.body.removeChild(popupEl)); - - // Set the message - popupEl.message = message; - - // Add to the DOM - document.body.appendChild(popupEl); - } -} diff --git a/aio/content/examples/elements/src/index.html b/aio/content/examples/elements/src/index.html deleted file mode 100644 index e8a1b6e353d..00000000000 --- a/aio/content/examples/elements/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - Elements - - - - - - diff --git a/aio/content/examples/elements/src/main.ts b/aio/content/examples/elements/src/main.ts deleted file mode 100644 index 2314e6c5090..00000000000 --- a/aio/content/examples/elements/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; -import {provideAnimations} from '@angular/platform-browser/animations'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport(), provideAnimations()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/elements/stackblitz.json b/aio/content/examples/elements/stackblitz.json deleted file mode 100644 index 49208b186ae..00000000000 --- a/aio/content/examples/elements/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Angular Elements", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/popup.service.ts", - "tags":["cookbook"] -} diff --git a/aio/content/examples/errors/cyclic-imports/child.component.ts b/aio/content/examples/errors/cyclic-imports/child.component.ts deleted file mode 100644 index eb570571193..00000000000 --- a/aio/content/examples/errors/cyclic-imports/child.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Component} from '@angular/core'; -import {ParentComponent} from './parent.component'; - -@Component({ - standalone: true, - selector: 'app-child', - template: 'The child!', -}) -export class ChildComponent { - constructor(private parent: ParentComponent) {} -} diff --git a/aio/content/examples/errors/cyclic-imports/parent.component.ts b/aio/content/examples/errors/cyclic-imports/parent.component.ts deleted file mode 100644 index d6b4ed2cfcd..00000000000 --- a/aio/content/examples/errors/cyclic-imports/parent.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-parent', - template: '', -}) -export class ParentComponent {} diff --git a/aio/content/examples/event-binding/BUILD.bazel b/aio/content/examples/event-binding/BUILD.bazel deleted file mode 100644 index f55c6cd6e05..00000000000 --- a/aio/content/examples/event-binding/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "event-binding", -) diff --git a/aio/content/examples/event-binding/e2e/src/app.e2e-spec.ts b/aio/content/examples/event-binding/e2e/src/app.e2e-spec.ts deleted file mode 100644 index a5a1dbf5588..00000000000 --- a/aio/content/examples/event-binding/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Event binding example', () => { - - beforeEach(() => browser.get('')); - - const saveButton = element.all(by.css('button')).get(0); - const onSaveButton = element.all(by.css('button')).get(1); - const myClick = element.all(by.css('button')).get(2); - const deleteButton = element.all(by.css('button')).get(3); - const saveNoProp = element.all(by.css('button')).get(4); - const saveProp = element.all(by.css('button')).get(5); - - - it('should display Event Binding with Angular', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Event Binding'); - }); - - it('should display 6 buttons', async () => { - expect(await saveButton.getText()).toBe('Save'); - expect(await onSaveButton.getText()).toBe('on-click Save'); - expect(await myClick.getText()).toBe('click with myClick'); - expect(await deleteButton.getText()).toBe('Delete'); - expect(await saveNoProp.getText()).toBe('Save, no propagation'); - expect(await saveProp.getText()).toBe('Save with propagation'); - }); - - it('should support user input', async () => { - const input = element(by.css('input')); - const bindingResult = element.all(by.css('h4')).get(1); - expect(await bindingResult.getText()).toEqual('Result: teapot'); - await input.sendKeys('abc'); - expect(await bindingResult.getText()).toEqual('Result: teapotabc'); - }); - - it('should hide the item img', async () => { - await deleteButton.click(); - await browser.switchTo().alert().accept(); - expect(await element.all(by.css('img')).get(0).getCssValue('display')).toEqual('none'); - }); - - it('should show two alerts', async () => { - const parentDiv = element.all(by.css('.parent-div')); - const childDiv = element.all(by.css('div > div')).get(1); - await parentDiv.click(); - await browser.switchTo().alert().accept(); - expect(await childDiv.getText()).toEqual('Click me too! (child)'); - await childDiv.click(); - expect(await browser.switchTo().alert().getText()).toEqual('Click me. Event target class is child-div'); - await browser.switchTo().alert().accept(); - }); - - it('should show 1 alert from Save, no prop, button', async () => { - await saveNoProp.click(); - expect(await browser.switchTo().alert().getText()).toEqual('Saved. Event target is Save, no propagation'); - await browser.switchTo().alert().accept(); - }); - - it('should show 2 alerts from Save w/prop button', async () => { - await saveProp.click(); - expect(await browser.switchTo().alert().getText()).toEqual('Saved.'); - await browser.switchTo().alert().accept(); - expect(await browser.switchTo().alert().getText()).toEqual('Saved.'); - await browser.switchTo().alert().accept(); - }); -}); diff --git a/aio/content/examples/event-binding/example-config.json b/aio/content/examples/event-binding/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/event-binding/src/app/app.component.css b/aio/content/examples/event-binding/src/app/app.component.css deleted file mode 100644 index a80480a914c..00000000000 --- a/aio/content/examples/event-binding/src/app/app.component.css +++ /dev/null @@ -1,25 +0,0 @@ -.group { - background-color: #dae8f9; - padding: 1rem; - margin: 1rem 0; -} - -.parent-div { - background-color: #bdd1f7; - border: solid 1px rgb(25, 118, 210); - padding: 1rem; -} - -.parent-div:hover { - background-color: #8fb4f9; -} - -.child-div { - margin-top: 1rem; - background-color: #fff; - padding: 1rem; -} - -.child-div:hover { - background-color: #eee; -} diff --git a/aio/content/examples/event-binding/src/app/app.component.html b/aio/content/examples/event-binding/src/app/app.component.html deleted file mode 100644 index ed3e816db2c..00000000000 --- a/aio/content/examples/event-binding/src/app/app.component.html +++ /dev/null @@ -1,51 +0,0 @@ -

    Event Binding

    - -
    -

    Target event

    - - - - - -

    myClick is an event on the custom ClickDirective:

    - - {{clickMessage}} - - -
    - -
    -

    $event and event handling statements

    -

    Result: {{currentItem.name}}

    - - - - - without NgModel -
    - -
    -

    Binding to a nested component

    -

    Custom events with EventEmitter

    - - -

    Click to see event target class:

    - - - -
    Click me (parent) -
    Click me too! (child)
    -
    - -

    Saves only once:

    -
    - -
    - -

    Saves twice:

    -
    - -
    - - diff --git a/aio/content/examples/event-binding/src/app/app.component.ts b/aio/content/examples/event-binding/src/app/app.component.ts deleted file mode 100644 index 0d9c5456d6d..00000000000 --- a/aio/content/examples/event-binding/src/app/app.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import {Component} from '@angular/core'; -import {Item} from './item'; - -import {ItemDetailComponent} from './item-detail/item-detail.component'; -import {ClickDirective} from './click.directive'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [ItemDetailComponent, ClickDirective], -}) -export class AppComponent { - currentItem = {name: 'teapot'}; - clickMessage = ''; - - onSave(event?: MouseEvent) { - const evtMsg = event ? ' Event target is ' + (event.target as HTMLElement).textContent : ''; - alert('Saved.' + evtMsg); - if (event) { - event.stopPropagation(); - } - } - - deleteItem(item: Item) { - alert(`Delete the ${item.name}.`); - } - - onClickMe(event?: MouseEvent) { - const evtMsg = event ? ' Event target class is ' + (event.target as HTMLElement).className : ''; - alert('Click me.' + evtMsg); - } - - // #docregion getValue - getValue(event: Event): string { - return (event.target as HTMLInputElement).value; - } - // #enddocregion getValue -} diff --git a/aio/content/examples/event-binding/src/app/click.directive.ts b/aio/content/examples/event-binding/src/app/click.directive.ts deleted file mode 100644 index 07ecbd8b063..00000000000 --- a/aio/content/examples/event-binding/src/app/click.directive.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* eslint-disable @angular-eslint/directive-selector */ -import {Directive, ElementRef, EventEmitter, Output} from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[myClick]', -}) -export class ClickDirective { - @Output('myClick') clicks = new EventEmitter(); // @Output(alias) propertyName = ... - - toggle = false; - - constructor(el: ElementRef) { - el.nativeElement.addEventListener('click', (event: Event) => { - this.toggle = !this.toggle; - this.clicks.emit(this.toggle ? 'Click!' : ''); - }); - } -} diff --git a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.css b/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.css deleted file mode 100644 index 38789a8947f..00000000000 --- a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.css +++ /dev/null @@ -1,11 +0,0 @@ -.detail { - border: 1px solid rgb(25, 118, 210); - padding: 1rem; - margin: 1rem 0; -} - -img { - max-width: 100px; - display: block; - padding: 1rem 0; -} diff --git a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.html b/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.html deleted file mode 100644 index 036bffb46f3..00000000000 --- a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -

    This is the ItemDetailComponent

    - {{item.name}} - {{ item.name }} - - -
    diff --git a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts b/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts deleted file mode 100644 index 2e0f6fa1280..00000000000 --- a/aio/content/examples/event-binding/src/app/item-detail/item-detail.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {Component, EventEmitter, Input, Output} from '@angular/core'; - -import {Item} from '../item'; - -@Component({ - standalone: true, - selector: 'app-item-detail', - styleUrls: ['./item-detail.component.css'], - templateUrl: './item-detail.component.html', -}) -export class ItemDetailComponent { - @Input() item!: Item; - itemImageUrl = 'assets/teapot.svg'; - lineThrough = ''; - displayNone = ''; - @Input() prefix = ''; - - // This component makes a request but it can't actually delete a hero. - @Output() deleteRequest = new EventEmitter(); - - delete() { - this.deleteRequest.emit(this.item); - this.displayNone = this.displayNone ? '' : 'none'; - this.lineThrough = this.lineThrough ? '' : 'line-through'; - } -} diff --git a/aio/content/examples/event-binding/src/app/item.ts b/aio/content/examples/event-binding/src/app/item.ts deleted file mode 100644 index 6e7f806fa8a..00000000000 --- a/aio/content/examples/event-binding/src/app/item.ts +++ /dev/null @@ -1,4 +0,0 @@ -export class Item { - name = ''; -} - diff --git a/aio/content/examples/event-binding/src/assets/teapot.svg b/aio/content/examples/event-binding/src/assets/teapot.svg deleted file mode 100644 index b5f51cf030d..00000000000 --- a/aio/content/examples/event-binding/src/assets/teapot.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/event-binding/src/index.html b/aio/content/examples/event-binding/src/index.html deleted file mode 100644 index 5c13ab5c54f..00000000000 --- a/aio/content/examples/event-binding/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - EventBinding - - - - - - - - diff --git a/aio/content/examples/event-binding/src/main.ts b/aio/content/examples/event-binding/src/main.ts deleted file mode 100644 index 46d4cf88707..00000000000 --- a/aio/content/examples/event-binding/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); diff --git a/aio/content/examples/event-binding/stackblitz.json b/aio/content/examples/event-binding/stackblitz.json deleted file mode 100644 index 765446194dc..00000000000 --- a/aio/content/examples/event-binding/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Event Binding", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Event Binding"] -} diff --git a/aio/content/examples/examples.bzl b/aio/content/examples/examples.bzl deleted file mode 100644 index 755da77072f..00000000000 --- a/aio/content/examples/examples.bzl +++ /dev/null @@ -1,239 +0,0 @@ -load("@build_bazel_rules_nodejs//:index.bzl", "npm_package_bin") -load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory") -load("//tools:defaults.bzl", "nodejs_test") -load("//:yarn.bzl", "YARN_LABEL") -load("//:packages.bzl", "AIO_EXAMPLE_PACKAGES", "to_package_label") - -# This map controls which examples are included and whether or not to generate -# a stackblitz live examples and zip archives. Keys are the example name, and values -# take the form: -# -# {"stackblitz": boolean, "zip": boolean} -# -# Set "stackblitz" to True to generate live examples from any stackblitz config files -# found in the example. Set "zip" to True to generate archives for any stackblitz or -# zipper configuration file found in the example. -# -# To ignore an example, comment out its row. - -EXAMPLES = { - "accessibility": {"stackblitz": True, "zip": True}, - "ajs-quick-reference": {"stackblitz": True, "zip": True}, - "angular-compiler-options": {"stackblitz": True, "zip": True}, - "animations": {"stackblitz": True, "zip": True}, - "architecture": {"stackblitz": True, "zip": True}, - "attribute-binding": {"stackblitz": True, "zip": True}, - "attribute-directives": {"stackblitz": True, "zip": True}, - "binding-syntax": {"stackblitz": True, "zip": True}, - "bootstrapping": {"stackblitz": True, "zip": True}, - "built-in-directives": {"stackblitz": True, "zip": True}, - "built-in-template-functions": {"stackblitz": True, "zip": True}, - "comparing-observables": {"stackblitz": False, "zip": False}, - "component-interaction": {"stackblitz": True, "zip": True}, - "component-overview": {"stackblitz": True, "zip": True}, - "component-styles": {"stackblitz": True, "zip": True}, - "content-projection": {"stackblitz": True, "zip": True}, - "dependency-injection": {"stackblitz": True, "zip": True}, - "dependency-injection-in-action": {"stackblitz": True, "zip": True}, - "deprecation-guide": {"stackblitz": True, "zip": True}, - "docs-style-guide": {"stackblitz": True, "zip": True}, - "dynamic-component-loader": {"stackblitz": True, "zip": True}, - "dynamic-form": {"stackblitz": True, "zip": True}, - "elements": {"stackblitz": True, "zip": True}, - "event-binding": {"stackblitz": True, "zip": True}, - "feature-modules": {"stackblitz": True, "zip": True}, - "first-app-lesson-00": {"stackblitz": True, "zip": True}, - "first-app-lesson-01": {"stackblitz": True, "zip": True}, - "first-app-lesson-02": {"stackblitz": True, "zip": True}, - "first-app-lesson-03": {"stackblitz": True, "zip": True}, - "first-app-lesson-04": {"stackblitz": True, "zip": True}, - "first-app-lesson-05": {"stackblitz": True, "zip": True}, - "first-app-lesson-06": {"stackblitz": True, "zip": True}, - "first-app-lesson-07": {"stackblitz": True, "zip": True}, - "first-app-lesson-08": {"stackblitz": True, "zip": True}, - "first-app-lesson-09": {"stackblitz": True, "zip": True}, - "first-app-lesson-10": {"stackblitz": True, "zip": True}, - "first-app-lesson-11": {"stackblitz": True, "zip": True}, - "first-app-lesson-12": {"stackblitz": True, "zip": True}, - "first-app-lesson-13": {"stackblitz": True, "zip": True}, - "first-app-lesson-14": {"stackblitz": True, "zip": True}, - "form-validation": {"stackblitz": True, "zip": True}, - "forms": {"stackblitz": True, "zip": True}, - "forms-overview": {"stackblitz": True, "zip": True}, - "getting-started": {"stackblitz": True, "zip": True}, - "getting-started-v0": {"stackblitz": True, "zip": True}, - "hierarchical-dependency-injection": {"stackblitz": True, "zip": True}, - "http": {"stackblitz": True, "zip": True}, - "i18n": {"stackblitz": True, "zip": True}, - "inputs-outputs": {"stackblitz": True, "zip": True}, - "injection-token": {"stackblitz": False, "zip": False}, - "interpolation": {"stackblitz": True, "zip": True}, - "lazy-loading-ngmodules": {"stackblitz": True, "zip": True}, - "lifecycle-hooks": {"stackblitz": True, "zip": True}, - "ngcontainer": {"stackblitz": True, "zip": True}, - "ngmodules": {"stackblitz": True, "zip": True}, - "observables": {"stackblitz": False, "zip": False}, - "observables-in-angular": {"stackblitz": False, "zip": False}, - "pipes": {"stackblitz": True, "zip": True}, - "practical-observable-usage": {"stackblitz": False, "zip": False}, - "property-binding": {"stackblitz": True, "zip": True}, - "providers": {"stackblitz": True, "zip": True}, - "providers-viewproviders": {"stackblitz": True, "zip": True}, - "reactive-forms": {"stackblitz": True, "zip": True}, - "resolution-modifiers": {"stackblitz": True, "zip": True}, - "router": {"stackblitz": True, "zip": True}, - "router-tutorial": {"stackblitz": True, "zip": True}, - "routing-with-urlmatcher": {"stackblitz": True, "zip": True}, - "rx-library": {"stackblitz": True, "zip": True}, - "schematics-for-libraries": {"stackblitz": False, "zip": True}, - "security": {"stackblitz": True, "zip": True}, - "service-worker-getting-started": {"stackblitz": False, "zip": True}, - "setup": {"stackblitz": False, "zip": False}, - "structural-directives": {"stackblitz": True, "zip": True}, - "styleguide": {"stackblitz": False, "zip": False}, - "template-expression-operators": {"stackblitz": True, "zip": True}, - "template-reference-variables": {"stackblitz": True, "zip": True}, - "template-syntax": {"stackblitz": True, "zip": True}, - "testing": {"stackblitz": True, "zip": True}, - "toh-pt0": {"stackblitz": True, "zip": True}, - "toh-pt1": {"stackblitz": True, "zip": True}, - "toh-pt2": {"stackblitz": True, "zip": True}, - "toh-pt3": {"stackblitz": True, "zip": True}, - "toh-pt4": {"stackblitz": True, "zip": True}, - "toh-pt5": {"stackblitz": True, "zip": True}, - "toh-pt6": {"stackblitz": True, "zip": True}, - "two-way-binding": {"stackblitz": True, "zip": True}, - "ssr": {"stackblitz": False, "zip": True}, - "upgrade-lazy-load-ajs": {"stackblitz": False, "zip": True}, - "upgrade-module": {"stackblitz": False, "zip": False}, - "upgrade-phonecat-1-typescript": {"stackblitz": False, "zip": False}, - "upgrade-phonecat-2-hybrid": {"stackblitz": False, "zip": False}, - "upgrade-phonecat-3-final": {"stackblitz": False, "zip": False}, - "user-input": {"stackblitz": True, "zip": True}, - "view-encapsulation": {"stackblitz": True, "zip": True}, - "what-is-angular": {"stackblitz": True, "zip": True}, -} - -def docs_example(name, test = True, test_tags = [], test_exec_properties = {}, flaky = False): - """Stamp targets for adding boilerplate to examples, creating live examples, and creating zips. - - Args: - name: name of the example - test: whether to run e2e tests - test_tags: tags to add to the test target - test_exec_properties: exec properties to add to the test's execution platform - """ - if name not in EXAMPLES: - # buildifier: disable=print - print("WARNING: Example '%s' is being ignored. To include it, add an entry to the EXAMPLES map in aio/content/examples/examples.bzl." % name) - return - - native.filegroup( - name = "files", - srcs = native.glob(["**"], exclude = [ - "**/node_modules/**", # Node modules may exist from the legacy setup. - ]), - ) - - # Generate example boilerplate - npm_package_bin( - name = "boilerplate", - args = ["add", native.package_name(), "$(@D)"], - data = [":files"], - output_dir = True, - tool = "//aio/tools/examples:example-boilerplate", - ) - - # Copy example files and boilerplate to the output tree - copy_to_directory( - name = name, - # Prevent sorting so that boilerplate overwrites example sources - # buildifier: do not sort - srcs = [ - ":files", - ":boilerplate", - ], - replace_prefixes = { - "boilerplate": "", - "aio/tools/examples/shared": "", - }, - allow_overwrites = True, - ) - - stackblitz_configs = native.glob(["*stackblitz.json"]) - - if EXAMPLES[name]["stackblitz"] and len(stackblitz_configs) > 0: - # Generate stackblitz live example(s) - outs = [file_name.replace(".json", ".html") for file_name in stackblitz_configs] - npm_package_bin( - name = "stackblitz", - args = [ - "$(execpath :%s)" % name, - "$(RULEDIR)", - ], - data = [":%s" % name], - outs = outs, - tool = "//aio/tools/stackblitz-builder:generate-stackblitz", - ) - - zip_configs = stackblitz_configs + native.glob(["zipper.json"]) - - if EXAMPLES[name]["zip"] and len(zip_configs) > 0: - # Generate example zip(s) - outs = [file_name.replace("stackblitz", name).replace("zipper", name).replace(".json", ".zip") for file_name in zip_configs] - npm_package_bin( - name = "example-zip", - args = [ - "$(execpath :%s)" % name, - "$(RULEDIR)", - ], - data = [":%s" % name], - outs = outs, - tool = "//aio/tools/example-zipper:generate-example-zip", - ) - - if test: - EXAMPLE_DEPS_WORKSPACE_NAME = "aio_example_deps" - - LOCAL_PACKAGE_DEPS = [to_package_label(dep) for dep in AIO_EXAMPLE_PACKAGES] - - # Local package deps are passed as args to the test script in the form "@package/name#path/to/package" - # for the script's convenience. - LOCAL_PACKAGE_ARGS = ["--localPackage=%s#$(rootpath %s)" % (dep, to_package_label(dep)) for dep in AIO_EXAMPLE_PACKAGES] - - nodejs_test( - name = "e2e", - data = [ - ":%s" % name, - YARN_LABEL, - "@npm//@angular/build-tooling/bazel/browsers/chromium", - "//aio/tools/examples:run-example-e2e", - "//adev/tools:windows-chromium-path", - # We install the whole node modules for runtime deps of e2e tests - "@{workspace}//:node_modules_files".format(workspace = EXAMPLE_DEPS_WORKSPACE_NAME), - ] + select({ - "//aio:aio_local_deps": LOCAL_PACKAGE_DEPS, - "//conditions:default": [], - }), - args = [ - "$(rootpath :%s)" % name, - "$(rootpath %s)" % YARN_LABEL, - EXAMPLE_DEPS_WORKSPACE_NAME, - ] + select({ - "//aio:aio_local_deps": LOCAL_PACKAGE_ARGS, - "//conditions:default": [], - }), - entry_point = "//aio/tools/examples:run-example-e2e.mjs", - env = { - "CHROME_BIN": "$(CHROMIUM)", - "CHROMEDRIVER_BIN": "$(CHROMEDRIVER)", - }, - toolchains = [ - "@npm//@angular/build-tooling/bazel/browsers/chromium:toolchain_alias", - ], - exec_properties = test_exec_properties, - flaky = flaky, - # RBE complains about superseeding the max inputs limit (70,000) due to the - # size of the input tree. - tags = ["no-remote-exec"] + test_tags, - ) diff --git a/aio/content/examples/feature-modules/BUILD.bazel b/aio/content/examples/feature-modules/BUILD.bazel deleted file mode 100644 index fe7d5c1ed6b..00000000000 --- a/aio/content/examples/feature-modules/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "feature-modules", -) diff --git a/aio/content/examples/feature-modules/e2e/src/app.e2e-spec.ts b/aio/content/examples/feature-modules/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 78e8b1ee46b..00000000000 --- a/aio/content/examples/feature-modules/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('feature-modules App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display message saying app works', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('app works!'); - }); -}); diff --git a/aio/content/examples/feature-modules/example-config.json b/aio/content/examples/feature-modules/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/feature-modules/src/app/app.component.css b/aio/content/examples/feature-modules/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/feature-modules/src/app/app.component.html b/aio/content/examples/feature-modules/src/app/app.component.html deleted file mode 100644 index ecfd45507b1..00000000000 --- a/aio/content/examples/feature-modules/src/app/app.component.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

    - {{title}} -

    - - - - diff --git a/aio/content/examples/feature-modules/src/app/app.component.ts b/aio/content/examples/feature-modules/src/app/app.component.ts deleted file mode 100644 index ff63e050488..00000000000 --- a/aio/content/examples/feature-modules/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'app works!'; -} diff --git a/aio/content/examples/feature-modules/src/app/app.module.ts b/aio/content/examples/feature-modules/src/app/app.module.ts deleted file mode 100644 index dd55e2ea044..00000000000 --- a/aio/content/examples/feature-modules/src/app/app.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docplaster -// #docregion app-module -import { HttpClientModule } from '@angular/common/http'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppComponent } from './app.component'; -// import the feature module here so you can add it to the imports array below -import { CustomerDashboardModule } from './customer-dashboard/customer-dashboard.module'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - FormsModule, - HttpClientModule, - CustomerDashboardModule // add the feature module here - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } -// #enddocregion app-module diff --git a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard.module.ts b/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard.module.ts deleted file mode 100644 index bf6476803bf..00000000000 --- a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docplaster -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -// #docregion customer-dashboard-component -// import the new component -import { CustomerDashboardComponent } from './customer-dashboard/customer-dashboard.component'; - -@NgModule({ - imports: [ - CommonModule - ], - declarations: [ - CustomerDashboardComponent - ], - // #enddocregion customer-dashboard-component - // #docregion component-exports - exports: [ - CustomerDashboardComponent - ] - // #enddocregion component-exports - // #docregion customer-dashboard-component -}) - -// #enddocregion customer-dashboard-component - -export class CustomerDashboardModule { } diff --git a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.css b/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.html b/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.html deleted file mode 100644 index e3e295f5c71..00000000000 --- a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.html +++ /dev/null @@ -1,7 +0,0 @@ - - - -

    - customer-dashboard works! -

    - diff --git a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.ts b/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.ts deleted file mode 100644 index f5d776a6139..00000000000 --- a/aio/content/examples/feature-modules/src/app/customer-dashboard/customer-dashboard/customer-dashboard.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-customer-dashboard', - templateUrl: './customer-dashboard.component.html', - styleUrls: ['./customer-dashboard.component.css'] -}) -export class CustomerDashboardComponent { - -} diff --git a/aio/content/examples/feature-modules/src/index.html b/aio/content/examples/feature-modules/src/index.html deleted file mode 100644 index 20a97247370..00000000000 --- a/aio/content/examples/feature-modules/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Feature Modules - - - - - - Loading... - - diff --git a/aio/content/examples/feature-modules/src/main.ts b/aio/content/examples/feature-modules/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/feature-modules/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/feature-modules/stackblitz.json b/aio/content/examples/feature-modules/stackblitz.json deleted file mode 100644 index e0cbd2e29d4..00000000000 --- a/aio/content/examples/feature-modules/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Feature Modules", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["feature modules"] -} diff --git a/aio/content/examples/first-app-lesson-00/BUILD.bazel b/aio/content/examples/first-app-lesson-00/BUILD.bazel deleted file mode 100644 index 8c8bf58ac15..00000000000 --- a/aio/content/examples/first-app-lesson-00/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-00", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-00/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-00/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 58fb99582cc..00000000000 --- a/aio/content/examples/first-app-lesson-00/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-00 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Default'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-00/example-config.json b/aio/content/examples/first-app-lesson-00/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-00/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-00/src/app/app.component.css b/aio/content/examples/first-app-lesson-00/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-00/src/app/app.component.ts b/aio/content/examples/first-app-lesson-00/src/app/app.component.ts deleted file mode 100644 index 0521ccc809d..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/app/app.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [], - template: `

    Default

    `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'default'; -} diff --git a/aio/content/examples/first-app-lesson-00/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-00/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-00/src/assets/logo.svg b/aio/content/examples/first-app-lesson-00/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-00/src/favicon.ico b/aio/content/examples/first-app-lesson-00/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-00/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-00/src/index.html b/aio/content/examples/first-app-lesson-00/src/index.html deleted file mode 100644 index 6d45b5b51db..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Default - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-00/src/main.ts b/aio/content/examples/first-app-lesson-00/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-00/src/styles.css b/aio/content/examples/first-app-lesson-00/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-00/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-00/stackblitz.json b/aio/content/examples/first-app-lesson-00/stackblitz.json deleted file mode 100644 index 36a3ab006c3..00000000000 --- a/aio/content/examples/first-app-lesson-00/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 00", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "00" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-01/BUILD.bazel b/aio/content/examples/first-app-lesson-01/BUILD.bazel deleted file mode 100644 index de342b651c6..00000000000 --- a/aio/content/examples/first-app-lesson-01/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-01", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-01/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-01/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 32aabdcb304..00000000000 --- a/aio/content/examples/first-app-lesson-01/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-01 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Hello world!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-01/example-config.json b/aio/content/examples/first-app-lesson-01/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-01/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-01/src/app/app.component.css b/aio/content/examples/first-app-lesson-01/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-01/src/app/app.component.ts b/aio/content/examples/first-app-lesson-01/src/app/app.component.ts deleted file mode 100644 index f522ba492b2..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/app/app.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [], - // #docregion app-comp-template - template: `

    Hello world!

    `, - // #enddocregion - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - // #docregion app-comp-title - title = 'homes'; - // #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-01/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-01/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-01/src/assets/logo.svg b/aio/content/examples/first-app-lesson-01/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-01/src/favicon.ico b/aio/content/examples/first-app-lesson-01/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-01/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-01/src/index.html b/aio/content/examples/first-app-lesson-01/src/index.html deleted file mode 100644 index de08c7bc7fd..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - Homes - - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-01/src/main.ts b/aio/content/examples/first-app-lesson-01/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-01/src/styles.css b/aio/content/examples/first-app-lesson-01/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-01/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-01/stackblitz.json b/aio/content/examples/first-app-lesson-01/stackblitz.json deleted file mode 100644 index f5f4c3c6cd8..00000000000 --- a/aio/content/examples/first-app-lesson-01/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 01", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "01" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-02/BUILD.bazel b/aio/content/examples/first-app-lesson-02/BUILD.bazel deleted file mode 100644 index 05b6e581656..00000000000 --- a/aio/content/examples/first-app-lesson-02/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-02", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-02/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-02/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 91b71989989..00000000000 --- a/aio/content/examples/first-app-lesson-02/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-02 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-02/example-config.json b/aio/content/examples/first-app-lesson-02/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-02/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-02/src/app/app.component.css b/aio/content/examples/first-app-lesson-02/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-02/src/app/app.component.ts b/aio/content/examples/first-app-lesson-02/src/app/app.component.ts deleted file mode 100644 index 099771fdc97..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/app/app.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component } from '@angular/core'; -// #docregion import-home -import { HomeComponent } from './home/home.component'; -// #enddocregion - -@Component({ - selector: 'app-root', - standalone: true, - // #docregion app-metadata-imports - imports: [ - HomeComponent, - ], - // #enddocregion - // #docregion app-metadata-template - template: ` -
    -
    - -
    -
    - -
    -
    - `, - // #enddocregion - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-02/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-02/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-02/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-02/src/app/home/home.component.ts deleted file mode 100644 index 72e1e11cec8..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/app/home/home.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - ], - // #docregion home-template - template: ` -
    -
    - - -
    -
    - `, - // #enddocregion - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - -} diff --git a/aio/content/examples/first-app-lesson-02/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-02/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-02/src/assets/logo.svg b/aio/content/examples/first-app-lesson-02/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-02/src/favicon.ico b/aio/content/examples/first-app-lesson-02/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-02/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-02/src/index.html b/aio/content/examples/first-app-lesson-02/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-02/src/main.ts b/aio/content/examples/first-app-lesson-02/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-02/src/styles.css b/aio/content/examples/first-app-lesson-02/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-02/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-02/stackblitz.json b/aio/content/examples/first-app-lesson-02/stackblitz.json deleted file mode 100644 index 73ed865b729..00000000000 --- a/aio/content/examples/first-app-lesson-02/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 02", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "02" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-03/BUILD.bazel b/aio/content/examples/first-app-lesson-03/BUILD.bazel deleted file mode 100644 index 68e559f913b..00000000000 --- a/aio/content/examples/first-app-lesson-03/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-03", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-03/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-03/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1ed18a095fa..00000000000 --- a/aio/content/examples/first-app-lesson-03/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-03 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a template housing-location component', async () => { - expect(await element.all(by.css('app-housing-location > p')).get(0).getText()).toEqual('housing-location works!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-03/example-config.json b/aio/content/examples/first-app-lesson-03/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-03/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/app.component.css b/aio/content/examples/first-app-lesson-03/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/app.component.ts b/aio/content/examples/first-app-lesson-03/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-03/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-03/src/app/home/home.component.ts deleted file mode 100644 index acaf46ee591..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/home/home.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -// #docregion import-housingLocation -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -// #enddocregion -@Component({ - selector: 'app-home', - standalone: true, - // #docregion add-housingLocation-to-array - imports: [ - CommonModule, - HousingLocationComponent - ], - // #enddocregion - // #docregion add-housingLocation-to-template - template: ` -
    -
    - - -
    -
    -
    - -
    - `, - // #enddocregion - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 9c7066b2f4b..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -

    - housing-location works! -

    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - -} diff --git a/aio/content/examples/first-app-lesson-03/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-03/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-03/src/assets/logo.svg b/aio/content/examples/first-app-lesson-03/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-03/src/favicon.ico b/aio/content/examples/first-app-lesson-03/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-03/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-03/src/index.html b/aio/content/examples/first-app-lesson-03/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-03/src/main.ts b/aio/content/examples/first-app-lesson-03/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-03/src/styles.css b/aio/content/examples/first-app-lesson-03/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-03/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-03/stackblitz.json b/aio/content/examples/first-app-lesson-03/stackblitz.json deleted file mode 100644 index 71a07ba1eb2..00000000000 --- a/aio/content/examples/first-app-lesson-03/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 03", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "03" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-04/BUILD.bazel b/aio/content/examples/first-app-lesson-04/BUILD.bazel deleted file mode 100644 index c0e535e0deb..00000000000 --- a/aio/content/examples/first-app-lesson-04/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-04", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-04/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-04/e2e/src/app.e2e-spec.ts deleted file mode 100644 index ed11e2a317c..00000000000 --- a/aio/content/examples/first-app-lesson-04/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-04 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a template housing-location component', async () => { - expect(await element.all(by.css('app-housing-location > p')).get(0).getText()).toEqual('housing-location works!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-04/example-config.json b/aio/content/examples/first-app-lesson-04/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-04/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/app.component.css b/aio/content/examples/first-app-lesson-04/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/app.component.ts b/aio/content/examples/first-app-lesson-04/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-04/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-04/src/app/home/home.component.ts deleted file mode 100644 index 6d4a21fdd45..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/home/home.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -// #docregion housing-location-import -import { HousingLocation } from '../housinglocation'; -// #enddocregion - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - -
    - `, - styleUrls: ['./home.component.css'], -}) -// #docregion only-house -export class HomeComponent { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - housingLocation: HousingLocation = { - id: 9999, - name: 'Test Home', - city: 'Test city', - state: 'ST', - photo: `${this.baseUrl}/example-house.jpg`, - availableUnits: 99, - wifi: true, - laundry: false, - }; -} -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 9c7066b2f4b..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -

    - housing-location works! -

    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - -} diff --git a/aio/content/examples/first-app-lesson-04/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-04/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-04/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-04/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-04/src/assets/logo.svg b/aio/content/examples/first-app-lesson-04/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-04/src/favicon.ico b/aio/content/examples/first-app-lesson-04/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-04/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-04/src/index.html b/aio/content/examples/first-app-lesson-04/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-04/src/main.ts b/aio/content/examples/first-app-lesson-04/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-04/src/styles.css b/aio/content/examples/first-app-lesson-04/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-04/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-04/stackblitz.json b/aio/content/examples/first-app-lesson-04/stackblitz.json deleted file mode 100644 index 45d8c1cdbe8..00000000000 --- a/aio/content/examples/first-app-lesson-04/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 04", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "04" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-05/BUILD.bazel b/aio/content/examples/first-app-lesson-05/BUILD.bazel deleted file mode 100644 index dd260306344..00000000000 --- a/aio/content/examples/first-app-lesson-05/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-05", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-05/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-05/e2e/src/app.e2e-spec.ts deleted file mode 100644 index cb2529f6f1d..00000000000 --- a/aio/content/examples/first-app-lesson-05/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-05 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a template housing-location component', async () => { - expect(await element.all(by.css('app-housing-location > p')).get(0).getText()).toEqual('housing-location works!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-05/example-config.json b/aio/content/examples/first-app-lesson-05/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-05/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/app.component.css b/aio/content/examples/first-app-lesson-05/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/app.component.ts b/aio/content/examples/first-app-lesson-05/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-05/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-05/src/app/home/home.component.ts deleted file mode 100644 index 9235b64c1be..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/home/home.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - -
    - `, - styleUrls: ['./home.component.css'], -}) -export class HomeComponent { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - housingLocation: HousingLocation = { - id: 9999, - name: 'Test Home', - city: 'Test city', - state: 'ST', - photo: `${this.baseUrl}/example-house.jpg`, - availableUnits: 99, - wifi: true, - laundry: false, - }; -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 78fc6a01737..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion add-imports -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -// #enddocregion -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -

    - housing-location works! -

    - `, - styleUrls: ['./housing-location.component.css'], -}) - -// #docregion add-housing-location-property -export class HousingLocationComponent { - @Input() housingLocation!: HousingLocation; -} -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-05/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-05/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-05/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-05/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-05/src/assets/logo.svg b/aio/content/examples/first-app-lesson-05/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-05/src/favicon.ico b/aio/content/examples/first-app-lesson-05/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-05/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-05/src/index.html b/aio/content/examples/first-app-lesson-05/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-05/src/main.ts b/aio/content/examples/first-app-lesson-05/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-05/src/styles.css b/aio/content/examples/first-app-lesson-05/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-05/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-05/stackblitz.json b/aio/content/examples/first-app-lesson-05/stackblitz.json deleted file mode 100644 index 85a9b2bbf0d..00000000000 --- a/aio/content/examples/first-app-lesson-05/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 05", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "05" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-06/BUILD.bazel b/aio/content/examples/first-app-lesson-06/BUILD.bazel deleted file mode 100644 index efb559d16ff..00000000000 --- a/aio/content/examples/first-app-lesson-06/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-06", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-06/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-06/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 6ba32975dce..00000000000 --- a/aio/content/examples/first-app-lesson-06/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-06 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a template housing-location component', async () => { - expect(await element.all(by.css('app-housing-location > p')).get(0).getText()).toEqual('housing-location works!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-06/example-config.json b/aio/content/examples/first-app-lesson-06/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-06/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/app.component.css b/aio/content/examples/first-app-lesson-06/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/app.component.ts b/aio/content/examples/first-app-lesson-06/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-06/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-06/src/app/home/home.component.ts deleted file mode 100644 index fd2e24415b3..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/home/home.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - // #docregion add-property-binding - - // #enddocregion -
    - `, - styleUrls: ['./home.component.css'], -}) -export class HomeComponent { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - housingLocation: HousingLocation = { - id: 9999, - name: 'Test Home', - city: 'Test city', - state: 'ST', - photo: `${this.baseUrl}/example-house.jpg`, - availableUnits: 99, - wifi: true, - laundry: false, - }; -} - diff --git a/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 095863582b9..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -

    - housing-location works! -

    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-06/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-06/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-06/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-06/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-06/src/assets/logo.svg b/aio/content/examples/first-app-lesson-06/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-06/src/favicon.ico b/aio/content/examples/first-app-lesson-06/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-06/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-06/src/index.html b/aio/content/examples/first-app-lesson-06/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-06/src/main.ts b/aio/content/examples/first-app-lesson-06/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-06/src/styles.css b/aio/content/examples/first-app-lesson-06/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-06/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-06/stackblitz.json b/aio/content/examples/first-app-lesson-06/stackblitz.json deleted file mode 100644 index fc242d46b44..00000000000 --- a/aio/content/examples/first-app-lesson-06/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 06", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "06" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-07/BUILD.bazel b/aio/content/examples/first-app-lesson-07/BUILD.bazel deleted file mode 100644 index 2a6db35efa6..00000000000 --- a/aio/content/examples/first-app-lesson-07/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-07", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-07/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-07/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 3c867df3ada..00000000000 --- a/aio/content/examples/first-app-lesson-07/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-07 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have test data in the housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Test city, ST'); - }); - - it('should have a heading in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Test Home'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-07/example-config.json b/aio/content/examples/first-app-lesson-07/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-07/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/app.component.css b/aio/content/examples/first-app-lesson-07/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/app.component.ts b/aio/content/examples/first-app-lesson-07/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-07/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-07/src/app/home/home.component.ts deleted file mode 100644 index 6e3d358c3e6..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/home/home.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - housingLocation: HousingLocation = { - id: 9999, - name: 'Test Home', - city: 'Test city', - state: 'ST', - photo: `${this.baseUrl}/example-house.jpg`, - availableUnits: 99, - wifi: true, - laundry: false, - }; -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index d4cd5202c0b..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - // #docregion add-listing-details - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    -
    - `, - // #enddocregion - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-07/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-07/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-07/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-07/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-07/src/assets/logo.svg b/aio/content/examples/first-app-lesson-07/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-07/src/favicon.ico b/aio/content/examples/first-app-lesson-07/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-07/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-07/src/index.html b/aio/content/examples/first-app-lesson-07/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-07/src/main.ts b/aio/content/examples/first-app-lesson-07/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-07/src/styles.css b/aio/content/examples/first-app-lesson-07/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-07/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-07/stackblitz.json b/aio/content/examples/first-app-lesson-07/stackblitz.json deleted file mode 100644 index 3eaf96383fd..00000000000 --- a/aio/content/examples/first-app-lesson-07/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 07", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "07" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-08/BUILD.bazel b/aio/content/examples/first-app-lesson-08/BUILD.bazel deleted file mode 100644 index cfdf57e332d..00000000000 --- a/aio/content/examples/first-app-lesson-08/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-08", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-08/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-08/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 31d3c517c11..00000000000 --- a/aio/content/examples/first-app-lesson-08/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-08 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-08/example-config.json b/aio/content/examples/first-app-lesson-08/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-08/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/app.component.css b/aio/content/examples/first-app-lesson-08/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/app.component.ts b/aio/content/examples/first-app-lesson-08/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-08/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-08/src/app/home/home.component.ts deleted file mode 100644 index 592feb0bc3b..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/home/home.component.ts +++ /dev/null @@ -1,138 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - // #docregion add-ngFor - - - // #enddocregion -
    - `, - styleUrls: ['./home.component.css'], -}) -// #docregion housing-list-entries -export class HomeComponent { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; -} -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 24e930ce9f2..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-08/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-08/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-08/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-08/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-08/src/assets/logo.svg b/aio/content/examples/first-app-lesson-08/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-08/src/index.html b/aio/content/examples/first-app-lesson-08/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-08/src/main.ts b/aio/content/examples/first-app-lesson-08/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-08/src/styles.css b/aio/content/examples/first-app-lesson-08/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-08/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-08/stackblitz.json b/aio/content/examples/first-app-lesson-08/stackblitz.json deleted file mode 100644 index e0e9bc04146..00000000000 --- a/aio/content/examples/first-app-lesson-08/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 08", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "08" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-09/BUILD.bazel b/aio/content/examples/first-app-lesson-09/BUILD.bazel deleted file mode 100644 index 8d77a97d73d..00000000000 --- a/aio/content/examples/first-app-lesson-09/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-09", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-09/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-09/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 9d46ebdd336..00000000000 --- a/aio/content/examples/first-app-lesson-09/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-09 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-09/example-config.json b/aio/content/examples/first-app-lesson-09/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-09/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/app.component.css b/aio/content/examples/first-app-lesson-09/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/app.component.ts b/aio/content/examples/first-app-lesson-09/src/app/app.component.ts deleted file mode 100644 index f53b0fe39c9..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/app.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - ], - template: ` -
    -
    - -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-09/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-09/src/app/home/home.component.ts deleted file mode 100644 index ab681f83c2e..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/home/home.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docregion import-inject -import { Component, inject } from '@angular/core'; -// #enddocregion -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -// #docregion import-service -import { HousingService } from '../housing.service'; -// #enddocregion -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { -// #docregion use-new-service - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - - constructor() { - this.housingLocationList = this.housingService.getAllHousingLocations(); - } -// #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 24e930ce9f2..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [CommonModule], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-09/src/app/housing.service.ts deleted file mode 100644 index 2d2ebce284b..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/housing.service.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { Injectable } from '@angular/core'; -// #docregion import-housing-location -import { HousingLocation } from './housinglocation'; -// #enddocregion -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - protected housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; - - // #docregion service-functions - getAllHousingLocations(): HousingLocation[] { - return this.housingLocationList; - } - - getHousingLocationById(id: number): HousingLocation | undefined { - return this.housingLocationList.find(housingLocation => housingLocation.id === id); - } - // #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-09/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-09/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-09/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-09/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-09/src/assets/logo.svg b/aio/content/examples/first-app-lesson-09/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-09/src/index.html b/aio/content/examples/first-app-lesson-09/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-09/src/main.ts b/aio/content/examples/first-app-lesson-09/src/main.ts deleted file mode 100644 index 6aa14fb91c4..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, - {providers: [provideProtractorTestingSupport()]}) - .catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-09/src/styles.css b/aio/content/examples/first-app-lesson-09/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-09/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-09/stackblitz.json b/aio/content/examples/first-app-lesson-09/stackblitz.json deleted file mode 100644 index bf7fae0feb5..00000000000 --- a/aio/content/examples/first-app-lesson-09/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 09", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "09" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-10/BUILD.bazel b/aio/content/examples/first-app-lesson-10/BUILD.bazel deleted file mode 100644 index 5b885377802..00000000000 --- a/aio/content/examples/first-app-lesson-10/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-10", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-10/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-10/e2e/src/app.e2e-spec.ts deleted file mode 100644 index c85a47ec0a2..00000000000 --- a/aio/content/examples/first-app-lesson-10/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-10 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - it('should have a details page at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > p')).get(0) - .getText()).toEqual('details works!'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-10/example-config.json b/aio/content/examples/first-app-lesson-10/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-10/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/app.component.css b/aio/content/examples/first-app-lesson-10/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/app.component.ts b/aio/content/examples/first-app-lesson-10/src/app/app.component.ts deleted file mode 100644 index 2634bd9658b..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/app.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; -// #docregion import-router-module -import { RouterModule } from '@angular/router'; -// #enddocregion -@Component({ - selector: 'app-root', - standalone: true, - // #docregion import-router-module-deco - imports: [ - HomeComponent, - RouterModule, - ], - // #enddocregion - // #docregion add-router-outlet - template: ` -
    - -
    - -
    -
    -
    - -
    -
    - `, - // #enddocregion - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/details/details.component.css b/aio/content/examples/first-app-lesson-10/src/app/details/details.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/first-app-lesson-10/src/app/details/details.component.ts b/aio/content/examples/first-app-lesson-10/src/app/details/details.component.ts deleted file mode 100644 index 0969fba74f4..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/details/details.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@Component({ - selector: 'app-details', - standalone: true, - imports: [CommonModule], - template: ` -

    - details works! -

    - `, - styleUrls: ['./details.component.css'], -}) -export class DetailsComponent { -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-10/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-10/src/app/home/home.component.ts deleted file mode 100644 index 5ba8e77c954..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/home/home.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -import { HousingService } from '../housing.service'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - - constructor() { - this.housingLocationList = this.housingService.getAllHousingLocations(); - } - -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 8d3c251e42f..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -import { RouterModule } from '@angular/router'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [ - CommonModule, - RouterModule - ], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-10/src/app/housing.service.ts deleted file mode 100644 index 84cc20fbd7a..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/housing.service.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HousingLocation } from './housinglocation'; - -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - protected housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; - - getAllHousingLocations(): HousingLocation[] { - return this.housingLocationList; - } - - getHousingLocationById(id: number): HousingLocation | undefined { - return this.housingLocationList.find(housingLocation => housingLocation.id === id); - } -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-10/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-10/src/app/routes.ts b/aio/content/examples/first-app-lesson-10/src/app/routes.ts deleted file mode 100644 index 8440153595d..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/app/routes.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docregion import-routes-components -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { DetailsComponent } from './details/details.component'; -// #enddocregion -// #docregion define-app-routes -const routeConfig: Routes = [ - { - path: '', - component: HomeComponent, - title: 'Home page' - }, - { - path: 'details/:id', - component: DetailsComponent, - title: 'Home details' - } -]; - -export default routeConfig; -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-10/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-10/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-10/src/assets/logo.svg b/aio/content/examples/first-app-lesson-10/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-10/src/favicon.ico b/aio/content/examples/first-app-lesson-10/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-10/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-10/src/index.html b/aio/content/examples/first-app-lesson-10/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-10/src/main.ts b/aio/content/examples/first-app-lesson-10/src/main.ts deleted file mode 100644 index 2228f06d430..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/main.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -// #docregion add-router-imports -import { provideRouter } from '@angular/router'; -import routeConfig from './app/routes'; -// #enddocregion -// #docregion add-router-config -bootstrapApplication(AppComponent, - { - providers: [ - provideProtractorTestingSupport(), - provideRouter(routeConfig) - ] - } -).catch(err => console.error(err)); -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-10/src/styles.css b/aio/content/examples/first-app-lesson-10/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-10/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-10/stackblitz.json b/aio/content/examples/first-app-lesson-10/stackblitz.json deleted file mode 100644 index 7e9e14026f3..00000000000 --- a/aio/content/examples/first-app-lesson-10/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 10", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "10" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-11/BUILD.bazel b/aio/content/examples/first-app-lesson-11/BUILD.bazel deleted file mode 100644 index 134f48cdb17..00000000000 --- a/aio/content/examples/first-app-lesson-11/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-11", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-11/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-11/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 8d56b75667d..00000000000 --- a/aio/content/examples/first-app-lesson-11/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-11 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - it('should have a details page at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > h2')).get(0) - .getText()).toEqual('Capital Safe Towns'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-11/example-config.json b/aio/content/examples/first-app-lesson-11/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-11/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/app.component.css b/aio/content/examples/first-app-lesson-11/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/app.component.ts b/aio/content/examples/first-app-lesson-11/src/app/app.component.ts deleted file mode 100644 index 339384288ae..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/app.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - RouterLink, - RouterOutlet, - ], - // #docregion add-router-link-to-header - template: ` -
    - -
    - -
    -
    -
    - -
    -
    - `, - // #enddocregion - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/details/details.component.css b/aio/content/examples/first-app-lesson-11/src/app/details/details.component.css deleted file mode 100644 index 35d41d031fb..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/details/details.component.css +++ /dev/null @@ -1,73 +0,0 @@ -/* #docregion add-details-styles */ -.listing-photo { - height: 600px; - width: 50%; - object-fit: cover; - border-radius: 30px; - float: right; -} - -.listing-heading { - font-size: 48pt; - font-weight: bold; - margin-bottom: 15px; -} - -.listing-location::before { - content: url('/assets/location-pin.svg') / ''; -} - -.listing-location { - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features > .section-heading { - color: var(--secondary-color); - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features { - margin-bottom: 20px; -} - -.listing-features li { - font-size: 14pt; -} - -li { - list-style-type: none; -} - -.listing-apply .section-heading { - font-size: 18pt; - margin-bottom: 15px; -} - -label, input { - display: block; -} -label { - color: var(--secondary-color); - font-weight: bold; - text-transform: uppercase; - font-size: 12pt; -} -input { - font-size: 16pt; - margin-bottom: 15px; - padding: 10px; - width: 400px; - border-top: none; - border-right: none; - border-left: none; - border-bottom: solid .3px; -} -@media (max-width: 1024px) { - .listing-photo { - width: 100%; - height: 400px; - } -} -/* #enddocregion */ \ No newline at end of file diff --git a/aio/content/examples/first-app-lesson-11/src/app/details/details.component.ts b/aio/content/examples/first-app-lesson-11/src/app/details/details.component.ts deleted file mode 100644 index 896f2ad6386..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/details/details.component.ts +++ /dev/null @@ -1,48 +0,0 @@ -// #docregion import-resources-for-details -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { HousingService } from '../housing.service'; -import { HousingLocation } from '../housinglocation'; -// #enddocregion - -@Component({ - selector: 'app-details', - standalone: true, - imports: [CommonModule], - // #docregion update-details-template - template: ` -
    - Exterior photo of {{housingLocation?.name}} -
    -

    {{housingLocation?.name}}

    -

    {{housingLocation?.city}}, {{housingLocation?.state}}

    -
    -
    -

    About this housing location

    -
      -
    • Units available: {{housingLocation?.availableUnits}}
    • -
    • Does this location have wifi: {{housingLocation?.wifi}}
    • -
    • Does this location have laundry: {{housingLocation?.laundry}}
    • -
    -
    -
    - `, - // #enddocregion - styleUrls: ['./details.component.css'], -}) -// #docregion get-housing-details -export class DetailsComponent { - - route: ActivatedRoute = inject(ActivatedRoute); - housingService = inject(HousingService); - housingLocation: HousingLocation | undefined; - - constructor() { - const housingLocationId = Number(this.route.snapshot.params['id']); - this.housingLocation = this.housingService.getHousingLocationById(housingLocationId); - } - -} -// #enddocregion diff --git a/aio/content/examples/first-app-lesson-11/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-11/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-11/src/app/home/home.component.ts deleted file mode 100644 index 5ba8e77c954..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/home/home.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -import { HousingService } from '../housing.service'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - - constructor() { - this.housingLocationList = this.housingService.getAllHousingLocations(); - } - -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 527dc97e211..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -import { RouterModule } from '@angular/router'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [ - CommonModule, - RouterModule - ], - // #docregion add-router-link - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    - Learn More -
    - `, - // #enddocregion - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-11/src/app/housing.service.ts deleted file mode 100644 index 84cc20fbd7a..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/housing.service.ts +++ /dev/null @@ -1,120 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HousingLocation } from './housinglocation'; - -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - protected housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; - - getAllHousingLocations(): HousingLocation[] { - return this.housingLocationList; - } - - getHousingLocationById(id: number): HousingLocation | undefined { - return this.housingLocationList.find(housingLocation => housingLocation.id === id); - } -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-11/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-11/src/app/routes.ts b/aio/content/examples/first-app-lesson-11/src/app/routes.ts deleted file mode 100644 index f3710b128af..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/app/routes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { DetailsComponent } from './details/details.component'; - -const routeConfig: Routes = [ - { - path: '', - component: HomeComponent, - title: 'Home page' - }, - { - path: 'details/:id', - component: DetailsComponent, - title: 'Home details' - } -]; - -export default routeConfig; diff --git a/aio/content/examples/first-app-lesson-11/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-11/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-11/src/assets/logo.svg b/aio/content/examples/first-app-lesson-11/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-11/src/favicon.ico b/aio/content/examples/first-app-lesson-11/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-11/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-11/src/index.html b/aio/content/examples/first-app-lesson-11/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-11/src/main.ts b/aio/content/examples/first-app-lesson-11/src/main.ts deleted file mode 100644 index fe1364a0c15..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { provideRouter } from '@angular/router'; -import routeConfig from './app/routes'; - -bootstrapApplication(AppComponent, - { - providers: [ - provideProtractorTestingSupport(), - provideRouter(routeConfig) - ] - } -).catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-11/src/styles.css b/aio/content/examples/first-app-lesson-11/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-11/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-11/stackblitz.json b/aio/content/examples/first-app-lesson-11/stackblitz.json deleted file mode 100644 index 41fa27ad934..00000000000 --- a/aio/content/examples/first-app-lesson-11/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 11", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "11" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-12/BUILD.bazel b/aio/content/examples/first-app-lesson-12/BUILD.bazel deleted file mode 100644 index a26f71d8960..00000000000 --- a/aio/content/examples/first-app-lesson-12/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-12", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-12/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-12/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 772c0f33e87..00000000000 --- a/aio/content/examples/first-app-lesson-12/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-12 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - it('should have a details page at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > h2')).get(0) - .getText()).toEqual('Capital Safe Towns'); - }); - - it('should have a form in the details component at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > form > button')).get(0) - .getText()).toEqual('Apply now'); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-12/example-config.json b/aio/content/examples/first-app-lesson-12/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-12/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/app.component.css b/aio/content/examples/first-app-lesson-12/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/app.component.ts b/aio/content/examples/first-app-lesson-12/src/app/app.component.ts deleted file mode 100644 index 677712d9754..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/app.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - RouterLink, - RouterOutlet, - ], - template: ` -
    - -
    - -
    -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/details/details.component.css b/aio/content/examples/first-app-lesson-12/src/app/details/details.component.css deleted file mode 100644 index 8993c7eec1a..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/details/details.component.css +++ /dev/null @@ -1,71 +0,0 @@ -.listing-photo { - height: 600px; - width: 50%; - object-fit: cover; - border-radius: 30px; - float: right; -} - -.listing-heading { - font-size: 48pt; - font-weight: bold; - margin-bottom: 15px; -} - -.listing-location::before { - content: url('/assets/location-pin.svg') / ''; -} - -.listing-location { - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features > .section-heading { - color: var(--secondary-color); - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features { - margin-bottom: 20px; -} - -.listing-features li { - font-size: 14pt; -} - -li { - list-style-type: none; -} - -.listing-apply .section-heading { - font-size: 18pt; - margin-bottom: 15px; -} - -label, input { - display: block; -} -label { - color: var(--secondary-color); - font-weight: bold; - text-transform: uppercase; - font-size: 12pt; -} -input { - font-size: 16pt; - margin-bottom: 15px; - padding: 10px; - width: 400px; - border-top: none; - border-right: none; - border-left: none; - border-bottom: solid .3px; -} -@media (max-width: 1024px) { - .listing-photo { - width: 100%; - height: 400px; - } -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/details/details.component.ts b/aio/content/examples/first-app-lesson-12/src/app/details/details.component.ts deleted file mode 100644 index ba483cd456a..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/details/details.component.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { HousingService } from '../housing.service'; -import { HousingLocation } from '../housinglocation'; -// #docregion form-imports -import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; -// #enddocregion -@Component({ - selector: 'app-details', - standalone: true, -// #docregion component-imports - imports: [ - CommonModule, - ReactiveFormsModule - ], -// #enddocregion -// #docregion component-template - template: ` -
    - Exterior photo of {{housingLocation?.name}} -
    -

    {{housingLocation?.name}}

    -

    {{housingLocation?.city}}, {{housingLocation?.state}}

    -
    -
    -

    About this housing location

    -
      -
    • Units available: {{housingLocation?.availableUnits}}
    • -
    • Does this location have wifi: {{housingLocation?.wifi}}
    • -
    • Does this location have laundry: {{housingLocation?.laundry}}
    • -
    -
    -
    -

    Apply now to live here

    -
    - - - - - - - - - -
    -
    -
    - `, -// #enddocregion - styleUrls: ['./details.component.css'], -}) -export class DetailsComponent { - - route: ActivatedRoute = inject(ActivatedRoute); - housingService = inject(HousingService); - housingLocation: HousingLocation | undefined; -// #docregion form-code - applyForm = new FormGroup({ - firstName: new FormControl(''), - lastName: new FormControl(''), - email: new FormControl('') - }); -// #enddocregion - - constructor() { - const housingLocationId = parseInt(this.route.snapshot.params['id'], 10); - this.housingLocation = this.housingService.getHousingLocationById(housingLocationId); - } -// #docregion form-submit - submitApplication() { - this.housingService.submitApplication( - this.applyForm.value.firstName ?? '', - this.applyForm.value.lastName ?? '', - this.applyForm.value.email ?? '' - ); - } -// #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-12/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-12/src/app/home/home.component.ts deleted file mode 100644 index 5ba8e77c954..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/home/home.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -import { HousingService } from '../housing.service'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - - constructor() { - this.housingLocationList = this.housingService.getAllHousingLocations(); - } - -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 0834923aff6..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -import { RouterModule } from '@angular/router'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [ - CommonModule, - RouterModule - ], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    - Learn More -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-12/src/app/housing.service.ts deleted file mode 100644 index 9cfb142bdf6..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/housing.service.ts +++ /dev/null @@ -1,125 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HousingLocation } from './housinglocation'; - -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - protected housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; - - getAllHousingLocations(): HousingLocation[] { - return this.housingLocationList; - } - - getHousingLocationById(id: number): HousingLocation | undefined { - return this.housingLocationList.find(housingLocation => housingLocation.id === id); - } - // #docregion submit-method - submitApplication(firstName: string, lastName: string, email: string) { - console.log(`Homes application received: firstName: ${firstName}, lastName: ${lastName}, email: ${email}.`); - } - // #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-12/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-12/src/app/routes.ts b/aio/content/examples/first-app-lesson-12/src/app/routes.ts deleted file mode 100644 index f3710b128af..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/app/routes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { DetailsComponent } from './details/details.component'; - -const routeConfig: Routes = [ - { - path: '', - component: HomeComponent, - title: 'Home page' - }, - { - path: 'details/:id', - component: DetailsComponent, - title: 'Home details' - } -]; - -export default routeConfig; diff --git a/aio/content/examples/first-app-lesson-12/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-12/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-12/src/assets/logo.svg b/aio/content/examples/first-app-lesson-12/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-12/src/favicon.ico b/aio/content/examples/first-app-lesson-12/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-12/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-12/src/index.html b/aio/content/examples/first-app-lesson-12/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-12/src/main.ts b/aio/content/examples/first-app-lesson-12/src/main.ts deleted file mode 100644 index fe1364a0c15..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { provideRouter } from '@angular/router'; -import routeConfig from './app/routes'; - -bootstrapApplication(AppComponent, - { - providers: [ - provideProtractorTestingSupport(), - provideRouter(routeConfig) - ] - } -).catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-12/src/styles.css b/aio/content/examples/first-app-lesson-12/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-12/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-12/stackblitz.json b/aio/content/examples/first-app-lesson-12/stackblitz.json deleted file mode 100644 index 73ddf290761..00000000000 --- a/aio/content/examples/first-app-lesson-12/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 12", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "12" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-13/BUILD.bazel b/aio/content/examples/first-app-lesson-13/BUILD.bazel deleted file mode 100644 index 4a04dec2049..00000000000 --- a/aio/content/examples/first-app-lesson-13/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-13", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/first-app-lesson-13/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-13/e2e/src/app.e2e-spec.ts deleted file mode 100644 index a166df70ffa..00000000000 --- a/aio/content/examples/first-app-lesson-13/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-13 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - it('should have a details page at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > h2')).get(0) - .getText()).toEqual('Capital Safe Towns'); - }); - - it('should have a form in the details component at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > form > button')).get(0) - .getText()).toEqual('Apply now'); - }); - - it('should filter the displayed elements by city name', async () => { - const filterField = element.all(by.css('app-home > section > form > input')).get(0); - const submitButton = element.all(by.css('app-home > section > form > button')).get(0); - await filterField.clear().then(() => { - filterField.sendKeys('chicago');}); - await submitButton.click(); - expect(await element.all(by.css('app-housing-location'))['length'] === 2); - }); - - it('should show all entries when filter is empty', async () => { - const filterField = element.all(by.css('app-home > section > form > input')).get(0); - const submitButton = element.all(by.css('app-home > section > form > button')).get(0); - await filterField.clear(); - await submitButton.click(); - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-13/example-config.json b/aio/content/examples/first-app-lesson-13/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-13/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/app.component.css b/aio/content/examples/first-app-lesson-13/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/app.component.ts b/aio/content/examples/first-app-lesson-13/src/app/app.component.ts deleted file mode 100644 index 677712d9754..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/app.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - RouterLink, - RouterOutlet, - ], - template: ` -
    - -
    - -
    -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/details/details.component.css b/aio/content/examples/first-app-lesson-13/src/app/details/details.component.css deleted file mode 100644 index 8993c7eec1a..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/details/details.component.css +++ /dev/null @@ -1,71 +0,0 @@ -.listing-photo { - height: 600px; - width: 50%; - object-fit: cover; - border-radius: 30px; - float: right; -} - -.listing-heading { - font-size: 48pt; - font-weight: bold; - margin-bottom: 15px; -} - -.listing-location::before { - content: url('/assets/location-pin.svg') / ''; -} - -.listing-location { - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features > .section-heading { - color: var(--secondary-color); - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features { - margin-bottom: 20px; -} - -.listing-features li { - font-size: 14pt; -} - -li { - list-style-type: none; -} - -.listing-apply .section-heading { - font-size: 18pt; - margin-bottom: 15px; -} - -label, input { - display: block; -} -label { - color: var(--secondary-color); - font-weight: bold; - text-transform: uppercase; - font-size: 12pt; -} -input { - font-size: 16pt; - margin-bottom: 15px; - padding: 10px; - width: 400px; - border-top: none; - border-right: none; - border-left: none; - border-bottom: solid .3px; -} -@media (max-width: 1024px) { - .listing-photo { - width: 100%; - height: 400px; - } -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/details/details.component.ts b/aio/content/examples/first-app-lesson-13/src/app/details/details.component.ts deleted file mode 100644 index fac97cd2bf9..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/details/details.component.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { HousingService } from '../housing.service'; -import { HousingLocation } from '../housinglocation'; -import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; - -@Component({ - selector: 'app-details', - standalone: true, - imports: [ - CommonModule, - ReactiveFormsModule - ], - template: ` -
    - Exterior photo of {{housingLocation?.name}} -
    -

    {{housingLocation?.name}}

    -

    {{housingLocation?.city}}, {{housingLocation?.state}}

    -
    -
    -

    About this housing location

    -
      -
    • Units available: {{housingLocation?.availableUnits}}
    • -
    • Does this location have wifi: {{housingLocation?.wifi}}
    • -
    • Does this location have laundry: {{housingLocation?.laundry}}
    • -
    -
    -
    -

    Apply now to live here

    -
    - - - - - - - - - -
    -
    -
    - `, - styleUrls: ['./details.component.css'], -}) -export class DetailsComponent { - - route: ActivatedRoute = inject(ActivatedRoute); - housingService = inject(HousingService); - housingLocation: HousingLocation | undefined; - - applyForm = new FormGroup({ - firstName: new FormControl(''), - lastName: new FormControl(''), - email: new FormControl('') - }); - - constructor() { - const housingLocationId = parseInt(this.route.snapshot.params['id'], 10); - this.housingLocation = this.housingService.getHousingLocationById(housingLocationId); - } - - submitApplication() { - this.housingService.submitApplication( - this.applyForm.value.firstName ?? '', - this.applyForm.value.lastName ?? '', - this.applyForm.value.email ?? '' - ); - } - -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-13/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-13/src/app/home/home.component.ts deleted file mode 100644 index 90829f356c7..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/home/home.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -import { HousingService } from '../housing.service'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - // #docregion add-filtered-location-list - filteredLocationList: HousingLocation[] = []; - // #enddocregion - // #docregion update-constructor - constructor() { - this.housingLocationList = this.housingService.getAllHousingLocations(); - this.filteredLocationList = this.housingLocationList; - } - // #enddocregion - // #docregion add-filter-results-fn - filterResults(text: string) { - if (!text) { - this.filteredLocationList = this.housingLocationList; - return; - } - - this.filteredLocationList = this.housingLocationList.filter( - housingLocation => housingLocation?.city.toLowerCase().includes(text.toLowerCase()) - ); - } - // #enddocregion -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 0834923aff6..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -import { RouterModule } from '@angular/router'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [ - CommonModule, - RouterModule - ], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    - Learn More -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-13/src/app/housing.service.ts deleted file mode 100644 index fb4ba181a73..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/housing.service.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HousingLocation } from './housinglocation'; - -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - readonly baseUrl = 'https://angular.io/assets/images/tutorials/faa'; - - protected housingLocationList: HousingLocation[] = [ - { - id: 0, - name: 'Acme Fresh Start Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/bernard-hermant-CLKGGwIBTaY-unsplash.jpg`, - availableUnits: 4, - wifi: true, - laundry: true - }, - { - id: 1, - name: 'A113 Transitional Housing', - city: 'Santa Monica', - state: 'CA', - photo: `${this.baseUrl}/brandon-griggs-wR11KBaB86U-unsplash.jpg`, - availableUnits: 0, - wifi: false, - laundry: true - }, - { - id: 2, - name: 'Warm Beds Housing Support', - city: 'Juneau', - state: 'AK', - photo: `${this.baseUrl}/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg`, - availableUnits: 1, - wifi: false, - laundry: false - }, - { - id: 3, - name: 'Homesteady Housing', - city: 'Chicago', - state: 'IL', - photo: `${this.baseUrl}/ian-macdonald-W8z6aiwfi1E-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 4, - name: 'Happy Homes Group', - city: 'Gary', - state: 'IN', - photo: `${this.baseUrl}/krzysztof-hepner-978RAXoXnH4-unsplash.jpg`, - availableUnits: 1, - wifi: true, - laundry: false - }, - { - id: 5, - name: 'Hopeful Apartment Group', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-JvQ0Q5IkeMM-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 6, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/phil-hearing-IYfp2Ixe9nM-unsplash.jpg`, - availableUnits: 5, - wifi: true, - laundry: true - }, - { - id: 7, - name: 'Hopeful Housing Solutions', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/r-architecture-GGupkreKwxA-unsplash.jpg`, - availableUnits: 2, - wifi: true, - laundry: true - }, - { - id: 8, - name: 'Seriously Safe Towns', - city: 'Oakland', - state: 'CA', - photo: `${this.baseUrl}/saru-robert-9rP3mxf8qWI-unsplash.jpg`, - availableUnits: 10, - wifi: false, - laundry: false - }, - { - id: 9, - name: 'Capital Safe Towns', - city: 'Portland', - state: 'OR', - photo: `${this.baseUrl}/webaliser-_TPTXZd9mOo-unsplash.jpg`, - availableUnits: 6, - wifi: true, - laundry: true - } - ]; - - getAllHousingLocations(): HousingLocation[] { - return this.housingLocationList; - } - - getHousingLocationById(id: number): HousingLocation | undefined { - return this.housingLocationList.find(housingLocation => housingLocation.id === id); - } - - submitApplication(firstName: string, lastName: string, email: string) { - console.log(`Homes application received: firstName: ${firstName}, lastName: ${lastName}, email: ${email}.`); - } -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-13/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-13/src/app/routes.ts b/aio/content/examples/first-app-lesson-13/src/app/routes.ts deleted file mode 100644 index f3710b128af..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/app/routes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { DetailsComponent } from './details/details.component'; - -const routeConfig: Routes = [ - { - path: '', - component: HomeComponent, - title: 'Home page' - }, - { - path: 'details/:id', - component: DetailsComponent, - title: 'Home details' - } -]; - -export default routeConfig; diff --git a/aio/content/examples/first-app-lesson-13/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-13/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-13/src/assets/logo.svg b/aio/content/examples/first-app-lesson-13/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-13/src/favicon.ico b/aio/content/examples/first-app-lesson-13/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-13/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-13/src/index.html b/aio/content/examples/first-app-lesson-13/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-13/src/main.ts b/aio/content/examples/first-app-lesson-13/src/main.ts deleted file mode 100644 index fe1364a0c15..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { provideRouter } from '@angular/router'; -import routeConfig from './app/routes'; - -bootstrapApplication(AppComponent, - { - providers: [ - provideProtractorTestingSupport(), - provideRouter(routeConfig) - ] - } -).catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-13/src/styles.css b/aio/content/examples/first-app-lesson-13/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-13/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-13/stackblitz.json b/aio/content/examples/first-app-lesson-13/stackblitz.json deleted file mode 100644 index aca030f55dc..00000000000 --- a/aio/content/examples/first-app-lesson-13/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 13", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "13" - ] - ] -} diff --git a/aio/content/examples/first-app-lesson-14/BUILD.bazel b/aio/content/examples/first-app-lesson-14/BUILD.bazel deleted file mode 100644 index 4ea0e7d6681..00000000000 --- a/aio/content/examples/first-app-lesson-14/BUILD.bazel +++ /dev/null @@ -1,14 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "first-app-lesson-14", - # This example downloads fonts and images from googleapis.com - test_exec_properties = ENABLE_NETWORK, - test_tags = [ - "manual", - "requires-network", - ], -) diff --git a/aio/content/examples/first-app-lesson-14/db.json b/aio/content/examples/first-app-lesson-14/db.json deleted file mode 100644 index 567475268b3..00000000000 --- a/aio/content/examples/first-app-lesson-14/db.json +++ /dev/null @@ -1,104 +0,0 @@ -{ - "locations": [ - { - "id": 0, - "name": "Acme Fresh Start Housing", - "city": "Chicago", - "state": "IL", - "photo": "https://angular.io/assets/images/tutorials/faa/bernard-hermant-CLKGGwIBTaY-unsplash.jpg", - "availableUnits": 4, - "wifi": true, - "laundry": true - }, - { - "id": 1, - "name": "A113 Transitional Housing", - "city": "Santa Monica", - "state": "CA", - "photo": "https://angular.io/assets/images/tutorials/faa/brandon-griggs-wR11KBaB86U-unsplash.jpg", - "availableUnits": 0, - "wifi": false, - "laundry": true - }, - { - "id": 2, - "name": "Warm Beds Housing Support", - "city": "Juneau", - "state": "AK", - "photo": "https://angular.io/assets/images/tutorials/faa/i-do-nothing-but-love-lAyXdl1-Wmc-unsplash.jpg", - "availableUnits": 1, - "wifi": false, - "laundry": false - }, - { - "id": 3, - "name": "Homesteady Housing", - "city": "Chicago", - "state": "IL", - "photo": "https://angular.io/assets/images/tutorials/faa/ian-macdonald-W8z6aiwfi1E-unsplash.jpg", - "availableUnits": 1, - "wifi": true, - "laundry": false - }, - { - "id": 4, - "name": "Happy Homes Group", - "city": "Gary", - "state": "IN", - "photo": "https://angular.io/assets/images/tutorials/faa/krzysztof-hepner-978RAXoXnH4-unsplash.jpg", - "availableUnits": 1, - "wifi": true, - "laundry": false - }, - { - "id": 5, - "name": "Hopeful Apartment Group", - "city": "Oakland", - "state": "CA", - "photo": "https://angular.io/assets/images/tutorials/faa/r-architecture-JvQ0Q5IkeMM-unsplash.jpg", - "availableUnits": 2, - "wifi": true, - "laundry": true - }, - { - "id": 6, - "name": "Seriously Safe Towns", - "city": "Oakland", - "state": "CA", - "photo": "https://angular.io/assets/images/tutorials/faa/phil-hearing-IYfp2Ixe9nM-unsplash.jpg", - "availableUnits": 5, - "wifi": true, - "laundry": true - }, - { - "id": 7, - "name": "Hopeful Housing Solutions", - "city": "Oakland", - "state": "CA", - "photo": "https://angular.io/assets/images/tutorials/faa/r-architecture-GGupkreKwxA-unsplash.jpg", - "availableUnits": 2, - "wifi": true, - "laundry": true - }, - { - "id": 8, - "name": "Seriously Safe Towns", - "city": "Oakland", - "state": "CA", - "photo": "https://angular.io/assets/images/tutorials/faa/saru-robert-9rP3mxf8qWI-unsplash.jpg", - "availableUnits": 10, - "wifi": false, - "laundry": false - }, - { - "id": 9, - "name": "Capital Safe Towns", - "city": "Portland", - "state": "OR", - "photo": "https://angular.io/assets/images/tutorials/faa/webaliser-_TPTXZd9mOo-unsplash.jpg", - "availableUnits": 6, - "wifi": true, - "laundry": true - } - ] -} \ No newline at end of file diff --git a/aio/content/examples/first-app-lesson-14/e2e/src/app.e2e-spec.ts b/aio/content/examples/first-app-lesson-14/e2e/src/app.e2e-spec.ts deleted file mode 100644 index bc60a582963..00000000000 --- a/aio/content/examples/first-app-lesson-14/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('first-app-lesson-14 app', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('.brand-logo')).get(0).getAttribute('src')).toContain('/assets/logo.svg'); - }); - - it('should have a filter string input', async () => { - expect(await element.all(by.css('input')).get(0).getAttribute('placeholder')).toEqual('Filter by city'); - expect(await element.all(by.css('input')).get(0).getAttribute('type')).toEqual('text'); - }); - - it('should have a search button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toEqual('Search'); - }); - - it('should have a housing-location component', async () => { - expect(await element.all(by.css('.listing > .listing-location')).get(0).getText()).toEqual('Chicago, IL'); - }); - - it('should have a title in the housing-location component', async () => { - expect(await element.all(by.css('.listing > h2')).get(0).getText()).toEqual('Acme Fresh Start Housing'); - }); - - it('should have 10 housing-location components', async () => { - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - it('should have a details page at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > h2')).get(0) - .getText()).toEqual('Capital Safe Towns'); - }); - - it('should have a form in the details component at /details/9', async () => { - await browser.get('/details/9'); - expect(await element.all(by.css('app-details > article > section > form > button')).get(0) - .getText()).toEqual('Apply now'); - }); - - it('should filter the displayed elements by city name', async () => { - const filterField = element.all(by.css('app-home > section > form > input')).get(0); - const submitButton = element.all(by.css('app-home > section > form > button')).get(0); - await filterField.clear().then(() => { - filterField.sendKeys('chicago');}); - await submitButton.click(); - expect(await element.all(by.css('app-housing-location'))['length'] === 2); - }); - - it('should show all entries when filter is empty', async () => { - const filterField = element.all(by.css('app-home > section > form > input')).get(0); - const submitButton = element.all(by.css('app-home > section > form > button')).get(0); - await filterField.clear(); - await submitButton.click(); - expect(await element.all(by.css('app-housing-location'))['length'] === 10); - }); - - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); diff --git a/aio/content/examples/first-app-lesson-14/example-config.json b/aio/content/examples/first-app-lesson-14/example-config.json deleted file mode 100644 index 6b43b07a8db..00000000000 --- a/aio/content/examples/first-app-lesson-14/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "useCommonBoilerplate": false, - "overrideBoilerplate": [ - "src/styles.css" - ] -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/app.component.css b/aio/content/examples/first-app-lesson-14/src/app/app.component.css deleted file mode 100644 index ca76bf56f4e..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/app.component.css +++ /dev/null @@ -1,12 +0,0 @@ -:host { - --content-padding: 10px; -} -header { - display: block; - height: 60px; - padding: var(--content-padding); - box-shadow: 0px 5px 25px var(--shadow-color); -} -.content { - padding: var(--content-padding); -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/app.component.ts b/aio/content/examples/first-app-lesson-14/src/app/app.component.ts deleted file mode 100644 index 677712d9754..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/app.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component } from '@angular/core'; -import { HomeComponent } from './home/home.component'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [ - HomeComponent, - RouterLink, - RouterOutlet, - ], - template: ` -
    - -
    - -
    -
    -
    - -
    -
    - `, - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - title = 'homes'; -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/details/details.component.css b/aio/content/examples/first-app-lesson-14/src/app/details/details.component.css deleted file mode 100644 index 8993c7eec1a..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/details/details.component.css +++ /dev/null @@ -1,71 +0,0 @@ -.listing-photo { - height: 600px; - width: 50%; - object-fit: cover; - border-radius: 30px; - float: right; -} - -.listing-heading { - font-size: 48pt; - font-weight: bold; - margin-bottom: 15px; -} - -.listing-location::before { - content: url('/assets/location-pin.svg') / ''; -} - -.listing-location { - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features > .section-heading { - color: var(--secondary-color); - font-size: 24pt; - margin-bottom: 15px; -} - -.listing-features { - margin-bottom: 20px; -} - -.listing-features li { - font-size: 14pt; -} - -li { - list-style-type: none; -} - -.listing-apply .section-heading { - font-size: 18pt; - margin-bottom: 15px; -} - -label, input { - display: block; -} -label { - color: var(--secondary-color); - font-weight: bold; - text-transform: uppercase; - font-size: 12pt; -} -input { - font-size: 16pt; - margin-bottom: 15px; - padding: 10px; - width: 400px; - border-top: none; - border-right: none; - border-left: none; - border-bottom: solid .3px; -} -@media (max-width: 1024px) { - .listing-photo { - width: 100%; - height: 400px; - } -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/details/details.component.ts b/aio/content/examples/first-app-lesson-14/src/app/details/details.component.ts deleted file mode 100644 index 55bc0c99d8a..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/details/details.component.ts +++ /dev/null @@ -1,78 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { ActivatedRoute } from '@angular/router'; -import { HousingService } from '../housing.service'; -import { HousingLocation } from '../housinglocation'; -import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms'; - -@Component({ - selector: 'app-details', - standalone: true, - imports: [ - CommonModule, - ReactiveFormsModule - ], - template: ` -
    - Exterior photo of {{housingLocation?.name}} -
    -

    {{housingLocation?.name}}

    -

    {{housingLocation?.city}}, {{housingLocation?.state}}

    -
    -
    -

    About this housing location

    -
      -
    • Units available: {{housingLocation?.availableUnits}}
    • -
    • Does this location have wifi: {{housingLocation?.wifi}}
    • -
    • Does this location have laundry: {{housingLocation?.laundry}}
    • -
    -
    -
    -

    Apply now to live here

    -
    - - - - - - - - - -
    -
    -
    - `, - styleUrls: ['./details.component.css'], -}) -export class DetailsComponent { - - route: ActivatedRoute = inject(ActivatedRoute); - housingService = inject(HousingService); - housingLocation: HousingLocation | undefined; - - applyForm = new FormGroup({ - firstName: new FormControl(''), - lastName: new FormControl(''), - email: new FormControl('') - }); - - // #docregion update-details-component-constructor - constructor() { - const housingLocationId = parseInt(this.route.snapshot.params['id'], 10); - this.housingService.getHousingLocationById(housingLocationId).then(housingLocation => { - this.housingLocation = housingLocation; - }); - } - // #enddocregion - - submitApplication() { - this.housingService.submitApplication( - this.applyForm.value.firstName ?? '', - this.applyForm.value.lastName ?? '', - this.applyForm.value.email ?? '' - ); - } - -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/home/home.component.css b/aio/content/examples/first-app-lesson-14/src/app/home/home.component.css deleted file mode 100644 index 68f1564e748..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/home/home.component.css +++ /dev/null @@ -1,40 +0,0 @@ -.results { - display: grid; - column-gap: 14px; - row-gap: 14px; - grid-template-columns: repeat(auto-fill, minmax(400px, 400px)); - margin-top: 50px; - justify-content: space-around; -} - -input[type="text"] { - border: solid 1px var(--primary-color); - padding: 10px; - border-radius: 8px; - margin-right: 4px; - display: inline-block; - width: 30%; -} - -button { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} - -@media (min-width: 500px) and (max-width: 768px) { - .results { - grid-template-columns: repeat(2, 1fr); - } - input[type="text"] { - width: 70%; - } -} - -@media (max-width: 499px) { - .results { - grid-template-columns: 1fr; - } -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/home/home.component.ts b/aio/content/examples/first-app-lesson-14/src/app/home/home.component.ts deleted file mode 100644 index 4959050e9a3..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/home/home.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { Component, inject } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocationComponent } from '../housing-location/housing-location.component'; -import { HousingLocation } from '../housinglocation'; -import { HousingService } from '../housing.service'; - -@Component({ - selector: 'app-home', - standalone: true, - imports: [ - CommonModule, - HousingLocationComponent - ], - template: ` -
    -
    - - -
    -
    -
    - - -
    - `, - styleUrls: ['./home.component.css'], -}) - -export class HomeComponent { - housingLocationList: HousingLocation[] = []; - housingService: HousingService = inject(HousingService); - filteredLocationList: HousingLocation[] = []; - - // #docregion update-home-component-constructor - constructor() { - this.housingService.getAllHousingLocations().then((housingLocationList: HousingLocation[]) => { - this.housingLocationList = housingLocationList; - this.filteredLocationList = housingLocationList; - }); - } - // #enddocregion - - filterResults(text: string) { - if (!text) { - this.filteredLocationList = this.housingLocationList; - return; - } - - this.filteredLocationList = this.housingLocationList.filter( - housingLocation => housingLocation?.city.toLowerCase().includes(text.toLowerCase()) - ); - } -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.css b/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.css deleted file mode 100644 index af6becb6732..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.css +++ /dev/null @@ -1,31 +0,0 @@ -.listing { - background: var(--accent-color); - border-radius: 30px; - padding-bottom: 30px; -} -.listing-heading { - color: var(--primary-color); - padding: 10px 20px 0 20px; -} -.listing-photo { - height: 250px; - width: 100%; - object-fit: cover; - border-radius: 30px 30px 0 0; -} -.listing-location { - padding: 10px 20px 20px 20px; -} -.listing-location::before { - content: url("/assets/location-pin.svg") / ""; -} - -section.listing a { - padding-left: 20px; - text-decoration: none; - color: var(--primary-color); -} -section.listing a::after { - content: "\203A"; - margin-left: 5px; -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.ts b/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.ts deleted file mode 100644 index 0834923aff6..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/housing-location/housing-location.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { HousingLocation } from '../housinglocation'; -import { RouterModule } from '@angular/router'; - -@Component({ - selector: 'app-housing-location', - standalone: true, - imports: [ - CommonModule, - RouterModule - ], - template: ` -
    - Exterior photo of {{housingLocation.name}} -

    {{ housingLocation.name }}

    -

    {{ housingLocation.city}}, {{housingLocation.state }}

    - Learn More -
    - `, - styleUrls: ['./housing-location.component.css'], -}) - -export class HousingLocationComponent { - - @Input() housingLocation!: HousingLocation; - -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/housing.service.ts b/aio/content/examples/first-app-lesson-14/src/app/housing.service.ts deleted file mode 100644 index 5aab9ec38f4..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/housing.service.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HousingLocation } from './housinglocation'; - -@Injectable({ - providedIn: 'root' -}) -export class HousingService { - - url = 'http://localhost:3000/locations'; - - // #docregion update-getAllHousingLocations - async getAllHousingLocations(): Promise { - const data = await fetch(this.url); - return await data.json() ?? []; - } - // #enddocregion - - // #docregion update-getHousingLocationById - async getHousingLocationById(id: number): Promise { - const data = await fetch(`${this.url}/${id}`); - return await data.json() ?? {}; - } - // #enddocregion - - submitApplication(firstName: string, lastName: string, email: string) { - console.log(firstName, lastName, email); - } -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/housinglocation.ts b/aio/content/examples/first-app-lesson-14/src/app/housinglocation.ts deleted file mode 100644 index 8303b6754eb..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/housinglocation.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface HousingLocation { - id: number; - name: string; - city: string; - state: string; - photo: string; - availableUnits: number; - wifi: boolean; - laundry: boolean; -} diff --git a/aio/content/examples/first-app-lesson-14/src/app/routes.ts b/aio/content/examples/first-app-lesson-14/src/app/routes.ts deleted file mode 100644 index f3710b128af..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/app/routes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Routes } from '@angular/router'; -import { HomeComponent } from './home/home.component'; -import { DetailsComponent } from './details/details.component'; - -const routeConfig: Routes = [ - { - path: '', - component: HomeComponent, - title: 'Home page' - }, - { - path: 'details/:id', - component: DetailsComponent, - title: 'Home details' - } -]; - -export default routeConfig; diff --git a/aio/content/examples/first-app-lesson-14/src/assets/location-pin.svg b/aio/content/examples/first-app-lesson-14/src/assets/location-pin.svg deleted file mode 100644 index 8a709d4b39c..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/assets/location-pin.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/first-app-lesson-14/src/assets/logo.svg b/aio/content/examples/first-app-lesson-14/src/assets/logo.svg deleted file mode 100644 index 6a4c13d5bac..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/assets/logo.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/first-app-lesson-14/src/favicon.ico b/aio/content/examples/first-app-lesson-14/src/favicon.ico deleted file mode 100644 index 997406ad22c..00000000000 Binary files a/aio/content/examples/first-app-lesson-14/src/favicon.ico and /dev/null differ diff --git a/aio/content/examples/first-app-lesson-14/src/index.html b/aio/content/examples/first-app-lesson-14/src/index.html deleted file mode 100644 index e2259ecf9f8..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Homes - - - - - - - - - - - diff --git a/aio/content/examples/first-app-lesson-14/src/main.ts b/aio/content/examples/first-app-lesson-14/src/main.ts deleted file mode 100644 index fe1364a0c15..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* -* Protractor support is deprecated in Angular. -* Protractor is used in this example for compatibility with Angular documentation tools. -*/ -import { bootstrapApplication,provideProtractorTestingSupport } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { provideRouter } from '@angular/router'; -import routeConfig from './app/routes'; - -bootstrapApplication(AppComponent, - { - providers: [ - provideProtractorTestingSupport(), - provideRouter(routeConfig) - ] - } -).catch(err => console.error(err)); diff --git a/aio/content/examples/first-app-lesson-14/src/styles.css b/aio/content/examples/first-app-lesson-14/src/styles.css deleted file mode 100644 index 8ff9d490e35..00000000000 --- a/aio/content/examples/first-app-lesson-14/src/styles.css +++ /dev/null @@ -1,23 +0,0 @@ -/* You can add global styles to this file, and also import other style files */ -* { - margin: 0; - padding: 0; -} - -body { - font-family: 'Be Vietnam Pro', sans-serif; -} -:root { - --primary-color: #605DC8; - --secondary-color: #8B89E6; - --accent-color: #e8e7fa; - --shadow-color: #E8E8E8; -} - -button.primary { - padding: 10px; - border: solid 1px var(--primary-color); - background: var(--primary-color); - color: white; - border-radius: 8px; -} diff --git a/aio/content/examples/first-app-lesson-14/stackblitz.json b/aio/content/examples/first-app-lesson-14/stackblitz.json deleted file mode 100644 index d207cb343f6..00000000000 --- a/aio/content/examples/first-app-lesson-14/stackblitz.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "description": "Angular - First App - Lesson 14", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "first", - "angular", - "app", - "lesson", - "14" - ] - ] -} diff --git a/aio/content/examples/form-validation/BUILD.bazel b/aio/content/examples/form-validation/BUILD.bazel deleted file mode 100644 index b3386a161aa..00000000000 --- a/aio/content/examples/form-validation/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "form-validation", -) diff --git a/aio/content/examples/form-validation/e2e/src/app.e2e-spec.ts b/aio/content/examples/form-validation/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 34323e59228..00000000000 --- a/aio/content/examples/form-validation/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,246 +0,0 @@ -import { browser, element, by, protractor, ElementFinder, ElementArrayFinder } from 'protractor'; - -// THESE TESTS ARE INCOMPLETE -describe('Form Validation Tests', () => { - - beforeAll(() => browser.get('')); - - describe('Template-driven form', () => { - beforeAll(() => { - getPage('app-hero-form-template'); - }); - - tests('Template-Driven Form'); - bobTests(); - asyncValidationTests(); - crossValidationTests(); - }); - - describe('Reactive form', () => { - beforeAll(() => { - getPage('app-hero-form-reactive'); - }); - - tests('Reactive Form'); - bobTests(); - asyncValidationTests(); - crossValidationTests(); - }); -}); - -////////// - -const testName = 'Test Name'; - -let page: { - section: ElementFinder; - form: ElementFinder; - title: ElementFinder; - nameInput: ElementFinder; - alterEgoInput: ElementFinder; - powerSelect: ElementFinder; - powerOption: ElementFinder; - errorMessages: ElementArrayFinder; - heroFormButtons: ElementArrayFinder; - heroSubmitted: ElementFinder; - alterEgoErrors: ElementFinder; - crossValidationErrorMessage: ElementFinder; -}; - -function getPage(sectionTag: string) { - const section = element(by.css(sectionTag)); - const buttons = section.all(by.css('button')); - - page = { - section, - form: section.element(by.css('form')), - title: section.element(by.css('h2')), - nameInput: section.element(by.css('#name')), - alterEgoInput: section.element(by.css('#alterEgo')), - powerSelect: section.element(by.css('#power')), - powerOption: section.element(by.css('#power option')), - errorMessages: section.all(by.css('div.alert')), - heroFormButtons: buttons, - heroSubmitted: section.element(by.css('.submitted-message')), - alterEgoErrors: section.element(by.css('.alter-ego-errors')), - crossValidationErrorMessage: section.element(by.css('.cross-validation-error-message')), - }; -} - -function tests(title: string) { - - it('should display correct title', async () => { - expect(await page.title.getText()).toContain(title); - }); - - it('should not display submitted message before submit', async () => { - expect(await page.heroSubmitted.isElementPresent(by.css('p'))).toBe(false); - }); - - it('should have form buttons', async () => { - expect(await page.heroFormButtons.count()).toEqual(2); - }); - - it('should have error at start', async () => { - await expectFormIsInvalid(); - }); - - // it('showForm', () => { - // page.form.getInnerHtml().then(html => console.log(html)); - // }); - - it('should have disabled submit button', async () => { - expect(await page.heroFormButtons.get(0).isEnabled()).toBe(false); - }); - - it('resetting name to valid name should clear errors', async () => { - const ele = page.nameInput; - expect(await ele.isPresent()).toBe(true, 'nameInput should exist'); - await ele.clear(); - await ele.sendKeys(testName); - await expectFormIsValid(); - }); - - it('should produce "required" error after clearing name', async () => { - await page.nameInput.clear(); - // await page.alterEgoInput.click(); // to blur ... didn't work - await page.nameInput.sendKeys('x', protractor.Key.BACK_SPACE); // ugh! - expect(await page.form.getAttribute('class')).toMatch('ng-invalid'); - expect(await page.errorMessages.get(0).getText()).toContain('required'); - }); - - it('should produce "at least 4 characters" error when name="x"', async () => { - await page.nameInput.clear(); - await page.nameInput.sendKeys('x'); // too short - await expectFormIsInvalid(); - expect(await page.errorMessages.get(0).getText()).toContain('at least 4 characters'); - }); - - it('resetting name to valid name again should clear errors', async () => { - await page.nameInput.sendKeys(testName); - await expectFormIsValid(); - }); - - it('should have enabled submit button', async () => { - const submitBtn = page.heroFormButtons.get(0); - expect(await submitBtn.isEnabled()).toBe(true); - }); - - it('should hide form after submit', async () => { - await page.heroFormButtons.get(0).click(); - expect(await page.heroFormButtons.get(0).isDisplayed()).toBe(false); - }); - - it('submitted form should be displayed', async () => { - expect(await page.heroSubmitted.isElementPresent(by.css('p'))).toBe(true); - }); - - it('submitted form should have new hero name', async () => { - expect(await page.heroSubmitted.getText()).toContain(testName); - }); - - it('clicking edit button should reveal form again', async () => { - const newFormBtn = page.heroSubmitted.element(by.css('button')); - await newFormBtn.click(); - expect(await page.heroSubmitted.isElementPresent(by.css('p'))) - .toBe(false, 'submitted hidden again'); - expect(await page.title.isDisplayed()).toBe(true, 'can see form title'); - }); -} - -async function expectFormIsValid() { - expect(await page.form.getAttribute('class')).toMatch('ng-valid'); -} - -async function expectFormIsInvalid() { - expect(await page.form.getAttribute('class')).toMatch('ng-invalid'); -} - -async function triggerAlterEgoValidation() { - // alterEgo has updateOn set to 'blur', click outside of the input to trigger the blur event - await element(by.css('app-root')).click(); -} - -async function waitForAlterEgoValidation() { - // alterEgo async validation will be performed in 400ms - await browser.sleep(400); -} - -function bobTests() { - const emsg = 'Name cannot be Bob.'; - - it('should produce "no bob" error after setting name to "Bobby"', async () => { - // Re-populate select element - await page.powerSelect.click(); - await page.powerOption.click(); - - await page.nameInput.clear(); - await page.nameInput.sendKeys('Bobby'); - await expectFormIsInvalid(); - expect(await page.errorMessages.get(0).getText()).toBe(emsg); - }); - - it('should be ok again with valid name', async () => { - await page.nameInput.clear(); - await page.nameInput.sendKeys(testName); - await expectFormIsValid(); - }); -} - -function asyncValidationTests() { - const emsg = 'Alter ego is already taken.'; - - it(`should produce "${emsg}" error after setting alterEgo to Eric`, async () => { - await page.alterEgoInput.clear(); - await page.alterEgoInput.sendKeys('Eric'); - - await triggerAlterEgoValidation(); - await waitForAlterEgoValidation(); - - await expectFormIsInvalid(); - expect(await page.alterEgoErrors.getText()).toBe(emsg); - }); - - it('should be ok again with different values', async () => { - await page.alterEgoInput.clear(); - await page.alterEgoInput.sendKeys('John'); - - await triggerAlterEgoValidation(); - await waitForAlterEgoValidation(); - - await expectFormIsValid(); - expect(await page.alterEgoErrors.isPresent()).toBe(false); - }); -} - -function crossValidationTests() { - const emsg = 'Name cannot match alter ego.'; - - it(`should produce "${emsg}" error after setting name and alter ego to the same value`, async () => { - await page.nameInput.clear(); - await page.nameInput.sendKeys('Batman'); - - await page.alterEgoInput.clear(); - await page.alterEgoInput.sendKeys('Batman'); - - await triggerAlterEgoValidation(); - await waitForAlterEgoValidation(); - - await expectFormIsInvalid(); - expect(await page.crossValidationErrorMessage.getText()).toBe(emsg); - }); - - it('should be ok again with different values', async () => { - await page.nameInput.clear(); - await page.nameInput.sendKeys('Batman'); - - await page.alterEgoInput.clear(); - await page.alterEgoInput.sendKeys('Superman'); - - await triggerAlterEgoValidation(); - await waitForAlterEgoValidation(); - - await expectFormIsValid(); - expect(await page.crossValidationErrorMessage.isPresent()).toBe(false); - }); -} diff --git a/aio/content/examples/form-validation/example-config.json b/aio/content/examples/form-validation/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/form-validation/src/app/app.component.ts b/aio/content/examples/form-validation/src/app/app.component.ts deleted file mode 100644 index ccd040459b1..00000000000 --- a/aio/content/examples/form-validation/src/app/app.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { HeroFormReactiveComponent } from './reactive/hero-form-reactive.component'; -import { HeroFormTemplateComponent } from './template/hero-form-template.component'; - -@Component({ - selector: 'app-root', - template: ` -

    Form validation example

    - -
    - - `, - standalone: true, - imports: [HeroFormTemplateComponent, HeroFormReactiveComponent], -}) -export class AppComponent {} diff --git a/aio/content/examples/form-validation/src/app/app.config.ts b/aio/content/examples/form-validation/src/app/app.config.ts deleted file mode 100644 index cecfa00cbfe..00000000000 --- a/aio/content/examples/form-validation/src/app/app.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {ApplicationConfig} from '@angular/core'; - -import {provideProtractorTestingSupport} from '@angular/platform-browser'; - -export const appConfig: ApplicationConfig = { - providers: [provideProtractorTestingSupport()], -}; diff --git a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.1.ts b/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.1.ts deleted file mode 100644 index d2c0abb75cf..00000000000 --- a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.1.ts +++ /dev/null @@ -1,52 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; -import { NgIf, NgFor } from '@angular/common'; -import { - FormsModule, - FormControl, - FormGroup, - ReactiveFormsModule, - Validators, -} from '@angular/forms'; -import { forbiddenNameValidator } from '../shared/forbidden-name.directive'; - -@Component({ - standalone: true, - selector: 'app-hero-form-reactive', - templateUrl: './hero-form-reactive.component.html', - styleUrls: ['./hero-form-reactive.component.css'], - imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor], -}) -export class HeroFormReactiveComponent implements OnInit { - powers = ['Really Smart', 'Super Flexible', 'Weather Changer']; - - hero = { name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0] }; - - heroForm: FormGroup; - - // #docregion form-group - ngOnInit(): void { - // #docregion custom-validator - this.heroForm = new FormGroup({ - name: new FormControl(this.hero.name, [ - Validators.required, - Validators.minLength(4), - forbiddenNameValidator(/bob/i), // <-- Here's how you pass in the custom validator. - ]), - alterEgo: new FormControl(this.hero.alterEgo), - power: new FormControl(this.hero.power, Validators.required), - }); - // #enddocregion custom-validator - } - - get name() { - return this.heroForm.get('name'); - } - - get power() { - return this.heroForm.get('power'); - } - // #enddocregion form-group -} -// #enddocregion diff --git a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.2.ts b/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.2.ts deleted file mode 100644 index 30f77c604bf..00000000000 --- a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.2.ts +++ /dev/null @@ -1,66 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; -import { NgIf, NgFor } from '@angular/common'; -import { - FormControl, - FormGroup, - FormsModule, - ReactiveFormsModule, - Validators, -} from '@angular/forms'; -import { forbiddenNameValidator } from '../shared/forbidden-name.directive'; -import { UniqueAlterEgoValidator } from '../shared/alter-ego.directive'; - -@Component({ - standalone: true, - selector: 'app-hero-form-reactive', - templateUrl: './hero-form-reactive.component.html', - styleUrls: ['./hero-form-reactive.component.css'], - imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor], -}) -export class HeroFormReactiveComponent implements OnInit { - powers = ['Really Smart', 'Super Flexible', 'Weather Changer']; - - hero = { name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0] }; - - heroForm: FormGroup; - - ngOnInit(): void { - // #docregion async-validator-usage - const alterEgoControl = new FormControl('', { - asyncValidators: [ - this.alterEgoValidator.validate.bind(this.alterEgoValidator), - ], - updateOn: 'blur', - }); - // #enddocregion async-validator-usage - alterEgoControl.setValue(this.hero.alterEgo); - - this.heroForm = new FormGroup({ - name: new FormControl(this.hero.name, [ - Validators.required, - Validators.minLength(4), - forbiddenNameValidator(/bob/i), - ]), - alterEgo: alterEgoControl, - power: new FormControl(this.hero.power, Validators.required), - }); - } - - get name() { - return this.heroForm.get('name'); - } - - get power() { - return this.heroForm.get('power'); - } - - get alterEgo() { - return this.heroForm.get('alterEgo'); - } - - // #docregion async-validator-inject - constructor(private alterEgoValidator: UniqueAlterEgoValidator) {} - // #enddocregion async-validator-inject -} diff --git a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.css b/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.css deleted file mode 100644 index b87c61c7751..00000000000 --- a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.css +++ /dev/null @@ -1,3 +0,0 @@ -.cross-validation-error input { - border-left: 5px solid red; -} diff --git a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.html b/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.html deleted file mode 100644 index bfd55d58eb1..00000000000 --- a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.html +++ /dev/null @@ -1,111 +0,0 @@ - -
    -

    Reactive Form

    - -
    -
    -
    -
    - - - - -
    -
    Name is required.
    -
    - Name must be at least 4 characters long. -
    -
    - Name cannot be Bob. -
    -
    - -
    - -
    - - - -
    Validating...
    -
    -
    - Alter ego is already taken. -
    -
    -
    - - -
    - Name cannot match alter ego. -
    - -
    - -
    - - - -
    -
    Power is required.
    -
    -
    - -

    Complete the form to enable the Submit button.

    - - -
    -
    - - -
    diff --git a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.ts b/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.ts deleted file mode 100644 index 55ad4f96af6..00000000000 --- a/aio/content/examples/form-validation/src/app/reactive/hero-form-reactive.component.ts +++ /dev/null @@ -1,62 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { - FormControl, - FormGroup, - Validators, - FormsModule, - ReactiveFormsModule, -} from '@angular/forms'; -import { forbiddenNameValidator } from '../shared/forbidden-name.directive'; -import { identityRevealedValidator } from '../shared/identity-revealed.directive'; -import { UniqueAlterEgoValidator } from '../shared/alter-ego.directive'; -import { NgIf, NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-hero-form-reactive', - templateUrl: './hero-form-reactive.component.html', - styleUrls: ['./hero-form-reactive.component.css'], - imports: [FormsModule, ReactiveFormsModule, NgIf, NgFor], -}) -export class HeroFormReactiveComponent implements OnInit { - powers = ['Really Smart', 'Super Flexible', 'Weather Changer']; - - hero = { name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0] }; - - heroForm!: FormGroup; - - ngOnInit(): void { - this.heroForm = new FormGroup( - { - name: new FormControl(this.hero.name, [ - Validators.required, - Validators.minLength(4), - forbiddenNameValidator(/bob/i), - ]), - alterEgo: new FormControl(this.hero.alterEgo, { - asyncValidators: [ - this.alterEgoValidator.validate.bind(this.alterEgoValidator), - ], - updateOn: 'blur', - }), - power: new FormControl(this.hero.power, Validators.required), - }, - { validators: identityRevealedValidator }, - ); // <-- add custom validator at the FormGroup level - } - - get name() { - return this.heroForm.get('name')!; - } - - get power() { - return this.heroForm.get('power')!; - } - - get alterEgo() { - return this.heroForm.get('alterEgo')!; - } - - constructor(private alterEgoValidator: UniqueAlterEgoValidator) {} -} diff --git a/aio/content/examples/form-validation/src/app/shared/alter-ego.directive.ts b/aio/content/examples/form-validation/src/app/shared/alter-ego.directive.ts deleted file mode 100644 index b5351ddc802..00000000000 --- a/aio/content/examples/form-validation/src/app/shared/alter-ego.directive.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Directive, forwardRef, Injectable } from '@angular/core'; -import { - AsyncValidator, - AbstractControl, - NG_ASYNC_VALIDATORS, - ValidationErrors, -} from '@angular/forms'; -import { catchError, map } from 'rxjs/operators'; -import { HeroesService } from './heroes.service'; -import { Observable, of } from 'rxjs'; - -// #docregion async-validator -@Injectable({ providedIn: 'root' }) -export class UniqueAlterEgoValidator implements AsyncValidator { - constructor(private heroesService: HeroesService) {} - - validate(control: AbstractControl): Observable { - return this.heroesService.isAlterEgoTaken(control.value).pipe( - map((isTaken) => (isTaken ? { uniqueAlterEgo: true } : null)), - catchError(() => of(null)), - ); - } -} -// #enddocregion async-validator - -// #docregion async-validator-directive -@Directive({ - selector: '[appUniqueAlterEgo]', - providers: [ - { - provide: NG_ASYNC_VALIDATORS, - useExisting: forwardRef(() => UniqueAlterEgoValidatorDirective), - multi: true, - }, - ], - standalone: true, -}) -export class UniqueAlterEgoValidatorDirective implements AsyncValidator { - constructor(private validator: UniqueAlterEgoValidator) {} - - validate(control: AbstractControl): Observable { - return this.validator.validate(control); - } -} -// #enddocregion async-validator-directive diff --git a/aio/content/examples/form-validation/src/app/shared/forbidden-name.directive.ts b/aio/content/examples/form-validation/src/app/shared/forbidden-name.directive.ts deleted file mode 100644 index c53f0a725ab..00000000000 --- a/aio/content/examples/form-validation/src/app/shared/forbidden-name.directive.ts +++ /dev/null @@ -1,44 +0,0 @@ -// #docregion -import { Directive, Input } from '@angular/core'; -import { - AbstractControl, - NG_VALIDATORS, - ValidationErrors, - Validator, - ValidatorFn, -} from '@angular/forms'; - -// #docregion custom-validator -/** A hero's name can't match the given regular expression */ -export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn { - return (control: AbstractControl): ValidationErrors | null => { - const forbidden = nameRe.test(control.value); - return forbidden ? { forbiddenName: { value: control.value } } : null; - }; -} -// #enddocregion custom-validator - -// #docregion directive -@Directive({ - selector: '[appForbiddenName]', - // #docregion directive-providers - providers: [ - { - provide: NG_VALIDATORS, - useExisting: ForbiddenValidatorDirective, - multi: true, - }, - ], - // #enddocregion directive-providers - standalone: true, -}) -export class ForbiddenValidatorDirective implements Validator { - @Input('appForbiddenName') forbiddenName = ''; - - validate(control: AbstractControl): ValidationErrors | null { - return this.forbiddenName - ? forbiddenNameValidator(new RegExp(this.forbiddenName, 'i'))(control) - : null; - } -} -// #enddocregion directive diff --git a/aio/content/examples/form-validation/src/app/shared/heroes.service.ts b/aio/content/examples/form-validation/src/app/shared/heroes.service.ts deleted file mode 100644 index 1bacdec57f3..00000000000 --- a/aio/content/examples/form-validation/src/app/shared/heroes.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; - -const ALTER_EGOS = ['Eric']; - -@Injectable({ providedIn: 'root' }) -export class HeroesService { - isAlterEgoTaken(alterEgo: string): Observable { - const isTaken = ALTER_EGOS.includes(alterEgo); - - return of(isTaken).pipe(delay(400)); - } -} diff --git a/aio/content/examples/form-validation/src/app/shared/identity-revealed.directive.ts b/aio/content/examples/form-validation/src/app/shared/identity-revealed.directive.ts deleted file mode 100755 index 7d2d4af036f..00000000000 --- a/aio/content/examples/form-validation/src/app/shared/identity-revealed.directive.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docregion -import { Directive } from '@angular/core'; -import { - AbstractControl, - FormGroup, - NG_VALIDATORS, - ValidationErrors, - Validator, - ValidatorFn, -} from '@angular/forms'; - -// #docregion cross-validation-validator -/** A hero's name can't match the hero's alter ego */ -export const identityRevealedValidator: ValidatorFn = ( - control: AbstractControl, -): ValidationErrors | null => { - const name = control.get('name'); - const alterEgo = control.get('alterEgo'); - - return name && alterEgo && name.value === alterEgo.value - ? { identityRevealed: true } - : null; -}; -// #enddocregion cross-validation-validator - -// #docregion cross-validation-directive -@Directive({ - selector: '[appIdentityRevealed]', - providers: [ - { - provide: NG_VALIDATORS, - useExisting: IdentityRevealedValidatorDirective, - multi: true, - }, - ], - standalone: true, -}) -export class IdentityRevealedValidatorDirective implements Validator { - validate(control: AbstractControl): ValidationErrors | null { - return identityRevealedValidator(control); - } -} -// #enddocregion cross-validation-directive diff --git a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.css b/aio/content/examples/form-validation/src/app/template/hero-form-template.component.css deleted file mode 100644 index 28b0db19920..00000000000 --- a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.css +++ /dev/null @@ -1,4 +0,0 @@ -/* #docregion */ -.cross-validation-error input { - border-left: 5px solid #a94442; -} diff --git a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.html b/aio/content/examples/form-validation/src/app/template/hero-form-template.component.html deleted file mode 100644 index 213a0235432..00000000000 --- a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.html +++ /dev/null @@ -1,110 +0,0 @@ - -
    -

    Template-Driven Form

    - -
    - -
    -
    -
    - - - - - - -
    -
    Name is required.
    -
    - Name must be at least 4 characters long. -
    -
    - Name cannot be Bob. -
    -
    - -
    - -
    - - - - -
    Validating...
    -
    -
    - Alter ego is already taken. -
    -
    -
    - - -
    - Name cannot match alter ego. -
    - -
    - -
    - - - -
    -
    Power is required.
    -
    -
    - -

    Complete the form to enable the Submit button.

    - - -
    - - -
    -
    diff --git a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.ts b/aio/content/examples/form-validation/src/app/template/hero-form-template.component.ts deleted file mode 100644 index 566b153b591..00000000000 --- a/aio/content/examples/form-validation/src/app/template/hero-form-template.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component } from '@angular/core'; -import { UniqueAlterEgoValidatorDirective } from '../shared/alter-ego.directive'; -import { NgIf, NgFor } from '@angular/common'; -import { ForbiddenValidatorDirective } from '../shared/forbidden-name.directive'; -import { IdentityRevealedValidatorDirective } from '../shared/identity-revealed.directive'; -import { FormsModule } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-hero-form-template', - templateUrl: './hero-form-template.component.html', - styleUrls: ['./hero-form-template.component.css'], - imports: [ - ForbiddenValidatorDirective, - FormsModule, - IdentityRevealedValidatorDirective, - NgFor, - NgIf, - UniqueAlterEgoValidatorDirective, - ], -}) -export class HeroFormTemplateComponent { - powers = ['Really Smart', 'Super Flexible', 'Weather Changer']; - - hero = { name: 'Dr.', alterEgo: 'Dr. What', power: this.powers[0] }; -} diff --git a/aio/content/examples/form-validation/src/assets/forms.css b/aio/content/examples/form-validation/src/assets/forms.css deleted file mode 100644 index 51cc24d82f4..00000000000 --- a/aio/content/examples/form-validation/src/assets/forms.css +++ /dev/null @@ -1,29 +0,0 @@ - -.ng-valid[required], .ng-valid.required { - border-left: 5px solid #42A948; /* green */ -} - -.ng-invalid:not(form) { - border-left: 5px solid #a94442; /* red */ -} - -.alert div { - background-color: #fed3d3; - color: #820000; - padding: 1rem; - margin-bottom: 1rem; -} - -.form-group { - margin-bottom: 1rem; -} - -label { - display: block; - margin-bottom: .5rem; -} - -select { - width: 100%; - padding: .5rem; -} diff --git a/aio/content/examples/form-validation/src/index.html b/aio/content/examples/form-validation/src/index.html deleted file mode 100644 index 80fb14f4895..00000000000 --- a/aio/content/examples/form-validation/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Hero Form with Validation - - - - - - - - - - diff --git a/aio/content/examples/form-validation/src/main.ts b/aio/content/examples/form-validation/src/main.ts deleted file mode 100644 index af9d7244fad..00000000000 --- a/aio/content/examples/form-validation/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { AppComponent } from './app/app.component'; -import { bootstrapApplication } from '@angular/platform-browser'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/form-validation/stackblitz.json b/aio/content/examples/form-validation/stackblitz.json deleted file mode 100644 index 485b5cb555e..00000000000 --- a/aio/content/examples/form-validation/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Validation", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/app.component.ts" -} diff --git a/aio/content/examples/forms-overview/BUILD.bazel b/aio/content/examples/forms-overview/BUILD.bazel deleted file mode 100644 index ec96adbda6b..00000000000 --- a/aio/content/examples/forms-overview/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "forms-overview", -) diff --git a/aio/content/examples/forms-overview/e2e/src/app.e2e-spec.ts b/aio/content/examples/forms-overview/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 34703dbf9c5..00000000000 --- a/aio/content/examples/forms-overview/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { AppPage } from './app.po'; - -describe('forms-overview App', () => { - let page: AppPage; - - beforeEach(() => { - page = new AppPage(); - }); - - it('should display a title', async () => { - await page.navigateTo(); - expect(await page.getTitleText()).toEqual('Forms Overview'); - }); -}); diff --git a/aio/content/examples/forms-overview/example-config.json b/aio/content/examples/forms-overview/example-config.json deleted file mode 100644 index ccf472031b4..00000000000 --- a/aio/content/examples/forms-overview/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "tests": [ - {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadlessNoSandbox", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]} - ] -} diff --git a/aio/content/examples/forms-overview/src/app/app.component.spec.ts b/aio/content/examples/forms-overview/src/app/app.component.spec.ts deleted file mode 100755 index a1828af54d1..00000000000 --- a/aio/content/examples/forms-overview/src/app/app.component.spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { TestBed, waitForAsync } from '@angular/core/testing'; - -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [AppComponent], - }).compileComponents(); - })); - - it('should create the app', waitForAsync(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - - expect(app).toBeTruthy(); - })); - - it('should render title', waitForAsync(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain( - 'Forms Overview', - ); - })); -}); diff --git a/aio/content/examples/forms-overview/src/app/app.component.ts b/aio/content/examples/forms-overview/src/app/app.component.ts deleted file mode 100755 index f775029e3b8..00000000000 --- a/aio/content/examples/forms-overview/src/app/app.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; -import { - FavoriteColorComponent as ReactiveFavoriteColorComponent -} from './reactive/favorite-color/favorite-color.component'; -import { - FavoriteColorComponent as TemplateFavoriteColorComponent -} from './template/favorite-color/favorite-color.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    Forms Overview

    -

    Reactive

    - -

    Template-Driven

    - - `, - styles: [], - imports: [ReactiveFavoriteColorComponent, TemplateFavoriteColorComponent], -}) -export class AppComponent {} diff --git a/aio/content/examples/forms-overview/src/app/app.config.ts b/aio/content/examples/forms-overview/src/app/app.config.ts deleted file mode 100644 index 177f2090153..00000000000 --- a/aio/content/examples/forms-overview/src/app/app.config.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -const appConfig: ApplicationConfig = { - providers: [provideProtractorTestingSupport()], -}; - -export default appConfig; diff --git a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts deleted file mode 100755 index ba6dd558347..00000000000 --- a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { ReactiveFormsModule } from '@angular/forms'; - -import { createNewEvent } from '../../shared/utils'; -import { FavoriteColorComponent } from './favorite-color.component'; - -describe('Favorite Color Component', () => { - let component: FavoriteColorComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [FavoriteColorComponent, ReactiveFormsModule], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FavoriteColorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - // #docregion view-to-model - it('should update the value of the input field', () => { - const input = fixture.nativeElement.querySelector('input'); - const event = createNewEvent('input'); - - input.value = 'Red'; - input.dispatchEvent(event); - - expect(fixture.componentInstance.favoriteColorControl.value).toEqual('Red'); - }); - // #enddocregion view-to-model - - // #docregion model-to-view - it('should update the value in the control', () => { - component.favoriteColorControl.setValue('Blue'); - - const input = fixture.nativeElement.querySelector('input'); - - expect(input.value).toBe('Blue'); - }); - // #enddocregion model-to-view -}); diff --git a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts b/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts deleted file mode 100755 index c376c954cec..00000000000 --- a/aio/content/examples/forms-overview/src/app/reactive/favorite-color/favorite-color.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-reactive-favorite-color', - template: ` - Favorite Color: - `, - imports: [ReactiveFormsModule], -}) -export class FavoriteColorComponent { - favoriteColorControl = new FormControl(''); -} diff --git a/aio/content/examples/forms-overview/src/app/shared/utils.ts b/aio/content/examples/forms-overview/src/app/shared/utils.ts deleted file mode 100755 index 3932eb30957..00000000000 --- a/aio/content/examples/forms-overview/src/app/shared/utils.ts +++ /dev/null @@ -1,9 +0,0 @@ -export function createNewEvent( - eventName: string, - bubbles = false, - cancelable = false, -) { - const evt = document.createEvent('CustomEvent'); - evt.initCustomEvent(eventName, bubbles, cancelable, null); - return evt; -} diff --git a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts deleted file mode 100755 index baf01056b31..00000000000 --- a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { - ComponentFixture, - fakeAsync, - TestBed, - tick, - waitForAsync, -} from '@angular/core/testing'; -import { FormsModule } from '@angular/forms'; - -import { createNewEvent } from '../../shared/utils'; -import { FavoriteColorComponent } from './favorite-color.component'; - -describe('FavoriteColorComponent', () => { - let component: FavoriteColorComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [FavoriteColorComponent, FormsModule], - }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(FavoriteColorComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); - - // #docregion model-to-view - it('should update the favorite color on the input field', fakeAsync(() => { - component.favoriteColor = 'Blue'; - - fixture.detectChanges(); - - tick(); - - const input = fixture.nativeElement.querySelector('input'); - - expect(input.value).toBe('Blue'); - })); - // #enddocregion model-to-view - - // #docregion view-to-model - it('should update the favorite color in the component', fakeAsync(() => { - const input = fixture.nativeElement.querySelector('input'); - const event = createNewEvent('input'); - - input.value = 'Red'; - input.dispatchEvent(event); - - fixture.detectChanges(); - - expect(component.favoriteColor).toEqual('Red'); - })); - // #enddocregion view-to-model -}); diff --git a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts b/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts deleted file mode 100755 index 5f5cc9b23ed..00000000000 --- a/aio/content/examples/forms-overview/src/app/template/favorite-color/favorite-color.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; -import { FormsModule } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-template-favorite-color', - template: ` - Favorite Color: - `, - imports: [FormsModule], -}) -export class FavoriteColorComponent { - favoriteColor = ''; -} diff --git a/aio/content/examples/forms-overview/src/index.html b/aio/content/examples/forms-overview/src/index.html deleted file mode 100644 index 988ae05585c..00000000000 --- a/aio/content/examples/forms-overview/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Forms Overview - - - - - - - - diff --git a/aio/content/examples/forms-overview/src/main.ts b/aio/content/examples/forms-overview/src/main.ts deleted file mode 100755 index a964b873df0..00000000000 --- a/aio/content/examples/forms-overview/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfig from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/forms-overview/stackblitz.json b/aio/content/examples/forms-overview/stackblitz.json deleted file mode 100644 index 7e702e13064..00000000000 --- a/aio/content/examples/forms-overview/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Forms Overview", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "file": "src/app/app.component.ts" -} diff --git a/aio/content/examples/forms/BUILD.bazel b/aio/content/examples/forms/BUILD.bazel deleted file mode 100644 index 2de06e05af5..00000000000 --- a/aio/content/examples/forms/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "forms", -) diff --git a/aio/content/examples/forms/e2e/src/app.e2e-spec.ts b/aio/content/examples/forms/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 3b43373382a..00000000000 --- a/aio/content/examples/forms/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Forms Tests', () => { - - beforeEach(() => browser.get('')); - - it('should display correct title', async () => { - expect(await element.all(by.css('h1')).get(0).getText()).toEqual('Hero Form'); - }); - - it('should not display message before submit', async () => { - const ele = element(by.css('h2')); - expect(await ele.isDisplayed()).toBe(false); - }); - - it('should hide form after submit', async () => { - const ele = element.all(by.css('h1')).get(0); - expect(await ele.isDisplayed()).toBe(true); - - const b = element.all(by.css('button[type=submit]')).get(0); - await b.click(); - expect(await ele.isDisplayed()).toBe(false); - }); - - it('should display message after submit', async () => { - const b = element.all(by.css('button[type=submit]')).get(0); - await b.click(); - expect(await element(by.css('h2')).getText()).toContain('You submitted the following'); - }); - - it('should hide form after submit', async () => { - const alterEgoEle = element.all(by.css('input[name=alterEgo]')).get(0); - expect(await alterEgoEle.isDisplayed()).toBe(true); - - const submitButtonEle = element.all(by.css('button[type=submit]')).get(0); - await submitButtonEle.click(); - expect(await alterEgoEle.isDisplayed()).toBe(false); - }); - - it('should reflect submitted data after submit', async () => { - const alterEgoEle = element.all(by.css('input[name=alterEgo]')).get(0); - const value = await alterEgoEle.getAttribute('value'); - const test = 'testing 1 2 3'; - const newValue = value + test; - - await alterEgoEle.sendKeys(test); - expect(await alterEgoEle.getAttribute('value')).toEqual(newValue); - - const b = element.all(by.css('button[type=submit]')).get(0); - await b.click(); - - const alterEgoTextEle = element(by.cssContainingText('div', 'Alter Ego')); - expect(await alterEgoTextEle.isPresent()).toBe(true, 'cannot locate "Alter Ego" label'); - const divEle = element(by.cssContainingText('div', newValue)); - expect(await divEle.isPresent()).toBe(true, `cannot locate div with this text: ${newValue}`); - }); -}); diff --git a/aio/content/examples/forms/example-config.json b/aio/content/examples/forms/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/forms/src/app/app.component.css b/aio/content/examples/forms/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/forms/src/app/app.component.html b/aio/content/examples/forms/src/app/app.component.html deleted file mode 100644 index 84d14ff8f6d..00000000000 --- a/aio/content/examples/forms/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/forms/src/app/app.component.ts b/aio/content/examples/forms/src/app/app.component.ts deleted file mode 100644 index f7baece9b5f..00000000000 --- a/aio/content/examples/forms/src/app/app.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { } diff --git a/aio/content/examples/forms/src/app/app.module.ts b/aio/content/examples/forms/src/app/app.module.ts deleted file mode 100644 index 1a94fe3e310..00000000000 --- a/aio/content/examples/forms/src/app/app.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { HeroFormComponent } from './hero-form/hero-form.component'; - -@NgModule({ - imports: [ - BrowserModule, - CommonModule, - FormsModule - ], - declarations: [ - AppComponent, - HeroFormComponent - ], - providers: [], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/forms/src/app/hero-form/hero-form.component.css b/aio/content/examples/forms/src/app/hero-form/hero-form.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/forms/src/app/hero-form/hero-form.component.html b/aio/content/examples/forms/src/app/hero-form/hero-form.component.html deleted file mode 100644 index 7d2b0235abf..00000000000 --- a/aio/content/examples/forms/src/app/hero-form/hero-form.component.html +++ /dev/null @@ -1,193 +0,0 @@ - - -
    - -
    -

    Hero Form

    - -
    - -
    - - - - -
    - - Name is required -
    - -
    - -
    - - -
    - -
    - - -
    - Power is required -
    -
    - - - - - - - - - with reset - -    - - - - without reset - - -
    -
    - Name via form.controls = {{showFormControls(heroForm)}} -
    - - -
    -
    - - -
    -

    You submitted the following:

    -
    -
    Name
    -
    {{ model.name }}
    -
    -
    -
    Alter Ego
    -
    {{ model.alterEgo }}
    -
    -
    -
    Power
    -
    {{ model.power }}
    -
    -
    - -
    - -
    - - - -
    -
    - - - - -
    -
    - - - -
    - -
    -
    -

    Hero Form

    -
    -
    - - -
    - -
    - - -
    - - -
    - - -
    - - - - -
    -
    - - -
    -
    -

    Hero Form

    - -
    - - - {{ model | json }} -
    - - -
    - -
    - - -
    - -
    - - -
    - - - - -
    -
    - - -
    - - - TODO: remove this: {{model.name}} - -
    - - TODO: remove this: {{model.name}} -
    diff --git a/aio/content/examples/forms/src/app/hero-form/hero-form.component.ts b/aio/content/examples/forms/src/app/hero-form/hero-form.component.ts deleted file mode 100644 index 42e3270bf2b..00000000000 --- a/aio/content/examples/forms/src/app/hero-form/hero-form.component.ts +++ /dev/null @@ -1,56 +0,0 @@ -// #docplaster -// #docregion , v1, final -import { Component } from '@angular/core'; - -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-form', - templateUrl: './hero-form.component.html', - styleUrls: ['./hero-form.component.css'] -}) -export class HeroFormComponent { - - powers = ['Really Smart', 'Super Flexible', - 'Super Hot', 'Weather Changer']; - - model = new Hero(18, 'Dr. IQ', this.powers[0], 'Chuck Overstreet'); - - // #docregion submitted - submitted = false; - - onSubmit() { this.submitted = true; } - // #enddocregion submitted - - // #enddocregion final - // #enddocregion v1 - - // #docregion final, new-hero - newHero() { - this.model = new Hero(42, '', ''); - } - // #enddocregion final, new-hero - - skyDog(): Hero { - // #docregion SkyDog - const myHero = new Hero(42, 'SkyDog', - 'Fetch any object at any distance', - 'Leslie Rollover'); - console.log('My hero is called ' + myHero.name); // "My hero is called SkyDog" - // #enddocregion SkyDog - return myHero; - } - - //////// NOT SHOWN IN DOCS //////// - - // Reveal in html: - // Name via form.controls = {{showFormControls(heroForm)}} - showFormControls(form: any) { - return form && form.controls.name && - form.controls.name.value; // Dr. IQ - } - - ///////////////////////////// - - // #docregion v1, final -} diff --git a/aio/content/examples/forms/src/app/hero.ts b/aio/content/examples/forms/src/app/hero.ts deleted file mode 100644 index c1286264523..00000000000 --- a/aio/content/examples/forms/src/app/hero.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -export class Hero { - - constructor( - public id: number, - public name: string, - public power: string, - public alterEgo?: string - ) { } - -} diff --git a/aio/content/examples/forms/src/assets/forms.css b/aio/content/examples/forms/src/assets/forms.css deleted file mode 100644 index 13ffbe1203d..00000000000 --- a/aio/content/examples/forms/src/assets/forms.css +++ /dev/null @@ -1,9 +0,0 @@ -/* #docregion */ -.ng-valid[required], .ng-valid.required { - border-left: 5px solid #42A948; /* green */ -} - -.ng-invalid:not(form) { - border-left: 5px solid #a94442; /* red */ -} -/* #enddocregion */ diff --git a/aio/content/examples/forms/src/index.html b/aio/content/examples/forms/src/index.html deleted file mode 100644 index be443ca0da1..00000000000 --- a/aio/content/examples/forms/src/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - Hero Form - - - - - - - - - - - - - - - diff --git a/aio/content/examples/forms/src/main.ts b/aio/content/examples/forms/src/main.ts deleted file mode 100644 index 49432aa0877..00000000000 --- a/aio/content/examples/forms/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/forms/src/styles.1.css b/aio/content/examples/forms/src/styles.1.css deleted file mode 100644 index 167a66be4f8..00000000000 --- a/aio/content/examples/forms/src/styles.1.css +++ /dev/null @@ -1 +0,0 @@ -@import url('https://unpkg.com/bootstrap@3.3.7/dist/css/bootstrap.min.css'); diff --git a/aio/content/examples/forms/stackblitz.json b/aio/content/examples/forms/stackblitz.json deleted file mode 100644 index 97d00244aa7..00000000000 --- a/aio/content/examples/forms/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Forms", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "file": "src/app/hero-form/hero-form.component.html" -} diff --git a/aio/content/examples/getting-started-v0/BUILD.bazel b/aio/content/examples/getting-started-v0/BUILD.bazel deleted file mode 100644 index 4539b852e04..00000000000 --- a/aio/content/examples/getting-started-v0/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "getting-started-v0", - # This example downloads and inlines resources - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/getting-started-v0/e2e/src/app.e2e-spec.ts b/aio/content/examples/getting-started-v0/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 2bf35c2de50..00000000000 --- a/aio/content/examples/getting-started-v0/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Getting Started V0', () => { - beforeEach(() => browser.get('/')); - - it('should display "My Store" in the top bar', async () => { - const title = await element(by.css('app-root app-top-bar h1')).getText(); - - expect(title).toEqual('My Store'); - }); - - it('should display "Products" on the homepage', async () => { - const title = await element(by.css('app-root app-product-list h2')).getText(); - - expect(title).toEqual('Products'); - }); -}); diff --git a/aio/content/examples/getting-started-v0/example-config.json b/aio/content/examples/getting-started-v0/example-config.json deleted file mode 100644 index 32a5ae69cc9..00000000000 --- a/aio/content/examples/getting-started-v0/example-config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "useCommonBoilerplate": false, - "projectType": "getting-started" -} \ No newline at end of file diff --git a/aio/content/examples/getting-started-v0/src/app/app.component.css b/aio/content/examples/getting-started-v0/src/app/app.component.css deleted file mode 100644 index 8b137891791..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/app.component.css +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/getting-started-v0/src/app/app.component.html b/aio/content/examples/getting-started-v0/src/app/app.component.html deleted file mode 100644 index 14109efcf18..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/app.component.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
    - -
    \ No newline at end of file diff --git a/aio/content/examples/getting-started-v0/src/app/app.component.ts b/aio/content/examples/getting-started-v0/src/app/app.component.ts deleted file mode 100644 index 68478a86238..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/app.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { -} diff --git a/aio/content/examples/getting-started-v0/src/app/app.module.ts b/aio/content/examples/getting-started-v0/src/app/app.module.ts deleted file mode 100644 index c9fa3225890..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/app.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; -import { ReactiveFormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { TopBarComponent } from './top-bar/top-bar.component'; -import { ProductListComponent } from './product-list/product-list.component'; - -@NgModule({ - imports: [ - BrowserModule, - ReactiveFormsModule, - RouterModule.forRoot([ - { path: '', component: ProductListComponent }, - ]) - ], - declarations: [ - AppComponent, - TopBarComponent, - ProductListComponent - ], - bootstrap: [ - AppComponent - ] -}) -export class AppModule { } diff --git a/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.css b/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.html b/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.html deleted file mode 100644 index 1007667e7b2..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Products

    diff --git a/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.ts b/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.ts deleted file mode 100644 index b9578df3475..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/product-list/product-list.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -import { products } from '../products'; - -@Component({ - selector: 'app-product-list', - templateUrl: './product-list.component.html', - styleUrls: ['./product-list.component.css'] -}) -export class ProductListComponent { - products = [...products]; - - share() { - window.alert('The product has been shared!'); - } -} diff --git a/aio/content/examples/getting-started-v0/src/app/products.ts b/aio/content/examples/getting-started-v0/src/app/products.ts deleted file mode 100644 index 1bd45bd64c8..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/products.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface Product { - id: number; - name: string; - price: number; - description: string; -} - -export const products = [ - { - id: 1, - name: 'Phone XL', - price: 799, - description: 'A large phone with one of the best screens' - }, - { - id: 2, - name: 'Phone Mini', - price: 699, - description: 'A great phone with one of the best cameras' - }, - { - id: 3, - name: 'Phone Standard', - price: 299, - description: '' - } -]; diff --git a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.css b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html deleted file mode 100644 index 86bbf82d3f4..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.html +++ /dev/null @@ -1,5 +0,0 @@ - -

    My Store

    -
    - -shopping_cartCheckout diff --git a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts b/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts deleted file mode 100644 index 12fe8c94888..00000000000 --- a/aio/content/examples/getting-started-v0/src/app/top-bar/top-bar.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-top-bar', - templateUrl: './top-bar.component.html', - styleUrls: ['./top-bar.component.css'] -}) -export class TopBarComponent { - -} diff --git a/aio/content/examples/getting-started-v0/src/assets/shipping.json b/aio/content/examples/getting-started-v0/src/assets/shipping.json deleted file mode 100644 index 94db54c96d3..00000000000 --- a/aio/content/examples/getting-started-v0/src/assets/shipping.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "type": "Overnight", - "price": 25.99 - }, - { - "type": "2-Day", - "price": 9.99 - }, - { - "type": "Postal", - "price": 2.99 - } -] \ No newline at end of file diff --git a/aio/content/examples/getting-started-v0/src/index.html b/aio/content/examples/getting-started-v0/src/index.html deleted file mode 100644 index d7c3a0a6d60..00000000000 --- a/aio/content/examples/getting-started-v0/src/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Angular Getting Started - - - - - - - - - - diff --git a/aio/content/examples/getting-started-v0/src/main.ts b/aio/content/examples/getting-started-v0/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/getting-started-v0/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/getting-started-v0/stackblitz.json b/aio/content/examples/getting-started-v0/stackblitz.json deleted file mode 100644 index db1a643fa6d..00000000000 --- a/aio/content/examples/getting-started-v0/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Getting Started", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Angular", "getting started", "tutorial"] -} diff --git a/aio/content/examples/getting-started/BUILD.bazel b/aio/content/examples/getting-started/BUILD.bazel deleted file mode 100644 index df56693db55..00000000000 --- a/aio/content/examples/getting-started/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "getting-started", - # This example downloads and inlines resources - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/getting-started/e2e/src/app.e2e-spec.ts b/aio/content/examples/getting-started/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 13f089c6f32..00000000000 --- a/aio/content/examples/getting-started/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { browser, element, by, ExpectedConditions as EC, logging } from 'protractor'; - -describe('Getting Started', () => { - const pageElements = { - topBarHeader: element(by.css('app-root app-top-bar h1')), - topBarLinks: element(by.css('app-root app-top-bar a')), - topBarCheckoutLink: element(by.cssContainingText('app-root app-top-bar a', 'Checkout')), - productListHeader: element(by.css('app-root app-product-list h2')), - productListItems: element.all(by.css('app-root app-product-list h3')), - productListLinks: element.all(by.css('app-root app-product-list a')), - productDetailsPage: element(by.css('app-root app-product-details div')), - cartPage: element(by.css('app-root app-cart')) - }; - - describe('General', () => { - beforeAll(async () => { - await browser.get('/'); - }); - - it('should display "My Store"', async () => { - const title = await pageElements.topBarHeader.getText(); - - expect(title).toEqual('My Store'); - }); - - it('should display "Products" on the homepage', async () => { - const title = await pageElements.productListHeader.getText(); - - expect(title).toEqual('Products'); - }); - }); - - describe('Product List', () => { - beforeAll(async () => { - await browser.get('/'); - }); - - it('should display 3 items', async () => { - const products = await pageElements.productListItems; - - expect(products.length).toEqual(3); - }); - }); - - describe('Product Details', () => { - beforeEach(async () => { - await browser.get('/'); - }); - - it('should display information for a product', async () => { - await pageElements.productListLinks.get(0).click(); - - const product = pageElements.productDetailsPage; - const productHeader = await product.element(by.css('h3')).getText(); - const productPrice = await product.element(by.css('h4')).getText(); - const productDescription = await product.element(by.css('p')).getText(); - - expect(await product.isDisplayed()).toBeTruthy(); - expect(productHeader).toBe('Phone XL'); - expect(productPrice).toBe('$799.00'); - expect(productDescription).toBe('A large phone with one of the best screens'); - }); - - it('should add the product to the cart', async () => { - await pageElements.productListLinks.get(0).click(); - - const product = pageElements.productDetailsPage; - const buyButton = product.element(by.css('button')); - const checkoutLink = pageElements.topBarCheckoutLink; - - await buyButton.click(); - await browser.wait(EC.alertIsPresent(), 1000); - await browser.switchTo().alert().accept(); - await checkoutLink.click(); - - const cartItems = await element.all(by.css('app-root app-cart div.cart-item')); - expect(cartItems.length).toBe(1); - }); - }); - - describe('Cart', () => { - - beforeEach(async () => { - await browser.get('/'); - }); - - it('should go through the checkout process', async () => { - await pageElements.productListLinks.get(0).click(); - - const checkoutLink = pageElements.topBarCheckoutLink; - const productDetailsPage = pageElements.productDetailsPage; - const buyButton = productDetailsPage.element(by.css('button')); - - const cartPage = pageElements.cartPage; - const inputFields = cartPage.all(by.css('form input')); - - const purchaseButton = cartPage.element(by.css('button')); - const nameField = inputFields.get(0); - const addressField = inputFields.get(1); - - await buyButton.click(); - await browser.wait(EC.alertIsPresent(), 1000); - await browser.switchTo().alert().accept(); - await checkoutLink.click(); - - await nameField.sendKeys('Customer'); - await addressField.sendKeys('Address'); - await purchaseButton.click(); - - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - const cartMessages = logs.filter(({ message }) => message.includes('Your order has been submitted')); - - expect(cartMessages.length).toBe(1); - }); - }); -}); diff --git a/aio/content/examples/getting-started/example-config.json b/aio/content/examples/getting-started/example-config.json deleted file mode 100644 index 32a5ae69cc9..00000000000 --- a/aio/content/examples/getting-started/example-config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "useCommonBoilerplate": false, - "projectType": "getting-started" -} \ No newline at end of file diff --git a/aio/content/examples/getting-started/src/app/app.component.css b/aio/content/examples/getting-started/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/app.component.html b/aio/content/examples/getting-started/src/app/app.component.html deleted file mode 100644 index 14109efcf18..00000000000 --- a/aio/content/examples/getting-started/src/app/app.component.html +++ /dev/null @@ -1,5 +0,0 @@ - - -
    - -
    \ No newline at end of file diff --git a/aio/content/examples/getting-started/src/app/app.component.ts b/aio/content/examples/getting-started/src/app/app.component.ts deleted file mode 100644 index 400d937a2f4..00000000000 --- a/aio/content/examples/getting-started/src/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { } diff --git a/aio/content/examples/getting-started/src/app/app.module.ts b/aio/content/examples/getting-started/src/app/app.module.ts deleted file mode 100644 index 5534497a262..00000000000 --- a/aio/content/examples/getting-started/src/app/app.module.ts +++ /dev/null @@ -1,65 +0,0 @@ -// #docplaster -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; -// #docregion http-client-module-import -import { HttpClientModule } from '@angular/common/http'; -// #enddocregion http-client-module-import -import { ReactiveFormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { TopBarComponent } from './top-bar/top-bar.component'; -import { ProductListComponent } from './product-list/product-list.component'; -// #docregion declare-product-alerts -import { ProductAlertsComponent } from './product-alerts/product-alerts.component'; -// #enddocregion declare-product-alerts -import { ProductDetailsComponent } from './product-details/product-details.component'; -// #docregion declare-cart -import { CartComponent } from './cart/cart.component'; -// #enddocregion declare-cart -import { ShippingComponent } from './shipping/shipping.component'; - -// #docregion product-details-route, http-client-module, shipping-route, cart-route, declare-product-alerts -// #docregion declare-cart - -@NgModule({ - // #enddocregion declare-product-alerts, declare-cart - imports: [ - BrowserModule, - // #enddocregion product-details-route, cart-route - HttpClientModule, - // #docregion product-details-route, cart-route - ReactiveFormsModule, - RouterModule.forRoot([ - { path: '', component: ProductListComponent }, - { path: 'products/:productId', component: ProductDetailsComponent }, -// #enddocregion product-details-route - { path: 'cart', component: CartComponent }, -// #enddocregion cart-route, http-client-module - { path: 'shipping', component: ShippingComponent }, -// #enddocregion shipping-route -// #docregion product-details-route, http-client-module, shipping-route, cart-route - ]) - ], - // #enddocregion cart-route - // #docregion declare-product-alerts, declare-cart - declarations: [ - AppComponent, - TopBarComponent, - ProductListComponent, - ProductAlertsComponent, - // #enddocregion declare-product-alerts - ProductDetailsComponent, - // #enddocregion product-details-route - CartComponent, - // #enddocregion declare-cart -// #enddocregion http-client-module - ShippingComponent - // #docregion declare-product-alerts, http-client-module, product-details-route, declare-cart - ], - // #enddocregion declare-product-alerts, product-details-route, declare-cart - bootstrap: [ - AppComponent - ] -}) -export class AppModule { } diff --git a/aio/content/examples/getting-started/src/app/cart.service.1.ts b/aio/content/examples/getting-started/src/app/cart.service.1.ts deleted file mode 100644 index 0ea267c518a..00000000000 --- a/aio/content/examples/getting-started/src/app/cart.service.1.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class CartService {} diff --git a/aio/content/examples/getting-started/src/app/cart.service.ts b/aio/content/examples/getting-started/src/app/cart.service.ts deleted file mode 100644 index 880008b4312..00000000000 --- a/aio/content/examples/getting-started/src/app/cart.service.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docregion import-http -import { HttpClient } from '@angular/common/http'; -// #docregion props -import { Product } from './products'; -import { Injectable } from '@angular/core'; -// #enddocregion props, import-http - -// #docregion props, methods, inject-http, get-shipping -@Injectable({ - providedIn: 'root' -}) -export class CartService { -// #enddocregion get-shipping - items: Product[] = []; -// #enddocregion props, methods - - constructor( - private http: HttpClient - ) {} -// #enddocregion inject-http -// #docregion methods - - addToCart(product: Product) { - this.items.push(product); - } - - getItems() { - return this.items; - } - - clearCart() { - this.items = []; - return this.items; - } -// #enddocregion methods - -// #docregion get-shipping - getShippingPrices() { - return this.http.get<{type: string, price: number}[]>('/assets/shipping.json'); - } -// #docregion props, methods, inject-http -} -// #enddocregion props, methods, inject-http diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.1.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.1.ts deleted file mode 100644 index 3a219371f86..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.1.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-cart', - templateUrl: './cart.component.html', - styleUrls: ['./cart.component.css'] -}) -export class CartComponent { - - -} diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.2.html b/aio/content/examples/getting-started/src/app/cart/cart.component.2.html deleted file mode 100644 index 829bc0e8fa1..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.2.html +++ /dev/null @@ -1,15 +0,0 @@ - - -

    Cart

    - - -

    - Shipping Prices -

    - - -
    - {{ item.name }} - {{ item.price | currency }} -
    - diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts deleted file mode 100644 index 77d9b911466..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.2.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docplaster -// #docregion imports -import { Component } from '@angular/core'; -import { CartService } from '../cart.service'; -// #enddocregion imports - -@Component({ - selector: 'app-cart', - templateUrl: './cart.component.html', - styleUrls: ['./cart.component.css'] -}) -// #docregion inject-cart, items -export class CartComponent { - -// #enddocregion inject-cart - items = this.cartService.getItems(); -// #docregion inject-cart - - constructor( - private cartService: CartService - ) { } -} diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.3.html b/aio/content/examples/getting-started/src/app/cart/cart.component.3.html deleted file mode 100644 index 11f860d66d9..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.3.html +++ /dev/null @@ -1,19 +0,0 @@ - -

    Cart

    - -

    - Shipping Prices -

    - -
    - {{ item.name }} - {{ item.price | currency }} -
    - - -
    - - - -
    - diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts deleted file mode 100644 index 9b7774e7b01..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.3.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { CartService } from '../cart.service'; - -@Component({ - selector: 'app-cart', - templateUrl: './cart.component.html', - styleUrls: ['./cart.component.css'] -}) -export class CartComponent implements OnInit { - - items; - - constructor( - private cartService: CartService - ) { } - - ngOnInit(): void { - this.items = this.cartService.getItems(); - } - -} diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.css b/aio/content/examples/getting-started/src/app/cart/cart.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.html b/aio/content/examples/getting-started/src/app/cart/cart.component.html deleted file mode 100644 index 7fa7ccc8a5e..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.html +++ /dev/null @@ -1,35 +0,0 @@ - - -

    Cart

    - -

    - Shipping Prices -

    - -
    - {{ item.name }} - {{ item.price | currency }} -
    - - -
    - - -
    - - -
    - -
    - - -
    - - - - -
    diff --git a/aio/content/examples/getting-started/src/app/cart/cart.component.ts b/aio/content/examples/getting-started/src/app/cart/cart.component.ts deleted file mode 100644 index 340d122ee54..00000000000 --- a/aio/content/examples/getting-started/src/app/cart/cart.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #docplaster -// #docregion imports -import { Component } from '@angular/core'; -import { FormBuilder } from '@angular/forms'; - -import { CartService } from '../cart.service'; -// #enddocregion imports - -@Component({ - selector: 'app-cart', - templateUrl: './cart.component.html', - styleUrls: ['./cart.component.css'] -}) -// #docregion inject-form-builder, checkout-form-group -export class CartComponent { - - // #enddocregion inject-form-builder - items = this.cartService.getItems(); - - checkoutForm = this.formBuilder.group({ - name: '', - address: '' - }); - -// #docregion inject-form-builder - constructor( - private cartService: CartService, - private formBuilder: FormBuilder, - ) {} -// #enddocregion inject-form-builder, checkout-form-group - - onSubmit(): void { - // Process checkout data here - this.items = this.cartService.clearCart(); - console.warn('Your order has been submitted', this.checkoutForm.value); - this.checkoutForm.reset(); - } -// #docregion inject-form-builder, checkout-form-group -} diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.html b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.html deleted file mode 100644 index fb7aea2f944..00000000000 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - -

    diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts deleted file mode 100644 index 6f3e958a340..00000000000 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.1.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docplaster -// #docregion imports -import { Component, Input } from '@angular/core'; -import { Product } from '../products'; -// #enddocregion imports -// #docregion as-generated - -@Component({ - selector: 'app-product-alerts', - templateUrl: './product-alerts.component.html', - styleUrls: ['./product-alerts.component.css'] -}) -// #docregion input-decorator -export class ProductAlertsComponent { - -// #enddocregion as-generated - @Input() product: Product | undefined; -// #docregion as-generated - -} diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.css b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.html b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.html deleted file mode 100644 index 451ca13f1ca..00000000000 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - -

    diff --git a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts b/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts deleted file mode 100644 index dbe828dfecb..00000000000 --- a/aio/content/examples/getting-started/src/app/product-alerts/product-alerts.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docplaster -// #docregion imports -import { Component, Input, Output, EventEmitter } from '@angular/core'; -import { Product } from '../products'; -// #enddocregion imports - -@Component({ - selector: 'app-product-alerts', - templateUrl: './product-alerts.component.html', - styleUrls: ['./product-alerts.component.css'] -}) -// #docregion input-output -export class ProductAlertsComponent { - @Input() product: Product | undefined; - @Output() notify = new EventEmitter(); -} diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts deleted file mode 100644 index 8ce3b685b1a..00000000000 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.1.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docplaster -// #docregion imports -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { Product, products } from '../products'; -// #enddocregion imports - -@Component({ - selector: 'app-product-details', - templateUrl: './product-details.component.html', - styleUrls: ['./product-details.component.css'] -}) -// #docregion props-methods, product-prop -export class ProductDetailsComponent implements OnInit { - - product: Product | undefined; - // #enddocregion product-prop - - constructor(private route: ActivatedRoute) { } - - // #enddocregion props-methods - // #docregion get-product - ngOnInit() { - // First get the product id from the current route. - const routeParams = this.route.snapshot.paramMap; - const productIdFromRoute = Number(routeParams.get('productId')); - - // Find the product that correspond with the id provided in route. - this.product = products.find(product => product.id === productIdFromRoute); - } - // #enddocregion get-product - // #docregion product-prop - /* ... */ - // #docregion props-methods -} diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.css b/aio/content/examples/getting-started/src/app/product-details/product-details.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.html b/aio/content/examples/getting-started/src/app/product-details/product-details.component.html deleted file mode 100644 index 600df89f902..00000000000 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.html +++ /dev/null @@ -1,12 +0,0 @@ - - -

    Product Details

    - -
    -

    {{ product.name }}

    -

    {{ product.price | currency }}

    -

    {{ product.description }}

    - - - -
    diff --git a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts b/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts deleted file mode 100644 index c690732fa12..00000000000 --- a/aio/content/examples/getting-started/src/app/product-details/product-details.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docplaster -// #docregion cart-service -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { Product, products } from '../products'; -import { CartService } from '../cart.service'; -// #enddocregion cart-service - -@Component({ - selector: 'app-product-details', - templateUrl: './product-details.component.html', - styleUrls: ['./product-details.component.css'] -}) -// #docregion inject-cart-service, add-to-cart -export class ProductDetailsComponent implements OnInit { - -// #enddocregion add-to-cart, inject-cart-service - product: Product | undefined; - -// #docregion inject-cart-service - constructor( - private route: ActivatedRoute, - private cartService: CartService - ) { } -// #enddocregion inject-cart-service - - ngOnInit() { - // First get the product id from the current route. - const routeParams = this.route.snapshot.paramMap; - const productIdFromRoute = Number(routeParams.get('productId')); - - // Find the product that correspond with the id provided in route. - this.product = products.find(product => product.id === productIdFromRoute); - } - -// #docregion add-to-cart - addToCart(product: Product) { - this.cartService.addToCart(product); - window.alert('Your product has been added to the cart!'); - } -// #docregion inject-cart-service -} diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.html deleted file mode 100644 index 1007667e7b2..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.html +++ /dev/null @@ -1 +0,0 @@ -

    Products

    diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts b/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts deleted file mode 100644 index 2fd806464b4..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.1.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { products } from '../products'; - -@Component({ - selector: 'app-product-list', - templateUrl: './product-list.component.html', - styleUrls: ['./product-list.component.css'] -}) -export class ProductListComponent { - - products = [...products]; - - share() { - window.alert('The product has been shared!'); - } -} diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.2.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.2.html deleted file mode 100644 index 4849729b498..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.2.html +++ /dev/null @@ -1,20 +0,0 @@ - - -

    Products

    - -
    - - -

    - - - - {{ product.name }} - - - -

    - - -
    - diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.3.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.3.html deleted file mode 100644 index 3e957f5740e..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.3.html +++ /dev/null @@ -1,15 +0,0 @@ -

    Products

    - -
    - -

    - - {{ product.name }} - -

    - -

    - Description: {{ product.description }} -

    - -
    diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.4.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.4.html deleted file mode 100644 index 2bae834fe50..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.4.html +++ /dev/null @@ -1,19 +0,0 @@ -

    Products

    - -
    - -

    - - {{ product.name }} - -

    - -

    - Description: {{ product.description }} -

    - - - -
    diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.5.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.5.html deleted file mode 100644 index fbd3d6813cf..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.5.html +++ /dev/null @@ -1,26 +0,0 @@ -

    Products

    - -
    - -

    - - {{ product.name }} - -

    - -

    - Description: {{ product.description }} -

    - - - - - - - - -
    - diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.6.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.6.html deleted file mode 100644 index 2e7fb390b72..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.6.html +++ /dev/null @@ -1,27 +0,0 @@ -

    Products

    - -
    - -

    - - {{ product.name }} - -

    - -

    - Description: {{ product.description }} -

    - - - - - - - - -
    - diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.css b/aio/content/examples/getting-started/src/app/product-list/product-list.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html b/aio/content/examples/getting-started/src/app/product-list/product-list.component.html deleted file mode 100644 index 75abbeb998f..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.html +++ /dev/null @@ -1,30 +0,0 @@ -

    Products

    - - -
    - -

    - - {{ product.name }} - -

    - - -

    - Description: {{ product.description }} -

    - - - - - - - -
    - diff --git a/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts b/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts deleted file mode 100644 index 7dd9ff68f6d..00000000000 --- a/aio/content/examples/getting-started/src/app/product-list/product-list.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component } from '@angular/core'; - -import { products } from '../products'; - -@Component({ - selector: 'app-product-list', - templateUrl: './product-list.component.html', - styleUrls: ['./product-list.component.css'] -}) -// #docregion on-notify -export class ProductListComponent { - - products = [...products]; - - share() { - window.alert('The product has been shared!'); - } - - onNotify() { - window.alert('You will be notified when the product goes on sale'); - } -} diff --git a/aio/content/examples/getting-started/src/app/products.ts b/aio/content/examples/getting-started/src/app/products.ts deleted file mode 100644 index 4d9980709c5..00000000000 --- a/aio/content/examples/getting-started/src/app/products.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface Product { - id: number; - name: string; - price: number; - description: string; -} - -export const products: Product[] = [ - { - id: 1, - name: 'Phone XL', - price: 799, - description: 'A large phone with one of the best screens' - }, - { - id: 2, - name: 'Phone Mini', - price: 699, - description: 'A great phone with one of the best cameras' - }, - { - id: 3, - name: 'Phone Standard', - price: 299, - description: '' - } -]; diff --git a/aio/content/examples/getting-started/src/app/shipping/shipping.component.1.ts b/aio/content/examples/getting-started/src/app/shipping/shipping.component.1.ts deleted file mode 100644 index 7d57bffc800..00000000000 --- a/aio/content/examples/getting-started/src/app/shipping/shipping.component.1.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-shipping', - templateUrl: './shipping.component.html', - styleUrls: ['./shipping.component.css'] -}) -export class ShippingComponent { - -} diff --git a/aio/content/examples/getting-started/src/app/shipping/shipping.component.css b/aio/content/examples/getting-started/src/app/shipping/shipping.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/shipping/shipping.component.html b/aio/content/examples/getting-started/src/app/shipping/shipping.component.html deleted file mode 100644 index 72fc2d58e13..00000000000 --- a/aio/content/examples/getting-started/src/app/shipping/shipping.component.html +++ /dev/null @@ -1,6 +0,0 @@ -

    Shipping Prices

    - -
    - {{ shipping.type }} - {{ shipping.price | currency }} -
    diff --git a/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts b/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts deleted file mode 100644 index d12b033d9cd..00000000000 --- a/aio/content/examples/getting-started/src/app/shipping/shipping.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docplaster -// #docregion imports -import { Component, OnInit } from '@angular/core'; - -import { Observable } from 'rxjs'; -import { CartService } from '../cart.service'; -// #enddocregion - -@Component({ - selector: 'app-shipping', - templateUrl: './shipping.component.html', - styleUrls: ['./shipping.component.css'] -}) -// #docregion props -export class ShippingComponent implements OnInit { - - shippingCosts!: Observable<{ type: string, price: number }[]>; -// #enddocregion props - -// #docregion inject-cart-service - constructor(private cartService: CartService) { } -// #enddocregion inject-cart-service -// #docregion props - - ngOnInit(): void { - this.shippingCosts = this.cartService.getShippingPrices(); - } - -} diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.1.html b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.1.html deleted file mode 100644 index 6eaad3c1aa5..00000000000 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.1.html +++ /dev/null @@ -1,7 +0,0 @@ - -

    My Store

    -
    - - - shopping_cartCheckout - diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.css b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html deleted file mode 100644 index ba33ae143bc..00000000000 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.html +++ /dev/null @@ -1,9 +0,0 @@ - -

    My Store

    -
    - - - - shopping_cartCheckout - - diff --git a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts b/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts deleted file mode 100644 index 9d24f963e30..00000000000 --- a/aio/content/examples/getting-started/src/app/top-bar/top-bar.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-top-bar', - templateUrl: './top-bar.component.html', - styleUrls: ['./top-bar.component.css'] -}) -export class TopBarComponent { } diff --git a/aio/content/examples/getting-started/src/assets/shipping.json b/aio/content/examples/getting-started/src/assets/shipping.json deleted file mode 100644 index 94db54c96d3..00000000000 --- a/aio/content/examples/getting-started/src/assets/shipping.json +++ /dev/null @@ -1,14 +0,0 @@ -[ - { - "type": "Overnight", - "price": 25.99 - }, - { - "type": "2-Day", - "price": 9.99 - }, - { - "type": "Postal", - "price": 2.99 - } -] \ No newline at end of file diff --git a/aio/content/examples/getting-started/src/index.html b/aio/content/examples/getting-started/src/index.html deleted file mode 100644 index d7c3a0a6d60..00000000000 --- a/aio/content/examples/getting-started/src/index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - Angular Getting Started - - - - - - - - - - diff --git a/aio/content/examples/getting-started/src/main.ts b/aio/content/examples/getting-started/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/getting-started/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/getting-started/stackblitz.json b/aio/content/examples/getting-started/stackblitz.json deleted file mode 100644 index 7241f664824..00000000000 --- a/aio/content/examples/getting-started/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Getting Started", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*" - ], - "file": "src/app/product-list/product-list.component.html", - "tags": ["Angular", "getting started", "tutorial"] -} diff --git a/aio/content/examples/getting-started/tsconfig.0.json b/aio/content/examples/getting-started/tsconfig.0.json deleted file mode 100644 index 7d7c89b7663..00000000000 --- a/aio/content/examples/getting-started/tsconfig.0.json +++ /dev/null @@ -1,38 +0,0 @@ -// This tsconfig is used in the TypeScript -// 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/guide/typescript-configuration. */ -{ - "compileOnSave": false, - "compilerOptions": { - "baseUrl": "./", - "forceConsistentCasingInFileNames": true, - "strict": true, - "noImplicitOverride": true, - "noPropertyAccessFromIndexSignature": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "sourceMap": true, - "declaration": false, - "downlevelIteration": true, - "experimentalDecorators": true, - "moduleResolution": "node", - "importHelpers": true, - "target": "ES2022", - "module": "ES2022", - "useDefineForClassFields": false, - "lib": [ - "ES2022", - "dom" - ] - }, - "angularCompilerOptions": { - "disableTypeScriptVersionCheck": true, - "enableI18nLegacyMessageIdFormat": false, - "strictInjectionParameters": true, - "strictInputAccessModifiers": true, - "strictTemplates": true - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/BUILD.bazel b/aio/content/examples/hierarchical-dependency-injection/BUILD.bazel deleted file mode 100644 index 4c2602644c0..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "hierarchical-dependency-injection", -) diff --git a/aio/content/examples/hierarchical-dependency-injection/e2e/src/app.e2e-spec.ts b/aio/content/examples/hierarchical-dependency-injection/e2e/src/app.e2e-spec.ts deleted file mode 100644 index ccf31b92f7d..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { browser, by, element } from 'protractor'; - -describe('Hierarchical dependency injection', () => { - - beforeAll(() => browser.get('')); - - describe('Heroes Scenario', () => { - const page = { - heroName: '', - income: '', - - // queries - heroEl: element.all(by.css('app-heroes-list li button')).get(0), // first hero - heroCardEl: element(by.css('app-heroes-list app-hero-tax-return')), // first hero tax-return - taxReturnNameEl: element.all(by.css('app-heroes-list app-hero-tax-return #name')).get(0), - incomeInputEl: element.all(by.css('app-heroes-list app-hero-tax-return input')).get(0), - cancelButtonEl: element(by.cssContainingText('app-heroes-list app-hero-tax-return button', 'Cancel')), - closeButtonEl: element(by.cssContainingText('app-heroes-list app-hero-tax-return button', 'Close')), - saveButtonEl: element(by.cssContainingText('app-heroes-list app-hero-tax-return button', 'Save')) - }; - - it('should list multiple heroes', async () => { - expect(await element.all(by.css('app-heroes-list li')).count()).toBeGreaterThan(1); - }); - - it('should show no hero tax-returns at the start', async () => { - expect(await element.all(by.css('app-heroes-list li app-hero-tax-return')).count()).toBe(0); - }); - - it('should open first hero in app-hero-tax-return view after click', async () => { - page.heroName = await page.heroEl.getText(); - await page.heroEl.click(); - expect(await page.heroCardEl.isDisplayed()).toBe(true); - }); - - it("hero tax-return should have first hero's name", async () => { - // Not `page.tax-returnNameInputEl.getAttribute('value')` although later that is essential - expect(await page.taxReturnNameEl.getText()).toEqual(page.heroName); - }); - - it('should be able to cancel change', async () => { - await page.incomeInputEl.clear(); - await page.incomeInputEl.sendKeys('777'); - expect(await page.incomeInputEl.getAttribute('value')).toBe('777', 'income should be 777'); - - await page.cancelButtonEl.click(); - expect(await page.incomeInputEl.getAttribute('value')).not.toBe('777', 'income should not be 777'); - }); - - it('should be able to save change', async () => { - await page.incomeInputEl.clear(); - await page.incomeInputEl.sendKeys('999'); - expect(await page.incomeInputEl.getAttribute('value')).toBe('999', 'income should be 999'); - - await page.saveButtonEl.click(); - expect(await page.incomeInputEl.getAttribute('value')).toBe('999', 'income should still be 999'); - }); - - it('should be able to close tax-return', async () => { - await page.saveButtonEl.click(); - expect(await element.all(by.css('app-heroes-list li app-hero-tax-return')).count()).toBe(0); - }); - - }); - - describe('Villains Scenario', () => { - it('should list multiple villains', async () => { - expect(await element.all(by.css('app-villains-list li')).count()).toBeGreaterThan(1); - }); - }); - - describe('Cars Scenario', () => { - - it('A-component should use expected services', async () => { - expect(await element(by.css('a-car')).getText()).toContain('C1-E1-T1'); - }); - - it('B-component should use expected services', async () => { - expect(await element(by.css('b-car')).getText()).toContain('C2-E2-T1'); - }); - - it('C-component should use expected services', async () => { - expect(await element(by.css('c-car')).getText()).toContain('C3-E2-T1'); - }); - }); -}); diff --git a/aio/content/examples/hierarchical-dependency-injection/example-config.json b/aio/content/examples/hierarchical-dependency-injection/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/app.component.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/app.component.ts deleted file mode 100755 index 1f496054088..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/app.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { NgIf } from '@angular/common'; -import { Component } from '@angular/core'; -import { CarsComponent } from './car.components'; -import { HeroesListComponent } from './heroes-list.component'; -import { VillainsListComponent } from './villains-list.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` - - - - -

    Hierarchical Dependency Injection

    - - - - - `, - imports: [NgIf, CarsComponent, HeroesListComponent, VillainsListComponent] -}) -export class AppComponent { - showCars = true; - showHeroes = true; - showVillains = true; -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/app.config.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/app.config.ts deleted file mode 100644 index 96587e9ada3..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/app.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -const appConfg: ApplicationConfig = { - providers: [ - // required for e2e testing on aio - provideProtractorTestingSupport() - ] -}; - -export default appConfg; diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/car.components.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/car.components.ts deleted file mode 100755 index 73804093887..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/car.components.ts +++ /dev/null @@ -1,81 +0,0 @@ -import { Component } from '@angular/core'; - -import { - CarService, CarService2, CarService3, - EngineService, EngineService2, TiresService -} from './car.services'; - -////////// CCarComponent //////////// -@Component({ - standalone: true, - selector: 'c-car', - template: '
    C: {{description}}
    ', - providers: [ - { provide: CarService, useClass: CarService3 } - ] -}) -export class CCarComponent { - description: string; - constructor(carService: CarService) { - this.description = `${carService.getCar().description} (${carService.name})`; - } -} - -////////// BCarComponent //////////// -@Component({ - standalone: true, - selector: 'b-car', - template: ` -
    B: {{description}}
    - - `, - providers: [ - { provide: CarService, useClass: CarService2 }, - { provide: EngineService, useClass: EngineService2 } - ], - imports: [CCarComponent] -}) -export class BCarComponent { - description: string; - constructor(carService: CarService) { - this.description = `${carService.getCar().description} (${carService.name})`; - } -} - -////////// ACarComponent //////////// -@Component({ - standalone: true, - selector: 'a-car', - template: ` -
    A: {{description}}
    - `, - imports: [BCarComponent] -}) -export class ACarComponent { - description: string; - constructor(carService: CarService) { - this.description = `${carService.getCar().description} (${carService.name})`; - } -} -////////// CarsComponent //////////// -@Component({ - standalone: true, - selector: 'app-cars', - template: ` -

    Cars

    - `, - imports: [ACarComponent] -}) -export class CarsComponent { } - -//////////////// - -export const carComponents = [ - CarsComponent, - ACarComponent, BCarComponent, CCarComponent -]; - -// generic car-related services -export const carServices = [ - CarService, EngineService, TiresService -]; diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts deleted file mode 100755 index 791e9991645..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/car.services.ts +++ /dev/null @@ -1,112 +0,0 @@ -import { Injectable } from '@angular/core'; - -/// Model /// -export class Car { - name = 'Avocado Motors'; - constructor(public engine: Engine, public tires: Tires) { } - - get description() { - return `${this.name} car with ` + - `${this.engine.cylinders} cylinders and ${this.tires.make} tires.`; - } -} - -export class Engine { - cylinders = 4; -} - -export class Tires { - make = 'Flintstone'; - model = 'Square'; -} - -//// Engine services /// -@Injectable({ - providedIn: 'root' -}) -export class EngineService { - id = 'E1'; - getEngine() { return new Engine(); } -} - -@Injectable({ - providedIn: 'root' -}) -export class EngineService2 { - id = 'E2'; - getEngine() { - const eng = new Engine(); - eng.cylinders = 8; - return eng; - } -} - -//// Tire services /// -@Injectable({ - providedIn: 'root' -}) -export class TiresService { - id = 'T1'; - getTires() { return new Tires(); } -} - -/// Car Services /// -@Injectable({ - providedIn: 'root' -}) -export class CarService { - id = 'C1'; - - constructor( - protected engineService: EngineService, - protected tiresService: TiresService) { } - - getCar() { - return new Car( - this.engineService.getEngine(), - this.tiresService.getTires()); - } - - get name() { - return `${this.id}-${this.engineService.id}-${this.tiresService.id}`; - } -} - -@Injectable({ - providedIn: 'root' -}) -export class CarService2 extends CarService { - override id = 'C2'; - - constructor( - protected override engineService: EngineService, - protected override tiresService: TiresService) { - super(engineService, tiresService); - } - - override getCar() { - const car = super.getCar(); - car.name = 'BamBam Motors, BroVan 2000'; - return car; - } -} - -@Injectable({ - providedIn: 'root' -}) -export class CarService3 extends CarService2 { - override id = 'C3'; - - constructor( - protected override engineService: EngineService, - protected override tiresService: TiresService) { - super(engineService, tiresService); - } - - override getCar() { - const car = super.getCar(); - car.name = 'Chizzamm Motors, Calico UltraMax Supreme'; - return car; - } -} - diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.css b/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.css deleted file mode 100755 index 1d29a1d1680..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.css +++ /dev/null @@ -1,22 +0,0 @@ -.tax-return { border: thin dashed green; margin: 1em; padding: 1em; width: 18em; position: relative } -#name { font-weight: bold;} -#tid { float: right; } -input { font-size: 100%; padding-left: 2px; width: 6em; } -input.num { text-align: right; padding-left: 0; padding-right: 4px; width: 4em;} -fieldset { border: 0 none;} - -.msg { - color: white; - font-size: 150%; - position: absolute; - /*opacity: 0.3;*/ - left: 2px; - top: 3em; - width: 98%; - background-color: green; - text-align: center; -} -.msg.canceled { - color: white; - background-color: red; -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.html b/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.html deleted file mode 100755 index b654dbc210f..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.html +++ /dev/null @@ -1,24 +0,0 @@ -
    -
    {{message}}
    -
    - Tax Return - {{taxReturn.name}} - TID: {{taxReturn.tid}} -
    -
    - Tax Return - -
    -
    - Tax Return - Tax: {{taxReturn.tax}} -
    -
    - Tax Return - - - -
    -
    diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.ts deleted file mode 100755 index 5105927ebc8..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -/* eslint-disable @angular-eslint/no-output-native */ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { HeroTaxReturn } from './hero'; -import { HeroTaxReturnService } from './hero-tax-return.service'; -import { FormsModule } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-hero-tax-return', - templateUrl: './hero-tax-return.component.html', - styleUrls: [ './hero-tax-return.component.css' ], - // #docregion providers - providers: [ HeroTaxReturnService ], - // #enddocregion providers, - imports: [FormsModule] -}) -export class HeroTaxReturnComponent { - message = ''; - - @Output() close = new EventEmitter(); - - get taxReturn(): HeroTaxReturn { - return this.heroTaxReturnService.taxReturn; - } - - @Input() - set taxReturn(htr: HeroTaxReturn) { - this.heroTaxReturnService.taxReturn = htr; - } - - constructor(private heroTaxReturnService: HeroTaxReturnService) { } - - onCanceled() { - this.flashMessage('Canceled'); - this.heroTaxReturnService.restoreTaxReturn(); - } - - onClose() { this.close.emit(); } - - onSaved() { - this.flashMessage('Saved'); - this.heroTaxReturnService.saveTaxReturn(); - } - - flashMessage(msg: string) { - this.message = msg; - setTimeout(() => this.message = '', 500); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.service.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.service.ts deleted file mode 100755 index 30593be3bd7..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/hero-tax-return.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HeroTaxReturn } from './hero'; -import { HeroesService } from './heroes.service'; - -@Injectable() -export class HeroTaxReturnService { - private currentTaxReturn!: HeroTaxReturn; - private originalTaxReturn!: HeroTaxReturn; - - constructor(private heroService: HeroesService) { } - - set taxReturn(htr: HeroTaxReturn) { - this.originalTaxReturn = htr; - this.currentTaxReturn = htr.clone(); - } - - get taxReturn(): HeroTaxReturn { - return this.currentTaxReturn; - } - - restoreTaxReturn() { - this.taxReturn = this.originalTaxReturn; - } - - saveTaxReturn() { - this.taxReturn = this.currentTaxReturn; - this.heroService.saveTaxReturn(this.currentTaxReturn).subscribe(); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/hero.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/hero.ts deleted file mode 100755 index 954d6520176..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/hero.ts +++ /dev/null @@ -1,31 +0,0 @@ -// #docregion - -export interface Hero { - id: number; - name: string; - tid: string; // tax id -} - -//// HeroTaxReturn //// -let nextId = 100; - -export class HeroTaxReturn { - constructor( - public id = nextId++, - public hero: Hero, - public income = 0 ) { - if (id === 0) { id = nextId++; } - } - - get name() { return this.hero.name; } - get tax() { return this.income ? .10 * this.income : 0; } - get tid() { return this.hero.tid; } - - toString() { - return `${this.hero.name}`; - } - - clone() { - return new HeroTaxReturn(this.id, this.hero, this.income); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/heroes-list.component.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/heroes-list.component.ts deleted file mode 100755 index b84c53e0423..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/heroes-list.component.ts +++ /dev/null @@ -1,58 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Hero, HeroTaxReturn } from './hero'; -import { HeroesService } from './heroes.service'; -import { HeroTaxReturnComponent } from './hero-tax-return.component'; -import { AsyncPipe, NgFor } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-heroes-list', - template: ` -
    -

    Hero Tax Returns

    -
      -
    • - -
    • -
    - - -
    - `, - styles: [` - li button { - font-size: inherit; - margin: 0.3rem; - padding: 0.5rem; - } - `], - imports: [HeroTaxReturnComponent, NgFor, AsyncPipe] -}) -export class HeroesListComponent { - heroes: Observable; - selectedTaxReturns: HeroTaxReturn[] = []; - - constructor(private heroesService: HeroesService) { - this.heroes = heroesService.getHeroes(); - } - - showTaxReturn(hero: Hero) { - this.heroesService.getTaxReturn(hero) - .subscribe(htr => { - // show if not currently shown - if (!this.selectedTaxReturns.find(tr => tr.id === htr.id)) { - this.selectedTaxReturns.push(htr); - } - }); - } - - closeTaxReturn(ix: number) { - this.selectedTaxReturns.splice(ix, 1); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/heroes.service.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/heroes.service.ts deleted file mode 100755 index 76b8ec09bb9..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/heroes.service.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { Observable, Observer } from 'rxjs'; - -import { Hero, HeroTaxReturn } from './hero'; - -@Injectable({ - providedIn: 'root' -}) -export class HeroesService { - heroes: Hero[] = [ - { id: 1, name: 'RubberMan', tid: '082-27-5678'}, - { id: 2, name: 'Tornado', tid: '099-42-4321'} - ]; - - heroTaxReturns: HeroTaxReturn[] = [ - new HeroTaxReturn(10, this.heroes[0], 35000), - new HeroTaxReturn(20, this.heroes[1], 1250000) - ]; - - getHeroes(): Observable { - return new Observable((observer: Observer) => { - observer.next(this.heroes); - observer.complete(); - }); - } - - getTaxReturn(hero: Hero): Observable { - return new Observable((observer: Observer) => { - const htr = this.heroTaxReturns.find(t => t.hero.id === hero.id); - observer.next(htr || new HeroTaxReturn(0, hero)); - observer.complete(); - }); - } - - saveTaxReturn(heroTaxReturn: HeroTaxReturn): Observable { - return new Observable((observer: Observer) => { - const htr = this.heroTaxReturns.find(t => t.id === heroTaxReturn.id); - if (htr) { - heroTaxReturn = Object.assign(htr, heroTaxReturn); // demo: mutate - } else { - this.heroTaxReturns.push(heroTaxReturn); - } - observer.next(heroTaxReturn); - observer.complete(); - }); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.html b/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.html deleted file mode 100755 index 75e5ba3237a..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -

    Villains

    -
      -
    • {{villain.name}}
    • -
    -
    diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.ts deleted file mode 100755 index 2fe704c80bb..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/villains-list.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Villain, VillainsService } from './villains.service'; -import { AsyncPipe, NgFor } from '@angular/common'; - -// #docregion metadata -@Component({ - standalone: true, - selector: 'app-villains-list', - templateUrl: './villains-list.component.html', - providers: [ VillainsService ], - imports: [ NgFor, AsyncPipe ] -}) -// #enddocregion metadata -export class VillainsListComponent { - villains: Observable; - - constructor(private villainsService: VillainsService) { - this.villains = villainsService.getVillains(); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/app/villains.service.ts b/aio/content/examples/hierarchical-dependency-injection/src/app/villains.service.ts deleted file mode 100755 index 5c898c2aa02..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/app/villains.service.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { of } from 'rxjs'; - -export interface Villain { - id: number; - name: string; -} - -@Injectable() -export class VillainsService { - villains: Villain[] = [ - { id: 1, name: 'Dr. Evil'}, - { id: 2, name: 'Moriarty'} - ]; - - getVillains() { - return of(this.villains); - } -} diff --git a/aio/content/examples/hierarchical-dependency-injection/src/index.html b/aio/content/examples/hierarchical-dependency-injection/src/index.html deleted file mode 100644 index dd35fec6aed..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Hierarchical Injectors - - - - - - - - - - diff --git a/aio/content/examples/hierarchical-dependency-injection/src/main.ts b/aio/content/examples/hierarchical-dependency-injection/src/main.ts deleted file mode 100755 index 32b21e0d5fb..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfg from './app/app.config'; - -// #docregion -bootstrapApplication(AppComponent, appConfg); diff --git a/aio/content/examples/hierarchical-dependency-injection/stackblitz.json b/aio/content/examples/hierarchical-dependency-injection/stackblitz.json deleted file mode 100644 index 9e9a837faa0..00000000000 --- a/aio/content/examples/hierarchical-dependency-injection/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Hierarchical Dependency Injection", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "file": "src/app/app.component.ts", - "tags": ["dependency", "injection"] -} diff --git a/aio/content/examples/http/BUILD.bazel b/aio/content/examples/http/BUILD.bazel deleted file mode 100644 index 9fbe8053a6d..00000000000 --- a/aio/content/examples/http/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "http", -) diff --git a/aio/content/examples/http/e2e/src/app.e2e-spec.ts b/aio/content/examples/http/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 565d30bc238..00000000000 --- a/aio/content/examples/http/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,158 +0,0 @@ -import { browser, element, by } from 'protractor'; -import { resolve } from 'path'; - -const page = { - configClearButton: element.all(by.css('app-config > div button')).get(2), - configErrorButton: element.all(by.css('app-config > div button')).get(3), - configErrorMessage: element(by.css('app-config p')), - configGetButton: element.all(by.css('app-config > div button')).get(0), - configGetResponseButton: element.all(by.css('app-config > div button')).get(1), - configSpan: element(by.css('app-config span')), - downloadButton: element.all(by.css('app-downloader button')).get(0), - downloadClearButton: element.all(by.css('app-downloader button')).get(1), - downloadMessage: element(by.css('app-downloader p')), - heroesListAddButton: element.all(by.css('app-heroes > div button')).get(0), - heroesListInput: element(by.css('app-heroes > div input')), - heroesListSearchButton: element.all(by.css('app-heroes > div button')).get(1), - heroesListItems: element.all(by.css('app-heroes ul li')), - logClearButton: element(by.css('app-messages button')), - logList: element(by.css('app-messages ol')), - logListItems: element.all(by.css('app-messages ol li')), - searchInput: element(by.css('app-package-search input#name')), - searchListItems: element.all(by.css('app-package-search li')), - uploadInput: element(by.css('app-uploader input')), - uploadMessage: element(by.css('app-uploader p')) -}; - -const checkLogForMessage = async (message: string) => { - expect(await page.logList.getText()).toContain(message); -}; - -describe('Http Tests', () => { - // It seems that currently Chrome/ChromeDriver fail to click a button that is just outside the - // viewport (or maybe only partially inside the viewport) - at least in headless mode. - // Possible solutions: - // 1. Click the element via JavaScript (with something like - // `browser.executeScript('arguments[0].click', elem)`). - // 2. Manually scroll the element into view before clicking: - // https://stackoverflow.com/questions/47776774/element-is-not-clickable-at-point-in-headless-mode-but-when-we-remove-headless - // 3. Explicitly set the window size to a bigger size: - // https://stackoverflow.com/questions/62003082/elementnotinteractableexception-element-not-interactable-element-has-zero-size - // - // Since the default 800x600 window size in headless mode (as used on CI) causes the - // `` buttons to be in a position that trigger the above issue, we explicitly set the - // window size to 1920x1080 when in headless mode. - beforeAll(async () => { - const config = await browser.getProcessedConfig(); - if (config.capabilities?.chromeOptions?.args?.includes('--headless')) { - browser.driver.manage().window().setSize(1920, 1080); - } - }); - - beforeEach(() => browser.get('')); - - describe('Heroes', () => { - it('retrieves the list of heroes at startup', async () => { - expect(await page.heroesListItems.count()).toBe(4); - expect(await page.heroesListItems.get(0).getText()).toContain('Dr. Nice'); - await checkLogForMessage('GET "api/heroes"'); - }); - - it('makes a POST to add a new hero', async () => { - await page.heroesListInput.sendKeys('Magneta'); - await page.heroesListAddButton.click(); - expect(await page.heroesListItems.count()).toBe(5); - await checkLogForMessage('POST "api/heroes"'); - }); - - it('makes a GET to search for a hero', async () => { - await page.heroesListInput.sendKeys('Celeritas'); - await page.heroesListSearchButton.click(); - await checkLogForMessage('GET "api/heroes?name=Celeritas"'); - }); - }); - - describe('Messages', () => { - it('can clear the logs', async () => { - expect(await page.logListItems.count()).toBe(1); - await page.logClearButton.click(); - expect(await page.logListItems.count()).toBe(0); - }); - }); - - describe('Configuration', () => { - it('can fetch the configuration JSON file', async () => { - await page.configGetButton.click(); - await checkLogForMessage('GET "assets/config.json"'); - expect(await page.configSpan.getText()).toContain('Heroes API URL is "api/heroes"'); - expect(await page.configSpan.getText()).toContain('Textfile URL is "assets/textfile.txt"'); - expect(await page.configSpan.getText()).toContain('Date is "Wed Jan 29 2020" (date)'); - }); - - it('can fetch the configuration JSON file with headers', async () => { - await page.configGetResponseButton.click(); - await checkLogForMessage('GET "assets/config.json"'); - expect(await page.configSpan.getText()).toContain('Response headers:'); - expect(await page.configSpan.getText()).toContain('content-type: application/json'); - }); - - it('can clear the configuration log', async () => { - await page.configGetResponseButton.click(); - expect(await page.configSpan.getText()).toContain('Response headers:'); - await page.configClearButton.click(); - expect(await page.configSpan.isPresent()).toBeFalsy(); - }); - - it('throws an error for a non valid url', async () => { - await page.configErrorButton.click(); - await checkLogForMessage('GET "not/a/real/url"'); - expect(await page.configErrorMessage.getText()).toContain('"Something bad happened; please try again later."'); - }); - }); - - describe('Download', () => { - it('can download a txt file and show it', async () => { - await page.downloadButton.click(); - await checkLogForMessage('DownloaderService downloaded "assets/textfile.txt"'); - await checkLogForMessage('GET "assets/textfile.txt"'); - expect(await page.downloadMessage.getText()).toContain('Contents: "This is the downloaded text file "'); - }); - - it('can clear the log of the download', async () => { - await page.downloadButton.click(); - expect(await page.downloadMessage.getText()).toContain('Contents: "This is the downloaded text file "'); - await page.downloadClearButton.click(); - expect(await page.downloadMessage.isPresent()).toBeFalsy(); - }); - }); - - describe('Upload', () => { - it('can upload a file', async () => { - const filename = 'app.po.ts'; - const url = resolve(__dirname, filename); - await page.uploadInput.sendKeys(url); - await checkLogForMessage('POST "/upload/file" succeeded in'); - expect(await page.uploadMessage.getText()).toContain( - `File "${filename}" was completely uploaded!`); - }); - }); - - describe('PackageSearch', () => { - it('can search for package and find in cache', async () => { - const packageName = 'angular'; - await page.searchInput.sendKeys(packageName); - await checkLogForMessage( - 'Caching response from "/packages/query?name=angular".'); - expect(await page.searchListItems.count()).toBeGreaterThan(1, 'angular items'); - - await page.searchInput.clear(); - await page.searchInput.sendKeys(' '); - expect(await page.searchListItems.count()).toBe(0, 'search empty'); - - await page.searchInput.clear(); - await page.searchInput.sendKeys(packageName); - await checkLogForMessage( - 'Found cached response for "/packages/query?name=angular"'); - }); - }); -}); diff --git a/aio/content/examples/http/example-config.json b/aio/content/examples/http/example-config.json deleted file mode 100644 index 239710e2cd0..00000000000 --- a/aio/content/examples/http/example-config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "projectType": "testing", - "tests": [ - {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadlessNoSandbox", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]} - ] -} diff --git a/aio/content/examples/http/specs.stackblitz.json b/aio/content/examples/http/specs.stackblitz.json deleted file mode 100644 index 46156a84d83..00000000000 --- a/aio/content/examples/http/specs.stackblitz.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "description": "Http Guide Testing", - "files":[ - "src/app/heroes/hero.ts", - "src/app/heroes/heroes.service.ts", - "src/app/heroes/heroes.service.spec.ts", - - "src/app/http-error-handler.service.ts", - "src/app/message.service.ts", - "src/testing/*.ts", - - "src/styles.css", - "src/test.css", - "src/main-specs.ts", - "src/index-specs.html" - ], - "main": "src/index-specs.html", - "tags": ["http", "testing"], - "devDependencies": ["jasmine-core"] -} diff --git a/aio/content/examples/http/src/app/app.component.css b/aio/content/examples/http/src/app/app.component.css deleted file mode 100644 index ea5fdfb1cda..00000000000 --- a/aio/content/examples/http/src/app/app.component.css +++ /dev/null @@ -1,16 +0,0 @@ -.checkboxes { - display: flex; - flex-wrap: wrap; - margin-bottom: 2rem; -} - -.checkboxes > label { - flex: 0 0 max-content; - margin: 0.5rem; - cursor: pointer; -} - -section:not(:last-of-type) { - padding-bottom: 2rem; - border-bottom: 1px solid black; -} diff --git a/aio/content/examples/http/src/app/app.component.html b/aio/content/examples/http/src/app/app.component.html deleted file mode 100644 index cf9adaa1056..00000000000 --- a/aio/content/examples/http/src/app/app.component.html +++ /dev/null @@ -1,46 +0,0 @@ -

    HttpClient Example

    -
    - - - - - - - - - -
    - -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    -
    - -
    diff --git a/aio/content/examples/http/src/app/app.component.ts b/aio/content/examples/http/src/app/app.component.ts deleted file mode 100644 index ec3c00a0bdb..00000000000 --- a/aio/content/examples/http/src/app/app.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { ConfigComponent } from './config/config.component'; -import { DownloaderComponent } from './downloader/downloader.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { MessagesComponent } from './messages/messages.component'; -import { PackageSearchComponent } from './package-search/package-search.component'; -import { UploaderComponent } from './uploader/uploader.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - CommonModule, - - ConfigComponent, - DownloaderComponent, - HeroesComponent, - MessagesComponent, - PackageSearchComponent, - UploaderComponent - ], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - showHeroes = true; - showConfig = true; - showDownloader = true; - showUploader = true; - showSearch = true; - - toggleHeroes() { this.showHeroes = !this.showHeroes; } - toggleConfig() { this.showConfig = !this.showConfig; } - toggleDownloader() { this.showDownloader = !this.showDownloader; } - toggleUploader() { this.showUploader = !this.showUploader; } - toggleSearch() { this.showSearch = !this.showSearch; } -} diff --git a/aio/content/examples/http/src/app/app.config.ts b/aio/content/examples/http/src/app/app.config.ts deleted file mode 100644 index 14076374d9b..00000000000 --- a/aio/content/examples/http/src/app/app.config.ts +++ /dev/null @@ -1,72 +0,0 @@ -// #docplaster -// #docregion sketch -import { ApplicationConfig } from '@angular/core'; -// #enddocregion sketch - -import { provideProtractorTestingSupport } from '@angular/platform-browser'; -// #docregion sketch -import { HttpClientModule } from '@angular/common/http'; -import { importProvidersFrom } from '@angular/core'; -// #enddocregion sketch - -import { HttpClientJsonpModule } from '@angular/common/http'; -import { HttpClientXsrfModule } from '@angular/common/http'; -import { httpInterceptorProviders } from '../app/http-interceptors/index'; -import { noopInterceptorProvider } from '../app/http-interceptors/noop-interceptor'; - -// #region example helper services; not shown in docs -import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; -import { InMemoryDataService } from '../app/in-memory-data.service'; - -import { AuthService } from '../app/auth.service'; -import { HttpErrorHandler } from '../app/http-error-handler.service'; -import { MessageService } from '../app/message.service'; -import { RequestCache, RequestCacheWithMap } from '../app/request-cache.service'; -// #endregion example helper services; not shown in docs - -// #docregion sketch - -// #docregion interceptor-providers, jsonp, noop-provider, xsrf -export const appConfig: ApplicationConfig = { - providers: [ - importProvidersFrom(HttpClientModule), -// #enddocregion interceptor-providers, jsonp, noop-provider, sketch, xsrf -// #docregion jsonp - importProvidersFrom(HttpClientJsonpModule), -// #enddocregion jsonp -// #docregion noop-provider - noopInterceptorProvider, -// #enddocregion noop-provider -// #docregion interceptor-providers - httpInterceptorProviders, -// #enddocregion interceptor-providers -// #docregion xsrf - importProvidersFrom( - HttpClientXsrfModule.withOptions({ - cookieName: 'My-Xsrf-Cookie', - headerName: 'My-Xsrf-Header', - }) - ), -// #enddocregion xsrf - - AuthService, - HttpErrorHandler, - MessageService, - { provide: RequestCache, useClass: RequestCacheWithMap }, - - importProvidersFrom( - // The HttpClientInMemoryWebApiModule module intercepts HTTP requests - // and returns simulated server responses. - // Remove it when a real server is ready to receive requests. - HttpClientInMemoryWebApiModule.forRoot( - InMemoryDataService, { - dataEncapsulation: false, - passThruUnknownUrl: true, - put204: false // return entity after PUT/update - } - ) - ), - provideProtractorTestingSupport(), // essential for e2e testing -// #docregion interceptor-providers, jsonp, noop-provider, sketch, xsrf - ] -}; diff --git a/aio/content/examples/http/src/app/auth.service.ts b/aio/content/examples/http/src/app/auth.service.ts deleted file mode 100644 index 67a4eb4dc56..00000000000 --- a/aio/content/examples/http/src/app/auth.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -/** Mock client-side authentication/authorization service */ -@Injectable() -export class AuthService { - getAuthorizationToken() { - return 'some-auth-token'; - } -} diff --git a/aio/content/examples/http/src/app/config/config.component.html b/aio/content/examples/http/src/app/config/config.component.html deleted file mode 100644 index 0490b060f34..00000000000 --- a/aio/content/examples/http/src/app/config/config.component.html +++ /dev/null @@ -1,19 +0,0 @@ -

    Get configuration from JSON file

    -
    - - - - - -

    Heroes API URL is "{{config.heroesUrl}}"

    -

    Textfile URL is "{{config.textfile}}"

    -

    Date is "{{config.date.toDateString()}}" ({{getType(config.date)}})

    -
    - Response headers: -
      -
    • {{header}}
    • -
    -
    -
    -
    -

    {{error | json}}

    diff --git a/aio/content/examples/http/src/app/config/config.component.ts b/aio/content/examples/http/src/app/config/config.component.ts deleted file mode 100644 index c3ebcc718c0..00000000000 --- a/aio/content/examples/http/src/app/config/config.component.ts +++ /dev/null @@ -1,96 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { Config, ConfigService } from './config.service'; - -@Component({ - standalone: true, - selector: 'app-config', - templateUrl: './config.component.html', - imports: [ CommonModule ], - providers: [ ConfigService ], - styles: ['.error { color: #b30000; }'] -}) -export class ConfigComponent { - error: any; - headers: string[] = []; - // #docregion typed_response, v2 - config: Config | undefined; - - // #enddocregion typed_response, v2 - // #docregion v1 - constructor(private configService: ConfigService) {} - - // #enddocregion v1 - clear() { - this.config = undefined; - this.error = undefined; - this.headers = []; - } - - // #docregion v1, v2, typed_response, untyped_response - showConfig() { - this.configService.getConfig() - // #enddocregion v1, v2, typed_response, untyped_response - .subscribe({ - next: data => this.config = { ...data }, // success path - error: error => this.error = error, // error path - }); - } - showConfig_v1() { - this.configService.getConfig_1() - // #docregion typed_response, v1 - .subscribe(data => this.config = { - heroesUrl: data.heroesUrl, - textfile: data.textfile, - date: data.date, - }); - } - // #enddocregion typed_response, v1 - - showConfig_untyped_response() { - this.configService.getConfig_untyped_response() - // #docregion untyped_response - .subscribe(data => this.config = { - heroesUrl: (data as any).heroesUrl, - textfile: (data as any).textfile, - date: (data as any).date, - }); - } - // #enddocregion untyped_response - - - - showConfig_v2() { - this.configService.getConfig() - // #docregion v2 - // clone the data object, using its known Config shape - .subscribe(data => this.config = { ...data }); - } - // #enddocregion v2 - -// #docregion showConfigResponse - showConfigResponse() { - this.configService.getConfigResponse() - // resp is of type `HttpResponse` - .subscribe(resp => { - // display its headers - const keys = resp.headers.keys(); - this.headers = keys.map(key => - `${key}: ${resp.headers.get(key)}`); - - // access the body directly, which is typed as `Config`. - this.config = { ...resp.body! }; - }); - } -// #enddocregion showConfigResponse - makeError() { - this.configService.makeIntentionalError().subscribe({ error: error => this.error = error.message }); - } - - getType(val: any): string { - return val instanceof Date ? 'date' : Array.isArray(val) ? 'array' : typeof val; - } -} - diff --git a/aio/content/examples/http/src/app/config/config.service.ts b/aio/content/examples/http/src/app/config/config.service.ts deleted file mode 100644 index c2e67b98344..00000000000 --- a/aio/content/examples/http/src/app/config/config.service.ts +++ /dev/null @@ -1,102 +0,0 @@ -// #docplaster -// #docregion , proto -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -// #enddocregion proto -import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; - -import { Observable, catchError, retry, throwError } from 'rxjs'; - -// #docregion config-interface -export interface Config { - heroesUrl: string; - textfile: string; - date: any; -} -// #enddocregion config-interface -// #docregion proto - -@Injectable() -export class ConfigService { - // #enddocregion proto - // #docregion getConfig_1 - configUrl = 'assets/config.json'; - - // #enddocregion getConfig_1 - // #docregion proto - constructor(private http: HttpClient) { } - // #enddocregion proto - - // #docregion getConfig, getConfig_1, getConfig_2, getConfig_3 - getConfig() { - // #enddocregion getConfig_1, getConfig_2, getConfig_3 - return this.http.get(this.configUrl) - .pipe( - retry(3), // retry a failed request up to 3 times - catchError(this.handleError) // then handle the error - ); - } - // #enddocregion getConfig - - getConfig_1() { - // #docregion getConfig_1 - return this.http.get(this.configUrl); - } - // #enddocregion getConfig_1 - - getConfig_2() { - // #docregion getConfig_2 - // now returns an Observable of Config - return this.http.get(this.configUrl); - } - // #enddocregion getConfig_2 - - getConfig_3() { - // #docregion getConfig_3 - return this.http.get(this.configUrl) - .pipe( - catchError(this.handleError) - ); - } - // #enddocregion getConfig_3 - - - getConfig_untyped_response() { - // #docregion untyped_response - return this.http.get(this.configUrl); - // #enddocregion untyped_response - } - - // #docregion getConfigResponse - getConfigResponse(): Observable> { - return this.http.get( - this.configUrl, { observe: 'response' }); - } - // #enddocregion getConfigResponse - - // #docregion handleError - private handleError(error: HttpErrorResponse) { - if (error.status === 0) { - // A client-side or network error occurred. Handle it accordingly. - console.error('An error occurred:', error.error); - } else { - // The backend returned an unsuccessful response code. - // The response body may contain clues as to what went wrong. - console.error( - `Backend returned code ${error.status}, body was: `, error.error); - } - // Return an observable with a user-facing error message. - return throwError(() => new Error('Something bad happened; please try again later.')); - } - // #enddocregion handleError - - makeIntentionalError() { - return this.http.get('not/a/real/url') - .pipe( - catchError(this.handleError) - ); - } - -// #docregion proto -} -// #enddocregion proto diff --git a/aio/content/examples/http/src/app/downloader/downloader.component.html b/aio/content/examples/http/src/app/downloader/downloader.component.html deleted file mode 100644 index a5595d35795..00000000000 --- a/aio/content/examples/http/src/app/downloader/downloader.component.html +++ /dev/null @@ -1,4 +0,0 @@ -

    Download the text file

    - - -

    Contents: "{{contents}}"

    diff --git a/aio/content/examples/http/src/app/downloader/downloader.component.ts b/aio/content/examples/http/src/app/downloader/downloader.component.ts deleted file mode 100644 index c8ef1913e0d..00000000000 --- a/aio/content/examples/http/src/app/downloader/downloader.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { DownloaderService } from './downloader.service'; - -@Component({ - standalone: true, - selector: 'app-downloader', - templateUrl: './downloader.component.html', - imports: [ CommonModule ], - providers: [ DownloaderService ] -}) -export class DownloaderComponent { - contents: string | undefined; - constructor(private downloaderService: DownloaderService) {} - - clear() { - this.contents = undefined; - } - - // #docregion download - download() { - this.downloaderService.getTextFile('assets/textfile.txt') - .subscribe(results => this.contents = results); - } - // #enddocregion download -} diff --git a/aio/content/examples/http/src/app/downloader/downloader.service.ts b/aio/content/examples/http/src/app/downloader/downloader.service.ts deleted file mode 100644 index 3df013b01a3..00000000000 --- a/aio/content/examples/http/src/app/downloader/downloader.service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { tap } from 'rxjs/operators'; - -import { MessageService } from '../message.service'; - -@Injectable() -export class DownloaderService { - constructor( - private http: HttpClient, - private messageService: MessageService) { } - - // #docregion getTextFile - getTextFile(filename: string) { - // The Observable returned by get() is of type Observable - // because a text response was specified. - // There's no need to pass a type parameter to get(). - return this.http.get(filename, {responseType: 'text'}) - .pipe( - tap( // Log the result or error - { - next: (data) => this.log(filename, data), - error: (error) => this.logError(filename, error) - } - ) - ); - } - // #enddocregion getTextFile - - private log(filename: string, data: string) { - const message = `DownloaderService downloaded "${filename}" and got "${data}".`; - this.messageService.add(message); - } - - private logError(filename: string, error: any) { - const message = `DownloaderService failed to download "${filename}"; got error "${error.message}".`; - console.error(message); - this.messageService.add(message); - } -} diff --git a/aio/content/examples/http/src/app/heroes/hero.ts b/aio/content/examples/http/src/app/heroes/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/http/src/app/heroes/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/http/src/app/heroes/heroes.component.css b/aio/content/examples/http/src/app/heroes/heroes.component.css deleted file mode 100644 index ec5cb40d565..00000000000 --- a/aio/content/examples/http/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,79 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.search input { - margin: 1rem 0; -} - -.heroes { - list-style-type: none; - padding: 0; -} - -.heroes li { - display: grid; - grid-template-columns: min-content max-content 1fr max-content max-content; - grid-template-areas: "badge name . edit delete"; - margin: 1rem 0; - align-items: center; - background-color: #eee; - border-radius: 4px; -} - -.heroes li .badge { - grid-area: badge; -} - -.heroes li .name { - grid-area: name; -} - -.heroes li button { - margin: 0.3rem; - padding: 0.3rem 0.8rem; -} - -.heroes li button.edit { - grid-area: edit; -} - -.heroes li button.delete { - grid-area: delete; -} - -.heroes li button:hover, .heros li button:focus { - color: #eee; - background-color: #000; -} - -.heroes .badge { - padding: 0.5rem 0.6rem; - color: white; - background-color: #435B60; - margin-right: 0.8rem; - border-radius: 4px 0 0 4px; - align-self: stretch; - display: flex; - align-items: center; -} - -.heroes input { - max-width: 12rem; - padding: .25rem; -} - -@media (max-width: 550px) { - .heroes li { - grid-template-columns: min-content 1fr 1fr; - grid-template-rows: 2rem max-content; - grid-template-areas: - "badge name name" - "badge edit delete"; - } - - .heroes li .name { - margin-top: 0.3rem; - } - - .heroes li button { - justify-self: center; - } -} \ No newline at end of file diff --git a/aio/content/examples/http/src/app/heroes/heroes.component.html b/aio/content/examples/http/src/app/heroes/heroes.component.html deleted file mode 100644 index 75b3f81363f..00000000000 --- a/aio/content/examples/http/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,29 +0,0 @@ -

    Heroes

    - - -
      -
    • - {{ hero.id || -1 }} - {{hero.name}} - - - - - -
    • -
    diff --git a/aio/content/examples/http/src/app/heroes/heroes.component.ts b/aio/content/examples/http/src/app/heroes/heroes.component.ts deleted file mode 100644 index 9bea8077bb0..00000000000 --- a/aio/content/examples/http/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; -import { Hero } from './hero'; -import { HeroesService } from './heroes.service'; - -@Component({ - standalone: true, - selector: 'app-heroes', - templateUrl: './heroes.component.html', - imports: [ CommonModule, FormsModule ], - providers: [HeroesService], - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent implements OnInit { - heroes: Hero[] = []; - editHero: Hero | undefined; // the hero currently being edited - heroName = ''; - - constructor(private heroesService: HeroesService) {} - - @ViewChild('heroEditInput') - set heroEditInput(element: ElementRef) { - if (element) { - element.nativeElement.focus(); - } - } - - ngOnInit() { - this.getHeroes(); - } - - getHeroes(): void { - this.heroesService.getHeroes() - .subscribe(heroes => (this.heroes = heroes)); - } - - add(name: string): void { - this.editHero = undefined; - name = name.trim(); - if (!name) { - return; - } - - // The server will generate the id for this new hero - const newHero: Hero = { name } as Hero; - // #docregion add-hero-subscribe - this.heroesService - .addHero(newHero) - .subscribe(hero => this.heroes.push(hero)); - // #enddocregion add-hero-subscribe - } - - delete(hero: Hero): void { - this.heroes = this.heroes.filter(h => h !== hero); - // #docregion delete-hero-subscribe - this.heroesService - .deleteHero(hero.id) - .subscribe(); - // #enddocregion delete-hero-subscribe - /* - // #docregion delete-hero-no-subscribe - // oops ... subscribe() is missing so nothing happens - this.heroesService.deleteHero(hero.id); - // #enddocregion delete-hero-no-subscribe - */ - } - - edit(heroName: string) { - this.update(heroName); - this.editHero = undefined; - } - - search(searchTerm: string) { - this.editHero = undefined; - if (searchTerm) { - this.heroesService - .searchHeroes(searchTerm) - .subscribe(heroes => (this.heroes = heroes)); - } else { - this.getHeroes(); - } - } - - update(heroName: string) { - if (heroName && this.editHero && this.editHero.name !== heroName) { - this.heroesService - .updateHero({...this.editHero, name: heroName}) - .subscribe(hero => { - // replace the hero in the heroes list with update from server - const ix = hero ? this.heroes.findIndex(h => h.id === hero.id) : -1; - if (ix > -1) { - this.heroes[ix] = hero; - } - }); - this.editHero = undefined; - } - } -} diff --git a/aio/content/examples/http/src/app/heroes/heroes.service.spec.ts b/aio/content/examples/http/src/app/heroes/heroes.service.spec.ts deleted file mode 100644 index 2425eb81387..00000000000 --- a/aio/content/examples/http/src/app/heroes/heroes.service.spec.ts +++ /dev/null @@ -1,156 +0,0 @@ -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -// Other imports -import { TestBed } from '@angular/core/testing'; -import { HttpClient, HttpResponse } from '@angular/common/http'; - -import { Hero } from './hero'; -import { HeroesService } from './heroes.service'; -import { HttpErrorHandler } from '../http-error-handler.service'; -import { MessageService } from '../message.service'; - -describe('HeroesService', () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - let heroService: HeroesService; - - beforeEach(() => { - TestBed.configureTestingModule({ - // Import the HttpClient mocking services - imports: [ HttpClientTestingModule ], - // Provide the service-under-test and its dependencies - providers: [ - HeroesService, - HttpErrorHandler, - MessageService - ] - }); - - // Inject the http, test controller, and service-under-test - // as they will be referenced by each test. - httpClient = TestBed.inject(HttpClient); - httpTestingController = TestBed.inject(HttpTestingController); - heroService = TestBed.inject(HeroesService); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - /// HeroService method tests begin /// - - describe('#getHeroes', () => { - let expectedHeroes: Hero[]; - - beforeEach(() => { - heroService = TestBed.inject(HeroesService); - expectedHeroes = [ - { id: 1, name: 'A' }, - { id: 2, name: 'B' }, - ] as Hero[]; - }); - - it('should return expected heroes (called once)', () => { - - heroService.getHeroes().subscribe({ - next: heroes => expect(heroes).toEqual(expectedHeroes, 'should return expected heroes'), - error: fail, - }); - - // HeroService should have made one request to GET heroes from expected URL - const req = httpTestingController.expectOne(heroService.heroesUrl); - expect(req.request.method).toEqual('GET'); - - // Respond with the mock heroes - req.flush(expectedHeroes); - }); - - it('should be OK returning no heroes', () => { - - heroService.getHeroes().subscribe({ - next: heroes => expect(heroes.length).toEqual(0, 'should have empty heroes array'), - error: fail, - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - req.flush([]); // Respond with no heroes - }); - - // This service reports the error but finds a way to let the app keep going. - it('should turn 404 into an empty heroes result', () => { - - heroService.getHeroes().subscribe({ - next: heroes => expect(heroes.length).toEqual(0, 'should return empty heroes array'), - error: fail, - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - - // respond with a 404 and the error message in the body - const msg = 'deliberate 404 error'; - req.flush(msg, {status: 404, statusText: 'Not Found'}); - }); - - it('should return expected heroes (called multiple times)', () => { - - heroService.getHeroes().subscribe(); - heroService.getHeroes().subscribe(); - heroService.getHeroes().subscribe({ - next: heroes => expect(heroes).toEqual(expectedHeroes, 'should return expected heroes'), - error: fail, - }); - - const requests = httpTestingController.match(heroService.heroesUrl); - expect(requests.length).toEqual(3, 'calls to getHeroes()'); - - // Respond to each request with different mock hero results - requests[0].flush([]); - requests[1].flush([{id: 1, name: 'bob'}]); - requests[2].flush(expectedHeroes); - }); - }); - - describe('#updateHero', () => { - // Expecting the query form of URL so should not 404 when id not found - const makeUrl = (id: number) => `${heroService.heroesUrl}/?id=${id}`; - - it('should update a hero and return it', () => { - - const updateHero: Hero = { id: 1, name: 'A' }; - - heroService.updateHero(updateHero).subscribe({ - next: data => expect(data).toEqual(updateHero, 'should return the hero'), - error: fail, - }); - - // HeroService should have made one request to PUT hero - const req = httpTestingController.expectOne(heroService.heroesUrl); - expect(req.request.method).toEqual('PUT'); - expect(req.request.body).toEqual(updateHero); - - // Expect server to return the hero after PUT - const expectedResponse = new HttpResponse( - { status: 200, statusText: 'OK', body: updateHero }); - req.event(expectedResponse); - }); - - // This service reports the error but finds a way to let the app keep going. - it('should turn 404 error into return of the update hero', () => { - const updateHero: Hero = { id: 1, name: 'A' }; - - heroService.updateHero(updateHero).subscribe({ - next: data => expect(data).toEqual(updateHero, 'should return the update hero'), - error: fail, - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - - // respond with a 404 and the error message in the body - const msg = 'deliberate 404 error'; - req.flush(msg, {status: 404, statusText: 'Not Found'}); - }); - }); - - // TODO: test other HeroService methods -}); diff --git a/aio/content/examples/http/src/app/heroes/heroes.service.ts b/aio/content/examples/http/src/app/heroes/heroes.service.ts deleted file mode 100644 index 8d3ac9a7f95..00000000000 --- a/aio/content/examples/http/src/app/heroes/heroes.service.ts +++ /dev/null @@ -1,119 +0,0 @@ -// #docplaster -import { Injectable } from '@angular/core'; -import { HttpClient, HttpParams } from '@angular/common/http'; -// #docregion http-options -import { HttpHeaders } from '@angular/common/http'; - -// #enddocregion http-options - -import { Observable, catchError, map } from 'rxjs'; - -import { Hero } from './hero'; -import { HttpErrorHandler, HandleError } from '../http-error-handler.service'; - -// #docregion http-options -const httpOptions = { - headers: new HttpHeaders({ - 'Content-Type': 'application/json', - Authorization: 'my-auth-token' - }) -}; -// #enddocregion http-options - -@Injectable() -export class HeroesService { - heroesUrl = 'api/heroes'; // URL to web api - private handleError: HandleError; - - constructor( - private http: HttpClient, - httpErrorHandler: HttpErrorHandler) { - this.handleError = httpErrorHandler.createHandleError('HeroesService'); - } - - /** GET heroes from the server */ - getHeroes(): Observable { - return this.http.get(this.heroesUrl) - .pipe( - catchError(this.handleError('getHeroes', [])) - ); - } - - // #docregion searchHeroes, searchHeroesJsonp - /* GET heroes whose name contains search term */ - searchHeroes(term: string): Observable { - // #enddocregion searchHeroesJsonp - term = term.trim(); - - // Add safe, URL encoded search parameter if there is a search term - const options = term ? - { params: new HttpParams().set('name', term) } : {}; - - return this.http.get(this.heroesUrl, options) - .pipe( - catchError(this.handleError('searchHeroes', [])) - ); - } - // #enddocregion searchHeroes - - // This JSONP example doesn't run. It is for the JSONP documentation only. - /** Imaginary API in a different domain that supports JSONP. */ - heroesSearchUrl = 'https://heroes.com/search'; - - /** Does whatever is necessary to convert the result from API to Heroes */ - jsonpResultToHeroes(result: any) { return result as Hero[]; } - - /* GET heroes (using JSONP) whose name contains search term */ - searchHeroesJsonp(term: string): Observable { - // #docregion searchHeroesJsonp - term = term.trim(); - - const heroesUrl = `${this.heroesSearchUrl}?${term}`; - return this.http.jsonp(heroesUrl, 'callback') - .pipe( - map(result => this.jsonpResultToHeroes(result)), - catchError(this.handleError('searchHeroes', [])) - ); - } - // #enddocregion searchHeroesJsonp - - //////// Save methods ////////// - - // #docregion addHero - /** POST: add a new hero to the database */ - addHero(hero: Hero): Observable { - return this.http.post(this.heroesUrl, hero, httpOptions) - .pipe( - catchError(this.handleError('addHero', hero)) - ); - } - // #enddocregion addHero - - // #docregion deleteHero - /** DELETE: delete the hero from the server */ - deleteHero(id: number): Observable { - const url = `${this.heroesUrl}/${id}`; // DELETE api/heroes/42 - return this.http.delete(url, httpOptions) - .pipe( - catchError(this.handleError('deleteHero')) - ); - } - // #enddocregion deleteHero - - // #docregion updateHero - /** PUT: update the hero on the server. Returns the updated hero upon success. */ - updateHero(hero: Hero): Observable { - // #enddocregion updateHero - // #docregion update-headers - httpOptions.headers = - httpOptions.headers.set('Authorization', 'my-new-auth-token'); - // #enddocregion update-headers - - // #docregion updateHero - return this.http.put(this.heroesUrl, hero, httpOptions) - .pipe( - catchError(this.handleError('updateHero', hero)) - ); - } - // #enddocregion updateHero -} diff --git a/aio/content/examples/http/src/app/http-error-handler.service.ts b/aio/content/examples/http/src/app/http-error-handler.service.ts deleted file mode 100644 index ea7cbc81059..00000000000 --- a/aio/content/examples/http/src/app/http-error-handler.service.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpErrorResponse } from '@angular/common/http'; - -import { Observable, of } from 'rxjs'; - -import { MessageService } from './message.service'; - -/** Type of the handleError function returned by HttpErrorHandler.createHandleError */ -export type HandleError = - (operation?: string, result?: T) => (error: HttpErrorResponse) => Observable; - -/** Handles HttpClient errors */ -@Injectable() -export class HttpErrorHandler { - constructor(private messageService: MessageService) { } - - /** Create curried handleError function that already knows the service name */ - createHandleError = (serviceName = '') => - (operation = 'operation', result = {} as T) => - this.handleError(serviceName, operation, result); - - /** - * Returns a function that handles Http operation failures. - * This error handler lets the app continue to run as if no error occurred. - * - * @param serviceName = name of the data service that attempted the operation - * @param operation - name of the operation that failed - * @param result - optional value to return as the observable result - */ - handleError(serviceName = '', operation = 'operation', result = {} as T) { - - return (error: HttpErrorResponse): Observable => { - // TODO: send the error to remote logging infrastructure - console.error(error); // log to console instead - - const message = (error.error instanceof ErrorEvent) ? - error.error.message : - `server returned code ${error.status} with body "${error.error}"`; - - // TODO: better job of transforming error for user consumption - this.messageService.add(`${serviceName}: ${operation} failed: ${message}`); - - // Let the app keep running by returning a safe result. - return of( result ); - }; - - } -} diff --git a/aio/content/examples/http/src/app/http-interceptors/auth-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/auth-interceptor.ts deleted file mode 100644 index bfd9103f043..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/auth-interceptor.ts +++ /dev/null @@ -1,40 +0,0 @@ -// #docplaster -import { Injectable } from '@angular/core'; -import { - HttpInterceptor, HttpHandler, HttpRequest -} from '@angular/common/http'; - -// #docregion -import { AuthService } from '../auth.service'; - -@Injectable() -export class AuthInterceptor implements HttpInterceptor { - - constructor(private auth: AuthService) {} - - intercept(req: HttpRequest, next: HttpHandler) { - // Get the auth token from the service. - const authToken = this.auth.getAuthorizationToken(); - - // #enddocregion - /* - * The verbose way: - // #docregion - // Clone the request and replace the original headers with - // cloned headers, updated with the authorization. - const authReq = req.clone({ - headers: req.headers.set('Authorization', authToken) - }); - // #enddocregion - */ - // #docregion set-header-shortcut - // Clone the request and set the new header in one step. - const authReq = req.clone({ setHeaders: { Authorization: authToken } }); - // #enddocregion set-header-shortcut - // #docregion - - // send cloned request with header to the next handler. - return next.handle(authReq); - } -} -// #enddocregion diff --git a/aio/content/examples/http/src/app/http-interceptors/caching-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/caching-interceptor.ts deleted file mode 100644 index a0d12b80f47..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/caching-interceptor.ts +++ /dev/null @@ -1,79 +0,0 @@ -// #docplaster -import { Injectable } from '@angular/core'; -import { - HttpEvent, HttpRequest, HttpResponse, HttpInterceptor, HttpHandler -} from '@angular/common/http'; - -import { Observable, of, startWith, tap } from 'rxjs'; - -import { RequestCache } from '../request-cache.service'; -import { searchUrl } from '../package-search/package-search.service'; - - -/** - * If request is cacheable (e.g., package search) and - * response is in cache return the cached response as observable. - * If has 'x-refresh' header that is true, - * then also re-run the package search, using response from next(), - * returning an observable that emits the cached response first. - * - * If not in cache or not cacheable, - * pass request through to next() - */ -// #docregion v1 -@Injectable() -export class CachingInterceptor implements HttpInterceptor { - constructor(private cache: RequestCache) {} - - intercept(req: HttpRequest, next: HttpHandler) { - // continue if not cacheable. - if (!isCacheable(req)) { return next.handle(req); } - - const cachedResponse = this.cache.get(req); - // #enddocregion v1 - // #docregion intercept-refresh - // cache-then-refresh - if (req.headers.get('x-refresh')) { - const results$ = sendRequest(req, next, this.cache); - return cachedResponse ? - results$.pipe( startWith(cachedResponse) ) : - results$; - } - // cache-or-fetch - // #docregion v1 - return cachedResponse ? - of(cachedResponse) : sendRequest(req, next, this.cache); - // #enddocregion intercept-refresh - } -} -// #enddocregion v1 - - -/** Is this request cacheable? */ -function isCacheable(req: HttpRequest) { - // Only GET requests are cacheable - return req.method === 'GET' && - // Only npm package search is cacheable in this app - -1 < req.url.indexOf(searchUrl); -} - -// #docregion send-request -/** - * Get server response observable by sending request to `next()`. - * Will add the response to the cache on the way out. - */ -function sendRequest( - req: HttpRequest, - next: HttpHandler, - cache: RequestCache): Observable> { - return next.handle(req).pipe( - tap(event => { - // There may be other events besides the response. - if (event instanceof HttpResponse) { - cache.put(req, event); // Update the cache. - } - }) - ); -} -// #enddocregion send-request - diff --git a/aio/content/examples/http/src/app/http-interceptors/custom-json-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/custom-json-interceptor.ts deleted file mode 100644 index 073cf3eb302..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/custom-json-interceptor.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { map } from 'rxjs/operators'; - -// #docregion custom-json-interceptor -// The JsonParser class acts as a base class for custom parsers and as the DI token. -@Injectable() -export abstract class JsonParser { - abstract parse(text: string): any; -} - -@Injectable() -export class CustomJsonInterceptor implements HttpInterceptor { - constructor(private jsonParser: JsonParser) {} - - intercept(httpRequest: HttpRequest, next: HttpHandler) { - if (httpRequest.responseType === 'json') { - // If the expected response type is JSON then handle it here. - return this.handleJsonResponse(httpRequest, next); - } else { - return next.handle(httpRequest); - } - } - - private handleJsonResponse(httpRequest: HttpRequest, next: HttpHandler) { - // Override the responseType to disable the default JSON parsing. - httpRequest = httpRequest.clone({responseType: 'text'}); - // Handle the response using the custom parser. - return next.handle(httpRequest).pipe(map(event => this.parseJsonResponse(event))); - } - - private parseJsonResponse(event: HttpEvent) { - if (event instanceof HttpResponse && typeof event.body === 'string') { - return event.clone({body: this.jsonParser.parse(event.body)}); - } else { - return event; - } - } -} -// #enddocregion custom-json-interceptor - -// #docregion custom-json-parser -@Injectable() -export class CustomJsonParser implements JsonParser { - parse(text: string): any { - return JSON.parse(text, dateReviver); - } -} - -function dateReviver(key: string, value: any) { - // #enddocregion custom-json-parser - if (typeof value !== 'string') { - return value; - } - const match = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(value); - if (!match) { - return value; - } - return new Date(+match[1], +match[2] - 1, +match[3]); - // #docregion custom-json-parser -} -// #enddocregion custom-json-parser diff --git a/aio/content/examples/http/src/app/http-interceptors/ensure-https-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/ensure-https-interceptor.ts deleted file mode 100644 index ad6c9f62812..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/ensure-https-interceptor.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - HttpEvent, HttpInterceptor, HttpHandler, HttpRequest -} from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -@Injectable() -export class EnsureHttpsInterceptor implements HttpInterceptor { - intercept(req: HttpRequest, next: HttpHandler): Observable> { - // #docregion excerpt - // clone request and replace 'http://' with 'https://' at the same time - const secureReq = req.clone({ - url: req.url.replace('http://', 'https://') - }); - // send the cloned, "secure" request to the next handler. - return next.handle(secureReq); - // #enddocregion excerpt - } -} diff --git a/aio/content/examples/http/src/app/http-interceptors/index.ts b/aio/content/examples/http/src/app/http-interceptors/index.ts deleted file mode 100644 index 68f8d55c0fd..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/index.ts +++ /dev/null @@ -1,33 +0,0 @@ -// #docplaster -// #docregion interceptor-providers -import { HTTP_INTERCEPTORS } from '@angular/common/http'; - -// #enddocregion interceptor-providers -import { CustomJsonInterceptor , CustomJsonParser, JsonParser} from './custom-json-interceptor'; - -// #docregion interceptor-providers -import { AuthInterceptor } from './auth-interceptor'; -import { CachingInterceptor } from './caching-interceptor'; -import { EnsureHttpsInterceptor } from './ensure-https-interceptor'; -import { LoggingInterceptor } from './logging-interceptor'; -import { NoopInterceptor } from './noop-interceptor'; -import { TrimNameInterceptor } from './trim-name-interceptor'; -import { UploadInterceptor } from './upload-interceptor'; - -/** Array of Http interceptor providers in outside-in order */ -export const httpInterceptorProviders = [ - // #enddocregion interceptor-providers - // #docregion custom-json-interceptor - { provide: HTTP_INTERCEPTORS, useClass: CustomJsonInterceptor, multi: true }, - { provide: JsonParser, useClass: CustomJsonParser }, - // #enddocregion custom-json-interceptor - // #docregion interceptor-providers - { provide: HTTP_INTERCEPTORS, useClass: NoopInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: EnsureHttpsInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: TrimNameInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: LoggingInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: UploadInterceptor, multi: true }, - { provide: HTTP_INTERCEPTORS, useClass: CachingInterceptor, multi: true }, -]; -// #enddocregion interceptor-providers diff --git a/aio/content/examples/http/src/app/http-interceptors/logging-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/logging-interceptor.ts deleted file mode 100644 index c04ddace602..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/logging-interceptor.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - HttpInterceptor, HttpHandler, HttpRequest, HttpResponse -} from '@angular/common/http'; - -// #docregion excerpt -import { finalize, tap } from 'rxjs'; -import { MessageService } from '../message.service'; - -@Injectable() -export class LoggingInterceptor implements HttpInterceptor { - constructor(private messenger: MessageService) {} - - intercept(req: HttpRequest, next: HttpHandler) { - const started = Date.now(); - let ok: string; - - // extend server response observable with logging - return next.handle(req) - .pipe( - tap({ - // Succeeds when there is a response; ignore other events - next: (event) => (ok = event instanceof HttpResponse ? 'succeeded' : ''), - // Operation failed; error is an HttpErrorResponse - error: (_error) => (ok = 'failed') - }), - // Log when response observable either completes or errors - finalize(() => { - const elapsed = Date.now() - started; - const msg = `${req.method} "${req.urlWithParams}" - ${ok} in ${elapsed} ms.`; - this.messenger.add(msg); - }) - ); - } -} -// #enddocregion excerpt diff --git a/aio/content/examples/http/src/app/http-interceptors/noop-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/noop-interceptor.ts deleted file mode 100644 index 4e6bbb3fddd..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/noop-interceptor.ts +++ /dev/null @@ -1,28 +0,0 @@ -// #docregion noop -import { Injectable } from '@angular/core'; -import { - HttpEvent, HttpInterceptor, HttpHandler, HttpRequest -} from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -/** Pass untouched request through to the next request handler. */ -@Injectable() -export class NoopInterceptor implements HttpInterceptor { - intercept(req: HttpRequest, next: HttpHandler): - Observable> { - return next.handle(req); - } -} -// #enddocregion noop - -// #docregion noop-provider -import { Provider } from '@angular/core'; - -// Injection token for the Http Interceptors multi-provider -import { HTTP_INTERCEPTORS } from '@angular/common/http'; - -/** Provider for the Noop Interceptor. */ -export const noopInterceptorProvider: Provider = - { provide: HTTP_INTERCEPTORS, useClass: NoopInterceptor, multi: true }; -// #enddocregion noop-provider diff --git a/aio/content/examples/http/src/app/http-interceptors/retry-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/retry-interceptor.ts deleted file mode 100644 index ea21f2c18a9..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/retry-interceptor.ts +++ /dev/null @@ -1,57 +0,0 @@ -// #docplaster -import { - HttpClient, - HttpContext, - HttpContextToken, - HttpEvent, - HttpHandler, - HttpInterceptor, - HttpRequest, -} from '@angular/common/http'; -import {Observable} from 'rxjs'; -/* -// #docregion reading-context -import {retry} from 'rxjs'; -// #enddocregion reading-context -*/ -// #docregion mutable-context -import {retry, tap} from 'rxjs/operators'; -// #enddocregion mutable-context - -// #docregion context-token, mutable-context -export const RETRY_COUNT = new HttpContextToken(() => 3); -// #enddocregion context-token -export const ERROR_COUNT = new HttpContextToken(() => 0); -// #enddocregion mutable-context - -export class FakeService { - constructor(private httpClient: HttpClient) { - // #docregion set-context - this.httpClient - .get('/data/feed', { - context: new HttpContext().set(RETRY_COUNT, 5), - }) - .subscribe(results => {/* ... */}); - // #enddocregion set-context - } -} - -// #docregion reading-context, mutable-context - -export class RetryInterceptor implements HttpInterceptor { - intercept(req: HttpRequest, next: HttpHandler): Observable> { - const retryCount = req.context.get(RETRY_COUNT); - - return next.handle(req).pipe( - // #enddocregion reading-context - tap({ - // An error has occurred, so increment this request's ERROR_COUNT. - error: () => req.context.set(ERROR_COUNT, req.context.get(ERROR_COUNT) + 1) - }), - // #docregion reading-context - // Retry the request a configurable number of times. - retry(retryCount), - ); - } -} -// #enddocregion reading-context, mutable-context diff --git a/aio/content/examples/http/src/app/http-interceptors/trim-name-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/trim-name-interceptor.ts deleted file mode 100644 index 23858ebdd29..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/trim-name-interceptor.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - HttpEvent, HttpInterceptor, HttpHandler, HttpRequest -} from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -@Injectable() -export class TrimNameInterceptor implements HttpInterceptor { - intercept(req: HttpRequest, next: HttpHandler): Observable> { - const body = req.body; - if (!body || !body.name ) { - return next.handle(req); - } - // #docregion excerpt - // copy the body and trim whitespace from the name property - const newBody = { ...body, name: body.name.trim() }; - // clone request and set its body - const newReq = req.clone({ body: newBody }); - // send the cloned request to the next handler. - return next.handle(newReq); - // #enddocregion excerpt - } -} diff --git a/aio/content/examples/http/src/app/http-interceptors/upload-interceptor.ts b/aio/content/examples/http/src/app/http-interceptors/upload-interceptor.ts deleted file mode 100644 index 849e8f1f27f..00000000000 --- a/aio/content/examples/http/src/app/http-interceptors/upload-interceptor.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - HttpEvent, HttpInterceptor, HttpHandler, - HttpRequest, HttpResponse, - HttpEventType, HttpProgressEvent -} from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -/** Simulate server replying to file upload request */ -@Injectable() -export class UploadInterceptor implements HttpInterceptor { - intercept(req: HttpRequest, next: HttpHandler): Observable> { - if (req.url.indexOf('/upload/file') === -1) { - return next.handle(req); - } - const delay = 300; // TODO: inject delay? - return createUploadEvents(delay); - } -} - -/** Create simulation of upload event stream */ -function createUploadEvents(delay: number) { - // Simulate XHR behavior which would provide this information in a ProgressEvent - const chunks = 5; - const total = 12345678; - const chunkSize = Math.ceil(total / chunks); - - return new Observable>(observer => { - // notify the event stream that the request was sent. - observer.next({type: HttpEventType.Sent}); - - uploadLoop(0); - - function uploadLoop(loaded: number) { - // N.B.: Cannot use setInterval or rxjs delay (which uses setInterval) - // because e2e test won't complete. A zone thing? - // Use setTimeout and tail recursion instead. - setTimeout(() => { - loaded += chunkSize; - - if (loaded >= total) { - const doneResponse = new HttpResponse({ - status: 201, // OK but no body; - }); - observer.next(doneResponse); - observer.complete(); - return; - } - - const progressEvent: HttpProgressEvent = { - type: HttpEventType.UploadProgress, - loaded, - total - }; - observer.next(progressEvent); - uploadLoop(loaded); - }, delay); - } - }); -} diff --git a/aio/content/examples/http/src/app/in-memory-data.service.ts b/aio/content/examples/http/src/app/in-memory-data.service.ts deleted file mode 100644 index 017776a2d21..00000000000 --- a/aio/content/examples/http/src/app/in-memory-data.service.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { InMemoryDbService } from 'angular-in-memory-web-api'; - -export class InMemoryDataService implements InMemoryDbService { - createDb() { - const heroes = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - ]; - const query = [ - { name: '@angular/core', version: '20.1.0', description: 'angular core package' }, - { name: '@angular/common', version: '20.1.0', description: 'angular common package' }, - { name: '@angular/material', version: '20.1.5', description: 'angular material package' }, - ]; - return {heroes, query}; - } -} diff --git a/aio/content/examples/http/src/app/message.service.ts b/aio/content/examples/http/src/app/message.service.ts deleted file mode 100644 index 1c56a49e70a..00000000000 --- a/aio/content/examples/http/src/app/message.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/http/src/app/messages/messages.component.css b/aio/content/examples/http/src/app/messages/messages.component.css deleted file mode 100644 index 9c0f3c71563..00000000000 --- a/aio/content/examples/http/src/app/messages/messages.component.css +++ /dev/null @@ -1,9 +0,0 @@ -:host { - display: block; - padding: 1rem; - background-color: rgb(255, 245, 187); -} - -h2 { - margin: 0; -} diff --git a/aio/content/examples/http/src/app/messages/messages.component.html b/aio/content/examples/http/src/app/messages/messages.component.html deleted file mode 100644 index 5d05ac00327..00000000000 --- a/aio/content/examples/http/src/app/messages/messages.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

    Messages

    - - -
    -
      -
    1. {{message}}
    2. -
    -
    diff --git a/aio/content/examples/http/src/app/messages/messages.component.ts b/aio/content/examples/http/src/app/messages/messages.component.ts deleted file mode 100644 index 8eb78671038..00000000000 --- a/aio/content/examples/http/src/app/messages/messages.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { MessageService } from '../message.service'; - -@Component({ - standalone: true, - selector: 'app-messages', - templateUrl: './messages.component.html', - imports: [ CommonModule ], - styleUrls: ['./messages.component.css'] -}) -export class MessagesComponent { - constructor(public messageService: MessageService) {} -} diff --git a/aio/content/examples/http/src/app/package-search/package-search.component.html b/aio/content/examples/http/src/app/package-search/package-search.component.html deleted file mode 100644 index 6ad93234207..00000000000 --- a/aio/content/examples/http/src/app/package-search/package-search.component.html +++ /dev/null @@ -1,17 +0,0 @@ - -

    Search Npm Packages

    -

    Searches when typing stops. Caches for 30 seconds.

    - - - - - - - -
      -
    • - {{package.name}} v.{{package.version}} - - {{package.description}} -
    • -
    - diff --git a/aio/content/examples/http/src/app/package-search/package-search.component.ts b/aio/content/examples/http/src/app/package-search/package-search.component.ts deleted file mode 100644 index 4cd2dbd3e8a..00000000000 --- a/aio/content/examples/http/src/app/package-search/package-search.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { Observable, Subject } from 'rxjs'; -import { debounceTime, distinctUntilChanged, switchMap } from 'rxjs/operators'; - -import { NpmPackageInfo, PackageSearchService } from './package-search.service'; - -@Component({ - standalone: true, - selector: 'app-package-search', - templateUrl: './package-search.component.html', - imports: [ CommonModule ], - styles: ['input { margin-bottom: .5rem; }'], - providers: [ PackageSearchService ] -}) -export class PackageSearchComponent implements OnInit { - // #docregion debounce - withRefresh = false; - packages$!: Observable; - private searchText$ = new Subject(); - - search(packageName: string) { - this.searchText$.next(packageName); - } - - ngOnInit() { - this.packages$ = this.searchText$.pipe( - debounceTime(500), - distinctUntilChanged(), - switchMap(packageName => - this.searchService.search(packageName, this.withRefresh)) - ); - } - - constructor(private searchService: PackageSearchService) { } - - // #enddocregion debounce - - toggleRefresh() { this.withRefresh = ! this.withRefresh; } - - // #docregion getValue - getValue(event: Event): string { - return (event.target as HTMLInputElement).value; - } - // #enddocregion getValue -} diff --git a/aio/content/examples/http/src/app/package-search/package-search.service.ts b/aio/content/examples/http/src/app/package-search/package-search.service.ts deleted file mode 100644 index a10b0c0c816..00000000000 --- a/aio/content/examples/http/src/app/package-search/package-search.service.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams } from '@angular/common/http'; - -import { Observable, of } from 'rxjs'; -import { catchError } from 'rxjs/operators'; - -import { HttpErrorHandler, HandleError } from '../http-error-handler.service'; - -export interface NpmPackageInfo { - name: string; - version: string; - description: string; -} - -export const searchUrl = '/packages/query'; - -function createHttpOptions(packageName: string, refresh = false) { - // package name search api - // e.g., /packages/query?name=dom' - const params = new HttpParams({ fromObject: { name: packageName } }); - const headerMap: Record = refresh ? {'x-refresh': 'true'} : {}; - const headers = new HttpHeaders(headerMap) ; - return { headers, params }; -} - -@Injectable() -export class PackageSearchService { - private handleError: HandleError; - - constructor( - private http: HttpClient, - httpErrorHandler: HttpErrorHandler) { - this.handleError = httpErrorHandler.createHandleError('PackageSearchService'); - } - - search(packageName: string, refresh = false): Observable { - // clear if no pkg name - if (!packageName.trim()) { return of([]); } - - const options = createHttpOptions(packageName, refresh); - - return this.http.get(searchUrl, options).pipe( - catchError(this.handleError('search', [])) - ); - } -} diff --git a/aio/content/examples/http/src/app/request-cache.service.ts b/aio/content/examples/http/src/app/request-cache.service.ts deleted file mode 100644 index 54c02b75bb9..00000000000 --- a/aio/content/examples/http/src/app/request-cache.service.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpRequest, HttpResponse } from '@angular/common/http'; - -import { MessageService } from './message.service'; - -export interface RequestCacheEntry { - url: string; - response: HttpResponse; - lastRead: number; -} - -export abstract class RequestCache { - abstract get(req: HttpRequest): HttpResponse | undefined; - abstract put(req: HttpRequest, response: HttpResponse): void; -} - -const maxAge = 30000; // maximum cache age (ms) - -@Injectable() -export class RequestCacheWithMap implements RequestCache { - - cache = new Map(); - - constructor(private messenger: MessageService) { } - - get(req: HttpRequest): HttpResponse | undefined { - const url = req.urlWithParams; - const cached = this.cache.get(url); - - if (!cached) { - return undefined; - } - - const isExpired = cached.lastRead < (Date.now() - maxAge); - const expired = isExpired ? 'expired ' : ''; - this.messenger.add( - `Found ${expired}cached response for "${url}".`); - return isExpired ? undefined : cached.response; - } - - put(req: HttpRequest, response: HttpResponse): void { - const url = req.urlWithParams; - this.messenger.add(`Caching response from "${url}".`); - - const newEntry = { url, response, lastRead: Date.now() }; - this.cache.set(url, newEntry); - - // remove expired cache entries - const expired = Date.now() - maxAge; - this.cache.forEach(entry => { - if (entry.lastRead < expired) { - this.cache.delete(entry.url); - } - }); - - this.messenger.add(`Request cache size: ${this.cache.size}.`); - } -} diff --git a/aio/content/examples/http/src/app/uploader/uploader.component.html b/aio/content/examples/http/src/app/uploader/uploader.component.html deleted file mode 100644 index 5aa6ea154fe..00000000000 --- a/aio/content/examples/http/src/app/uploader/uploader.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    Upload a file

    -
    -
    - - - -
    -

    {{message}}

    -
    diff --git a/aio/content/examples/http/src/app/uploader/uploader.component.ts b/aio/content/examples/http/src/app/uploader/uploader.component.ts deleted file mode 100644 index 32a956aa093..00000000000 --- a/aio/content/examples/http/src/app/uploader/uploader.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { UploaderService } from './uploader.service'; - -@Component({ - standalone: true, - selector: 'app-uploader', - templateUrl: './uploader.component.html', - imports: [ CommonModule, FormsModule ], - styles: ['input[type=file] { font-size: 1.2rem; margin-top: 1rem; display: block; }'], - providers: [ UploaderService ] -}) -export class UploaderComponent { - message = ''; - - constructor(private uploaderService: UploaderService) {} - - onPicked(input: HTMLInputElement) { - const file = input.files?.[0]; - if (file) { - this.uploaderService.upload(file).subscribe( - msg => { - input.value = ''; - this.message = msg; - } - ); - } - } -} diff --git a/aio/content/examples/http/src/app/uploader/uploader.service.ts b/aio/content/examples/http/src/app/uploader/uploader.service.ts deleted file mode 100644 index a78fdd9eef8..00000000000 --- a/aio/content/examples/http/src/app/uploader/uploader.service.ts +++ /dev/null @@ -1,106 +0,0 @@ -import { Injectable } from '@angular/core'; -import { - HttpClient, HttpEvent, HttpEventType, HttpProgressEvent, - HttpRequest, HttpResponse, HttpErrorResponse -} from '@angular/common/http'; - -import { of } from 'rxjs'; -import { catchError, last, map, tap } from 'rxjs/operators'; - -import { MessageService } from '../message.service'; - -@Injectable() -export class UploaderService { - constructor( - private http: HttpClient, - private messenger: MessageService) {} - - // If uploading multiple files, change to: - // upload(files: FileList) { - // const formData = new FormData(); - // files.forEach(f => formData.append(f.name, f)); - // new HttpRequest('POST', '/upload/file', formData, {reportProgress: true}); - // ... - // } - - upload(file: File) { - if (!file) { return of(); } - - // COULD HAVE WRITTEN: - // return this.http.post('/upload/file', file, { - // reportProgress: true, - // observe: 'events' - // }).pipe( - - // Create the request object that POSTs the file to an upload endpoint. - // The `reportProgress` option tells HttpClient to listen and return - // XHR progress events. - // #docregion upload-request - const req = new HttpRequest('POST', '/upload/file', file, { - reportProgress: true - }); - // #enddocregion upload-request - - // #docregion upload-body - // The `HttpClient.request` API produces a raw event stream - // which includes start (sent), progress, and response events. - return this.http.request(req).pipe( - map(event => this.getEventMessage(event, file)), - tap(message => this.showProgress(message)), - last(), // return last (completed) message to caller - catchError(this.handleError(file)) - ); - // #enddocregion upload-body - } - - // #docregion getEventMessage - /** Return distinct message for sent, upload progress, & response events */ - private getEventMessage(event: HttpEvent, file: File) { - switch (event.type) { - case HttpEventType.Sent: - return `Uploading file "${file.name}" of size ${file.size}.`; - - case HttpEventType.UploadProgress: - // Compute and show the % done: - const percentDone = event.total ? Math.round(100 * event.loaded / event.total) : 0; - return `File "${file.name}" is ${percentDone}% uploaded.`; - - case HttpEventType.Response: - return `File "${file.name}" was completely uploaded!`; - - default: - return `File "${file.name}" surprising upload event: ${event.type}.`; - } - } - // #enddocregion getEventMessage - - /** - * Returns a function that handles Http upload failures. - * - * @param file - File object for file being uploaded - * - * When no `UploadInterceptor` and no server, - * you'll end up here in the error handler. - */ - private handleError(file: File) { - const userMessage = `${file.name} upload failed.`; - - return (error: HttpErrorResponse) => { - // TODO: send the error to remote logging infrastructure - console.error(error); // log to console instead - - const message = (error.error instanceof Error) ? - error.error.message : - `server returned code ${error.status} with body "${error.error}"`; - - this.messenger.add(`${userMessage} ${message}`); - - // Let app keep running but indicate failure. - return of(userMessage); - }; - } - - private showProgress(message: string) { - this.messenger.add(message); - } -} diff --git a/aio/content/examples/http/src/assets/config.json b/aio/content/examples/http/src/assets/config.json deleted file mode 100644 index b5f75452ce0..00000000000 --- a/aio/content/examples/http/src/assets/config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "heroesUrl": "api/heroes", - "textfile": "assets/textfile.txt", - "date": "2020-01-29" -} diff --git a/aio/content/examples/http/src/assets/textfile.txt b/aio/content/examples/http/src/assets/textfile.txt deleted file mode 100644 index 282575a15a7..00000000000 --- a/aio/content/examples/http/src/assets/textfile.txt +++ /dev/null @@ -1 +0,0 @@ -This is the downloaded text file diff --git a/aio/content/examples/http/src/browser-test-shim.js b/aio/content/examples/http/src/browser-test-shim.js deleted file mode 100644 index ef2311cb26c..00000000000 --- a/aio/content/examples/http/src/browser-test-shim.js +++ /dev/null @@ -1,86 +0,0 @@ -// BROWSER TESTING SHIM -// Keep it in-sync with what karma-test-shim does -// #docregion -/*global jasmine, __karma__, window*/ -(function () { - - Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. - - // Uncomment to get full stacktrace output. Sometimes helpful, usually not. - // Error.stackTraceLimit = Infinity; // - - jasmine.DEFAULT_TIMEOUT_INTERVAL = 3000; - - var baseURL = document.baseURI; - baseURL = baseURL + baseURL[baseURL.length-1] ? '' : '/'; - - System.config({ - baseURL: baseURL, - // Extend usual application package list with test folder - packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } }, - - // Assume npm: is set in `paths` in systemjs.config - // Map the angular testing umd bundles - map: { - '@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js', - '@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js', - '@angular/common/http/testing': 'npm:@angular/common/bundles/common-http-testing.umd.js', - '@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js', - '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', - '@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js', - '@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js', - }, - }); - - System.import('systemjs.config.js') - // .then(importSystemJsExtras) // not in this project - .then(initTestBed) - .then(initTesting); - - /** Optional SystemJS configuration extras. Keep going w/o it */ - function importSystemJsExtras(){ - return System.import('systemjs.config.extras.js') - .catch(function(reason) { - console.log( - 'Note: System.import could not load "systemjs.config.extras.js" where you might have added more configuration. It is an optional file so we will continue without it.' - ); - console.log(reason); - }); - } - - function initTestBed(){ - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]) - - .then(function (providers) { - var coreTesting = providers[0]; - var browserTesting = providers[1]; - - coreTesting.TestBed.initTestEnvironment( - browserTesting.BrowserDynamicTestingModule, - browserTesting.platformBrowserDynamicTesting()); - }) - } - - // Import all spec files defined in the html (__spec_files__) - // and start Jasmine testrunner - function initTesting () { - console.log('loading spec files: '+__spec_files__.join(', ')); - return Promise.all( - __spec_files__.map(function(spec) { - return System.import(spec); - }) - ) - // After all imports load, re-execute `window.onload` which - // triggers the Jasmine test-runner start or explain what went wrong - .then(success, console.error.bind(console)); - - function success () { - console.log('Spec files loaded; starting Jasmine testrunner'); - window.onload(); - } - } - - })(); diff --git a/aio/content/examples/http/src/index-specs.html b/aio/content/examples/http/src/index-specs.html deleted file mode 100644 index 26286a50832..00000000000 --- a/aio/content/examples/http/src/index-specs.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/aio/content/examples/http/src/index.html b/aio/content/examples/http/src/index.html deleted file mode 100644 index 464f7a26b23..00000000000 --- a/aio/content/examples/http/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - HttpClient Example - - - - - - - - diff --git a/aio/content/examples/http/src/main-specs.ts b/aio/content/examples/http/src/main-specs.ts deleted file mode 100644 index 21359298c43..00000000000 --- a/aio/content/examples/http/src/main-specs.ts +++ /dev/null @@ -1,38 +0,0 @@ -import 'jasmine-core/lib/jasmine-core/jasmine-html.js'; -import 'jasmine-core/lib/jasmine-core/boot.js'; - -declare const jasmine: any; - -import './polyfills'; - -import 'zone.js/testing'; - -import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; - -// Import spec files individually for Stackblitz -import './app/heroes/heroes.service.spec.ts'; -import './testing/http-client.spec.ts'; - -// -bootstrap(); - -// -function bootstrap() { - if ((window as any).jasmineRef) { - location.reload(); - return; - } else { - window.onload?.({} as Event); - (window as any).jasmineRef = jasmine.getEnv(); - } - - // First, initialize the Angular testing environment. - getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting() - ); -} diff --git a/aio/content/examples/http/src/main.ts b/aio/content/examples/http/src/main.ts deleted file mode 100644 index a207cbbd19f..00000000000 --- a/aio/content/examples/http/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docplaster -// #docregion sketch -import { bootstrapApplication } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); -// #enddocregion sketch diff --git a/aio/content/examples/http/src/test.css b/aio/content/examples/http/src/test.css deleted file mode 100644 index 6010a5d9ba7..00000000000 --- a/aio/content/examples/http/src/test.css +++ /dev/null @@ -1 +0,0 @@ -@import "~jasmine-core/lib/jasmine-core/jasmine.css" diff --git a/aio/content/examples/http/src/testing/http-client.spec.ts b/aio/content/examples/http/src/testing/http-client.spec.ts deleted file mode 100644 index 81f4de2e77d..00000000000 --- a/aio/content/examples/http/src/testing/http-client.spec.ts +++ /dev/null @@ -1,183 +0,0 @@ -// #docplaster -// #docregion imports -// Http testing module and mocking controller -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -// Other imports -import { TestBed } from '@angular/core/testing'; -import { HttpClient, HttpErrorResponse } from '@angular/common/http'; - -// #enddocregion imports -import { HttpHeaders } from '@angular/common/http'; - -interface Data { - name: string; -} - -const testUrl = '/data'; - -// #docregion setup -describe('HttpClient testing', () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ HttpClientTestingModule ] - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.inject(HttpClient); - httpTestingController = TestBed.inject(HttpTestingController); - }); - // #enddocregion setup - // #docregion afterEach - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - // #enddocregion afterEach - // #docregion setup - /// Tests begin /// - // #enddocregion setup - // #docregion get-test - it('can test HttpClient.get', () => { - const testData: Data = {name: 'Test Data'}; - - // Make an HTTP GET request - httpClient.get(testUrl) - .subscribe(data => - // When observable resolves, result should match test data - expect(data).toEqual(testData) - ); - - // The following `expectOne()` will match the request's URL. - // If no requests or multiple requests matched that URL - // `expectOne()` would throw. - const req = httpTestingController.expectOne('/data'); - - // Assert that the request is a GET. - expect(req.request.method).toEqual('GET'); - - // Respond with mock data, causing Observable to resolve. - // Subscribe callback asserts that correct data was returned. - req.flush(testData); - - // Finally, assert that there are no outstanding requests. - httpTestingController.verify(); - }); - // #enddocregion get-test - - it('can test HttpClient.get with matching header', () => { - const testData: Data = {name: 'Test Data'}; - - // Make an HTTP GET request with specific header - httpClient.get(testUrl, { - headers: new HttpHeaders({Authorization: 'my-auth-token'}) - }) - .subscribe(data => - expect(data).toEqual(testData) - ); - - // Find request with a predicate function. - // #docregion predicate - // Expect one request with an authorization header - const req = httpTestingController.expectOne( - request => request.headers.has('Authorization') - ); - // #enddocregion predicate - req.flush(testData); - }); - - it('can test multiple requests', () => { - const testData: Data[] = [ - { name: 'bob' }, { name: 'carol' }, - { name: 'ted' }, { name: 'alice' } - ]; - - // Make three requests in a row - httpClient.get(testUrl) - .subscribe(d => expect(d.length).withContext('should have no data').toEqual(0)); - - httpClient.get(testUrl) - .subscribe(d => expect(d).withContext('should be one element array').toEqual([testData[0]])); - - httpClient.get(testUrl) - .subscribe(d => expect(d).withContext('should be expected data').toEqual(testData)); - - // #docregion multi-request - // get all pending requests that match the given URL - const requests = httpTestingController.match(testUrl); - expect(requests.length).toEqual(3); - - // Respond to each request with different results - requests[0].flush([]); - requests[1].flush([testData[0]]); - requests[2].flush(testData); - // #enddocregion multi-request - }); - - // #docregion 404 - it('can test for 404 error', () => { - const emsg = 'deliberate 404 error'; - - httpClient.get(testUrl).subscribe({ - next: () => fail('should have failed with the 404 error'), - error: (error: HttpErrorResponse) => { - expect(error.status).withContext('status').toEqual(404); - expect(error.error).withContext('message').toEqual(emsg); - }, - }); - - const req = httpTestingController.expectOne(testUrl); - - // Respond with mock error - req.flush(emsg, { status: 404, statusText: 'Not Found' }); - }); - // #enddocregion 404 - - // #docregion network-error - it('can test for network error', done => { - // Create mock ProgressEvent with type `error`, raised when something goes wrong - // at network level. e.g. Connection timeout, DNS error, offline, etc. - const mockError = new ProgressEvent('error'); - - httpClient.get(testUrl).subscribe({ - next: () => fail('should have failed with the network error'), - error: (error: HttpErrorResponse) => { - expect(error.error).toBe(mockError); - done(); - }, - }); - - const req = httpTestingController.expectOne(testUrl); - - // Respond with mock error - req.error(mockError); - }); - // #enddocregion network-error - - it('httpTestingController.verify should fail if HTTP response not simulated', () => { - // Sends request - httpClient.get('some/api').subscribe(); - - // verify() should fail because haven't handled the pending request. - expect(() => httpTestingController.verify()).toThrow(); - - // Now get and flush the request so that afterEach() doesn't fail - const req = httpTestingController.expectOne('some/api'); - req.flush(null); - }); - - // Proves that verify in afterEach() really would catch error - // if test doesn't simulate the HTTP response. - // - // Must disable this test because can't catch an error in an afterEach(). - // Uncomment if you want to confirm that afterEach() does the job. - // it('afterEach() should fail when HTTP response not simulated',() => { - // // Sends request which is never handled by this test - // httpClient.get('some/api').subscribe(); - // }); -// #docregion setup -}); -// #enddocregion setup diff --git a/aio/content/examples/http/stackblitz.json b/aio/content/examples/http/stackblitz.json deleted file mode 100644 index 1079ab149c0..00000000000 --- a/aio/content/examples/http/stackblitz.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "description": "Http", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!src/testing/*.*", - "!src/index-specs.html", - "!src/main-specs.ts" - ], - "file": "src/app/app.component.ts", - "tags": ["http"], - "devDependencies": ["jasmine-core"] -} diff --git a/aio/content/examples/i18n/BUILD.bazel b/aio/content/examples/i18n/BUILD.bazel deleted file mode 100644 index ce95b28dcab..00000000000 --- a/aio/content/examples/i18n/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "i18n", -) diff --git a/aio/content/examples/i18n/angular.json b/aio/content/examples/i18n/angular.json deleted file mode 100644 index 83610dc2bd9..00000000000 --- a/aio/content/examples/i18n/angular.json +++ /dev/null @@ -1,140 +0,0 @@ -// #docplaster ... -{ - "$schema": "./node_modules/@angular/cli/lib/config/schema.json", - "version": 1, - "newProjectRoot": "projects", - // #docregion locale-config, i18n-baseHref - "projects": { - "angular.io-example": { - // #enddocregion locale-config, i18n-baseHref - "projectType": "application", - "root": "", - "sourceRoot": "src", - "prefix": "app", - // #docregion locale-config, i18n-baseHref - "i18n": { - "sourceLocale": "en-US", - "locales": { - "fr": { - "translation": "src/locale/messages.fr.xlf", - // #enddocregion locale-config - "baseHref": "" - // #docregion locale-config - } - } - }, - // #docregion build-production-french - "architect": { - // #enddocregion locale-config, i18n-baseHref - // #docregion build-localize-true, build-single-locale, missing-translation-error - "build": { - // #enddocregion build-single-locale - "builder": "@angular-devkit/build-angular:application", - "options": { - // #enddocregion build-production-french, missing-translation-error - "localize": true, - // #enddocregion build-localize-true - "outputPath": "dist", - "index": "src/index.html", - "browser": "src/main.ts", - "polyfills": ["zone.js"], - "tsConfig": "tsconfig.app.json", - "assets": ["src/favicon.ico", "src/assets"], - "styles": ["src/styles.css"], - "scripts": [], - // #docregion missing-translation-error - "i18nMissingTranslation": "error" - // #docregion build-localize-true, build-production-french - }, - // #enddocregion build-localize-true, missing-translation-error - // #docregion build-single-locale - "configurations": { - // #enddocregion build-single-locale, build-production-french - "production": { - "budgets": [ - { - "type": "initial", - "maximumWarning": "500kb", - "maximumError": "1mb" - }, - { - "type": "anyComponentStyle", - "maximumWarning": "2kb", - "maximumError": "4kb" - } - ], - "outputHashing": "all" - }, - "development": { - "localize": false, - "optimization": false, - "extractLicenses": false, - "sourceMap": true - }, - // #docregion build-single-locale, build-production-french - "fr": { - "localize": ["fr"] - } - }, - // #enddocregion build-single-locale, build-production-french - "defaultConfiguration": "production" - // #docregion build-single-locale, build-production-french - }, - "serve": { - "builder": "@angular-devkit/build-angular:dev-server", - "configurations": { - // #enddocregion build-single-locale - "production": { - "buildTarget": "angular.io-example:build:production" - }, - // #enddocregion build-production-french - "development": { - "buildTarget": "angular.io-example:build:development" - }, - // #docregion build-single-locale, build-production-french - "fr": { - "buildTarget": "angular.io-example:build:development,fr" - } - }, - // #enddocregion build-single-locale, build-production-french - "defaultConfiguration": "development" - // #docregion build-single-locale, build-production-french - }, - // #enddocregion build-single-locale, build-production-french - "extract-i18n": { - "builder": "@angular-devkit/build-angular:extract-i18n", - "options": { - "buildTarget": "angular.io-example:build" - } - }, - "test": { - "builder": "@angular-devkit/build-angular:karma", - "options": { - "polyfills": ["zone.js", "zone.js/testing"], - "tsConfig": "tsconfig.spec.json", - "assets": ["src/favicon.ico", "src/assets"], - "styles": ["src/styles.css"], - "scripts": [] - } - }, - "e2e": { - "builder": "@angular-devkit/build-angular:protractor", - "options": { - "protractorConfig": "e2e/protractor.conf.js", - "devServerTarget": "angular.io-example:serve:fr" - }, - "configurations": { - "production": { - "devServerTarget": "angular.io-example:serve:production" - } - } - } - // #docregion locale-config, build-single-locale, build-production-french, i18n-baseHref - } - // #enddocregion build-single-locale, build-production-french - } - } - // #enddocregion i18n-baseHref - // #docregion i18n-baseHref -} -// #enddocregion locale-config, i18n-baseHref diff --git a/aio/content/examples/i18n/doc-files/apache2.conf b/aio/content/examples/i18n/doc-files/apache2.conf deleted file mode 100644 index eed547e1f87..00000000000 --- a/aio/content/examples/i18n/doc-files/apache2.conf +++ /dev/null @@ -1,24 +0,0 @@ -# #docregion - - ServerName localhost - DocumentRoot /www/data - - RewriteEngine on - RewriteBase / - RewriteRule ^../index\.html$ - [L] - - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule (..) $1/index.html [L] - - RewriteCond %{HTTP:Accept-Language} ^de [NC] - RewriteRule ^$ /de/ [R] - - RewriteCond %{HTTP:Accept-Language} ^en [NC] - RewriteRule ^$ /en/ [R] - - RewriteCond %{HTTP:Accept-Language} !^en [NC] - RewriteCond %{HTTP:Accept-Language} !^de [NC] - RewriteRule ^$ /fr/ [R] - - diff --git a/aio/content/examples/i18n/doc-files/app.component.html b/aio/content/examples/i18n/doc-files/app.component.html deleted file mode 100644 index 1e5da1744cc..00000000000 --- a/aio/content/examples/i18n/doc-files/app.component.html +++ /dev/null @@ -1,37 +0,0 @@ - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -

    Hello i18n!

    - - - -Angular logo - - - -

    Hello

    - -

    Good bye

    - diff --git a/aio/content/examples/i18n/doc-files/app.locale_data.ts b/aio/content/examples/i18n/doc-files/app.locale_data.ts deleted file mode 100644 index 3c99a59e090..00000000000 --- a/aio/content/examples/i18n/doc-files/app.locale_data.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { registerLocaleData } from '@angular/common'; -import localeFr from '@angular/common/locales/fr'; - -// the second parameter 'fr-FR' is optional -registerLocaleData(localeFr, 'fr-FR'); diff --git a/aio/content/examples/i18n/doc-files/app.locale_data_extra.ts b/aio/content/examples/i18n/doc-files/app.locale_data_extra.ts deleted file mode 100644 index f31ce034bb3..00000000000 --- a/aio/content/examples/i18n/doc-files/app.locale_data_extra.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { registerLocaleData } from '@angular/common'; -import localeFrExtra from '@angular/common/locales/extra/fr'; -import localeFr from '@angular/common/locales/fr'; - -registerLocaleData(localeFr, 'fr-FR', localeFrExtra); diff --git a/aio/content/examples/i18n/doc-files/app.module.ts b/aio/content/examples/i18n/doc-files/app.module.ts deleted file mode 100644 index 02a71cc246d..00000000000 --- a/aio/content/examples/i18n/doc-files/app.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -// For documenting NgModule Apps only -// #docregion -import { LOCALE_ID, NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppComponent } from '../src/app/app.component'; - -@NgModule({ - imports: [ BrowserModule ], - declarations: [ AppComponent ], - providers: [ { provide: LOCALE_ID, useValue: 'fr' } ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/i18n/doc-files/commands.sh b/aio/content/examples/i18n/doc-files/commands.sh deleted file mode 100644 index 5974576376b..00000000000 --- a/aio/content/examples/i18n/doc-files/commands.sh +++ /dev/null @@ -1,35 +0,0 @@ -# #docregion add-localize -ng add @angular/localize -# #enddocregion add-localize - -# #docregion extract-i18n-default -ng extract-i18n -# #enddocregion extract-i18n-default - -# #docregion extract-i18n-output-path -ng extract-i18n --output-path src/locale -# #enddocregion extract-i18n-output-path - -# #docregion extract-i18n-formats -ng extract-i18n --format=xlf -ng extract-i18n --format=xlf2 -ng extract-i18n --format=xmb -ng extract-i18n --format=json -ng extract-i18n --format=arb -# #enddocregion extract-i18n-formats - -# #docregion extract-i18n-out-file -ng extract-i18n --out-file source.xlf -# #enddocregion extract-i18n-out-file - -# #docregion build-localize -ng build --localize -# #enddocregion build-localize - -# #docregion serve-french -ng serve --configuration=fr -# #enddocregion serve-french - -# #docregion build-production-french -ng build --configuration=production,fr -# #enddocregion build-production-french diff --git a/aio/content/examples/i18n/doc-files/locale_plural_function.ts b/aio/content/examples/i18n/doc-files/locale_plural_function.ts deleted file mode 100644 index d99e2f47665..00000000000 --- a/aio/content/examples/i18n/doc-files/locale_plural_function.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable */ -// #docregion -function plural(n: number): number { - let i = Math.floor(Math.abs(n)), v = n.toString().replace(/^[^.]*\.?/, '').length; - if (i === 1 && v === 0) return 1; - return 5; -} diff --git a/aio/content/examples/i18n/doc-files/main.1.ts b/aio/content/examples/i18n/doc-files/main.1.ts deleted file mode 100644 index 9cd15da95dd..00000000000 --- a/aio/content/examples/i18n/doc-files/main.1.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent); diff --git a/aio/content/examples/i18n/doc-files/messages.fr.xlf.html b/aio/content/examples/i18n/doc-files/messages.fr.xlf.html deleted file mode 100644 index 23d6f5fd1bd..00000000000 --- a/aio/content/examples/i18n/doc-files/messages.fr.xlf.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - Hello i18n! - An introduction header for this sample - User welcome - - - - - - - Hello i18n! - Bonjour i18n ! - An introduction header for this sample - User welcome - - - - - - - I don't output any element - Je n'affiche aucun élément - - - Angular logo - Logo d'Angular - - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} } - {VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes} } - - - - - - The author is - L'auteur est - - - - - {VAR_SELECT, select, male {male} female {female} other {other} } - {VAR_SELECT, select, male {un homme} female {une femme} other {autre} } - - - - - - - Updated: - Mis à jour: - - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} } - {VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} } - - - - - - Hello - Bonjour - - - - - - diff --git a/aio/content/examples/i18n/doc-files/nginx.conf b/aio/content/examples/i18n/doc-files/nginx.conf deleted file mode 100644 index 31430f5ace5..00000000000 --- a/aio/content/examples/i18n/doc-files/nginx.conf +++ /dev/null @@ -1,32 +0,0 @@ -# #docregion -http { - # Browser preferred language detection (does NOT require - # AcceptLanguageModule) - map $http_accept_language $accept_language { - ~*^de de; - ~*^fr fr; - ~*^en en; - } - # ... -} - -server { - listen 80; - server_name localhost; - root /www/data; - - # Fallback to default language if no preference defined by browser - if ($accept_language ~ "^$") { - set $accept_language "fr"; - } - - # Redirect "/" to Angular application in the preferred language of the browser - rewrite ^/$ /$accept_language permanent; - - # Everything under the Angular application is always redirected to Angular in the - # correct language - location ~ ^/(fr|de|en) { - try_files $uri /$1/index.html?$args; - } - # ... -} diff --git a/aio/content/examples/i18n/doc-files/rendered-output.html b/aio/content/examples/i18n/doc-files/rendered-output.html deleted file mode 100644 index 139a7e7f361..00000000000 --- a/aio/content/examples/i18n/doc-files/rendered-output.html +++ /dev/null @@ -1,3 +0,0 @@ -

    Bonjour

    - -

    Bonjour

    \ No newline at end of file diff --git a/aio/content/examples/i18n/e2e/src/app.e2e-spec.ts b/aio/content/examples/i18n/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 42c50f03a7b..00000000000 --- a/aio/content/examples/i18n/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('i18n E2E Tests', () => { - - beforeEach(() => browser.get('')); - - it('should display i18n translated welcome: Bonjour !', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Bonjour i18n !'); - }); - - it('should display the node texts without elements', async () => { - expect(await element(by.css('app-root')).getText()).toContain(`Je n'affiche aucun élément`); - }); - - it('should display the translated title attribute', async () => { - const title = await element(by.css('img')).getAttribute('title'); - expect(title).toBe(`Logo d'Angular`); - }); - - it('should display the ICU plural expression', async () => { - expect(await element.all(by.css('span')).get(0).getText()).toBe(`Mis à jour à l'instant`); - }); - - it('should display the ICU select expression', async () => { - const selectIcuExp = element.all(by.css('span')).get(1); - expect(await selectIcuExp.getText()).toBe(`L'auteur est une femme`); - await element.all(by.css('button')).get(2).click(); - expect(await selectIcuExp.getText()).toBe(`L'auteur est un homme`); - }); - - it('should display the nested expression', async () => { - const nestedExp = element.all(by.css('span')).get(2); - const incBtn = element.all(by.css('button')).get(0); - expect(await nestedExp.getText()).toBe(`Mis à jour: à l'instant`); - await incBtn.click(); - expect(await nestedExp.getText()).toBe(`Mis à jour: il y a une minute`); - await incBtn.click(); - await incBtn.click(); - await element.all(by.css('button')).get(4).click(); - expect(await nestedExp.getText()).toBe(`Mis à jour: il y a 3 minutes par autre`); - }); - -}); diff --git a/aio/content/examples/i18n/example-config.json b/aio/content/examples/i18n/example-config.json deleted file mode 100644 index 7512bf529d3..00000000000 --- a/aio/content/examples/i18n/example-config.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "projectType": "i18n", - "overrideBoilerplate": [ - "angular.json" - ], - "tests": [ - { - "cmd": "yarn", - "args": [ - "e2e", - "--protractor-config=e2e/protractor-bazel.conf.js", - "--no-webdriver-update", - "--port=0" - ] - } - ] -} diff --git a/aio/content/examples/i18n/readme.md b/aio/content/examples/i18n/readme.md deleted file mode 100644 index ee50d2b2d20..00000000000 --- a/aio/content/examples/i18n/readme.md +++ /dev/null @@ -1,27 +0,0 @@ -# Angular i18n Internationalization Example - -This sample comes from the Angular documentation's "[Example Angular Internationalization application](https://angular.io/guide/i18n-example)" page. - -## Install and Run the Download - -1. `npm install` the node_module packages -2. `npm start` to see it run in English -3. `npm run start:fr` to see it run with French translation. - ->See the scripts in `package.json` for an explanation of these commands. - - -## Run in Stackblitz - -Stackblitz compiles and runs the English version by default. - -To see the example translate to French with Angular i18n: - -1. Open the `project.json` file and add the following to the bottom: -``` - , "stackblitz": { - "startCommand": "npm run start:fr" - } -``` - -2. Click the "Fork" button in the stackblitz header. That makes a new copy for you with this change and re-runs the example in French. \ No newline at end of file diff --git a/aio/content/examples/i18n/src/app/app.component.html b/aio/content/examples/i18n/src/app/app.component.html deleted file mode 100644 index ca9271999fd..00000000000 --- a/aio/content/examples/i18n/src/app/app.component.html +++ /dev/null @@ -1,35 +0,0 @@ - -

    - Hello i18n! -

    - - -I don't output any element - - -
    - - -Angular logo - -
    - - -Updated {minutes, plural, =0 {just now} =1 {one minute ago} other {{{minutes}} minutes ago}} - -({{minutes}}) -

    - - - - -The author is {gender, select, male {male} female {female} other {other}} - -

    - -Updated: {minutes, plural, - =0 {just now} - =1 {one minute ago} - other {{{minutes}} minutes ago by {gender, select, male {male} female {female} other {other}}}} - - diff --git a/aio/content/examples/i18n/src/app/app.component.ts b/aio/content/examples/i18n/src/app/app.component.ts deleted file mode 100644 index 378f7867025..00000000000 --- a/aio/content/examples/i18n/src/app/app.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent { - minutes = 0; - gender = 'female'; - fly = true; - logo = 'https://angular.io/assets/images/logos/angular/angular.png'; - inc(i: number) { - this.minutes = Math.min(5, Math.max(0, this.minutes + i)); - } - male() { this.gender = 'male'; } - female() { this.gender = 'female'; } - other() { this.gender = 'other'; } -} - diff --git a/aio/content/examples/i18n/src/index.html b/aio/content/examples/i18n/src/index.html deleted file mode 100644 index 328627d72ec..00000000000 --- a/aio/content/examples/i18n/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Angular i18n example - - - - - Loading... - - - diff --git a/aio/content/examples/i18n/src/locale/messages.fr.xlf b/aio/content/examples/i18n/src/locale/messages.fr.xlf deleted file mode 100644 index def433e0b06..00000000000 --- a/aio/content/examples/i18n/src/locale/messages.fr.xlf +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - Hello i18n! - - - Bonjour i18n ! - - - app\app.component.ts - 4 - - An introduction header for this sample - User welcome - - - I don't output any element - Je n'affiche aucun élément - - app\app.component.ts - 10 - - - - Angular logo - Logo d'Angular - - app\app.component.ts - 16 - - - - Updated - Mis à jour - - app\app.component.ts - 21 - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} } - {VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes} } - - app\app.component.ts - 21 - - - - The author is - L'auteur est - - app\app.component.ts - 27 - - - - {VAR_SELECT, select, male {male} female {female} other {other} } - {VAR_SELECT, select, male {un homme} female {une femme} other {autre} } - - app\app.component.ts - 27 - - - - Updated: - - Mis à jour: - - - app\app.component.ts - 31 - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} } - {VAR_PLURAL, plural, =0 {à l'instant} =1 {il y a une minute} other {il y a minutes par {VAR_SELECT, select, male {un homme} female {une femme} other {autre} }} } - - app\app.component.ts - 31 - - - - - diff --git a/aio/content/examples/i18n/src/locale/messages.xlf b/aio/content/examples/i18n/src/locale/messages.xlf deleted file mode 100644 index 626eb8e5a91..00000000000 --- a/aio/content/examples/i18n/src/locale/messages.xlf +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - Hello i18n! - - - app/app.component.ts - 3 - - An introduction header for this sample - User welcome - - - I don't output any element - - app/app.component.ts - 9 - - - - Angular logo - - app/app.component.ts - 15 - - - - Updated - - app/app.component.ts - 20 - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago} } - - app/app.component.ts - 20 - - - - The author is - - app/app.component.ts - 26 - - - - {VAR_SELECT, select, male {male} female {female} other {other} } - - app/app.component.ts - 26 - - - - Updated: - - - app/app.component.ts - 30 - - - - {VAR_PLURAL, plural, =0 {just now} =1 {one minute ago} other { minutes ago by {VAR_SELECT, select, male {male} female {female} other {other} }} } - - app/app.component.ts - 30 - - - - - diff --git a/aio/content/examples/i18n/src/main.ts b/aio/content/examples/i18n/src/main.ts deleted file mode 100644 index cfc7d025db6..00000000000 --- a/aio/content/examples/i18n/src/main.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion global-locale -import '@angular/common/locales/global/fr'; -// #enddocregion global-locale - -import { provideProtractorTestingSupport } from '@angular/platform-browser'; -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/i18n/stackblitz.json b/aio/content/examples/i18n/stackblitz.json deleted file mode 100644 index d00974aa1d8..00000000000 --- a/aio/content/examples/i18n/stackblitz.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "description": "i18n", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*", - "!doc-files/**/*", - "**/*.xlf" - ], - "file": "src/app/app.component.ts", - "tags": ["Angular", "i18n", "internationalization"], - "devDependencies": ["@angular/compiler-cli", "typescript"] -} diff --git a/aio/content/examples/injection-token/BUILD.bazel b/aio/content/examples/injection-token/BUILD.bazel deleted file mode 100644 index 17402c83625..00000000000 --- a/aio/content/examples/injection-token/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "injection-token", -) diff --git a/aio/content/examples/injection-token/e2e/src/app.e2e-spec.ts b/aio/content/examples/injection-token/e2e/src/app.e2e-spec.ts deleted file mode 100644 index d4443df6230..00000000000 --- a/aio/content/examples/injection-token/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/injection-token/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/injection-token/example-config.json b/aio/content/examples/injection-token/example-config.json deleted file mode 100644 index c07fa9794c5..00000000000 --- a/aio/content/examples/injection-token/example-config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": [ "tsc", "--project", "./tsconfig.app.json" ] - } - ] -} diff --git a/aio/content/examples/injection-token/src/main.ts b/aio/content/examples/injection-token/src/main.ts deleted file mode 100644 index 8923a32feb9..00000000000 --- a/aio/content/examples/injection-token/src/main.ts +++ /dev/null @@ -1,26 +0,0 @@ -// TODO: Add unit tests for this file. -/* eslint-disable @angular-eslint/no-output-native */ -// #docregion -import {Injector, InjectionToken} from '@angular/core'; - -interface MyInterface { - someProperty: string; -} - -// #docregion InjectionToken - -const TOKEN = new InjectionToken('SomeToken'); - -// Setting up the provider using the same token instance -const providers = [ - {provide: TOKEN, useValue: {someProperty: 'exampleValue'}}, // Mock value for MyInterface -]; - -// Creating the injector with the provider -const injector = Injector.create({providers}); - -// Retrieving the value using the same token instance -const myInterface = injector.get(TOKEN); -// myInterface is inferred to be MyInterface. - -// #enddocregion InjectionToken diff --git a/aio/content/examples/inputs-outputs/BUILD.bazel b/aio/content/examples/inputs-outputs/BUILD.bazel deleted file mode 100644 index 6981455d85d..00000000000 --- a/aio/content/examples/inputs-outputs/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "inputs-outputs", -) diff --git a/aio/content/examples/inputs-outputs/e2e/src/app.e2e-spec.ts b/aio/content/examples/inputs-outputs/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 86cf1d592a6..00000000000 --- a/aio/content/examples/inputs-outputs/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { browser, element, by, logging, ExpectedConditions as EC } from 'protractor'; - -describe('Inputs and Outputs', () => { - - beforeEach(() => browser.get('')); - - // helper function used to test what's logged to the console - async function logChecker(contents: string) { - const logs = await browser - .manage() - .logs() - .get(logging.Type.BROWSER); - const messages = logs.filter(({ message }) => message.indexOf(contents) !== -1); - expect(messages.length).toBeGreaterThan(0); - } - - it('should have title Inputs and Outputs', async () => { - const title = element.all(by.css('h1')).get(0); - expect(await title.getText()).toEqual('Inputs and Outputs'); - }); - - it('should add 123 to the parent list', async () => { - const addToParentButton = element.all(by.css('button')).get(0); - const addToListInput = element.all(by.css('input')).get(0); - const addedItem = element.all(by.css('li')).get(4); - - // Wait for an
  • to be present before sending keys to the input. - await browser.wait(EC.presenceOf(element.all(by.css('li')).get(0)), 5000); - - await addToListInput.sendKeys('123'); - await addToParentButton.click(); - expect(await addedItem.getText()).toEqual('123'); - }); - - it('should delete item', async () => { - const deleteButton = element.all(by.css('button')).get(1); - const contents = 'Child'; - await deleteButton.click(); - await logChecker(contents); - }); - - it('should log buy the item', async () => { - const buyButton = element.all(by.css('button')).get(2); - const contents = 'Child'; - await buyButton.click(); - await logChecker(contents); - }); - - it('should save item for later', async () => { - const saveButton = element.all(by.css('button')).get(3); - const contents = 'Child'; - await saveButton.click(); - await logChecker(contents); - }); - - it('should add item to wishlist', async () => { - const addToParentButton = element.all(by.css('button')).get(4); - const addedItem = element.all(by.css('li')).get(6); - await addToParentButton.click(); - expect(await addedItem.getText()).toEqual('Television'); - }); - -}); diff --git a/aio/content/examples/inputs-outputs/example-config.json b/aio/content/examples/inputs-outputs/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/inputs-outputs/src/app/aliasing.component.ts b/aio/content/examples/inputs-outputs/src/app/aliasing.component.ts deleted file mode 100644 index fffa67a124d..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/aliasing.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -/* eslint-disable @angular-eslint/no-input-rename, - @angular-eslint/no-inputs-metadata-property, - @angular-eslint/no-output-rename, - @angular-eslint/no-outputs-metadata-property */ -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-aliasing', - template: ` -

    Save for later item: {{input1}}

    - - -

    Item for wishlist: {{input2}}

    - - `, - inputs: ['input1: saveForLaterItem'], // propertyName:alias - outputs: ['outputEvent1: saveForLaterEvent'] -}) -export class AliasingComponent { - - input1 = ''; - outputEvent1: EventEmitter = new EventEmitter(); - - @Input('wishListItem') input2 = ''; // @Input(alias) - @Output('wishEvent') outputEvent2 = new EventEmitter(); // @Output(alias) propertyName = ... - - - saveIt() { - console.warn('Child says: emitting outputEvent1 with', this.input1); - this.outputEvent1.emit(this.input1); - } - - wishForIt() { - console.warn('Child says: emitting outputEvent2', this.input2); - this.outputEvent2.emit(this.input2); - } - -} diff --git a/aio/content/examples/inputs-outputs/src/app/app.component.html b/aio/content/examples/inputs-outputs/src/app/app.component.html deleted file mode 100644 index 881d96f4293..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/app.component.html +++ /dev/null @@ -1,61 +0,0 @@ -

    Inputs and Outputs

    - - - - - - - - - -
    - - - - -

    Parent component receiving value via @Output()

    - -
      -
    • {{item}}
    • -
    - -
    - -

    Input and Output together

    -

    Open the console to see the EventEmitter at work when you click Delete.

    - - - - - - -
    - -

    Input and Output in the component class metadata

    -

    Open the console to see the EventEmitter at work when you click Buy.

    - - - - - -
    - -

    Aliasing Inputs and Outputs

    -

    See aliasing.component.ts for aliases and the console for the EventEmitter console logs.

    - - - - -

    Wishlist:

    -
      -
    • {{wish}}
    • -
    - diff --git a/aio/content/examples/inputs-outputs/src/app/app.component.ts b/aio/content/examples/inputs-outputs/src/app/app.component.ts deleted file mode 100644 index 4a457bc574f..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/app.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -import { NgFor } from '@angular/common'; - -import { AliasingComponent } from './aliasing.component'; -import { InputOutputComponent } from './input-output.component'; -import { InTheMetadataComponent } from './in-the-metadata.component'; -import { ItemDetailComponent } from './item-detail.component'; -import { ItemDetailMetadataComponent } from './item-details-metadata.component'; -import { ItemOutputComponent } from './item-output.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - AliasingComponent, - InputOutputComponent, - InTheMetadataComponent, - ItemDetailComponent, - ItemDetailMetadataComponent, - ItemOutputComponent, - NgFor - ] -}) - -// #docregion parent-property -// #docregion add-new-item -export class AppComponent { -// #enddocregion add-new-item - currentItem = 'Television'; - // #enddocregion parent-property - - lastChanceItem = 'Beanbag'; -// #docregion add-new-item - items = ['item1', 'item2', 'item3', 'item4']; -// #enddocregion add-new-item - wishlist = ['Drone', 'Computer']; - - // #docregion add-new-item - - addItem(newItem: string) { - this.items.push(newItem); - } - // #enddocregion add-new-item - - - crossOffItem(item: string) { - console.warn(`Parent says: crossing off ${item}.`); - } - - buyClearanceItem(item: string) { - console.warn(`Parent says: buying ${item}.`); - } - - saveForLater(item: string) { - console.warn(`Parent says: saving ${item} for later.`); - } - - addToWishList(wish: string) { - console.warn(`Parent says: adding ${this.currentItem} to your wishlist.`); - this.wishlist.push(wish); - console.warn(this.wishlist); - } -// #docregion add-new-item -// #docregion parent-property -} -// #enddocregion add-new-item -// #enddocregion parent-property diff --git a/aio/content/examples/inputs-outputs/src/app/in-the-metadata.component.ts b/aio/content/examples/inputs-outputs/src/app/in-the-metadata.component.ts deleted file mode 100644 index be9c05a9755..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/in-the-metadata.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* eslint-disable @angular-eslint/no-inputs-metadata-property, @angular-eslint/no-outputs-metadata-property */ -import { Component, EventEmitter } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-in-the-metadata', - template: ` -

    Latest clearance item: {{clearanceItem}}

    - - - `, - inputs: ['clearanceItem'], - outputs: ['buyEvent'] -}) -export class InTheMetadataComponent { - - - buyEvent = new EventEmitter(); - clearanceItem = ''; - - buyIt() { - console.warn('Child says: emitting buyEvent with', this.clearanceItem); - this.buyEvent.emit(this.clearanceItem); - } - -} diff --git a/aio/content/examples/inputs-outputs/src/app/input-output.component.ts b/aio/content/examples/inputs-outputs/src/app/input-output.component.ts deleted file mode 100644 index b2a0252453d..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/input-output.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component, Input, Output, EventEmitter } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-input-output', - template: ` -

    Item: {{item}}

    - - `, -}) -export class InputOutputComponent { - - @Input() item = ''; - @Output() deleteRequest = new EventEmitter(); - - lineThrough = ''; - - delete() { - console.warn('Child says: emitting item deleteRequest with', this.item); - this.deleteRequest.emit(this.item); - this.lineThrough = this.lineThrough ? '' : 'line-through'; - } -} diff --git a/aio/content/examples/inputs-outputs/src/app/item-detail.component.html b/aio/content/examples/inputs-outputs/src/app/item-detail.component.html deleted file mode 100644 index 7b856fb9e9d..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/item-detail.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

    Child component with @Input()

    - - -

    - Today's item: {{item}} -

    - - diff --git a/aio/content/examples/inputs-outputs/src/app/item-detail.component.ts b/aio/content/examples/inputs-outputs/src/app/item-detail.component.ts deleted file mode 100644 index 6d11fa75b98..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/item-detail.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docplaster -// #docregion use-input -import { Component, Input } from '@angular/core'; // First, import Input -// #enddocregion use-input - -@Component({ - standalone: true, - selector: 'app-item-detail', - templateUrl: './item-detail.component.html', -}) - -// #docregion use-input -export class ItemDetailComponent { - @Input() item = ''; // decorate the property with @Input() -} -// #enddocregion use-input diff --git a/aio/content/examples/inputs-outputs/src/app/item-details-metadata.component.ts b/aio/content/examples/inputs-outputs/src/app/item-details-metadata.component.ts deleted file mode 100644 index 5dcb767562c..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/item-details-metadata.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docplaster -// #docregion use-input-metadata-required -import { Component, Input } from '@angular/core'; // First, import Input -// #enddocregion use-input-metadata-required -// #docregion use-input-metadata-boolean-transform -import { booleanAttribute } from '@angular/core'; // First, import booleanAttribute -// #enddocregion use-input-metadata-boolean-transform -@Component({ - standalone: true, - selector: 'app-item-detail-metadata', - template: ` -

    Child component with @Input() metadata configurations

    - -

    - Today's item: {{item}} - Item's Availability: {{itemAvailability}} -

    - ` -}) - -export class ItemDetailMetadataComponent { - // #docregion use-input-metadata-required - @Input({required: true}) item!: string; // Second, decorate the property with required metadata - // #enddocregion use-input-metadata-required - - // #docregion use-input-metadata-boolean-transform - @Input({transform: booleanAttribute}) itemAvailability!: boolean; // Second, decorate the property with transform - // #enddocregion use-input-metadata-boolean-transform -} - diff --git a/aio/content/examples/inputs-outputs/src/app/item-output.component.html b/aio/content/examples/inputs-outputs/src/app/item-output.component.html deleted file mode 100644 index 22b767084e1..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/item-output.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    Child component with @Output()

    - - - - - - diff --git a/aio/content/examples/inputs-outputs/src/app/item-output.component.ts b/aio/content/examples/inputs-outputs/src/app/item-output.component.ts deleted file mode 100644 index 4474de1a7b9..00000000000 --- a/aio/content/examples/inputs-outputs/src/app/item-output.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Output, EventEmitter } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-item-output', - templateUrl: './item-output.component.html', -}) -// #docregion item-output-class -export class ItemOutputComponent { -// #docregion item-output - - @Output() newItemEvent = new EventEmitter(); - -// #enddocregion item-output - addNewItem(value: string) { - this.newItemEvent.emit(value); - } -} -// #enddocregion item-output-class diff --git a/aio/content/examples/inputs-outputs/src/index.html b/aio/content/examples/inputs-outputs/src/index.html deleted file mode 100644 index 5a9d089e689..00000000000 --- a/aio/content/examples/inputs-outputs/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Inputs and Outputs - - - - - - - - diff --git a/aio/content/examples/inputs-outputs/src/main.ts b/aio/content/examples/inputs-outputs/src/main.ts deleted file mode 100644 index 5a2dcb1b362..00000000000 --- a/aio/content/examples/inputs-outputs/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/inputs-outputs/stackblitz.json b/aio/content/examples/inputs-outputs/stackblitz.json deleted file mode 100644 index f52293403f6..00000000000 --- a/aio/content/examples/inputs-outputs/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Inputs and Outputs", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Inputs and Outputs"] -} diff --git a/aio/content/examples/interpolation/BUILD.bazel b/aio/content/examples/interpolation/BUILD.bazel deleted file mode 100644 index b9575f8eb3e..00000000000 --- a/aio/content/examples/interpolation/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "interpolation", -) diff --git a/aio/content/examples/interpolation/e2e/src/app.e2e-spec.ts b/aio/content/examples/interpolation/e2e/src/app.e2e-spec.ts deleted file mode 100644 index a2ce3747e72..00000000000 --- a/aio/content/examples/interpolation/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Interpolation e2e tests', () => { - - beforeEach(() => browser.get('')); - - it('should display Interpolation and Template Expressions', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Interpolation and Template Expressions'); - }); - - it('should display Current customer: Maria', async () => { - expect(await element.all(by.css('h3')).get(0).getText()).toBe(`Current customer: Maria`); - }); - - it('should display The sum of 1 + 1 is not 4.', async () => { - expect(await element.all(by.css('p:last-child')).get(0).getText()).toBe(`The sum of 1 + 1 is not 4.`); - }); - - it('should display Expression Context', async () => { - expect(await element.all(by.css('h2')).get(1).getText()).toBe(`Expression Context`); - }); - - it('should display a list of customers', async () => { - expect(await element.all(by.css('li')).get(0).getText()).toBe(`Maria`); - }); - - it('should display two pictures', async () => { - const pottedPlant = element.all(by.css('img')).get(0); - const lamp = element.all(by.css('img')).get(1); - - expect(await pottedPlant.getAttribute('src')).toContain('potted-plant'); - expect(await pottedPlant.isDisplayed()).toBe(true); - - expect(await lamp.getAttribute('src')).toContain('lamp'); - expect(await lamp.isDisplayed()).toBe(true); - }); - - it('should support user input', async () => { - const input = element(by.css('input')); - const label = element(by.css('label')); - expect(await label.getText()).toEqual('Type something:'); - await input.sendKeys('abc'); - expect(await label.getText()).toMatch(/^Type something:\s+abc$/); - }); -}); diff --git a/aio/content/examples/interpolation/example-config.json b/aio/content/examples/interpolation/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/interpolation/src/app/app.component.1.ts b/aio/content/examples/interpolation/src/app/app.component.1.ts deleted file mode 100644 index 87921fdf1d4..00000000000 --- a/aio/content/examples/interpolation/src/app/app.component.1.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Component } from '@angular/core'; -import { NgFor } from '@angular/common'; - -// #docregion var-collision -@Component({ - standalone: true, - template: ` -
    - -

    Hello, {{customer}}

    -
      - -
    • {{ customer.value }}
    • -
    -
    - `, - imports: [NgFor] -}) -export class AppComponent { - customers = [{value: 'Ebony'}, {value: 'Chiho'}]; - customer = 'Padma'; -} -// #enddocregion var-collision diff --git a/aio/content/examples/interpolation/src/app/app.component.css b/aio/content/examples/interpolation/src/app/app.component.css deleted file mode 100644 index 0a5e9c88452..00000000000 --- a/aio/content/examples/interpolation/src/app/app.component.css +++ /dev/null @@ -1,8 +0,0 @@ -div { - max-width: 600px; - margin: auto; -} - -img { - max-width: 200px; -} diff --git a/aio/content/examples/interpolation/src/app/app.component.html b/aio/content/examples/interpolation/src/app/app.component.html deleted file mode 100644 index 720f674c9f0..00000000000 --- a/aio/content/examples/interpolation/src/app/app.component.html +++ /dev/null @@ -1,56 +0,0 @@ - -
    -

    Interpolation and Template Expressions

    -
    - -
    -

    Interpolation

    - -

    Current customer: {{ currentCustomer }}

    - - - -

    {{title}}

    -
    item
    - - -

    Evaluating template expressions

    -

    Simple evaluation (to a string):

    - -

    The sum of 1 + 1 is {{1 + 1}}.

    - -

    Evaluates using a method (also evaluates to a string):

    - -

    The sum of 1 + 1 is not {{1 + 1 + getVal()}}.

    -
    - -
    -

    Expression Context

    - -
    -

    Component context, properties of app.component.ts:

    - -

    {{recommended}}

    - item 2 - -
    - -
    -

    Template context, template input variables (let customer):

    - -
      -
    • {{customer.name}}
    • -
    - -
    - -
    -

    Template context: template reference variables (#customerInput):

    - - - -
    - -
    diff --git a/aio/content/examples/interpolation/src/app/app.component.ts b/aio/content/examples/interpolation/src/app/app.component.ts deleted file mode 100644 index d6ba7f843d4..00000000000 --- a/aio/content/examples/interpolation/src/app/app.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component } from '@angular/core'; -import { NgFor } from '@angular/common'; - -import { CUSTOMERS } from './customers'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ NgFor ], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - customers = CUSTOMERS; - // #docregion customer - currentCustomer = 'Maria'; - // #enddocregion customer - - title = 'Featured product:'; - itemImageUrl = '../assets/potted-plant.svg'; - - recommended = 'You might also like:'; - itemImageUrl2 = '../assets/lamp.svg'; - - - - getVal(): number { return 2; } - - -} diff --git a/aio/content/examples/interpolation/src/app/customer.ts b/aio/content/examples/interpolation/src/app/customer.ts deleted file mode 100644 index b92bc896cab..00000000000 --- a/aio/content/examples/interpolation/src/app/customer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Customer { - name = ''; -} diff --git a/aio/content/examples/interpolation/src/app/customers.ts b/aio/content/examples/interpolation/src/app/customers.ts deleted file mode 100644 index a1d25b93c9f..00000000000 --- a/aio/content/examples/interpolation/src/app/customers.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Customer } from './customer'; - -export const CUSTOMERS: Customer[] = [ - { name: 'Maria' }, - { name: 'Oliver' }, - { name: 'Walter' }, - { name: 'Lakshmi' }, - { name: 'Yasha' } -]; diff --git a/aio/content/examples/interpolation/src/assets/lamp.svg b/aio/content/examples/interpolation/src/assets/lamp.svg deleted file mode 100644 index 549d226f507..00000000000 --- a/aio/content/examples/interpolation/src/assets/lamp.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/aio/content/examples/interpolation/src/assets/potted-plant.svg b/aio/content/examples/interpolation/src/assets/potted-plant.svg deleted file mode 100644 index e2b6ec7cf22..00000000000 --- a/aio/content/examples/interpolation/src/assets/potted-plant.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - diff --git a/aio/content/examples/interpolation/src/index.html b/aio/content/examples/interpolation/src/index.html deleted file mode 100644 index 9ee2030b3f9..00000000000 --- a/aio/content/examples/interpolation/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Interpolation - - - - - - - - diff --git a/aio/content/examples/interpolation/src/main.ts b/aio/content/examples/interpolation/src/main.ts deleted file mode 100644 index 5a2dcb1b362..00000000000 --- a/aio/content/examples/interpolation/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/interpolation/stackblitz.json b/aio/content/examples/interpolation/stackblitz.json deleted file mode 100644 index f33d39c88ff..00000000000 --- a/aio/content/examples/interpolation/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Interpolation", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["interpolation"] -} diff --git a/aio/content/examples/lazy-loading-ngmodules/BUILD.bazel b/aio/content/examples/lazy-loading-ngmodules/BUILD.bazel deleted file mode 100644 index 0a8c0c99a43..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "lazy-loading-ngmodules", -) diff --git a/aio/content/examples/lazy-loading-ngmodules/e2e/src/app.e2e-spec.ts b/aio/content/examples/lazy-loading-ngmodules/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 33ea8d11965..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { element, by, ExpectedConditions, browser } from 'protractor'; -import { AppPage } from './app.po'; - - -describe('providers App', () => { - let page: AppPage; - const buttons = element.all(by.css('button')); - const customersButton = buttons.get(0); - const ordersButton = buttons.get(1); - - beforeEach(async () => { - page = new AppPage(); - await page.navigateTo(); - }); - - it('should display message saying app works', async () => { - expect(await page.getTitleText()).toEqual('Lazy loading feature modules'); - }); - - describe('Customers', () => { - beforeEach(() => customersButton.click()); - - it('should show customers when the button is clicked', async () => { - const customersMessage = element(by.css('app-customers > p')); - await browser.wait(ExpectedConditions.visibilityOf(customersMessage)); - expect(await customersMessage.getText()).toBe('customers works!'); - }); - - }); - - describe('Orders', () => { - beforeEach(() => ordersButton.click()); - - it('should show orders when the button is clicked', async () => { - const ordersMessage = element(by.css('app-orders > p')); - await browser.wait(ExpectedConditions.visibilityOf(ordersMessage)); - expect(await ordersMessage.getText()).toBe('orders works!'); - }); - - }); - -}); diff --git a/aio/content/examples/lazy-loading-ngmodules/example-config.json b/aio/content/examples/lazy-loading-ngmodules/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app-routing.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/app-routing.module.ts deleted file mode 100644 index 06ddc0c8d60..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/app-routing.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docplaster -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - - -// #docregion const-routes, routes-customers, routes-customers-orders -const routes: Routes = [ - { - path: 'customers', - loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule) - // #enddocregion routes-customers - }, - { - path: 'orders', - loadChildren: () => import('./orders/orders.module').then(m => m.OrdersModule) - // #enddocregion routes-customers-orders - }, - { - path: '', - redirectTo: '', - pathMatch: 'full' - // #docregion routes-customers, routes-customers-orders - } -]; -// #enddocregion const-routes, routes-customers, routes-customers-orders - -@NgModule({ - imports: [ - RouterModule.forRoot(routes) - ], - exports: [RouterModule], - providers: [] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.css b/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.html b/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.html deleted file mode 100644 index a63dc2e6a86..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.html +++ /dev/null @@ -1,13 +0,0 @@ - - -

    - {{title}} -

    - - - - - - - - diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.ts deleted file mode 100644 index 665b2ef0959..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Lazy loading feature modules'; -} diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts deleted file mode 100644 index 7848845cef4..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/app.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { HttpClientModule } from '@angular/common/http'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - FormsModule, - HttpClientModule, - AppRoutingModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers-routing.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers-routing.module.ts deleted file mode 100644 index 21e9b46be96..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers-routing.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docplaster -// #docregion customers-routing-module -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -import { CustomersComponent } from './customers.component'; - - -const routes: Routes = [ - { - path: '', - component: CustomersComponent - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class CustomersRoutingModule { } -// #enddocregion customers-routing-module diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.css b/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.html b/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.html deleted file mode 100644 index 2094219d290..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - customers works! -

    diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.ts deleted file mode 100644 index cf87dffbbe6..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-customers', - templateUrl: './customers.component.html', - styleUrls: ['./customers.component.css'] -}) -export class CustomersComponent {} diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.module.ts deleted file mode 100644 index 83e841e50b1..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/customers/customers.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docplaster -// #docregion customers-module -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { CustomersRoutingModule } from './customers-routing.module'; -import { CustomersComponent } from './customers.component'; - -@NgModule({ - imports: [ - CommonModule, - CustomersRoutingModule - ], - declarations: [CustomersComponent] -}) -export class CustomersModule { } -// #enddocregion customers-module diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders-routing.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders-routing.module.ts deleted file mode 100644 index c69dbd0d295..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docplaster -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -// #docregion orders-routing-module-detail -import { OrdersComponent } from './orders.component'; - -const routes: Routes = [ - { - path: '', - component: OrdersComponent - } -]; -// #enddocregion orders-routing-module-detail - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class OrdersRoutingModule { } diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.css b/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.html b/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.html deleted file mode 100644 index 1f5843d4a31..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - orders works! -

    diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.ts deleted file mode 100644 index 89819fa50a2..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-orders', - templateUrl: './orders.component.html', - styleUrls: ['./orders.component.css'] -}) -export class OrdersComponent {} diff --git a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.module.ts b/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.module.ts deleted file mode 100644 index 0fbe55c108c..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/app/orders/orders.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { OrdersRoutingModule } from './orders-routing.module'; -import { OrdersComponent } from './orders.component'; - -@NgModule({ - imports: [ - CommonModule, - OrdersRoutingModule - ], - declarations: [OrdersComponent] -}) -export class OrdersModule { } diff --git a/aio/content/examples/lazy-loading-ngmodules/src/index.html b/aio/content/examples/lazy-loading-ngmodules/src/index.html deleted file mode 100644 index 36a38d88e65..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Lazy loading feature modules - - - - - - Loading... - - diff --git a/aio/content/examples/lazy-loading-ngmodules/src/main.ts b/aio/content/examples/lazy-loading-ngmodules/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/lazy-loading-ngmodules/stackblitz.json b/aio/content/examples/lazy-loading-ngmodules/stackblitz.json deleted file mode 100644 index 91a87de480a..00000000000 --- a/aio/content/examples/lazy-loading-ngmodules/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Lazy Loading Feature Modules", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app-routing.module.ts", - "tags": ["lazy loading"] -} diff --git a/aio/content/examples/lifecycle-hooks/BUILD.bazel b/aio/content/examples/lifecycle-hooks/BUILD.bazel deleted file mode 100644 index 1fac9c0f73e..00000000000 --- a/aio/content/examples/lifecycle-hooks/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "lifecycle-hooks", -) diff --git a/aio/content/examples/lifecycle-hooks/e2e/src/app.e2e-spec.ts b/aio/content/examples/lifecycle-hooks/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 40e53501907..00000000000 --- a/aio/content/examples/lifecycle-hooks/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { browser, element, ElementFinder, by } from 'protractor'; - -describe('Lifecycle hooks', () => { - const sendKeys = async (el: ElementFinder, input: string) => { - for (const c of input.split('')) { - await el.sendKeys(c); - } - }; - - beforeAll(() => browser.get('')); - - it('should open correctly', async () => { - expect(await element.all(by.css('h2')).get(0).getText()).toEqual('Peek-A-Boo'); - }); - - it('should support peek-a-boo', async () => { - const pabComp = element(by.css('peek-a-boo-parent peek-a-boo')); - expect(await pabComp.isPresent()).toBe(false, 'should not be able to find the "peek-a-boo" component'); - - const pabButton = element.all(by.css('peek-a-boo-parent button')).get(0); - const updateHeroButton = element.all(by.css('peek-a-boo-parent button')).get(1); - expect(await pabButton.getText()).toContain('Create Peek'); - - await pabButton.click(); - expect(await pabButton.getText()).toContain('Destroy Peek'); - expect(await pabComp.isDisplayed()).toBe(true, 'should be able to see the "peek-a-boo" component'); - expect(await pabComp.getText()).toContain('Windstorm'); - expect(await pabComp.getText()).not.toContain('Windstorm!'); - expect(await updateHeroButton.isPresent()).toBe(true, 'should be able to see the update hero button'); - - await updateHeroButton.click(); - expect(await pabComp.getText()).toContain('Windstorm!'); - - await pabButton.click(); - expect(await pabComp.isPresent()).toBe(false, 'should no longer be able to find the "peek-a-boo" component'); - }); - - it('should support OnChanges hook', async () => { - const onChangesViewEle = element.all(by.css('on-changes div')).get(0); - const inputEles = element.all(by.css('on-changes-parent input')); - const heroNameInputEle = inputEles.get(1); - const powerInputEle = inputEles.get(0); - const titleEle = onChangesViewEle.element(by.css('p')); - const changeLogEles = onChangesViewEle.all(by.css('div')); - - expect(await titleEle.getText()).toContain('Windstorm can sing'); - expect(await changeLogEles.count()).toEqual(2, 'should start with 2 messages'); - await heroNameInputEle.sendKeys('-foo-'); - expect(await titleEle.getText()).toContain('Windstorm-foo- can sing'); - expect(await changeLogEles.count()).toEqual(2, 'should still have 2 messages'); - await powerInputEle.sendKeys('-bar-'); - expect(await titleEle.getText()).toContain('Windstorm-foo- can sing-bar-'); - // 7 == 2 previously + length of '-bar-' - expect(await changeLogEles.count()).toEqual(7, 'should have 7 messages now'); - }); - - it('should support DoCheck hook', async () => { - const doCheckViewEle = element.all(by.css('do-check div')).get(0); - const inputEles = element.all(by.css('do-check-parent input')); - const heroNameInputEle = inputEles.get(1); - const powerInputEle = inputEles.get(0); - const titleEle = doCheckViewEle.element(by.css('p')); - const changeLogEles = doCheckViewEle.all(by.css('div')); - let logCount: number; - - expect(await titleEle.getText()).toContain('Windstorm can sing'); - - let count = await changeLogEles.count(); - // 3 messages to start - expect(count).toEqual(3, 'should start with 3 messages'); - - logCount = count; - await sendKeys(heroNameInputEle, '-foo-'); - count = await changeLogEles.count(); - expect(await titleEle.getText()).toContain('Windstorm-foo- can sing'); - expect(count).toBeGreaterThanOrEqual(logCount + 5, 'should add at least one more message for each keystroke'); - - logCount = count; - await sendKeys(powerInputEle, '-bar-'); - count = await changeLogEles.count(); - expect(await titleEle.getText()).toContain('Windstorm-foo- can sing-bar-'); - expect(count).toBeGreaterThanOrEqual(logCount + 5, 'should add at least one more message for each keystroke'); - }); - - it('should support AfterView hooks', async () => { - const parentEle = element(by.tagName('after-view-parent')); - const buttonEle = parentEle.element(by.tagName('button')); // Reset - const commentEle = parentEle.element(by.className('comment')); - const logEles = parentEle.all(by.css('h3 ~ div')); - const childViewInputEle = parentEle.element(by.css('app-child-view input')); - let logCount: number; - - expect(await childViewInputEle.getAttribute('value')).toContain('Magneta'); - expect(await commentEle.isPresent()).toBe(false, 'comment should not be in DOM'); - - logCount = await logEles.count(); - await childViewInputEle.sendKeys('-test-'); - - expect(await childViewInputEle.getAttribute('value')).toContain('-test-'); - expect(await commentEle.isPresent()).toBe(true, 'should have comment because >10 chars'); - expect(await commentEle.getText()).toContain('long name'); - - const count = await logEles.count(); - expect(logCount + 7).toBeGreaterThan(count - 3, '7 additional log messages should have been added'); - expect(logCount + 7).toBeLessThan(count + 3, '7 additional log messages should have been added'); - - logCount = count; - await buttonEle.click(); - expect(await logEles.count()).toBeLessThan(logCount, 'log should shrink after reset'); - }); - - it('should support AfterContent hooks', async () => { - const parentEle = element(by.tagName('after-content-parent')); - const buttonEle = parentEle.element(by.tagName('button')); // Reset - const commentEle = parentEle.element(by.className('comment')); - const logEles = parentEle.all(by.css('h3 ~ div')); - const childViewInputEle = parentEle.element(by.css('app-child input')); - let logCount = await logEles.count(); - - expect(await childViewInputEle.getAttribute('value')).toContain('Magneta'); - expect(await commentEle.isPresent()).toBe(false, 'comment should not be in DOM'); - - await sendKeys(childViewInputEle, '-test-'); - const count = await logEles.count(); - expect(await childViewInputEle.getAttribute('value')).toContain('-test-'); - expect(await commentEle.isPresent()).toBe(true, 'should have comment because >10 chars'); - expect(await commentEle.getText()).toContain('long name'); - expect(count).toBeGreaterThanOrEqual(logCount + 5, 'additional log messages should have been added'); - - logCount = count; - await buttonEle.click(); - expect(await logEles.count()).toBeLessThan(logCount, 'log should shrink after reset'); - }); - - it("should support spy's OnInit & OnDestroy hooks", async () => { - const inputEle = element(by.css('spy-parent input')); - const addHeroButtonEle = element(by.cssContainingText('spy-parent button', 'Add Hero')); - const resetHeroesButtonEle = element(by.cssContainingText('spy-parent button', 'Reset Heroes')); - const heroEles = element.all(by.css('spy-parent div p')); - const logEles = element.all(by.css('spy-parent h3 ~ div')); - - expect(await heroEles.count()).toBe(2, 'should have two heroes displayed'); - expect(await logEles.count()).toBe(2, 'should have two log entries'); - - await inputEle.sendKeys('-test-'); - await addHeroButtonEle.click(); - expect(await heroEles.count()).toBe(3, 'should have added one hero'); - expect(await heroEles.get(2).getText()).toContain('-test-'); - expect(await logEles.count()).toBe(3, 'should now have 3 log entries'); - - await resetHeroesButtonEle.click(); - expect(await heroEles.count()).toBe(0, 'should no longer have any heroes'); - expect(await logEles.count()).toBe(7, 'should now have 7 log entries - 3 orig + 1 reset + 3 removeall'); - }); - - it('should support "spy counter"', async () => { - const updateCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Update')); - const resetCounterButtonEle = element(by.cssContainingText('counter-parent button', 'Reset')); - const textEle = element(by.css('counter-parent app-counter p')); - const logEles = element.all(by.css('counter-parent .info .log')); - - expect(await textEle.getText()).toContain('Counter = 0'); - expect(await logEles.count()) - .toBe(3, 'should start with one change log and two lifecycle log entries, including reset'); - - await updateCounterButtonEle.click(); - expect(await textEle.getText()).toContain('Counter = 1'); - expect(await logEles.count()) - .toBe(5, 'should now have 2 change log entries and 3 lifecycle log entries, including reset'); - - await resetCounterButtonEle.click(); - expect(await textEle.getText()).toContain('Counter = 0'); - expect(await logEles.count()) - .toBe(8, 'should now have 8 log entries - 1 change log + 2 reset + 2 destroy + 3 init'); - - }); -}); diff --git a/aio/content/examples/lifecycle-hooks/example-config.json b/aio/content/examples/lifecycle-hooks/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-content-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-content-parent.component.ts deleted file mode 100644 index 0132f437e58..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/after-content-parent.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'after-content-parent', - template: ` -
    -

    AfterContent

    - -
    ` + - // #docregion parent-template - ` - - ` - // #enddocregion parent-template - + `
    - -
    -

    AfterContent Logs

    - -
    {{msg}}
    -
    -
    - `, - providers: [LoggerService] -}) -export class AfterContentParentComponent { - show = true; - - constructor(public logger: LoggerService) { } - - reset() { - this.logger.clear(); - // quickly remove and reload AfterContentComponent which recreates it - this.show = false; - this.logger.tick_then(() => this.show = true); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts deleted file mode 100644 index d3215e1b024..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/after-content.component.ts +++ /dev/null @@ -1,68 +0,0 @@ -// #docplaster -// #docregion -import { AfterContentChecked, AfterContentInit, Component, ContentChild } from '@angular/core'; - -import { ChildComponent } from './child.component'; -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'after-content', -// #docregion template - template: ` -
    projected content begins
    - -
    projected content ends
    - ` -// #enddocregion template - + ` -

    - {{comment}} -

    - ` -}) -// #docregion hooks -export class AfterContentComponent implements AfterContentChecked, AfterContentInit { - private prevHero = ''; - comment = ''; - - // Query for a CONTENT child of type `ChildComponent` - @ContentChild(ChildComponent) contentChild!: ChildComponent; - -// #enddocregion hooks - constructor(private logger: LoggerService) { - this.logIt('AfterContent constructor'); - } - -// #docregion hooks - ngAfterContentInit() { - // contentChild is set after the content has been initialized - this.logIt('AfterContentInit'); - this.doSomething(); - } - - ngAfterContentChecked() { - // contentChild is updated after the content has been checked - if (this.prevHero === this.contentChild.hero) { - this.logIt('AfterContentChecked (no change)'); - } else { - this.prevHero = this.contentChild.hero; - this.logIt('AfterContentChecked'); - this.doSomething(); - } - } -// #enddocregion hooks - - // This surrogate for real business logic sets the `comment` - private doSomething() { - this.comment = this.contentChild.hero.length > 10 ? "That's a long name" : ''; - } - - private logIt(method: string) { - const child = this.contentChild; - const message = `${method}: ${child ? child.hero : 'no'} child content`; - this.logger.log(message); - } -// #docregion hooks - // ... -} -// #enddocregion hooks diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-view-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-view-parent.component.ts deleted file mode 100644 index 8caa68f23ca..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/after-view-parent.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'after-view-parent', - template: ` -

    AfterView

    - - - -
    -

    AfterView Logs

    - -
    {{msg}}
    -
    - `, - providers: [LoggerService] -}) -export class AfterViewParentComponent { - show = true; - - constructor(public logger: LoggerService) { } - - reset() { - this.logger.clear(); - // quickly remove and reload AfterViewComponent which recreates it - this.show = false; - this.logger.tick_then(() => this.show = true); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts b/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts deleted file mode 100644 index 284e0dceff1..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/after-view.component.ts +++ /dev/null @@ -1,76 +0,0 @@ -// #docplaster -// #docregion -import { AfterViewChecked, AfterViewInit, Component, ViewChild } from '@angular/core'; - -import { ChildViewComponent } from './child-view.component'; -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'after-view', -// #docregion template - template: ` -
    child view begins
    - -
    child view ends
    - ` -// #enddocregion template - + ` -

    - {{comment}} -

    - ` -}) -// #docregion hooks -export class AfterViewComponent implements AfterViewChecked, AfterViewInit { - // #enddocregion hooks - comment = ''; - // #docregion hooks - private prevHero = ''; - - // Query for a VIEW child of type `ChildViewComponent` - @ViewChild(ChildViewComponent) viewChild!: ChildViewComponent; - - // #enddocregion hooks - constructor(private logger: LoggerService) { - this.logIt('AfterView constructor'); - } - - // #docregion hooks - ngAfterViewInit() { - // viewChild is set after the view has been initialized - this.logIt('AfterViewInit'); - this.doSomething(); - } - - ngAfterViewChecked() { - // viewChild is updated after the view has been checked - if (this.prevHero === this.viewChild.hero) { - this.logIt('AfterViewChecked (no change)'); - } else { - this.prevHero = this.viewChild.hero; - this.logIt('AfterViewChecked'); - this.doSomething(); - } - } - // #enddocregion hooks - - // #docregion do-something - // This surrogate for real business logic sets the `comment` - private doSomething() { - const c = this.viewChild.hero.length > 10 ? "That's a long name" : ''; - if (c !== this.comment) { - // Wait a tick because the component's view has already been checked - this.logger.tick_then(() => this.comment = c); - } - } - // #enddocregion do-something - - private logIt(method: string) { - const child = this.viewChild; - const message = `${method}: ${child ? child.hero : 'no'} child view`; - this.logger.log(message); - } - // #docregion hooks - // ... -} -// #enddocregion hooks diff --git a/aio/content/examples/lifecycle-hooks/src/app/app.component.html b/aio/content/examples/lifecycle-hooks/src/app/app.component.html deleted file mode 100644 index c0fb2da8ffc..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/app.component.html +++ /dev/null @@ -1,35 +0,0 @@ -

    Lifecycle Hooks

    -Peek-a-boo: (most) lifecycle hooks -Spy: directive with OnInit & OnDestroy -OnChanges -DoCheck -AfterViewInit & AfterViewChecked -AfterContentInit & AfterContentChecked -Counter: OnChanges + Spy directive - - -back to top -
    - - -back to top -
    - - -back to top -
    - - -back to top -
    - - -back to top -
    - - -back to top -
    - - -back to top diff --git a/aio/content/examples/lifecycle-hooks/src/app/app.component.ts b/aio/content/examples/lifecycle-hooks/src/app/app.component.ts deleted file mode 100644 index 7b3cf496f14..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -@Component({ - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/lifecycle-hooks/src/app/app.module.ts b/aio/content/examples/lifecycle-hooks/src/app/app.module.ts deleted file mode 100644 index 383f6c2a3f2..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/app.module.ts +++ /dev/null @@ -1,57 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; - -import { AfterContentParentComponent } from './after-content-parent.component'; -import { AfterContentComponent } from './after-content.component'; -import { ChildComponent } from './child.component'; - -import { AfterViewParentComponent } from './after-view-parent.component'; -import { AfterViewComponent } from './after-view.component'; -import { ChildViewComponent } from './child-view.component'; - -import { CounterParentComponent } from './counter-parent.component'; -import { MyCounterComponent } from './counter.component'; - -import { DoCheckParentComponent } from './do-check-parent.component'; -import { DoCheckComponent } from './do-check.component'; - -import { OnChangesParentComponent } from './on-changes-parent.component'; -import { OnChangesComponent } from './on-changes.component'; - -import { PeekABooParentComponent } from './peek-a-boo-parent.component'; -import { PeekABooComponent } from './peek-a-boo.component'; - -import { SpyParentComponent } from './spy.component'; -import { SpyDirective } from './spy.directive'; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule - ], - declarations: [ - AppComponent, - AfterContentParentComponent, - AfterContentComponent, - ChildComponent, - AfterViewParentComponent, - AfterViewComponent, - ChildViewComponent, - CounterParentComponent, - MyCounterComponent, - DoCheckParentComponent, - DoCheckComponent, - OnChangesParentComponent, - OnChangesComponent, - PeekABooParentComponent, - PeekABooComponent, - SpyParentComponent, - SpyDirective - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts b/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts deleted file mode 100644 index dd835a7a8ee..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/child-view.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; - -// #docregion child-view -@Component({ - selector: 'app-child-view', - template: ` - - - ` -}) -export class ChildViewComponent { - hero = 'Magneta'; -} -// #enddocregion child-view diff --git a/aio/content/examples/lifecycle-hooks/src/app/child.component.ts b/aio/content/examples/lifecycle-hooks/src/app/child.component.ts deleted file mode 100644 index a63fa95c5d6..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/child.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-child', - template: ` - ` -}) -export class ChildComponent { - hero = 'Magneta'; -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/counter-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/counter-parent.component.ts deleted file mode 100644 index 656756d86fa..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/counter-parent.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'counter-parent', - template: ` -

    Counter Spy

    - - - - - - -
    -

    Spy Lifecycle Hook Log

    -
    {{msg}}
    -
    - `, - providers: [LoggerService] -}) -export class CounterParentComponent { - value = 0; - spyLog: string[] = []; - - private logger: LoggerService; - - constructor(logger: LoggerService) { - this.logger = logger; - this.spyLog = logger.logs; - this.reset(); - } - - updateCounter() { - this.value += 1; - this.logger.tick(); - } - - reset() { - this.logger.log('reset'); - this.value = 0; - this.logger.tick(); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/counter.component.ts b/aio/content/examples/lifecycle-hooks/src/app/counter.component.ts deleted file mode 100644 index 58d7e7057b5..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/counter.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docregion -import { - Component, Input, - OnChanges, SimpleChanges, -} from '@angular/core'; - -@Component({ - selector: 'app-counter', - template: ` -

    Counter = {{counter}}

    - -
    -

    Counter Change Log

    -
    {{chg}}
    -
    - ` -}) -export class MyCounterComponent implements OnChanges { - @Input() counter = 0; - changeLog: string[] = []; - - ngOnChanges(changes: SimpleChanges) { - - // Empty the changeLog whenever counter goes to zero - // hint: this is a way to respond programmatically to external value changes. - if (this.counter === 0) { - this.changeLog = []; - } - - // A change to `counter` is the only change we care about - const chng = changes['counter']; - const cur = chng.currentValue; - const prev = JSON.stringify(chng.previousValue); // first time is {}; after is integer - this.changeLog.push(`counter: currentValue = ${cur}, previousValue = ${prev}`); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.html b/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.html deleted file mode 100644 index fd8b3eb7ee1..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    {{title}}

    - - - - - - - - diff --git a/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.ts deleted file mode 100644 index 38f51e882a0..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/do-check-parent.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component, ViewChild } from '@angular/core'; - -import { DoCheckComponent } from './do-check.component'; -import { Hero } from './hero'; - -@Component({ - selector: 'do-check-parent', - templateUrl: './do-check-parent.component.html' -}) -export class DoCheckParentComponent { - hero!: Hero; - power = ''; - title = 'DoCheck'; - @ViewChild(DoCheckComponent) childView!: DoCheckComponent; - - constructor() { - this.reset(); - } - - reset() { - this.hero = new Hero('Windstorm'); - this.power = 'sing'; - if (this.childView) { - this.childView.reset(); - } - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/do-check.component.ts b/aio/content/examples/lifecycle-hooks/src/app/do-check.component.ts deleted file mode 100644 index 3a669ede984..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/do-check.component.ts +++ /dev/null @@ -1,66 +0,0 @@ -// #docregion -import { Component, DoCheck, Input } from '@angular/core'; - -import { Hero } from './hero'; - -@Component({ - selector: 'do-check', - template: ` -
    -

    {{hero.name}} can {{power}}

    - -

    Change Log

    -
    {{chg}}
    -
    - ` -}) -export class DoCheckComponent implements DoCheck { - @Input() hero!: Hero; - @Input() power = ''; - - changeDetected = false; - changeLog: string[] = []; - oldHeroName = ''; - oldPower = ''; - oldLogLength = 0; - noChangeCount = 0; - - // #docregion ng-do-check - ngDoCheck() { - - if (this.hero.name !== this.oldHeroName) { - this.changeDetected = true; - this.changeLog.push(`DoCheck: Hero name changed to "${this.hero.name}" from "${this.oldHeroName}"`); - this.oldHeroName = this.hero.name; - } - - if (this.power !== this.oldPower) { - this.changeDetected = true; - this.changeLog.push(`DoCheck: Power changed to "${this.power}" from "${this.oldPower}"`); - this.oldPower = this.power; - } - - if (this.changeDetected) { - this.noChangeCount = 0; - } else { - // log that hook was called when there was no relevant change. - const count = this.noChangeCount += 1; - const noChangeMsg = `DoCheck called ${count}x when no change to hero or power`; - if (count === 1) { - // add new "no change" message - this.changeLog.push(noChangeMsg); - } else { - // update last "no change" message - this.changeLog[this.changeLog.length - 1] = noChangeMsg; - } - } - - this.changeDetected = false; - } - // #enddocregion ng-do-check - - reset() { - this.changeDetected = true; - this.changeLog = []; - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/hero.ts b/aio/content/examples/lifecycle-hooks/src/app/hero.ts deleted file mode 100644 index d30f82ba39b..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/hero.ts +++ /dev/null @@ -1,3 +0,0 @@ -export class Hero { - constructor(public name: string) { } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/logger.service.ts b/aio/content/examples/lifecycle-hooks/src/app/logger.service.ts deleted file mode 100644 index 312b7857079..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/logger.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class LoggerService { - logs: string[] = []; - prevMsg = ''; - prevMsgCount = 1; - - log(msg: string) { - if (msg === this.prevMsg) { - // Repeat message; update last log entry with count. - this.logs[this.logs.length - 1] = msg + ` (${this.prevMsgCount += 1}x)`; - } else { - // New message; log it. - this.prevMsg = msg; - this.prevMsgCount = 1; - this.logs.push(msg); - } - } - - clear() { this.logs = []; } - - // schedules a view refresh to ensure display catches up - tick() { this.tick_then(() => { }); } - tick_then(fn: () => any) { setTimeout(fn, 0); } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.html b/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.html deleted file mode 100644 index 24e0ef6dc65..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.html +++ /dev/null @@ -1,11 +0,0 @@ -

    {{title}}

    - - - - - - - - - - diff --git a/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.ts deleted file mode 100644 index 1be9b1af511..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/on-changes-parent.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component, ViewChild } from '@angular/core'; - -import { Hero } from './hero'; -import { OnChangesComponent } from './on-changes.component'; - -@Component({ - selector: 'on-changes-parent', - templateUrl: './on-changes-parent.component.html', - styles: [''] -}) -export class OnChangesParentComponent { - hero!: Hero; - power = ''; - title = 'OnChanges'; - @ViewChild(OnChangesComponent) childView!: OnChangesComponent; - - constructor() { - this.reset(); - } - - reset() { - // new Hero object every time; triggers onChanges - this.hero = new Hero('Windstorm'); - // setting power only triggers onChanges if this value is different - this.power = 'sing'; - if (this.childView) { - this.childView.reset(); - } - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/on-changes.component.ts b/aio/content/examples/lifecycle-hooks/src/app/on-changes.component.ts deleted file mode 100644 index 951cde275af..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/on-changes.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -/* eslint-disable guard-for-in */ -// #docregion -import { Component, Input, OnChanges, SimpleChanges } from '@angular/core'; - -import { Hero } from './hero'; - -@Component({ - selector: 'on-changes', - template: ` -
    -

    {{hero.name}} can {{power}}

    - -

    Change Log

    -
    {{chg}}
    -
    - ` -}) -export class OnChangesComponent implements OnChanges { -// #docregion inputs - @Input() hero!: Hero; - @Input() power = ''; -// #enddocregion inputs - - changeLog: string[] = []; - - // #docregion ng-on-changes - ngOnChanges(changes: SimpleChanges) { - for (const propName in changes) { - const chng = changes[propName]; - const cur = JSON.stringify(chng.currentValue); - const prev = JSON.stringify(chng.previousValue); - this.changeLog.push(`${propName}: currentValue = ${cur}, previousValue = ${prev}`); - } - } - // #enddocregion ng-on-changes - - reset() { this.changeLog = []; } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo-parent.component.ts b/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo-parent.component.ts deleted file mode 100644 index 7dbc52191b4..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo-parent.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'peek-a-boo-parent', - template: ` -
    -
    -

    Peek-A-Boo

    - - - - -
    - - -

    Lifecycle Hook Log

    -
    {{msg}}
    -
    -
    - `, - providers: [ LoggerService ] -}) -export class PeekABooParentComponent { - - hasChild = false; - hookLog: string[] = []; - - heroName = 'Windstorm'; - private logger: LoggerService; - - constructor(logger: LoggerService) { - this.logger = logger; - this.hookLog = logger.logs; - } - - toggleChild() { - this.hasChild = !this.hasChild; - if (this.hasChild) { - this.heroName = 'Windstorm'; - this.logger.clear(); // clear log on create - } - this.hookLog = this.logger.logs; - this.logger.tick(); - } - - updateHero() { - this.heroName += '!'; - this.logger.tick(); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.component.ts b/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.component.ts deleted file mode 100644 index 2dd201abb47..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.component.ts +++ /dev/null @@ -1,74 +0,0 @@ -/* eslint-disable @angular-eslint/no-conflicting-lifecycle */ -// #docregion -import { - AfterContentChecked, - AfterContentInit, - AfterViewChecked, - AfterViewInit, - Component, - DoCheck, - Input, - OnChanges, - OnDestroy, - OnInit, - SimpleChanges -} from '@angular/core'; - -import { LoggerService } from './logger.service'; -import { PeekABooDirective } from './peek-a-boo.directive'; - -@Component({ - selector: 'peek-a-boo', - template: '

    Now you see my hero, {{name}}

    ' -}) -// Don't HAVE to mention the Lifecycle Hook interfaces -// unless we want typing and tool support. -export class PeekABooComponent extends PeekABooDirective implements - OnChanges, OnInit, DoCheck, - AfterContentInit, AfterContentChecked, - AfterViewInit, AfterViewChecked, - OnDestroy { - @Input() name = ''; - - private verb = 'initialized'; - - constructor(logger: LoggerService) { - super(logger); - - const is = this.name ? 'is' : 'is not'; - this.logIt(`name ${is} known at construction`); - } - - // only called for/if there is an @input variable set by parent. - ngOnChanges(changes: SimpleChanges) { - const changesMsgs: string[] = []; - for (const propName in changes) { - if (propName === 'name') { - const name = changes['name'].currentValue; - changesMsgs.push(`name ${this.verb} to "${name}"`); - } else { - changesMsgs.push(propName + ' ' + this.verb); - } - } - this.logIt(`OnChanges: ${changesMsgs.join('; ')}`); - this.verb = 'changed'; // next time it will be a change - } - - // Beware! Called frequently! - // Called in every change detection cycle anywhere on the page - ngDoCheck() { this.logIt('DoCheck'); } - - ngAfterContentInit() { this.logIt('AfterContentInit'); } - - // Beware! Called frequently! - // Called in every change detection cycle anywhere on the page - ngAfterContentChecked() { this.logIt('AfterContentChecked'); } - - ngAfterViewInit() { this.logIt('AfterViewInit'); } - - // Beware! Called frequently! - // Called in every change detection cycle anywhere on the page - ngAfterViewChecked() { this.logIt('AfterViewChecked'); } - - ngOnDestroy() { this.logIt('OnDestroy'); } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.directive.ts b/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.directive.ts deleted file mode 100644 index 2bd7b79bc41..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/peek-a-boo.directive.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Directive, OnInit } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -let nextId = 1; - -// #docregion ngOnInit -@Directive({selector: '[appPeekABoo]'}) -export class PeekABooDirective implements OnInit { - constructor(private logger: LoggerService) { } - - // implement OnInit's `ngOnInit` method - ngOnInit() { - this.logIt('OnInit'); - } - - logIt(msg: string) { - this.logger.log(`#${nextId++} ${msg}`); - } -} -// #enddocregion ngOnInit diff --git a/aio/content/examples/lifecycle-hooks/src/app/spy.component.html b/aio/content/examples/lifecycle-hooks/src/app/spy.component.html deleted file mode 100644 index eeb5f1a734b..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/spy.component.html +++ /dev/null @@ -1,19 +0,0 @@ -
    -

    Spy Directive

    - - - - - - -
    - -

    - {{hero}} -

    - - -

    Spy Lifecycle Hook Log

    -
    {{msg}}
    -
    -
    diff --git a/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts b/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts deleted file mode 100644 index a8f82d4abf9..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/spy.component.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -@Component({ - selector: 'spy-parent', - templateUrl: './spy.component.html', - providers: [LoggerService] -}) -export class SpyParentComponent { - newName = 'Herbie'; - heroes: string[] = ['Windstorm', 'Magneta']; - - constructor(public logger: LoggerService) { - } - - addHero() { - if (this.newName.trim()) { - this.heroes.push(this.newName.trim()); - this.newName = ''; - this.logger.tick(); - } - } - removeHero(hero: string) { - this.heroes.splice(this.heroes.indexOf(hero), 1); - this.logger.tick(); - } - reset() { - this.logger.log('reset'); - this.heroes = []; - this.logger.tick(); - } -} diff --git a/aio/content/examples/lifecycle-hooks/src/app/spy.directive.ts b/aio/content/examples/lifecycle-hooks/src/app/spy.directive.ts deleted file mode 100644 index c364b3decad..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/app/spy.directive.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import { Directive, OnInit, OnDestroy } from '@angular/core'; - -import { LoggerService } from './logger.service'; - -// #docregion spy-directive -let nextId = 1; - -// Spy on any element to which it is applied. -// Usage:
    ...
    -@Directive({selector: '[appSpy]'}) -export class SpyDirective implements OnInit, OnDestroy { - private id = nextId++; - - constructor(private logger: LoggerService) { } - - ngOnInit() { - this.logger.log(`Spy #${this.id} onInit`); - } - - ngOnDestroy() { - this.logger.log(`Spy #${this.id} onDestroy`); - } -} -// #enddocregion spy-directive diff --git a/aio/content/examples/lifecycle-hooks/src/assets/sample.css b/aio/content/examples/lifecycle-hooks/src/assets/sample.css deleted file mode 100644 index 498464f91fd..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/assets/sample.css +++ /dev/null @@ -1,61 +0,0 @@ -.parent { - padding: 2rem 0; -} - -h2 { - text-align: center; -} - -.comment { - color: #890000; - font-style: italic; -} - -.log { - background-color: #e4e4e4; - padding: .25rem; -} - -.info { - background: #fff4f4; - padding: .75rem; - margin-top: 1rem; -} - -p { - padding: .25rem; -} - -a { - display: block; - padding-bottom: .5rem; - font-size: 1.1rem; - color: #264d73 -} - -a:hover { - text-decoration: none; -} - -a[href="#top"] { - margin: 1rem 0; - padding: .5rem; - background-color: #264d73; - color: #fff; -} - -a[href="#top"]:hover { - background-color:#eaeaea; - color: black; -} - -a[href="#top"]:active { - background-color: black; - color: #eaeaea; -} - -input { - margin-bottom: 1rem; - margin-top: .5rem; - font-size: 1rem; -} diff --git a/aio/content/examples/lifecycle-hooks/src/index.html b/aio/content/examples/lifecycle-hooks/src/index.html deleted file mode 100644 index 7446c1feb57..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/index.html +++ /dev/null @@ -1,16 +0,0 @@ - - - - - Angular Lifecycle Hooks - - - - - - - - - - - diff --git a/aio/content/examples/lifecycle-hooks/src/main.ts b/aio/content/examples/lifecycle-hooks/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/lifecycle-hooks/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/lifecycle-hooks/stackblitz.json b/aio/content/examples/lifecycle-hooks/stackblitz.json deleted file mode 100644 index be2e1f757b5..00000000000 --- a/aio/content/examples/lifecycle-hooks/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "Lifecycle Hooks", - "files":["!**/*.d.ts", "!**/*.js"], - "tags": ["lifecycle", "hooks", - "OnInit", "OnDestroy", "OnChange", "DoCheck", - "AfterContentInit", "AfterContentChecked", - "AfterViewInit", "AfterViewChecked"] -} diff --git a/aio/content/examples/ngcontainer/BUILD.bazel b/aio/content/examples/ngcontainer/BUILD.bazel deleted file mode 100644 index d7e60540d6c..00000000000 --- a/aio/content/examples/ngcontainer/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "ngcontainer", - test = False, -) diff --git a/aio/content/examples/ngcontainer/example-config.json b/aio/content/examples/ngcontainer/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/ngcontainer/src/app/app.component.css b/aio/content/examples/ngcontainer/src/app/app.component.css deleted file mode 100644 index 6631f05f471..00000000000 --- a/aio/content/examples/ngcontainer/src/app/app.component.css +++ /dev/null @@ -1,36 +0,0 @@ -button { - min-width: 100px; - font-size: 100%; -} - -code, -.code { - background-color: #eee; - color: black; - font-family: Courier, sans-serif; - font-size: 85%; -} - -div.code { - width: 400px; -} - -.heroic { - font-size: 150%; - font-weight: bold; -} - -hr { - margin: 40px 0; -} - -td, -th { - text-align: left; - vertical-align: top; -} - -p span { - color: red; - font-size: 70%; -} diff --git a/aio/content/examples/ngcontainer/src/app/app.component.html b/aio/content/examples/ngcontainer/src/app/app.component.html deleted file mode 100644 index afc9cb5659a..00000000000 --- a/aio/content/examples/ngcontainer/src/app/app.component.html +++ /dev/null @@ -1,255 +0,0 @@ -

    <ng-container>

    - -
    {{hero.name}}
    - -
    - -

    <ng-container> and CSS

    -

    Examples demonstrating issues with rigid CSS styles.

    - - - -

    #1 <ng-container> and <p>

    -

    - I turned the corner - - and saw {{hero.name}}. I waved - - and continued on my way. -

    -

    - I turned the corner - - and saw {{hero.name}}. I waved - - and continued on my way. -

    - -

    #2 <ng-container> and <p>

    - -
    -

    - {{hero.name}} is - - , - and - {{trait}} - . -

    - -

    - {{hero.name}} is - - , - and - {{trait}} - . -

    - -
    - -

    #3 <ng-container> and <p>

    -

    - -

    - -
    - The hero.id in the <span> - is caught by the p-span CSS: -

    - - Id: ({{hero.id}}) - - Name: {{hero.name}} -

    -
    - -
    - The hero.id in the <ng-container> - is unaffected by the p-span CSS: -

    - - Id: ({{hero.id}}) - - Name: {{hero.name}} -

    -
    - -
    - The hero.id in the <ng-template *ngIf> disappears: -

    - - Id: ({{hero.id}}) - - Name: {{hero.name}} -

    -
    - -
    - The hero.id in the <ng-template [ngIf]> - is unaffected by the p-span CSS: -

    - - Id: ({{hero.id}}) - - Name: {{hero.name}} -

    -
    - -
    - -
    - -

    <ng-container> and layout-sensitive elements

    -

    - Examples demonstrating issues with layout-sensitive elements - such as <select> and <table>. -

    - -

    #1 <ng-container> and <options>

    - -

    <select> with <span>

    -
    - Pick your favorite hero - () -
    - - -

    <select> with <ng-container>

    -
    - Pick your favorite hero - () -
    - - -



    - -

    #2 <ng-container> and <options>

    -

    - -

    - -

    Options with <ng-container>

    - - - - -

    Options with <span>

    - - -
    - -

    <ng-container> and <table>

    -

    - - - -

    - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    DirectiveTypeDescription
    NgClassAAdd or remove multiple CSS classes.
    xxxSdiv with *ngIf formats crazy.
    yyySdiv with *ngIf formats crazy.
    NgForSRepeat the template for each item in a list.
    NgIfSAdd or remove DOM elements.
    NgStyleAAdd or remove multiple style attributes.
    NgSwitchSInclude in DOM if case matches the switch value.
    - -
    - -

    Do not confuse <ng-container> with <ng-content>

    - -

    <ng-container>Inside ng-container</ng-container>

    -Inside ng-container - -

    <ng-content>this is an Angular parse error</ng-content>

    - -
    Template parse errors:
    -<ng-content> element cannot have content.
    - -

    Demo of </ng-content>

    - - Projected content - diff --git a/aio/content/examples/ngcontainer/src/app/app.component.ts b/aio/content/examples/ngcontainer/src/app/app.component.ts deleted file mode 100644 index 8b76140424c..00000000000 --- a/aio/content/examples/ngcontainer/src/app/app.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component } from '@angular/core'; -import { NgIf, NgFor, UpperCasePipe } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { ContentComponent } from './content.component'; - -import { Hero, heroes } from './hero'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ContentComponent, FormsModule, NgIf, NgFor, UpperCasePipe], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - heroes = heroes; - hero: Hero | null = this.heroes[0]; - heroTraits = ['honest', 'brave', 'considerate']; - - // flags for the table - - attrDirs = true; - strucDirs = true; - divNgIf = false; - - showId = true; - showDefaultTraits = true; - showSad = true; -} diff --git a/aio/content/examples/ngcontainer/src/app/content.component.ts b/aio/content/examples/ngcontainer/src/app/content.component.ts deleted file mode 100644 index 5f93435398d..00000000000 --- a/aio/content/examples/ngcontainer/src/app/content.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'content-comp', - template: - `
    - -
    `, - styles: [ ` - div { border: medium dashed green; padding: 1em; width: 150px; text-align: center} - `] -}) -export class ContentComponent { } diff --git a/aio/content/examples/ngcontainer/src/app/hero.components.ts b/aio/content/examples/ngcontainer/src/app/hero.components.ts deleted file mode 100644 index 343f13f9d0b..00000000000 --- a/aio/content/examples/ngcontainer/src/app/hero.components.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { Hero } from './hero'; - -@Component({ - standalone: true, - selector: 'happy-hero', - template: 'Wow. You like {{hero.name}}. What a happy hero ... just like you.' -}) -export class HappyHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'sad-hero', - template: 'You like {{hero.name}}? Such a sad hero. Are you sad too?' -}) -export class SadHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'confused-hero', - template: 'Are you as confused as {{hero.name}}?' -}) -export class ConfusedHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'unknown-hero', - template: '{{message}}' -}) -export class UnknownHeroComponent { - @Input() hero!: Hero; - get message() { - return this.hero && this.hero.name - ? `${this.hero.name} is strange and mysterious.` - : 'Are you feeling indecisive?'; - } -} - -export const heroComponents = [ - HappyHeroComponent, - SadHeroComponent, - ConfusedHeroComponent, - UnknownHeroComponent -]; diff --git a/aio/content/examples/ngcontainer/src/app/hero.ts b/aio/content/examples/ngcontainer/src/app/hero.ts deleted file mode 100644 index 2c8a93d3617..00000000000 --- a/aio/content/examples/ngcontainer/src/app/hero.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; - emotion?: string; -} - -export const heroes: Hero[] = [ - { id: 1, name: 'Dr. Nice', emotion: 'happy' }, - { id: 2, name: 'RubberMan', emotion: 'sad' }, - { id: 3, name: 'Windstorm', emotion: 'confused' }, - { id: 4, name: 'Magneta' } -]; diff --git a/aio/content/examples/ngcontainer/src/index.html b/aio/content/examples/ngcontainer/src/index.html deleted file mode 100644 index d189d0a0568..00000000000 --- a/aio/content/examples/ngcontainer/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Angular <ng-container> - - - - Loading... - - - diff --git a/aio/content/examples/ngcontainer/src/main.ts b/aio/content/examples/ngcontainer/src/main.ts deleted file mode 100644 index 5a2dcb1b362..00000000000 --- a/aio/content/examples/ngcontainer/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/ngcontainer/stackblitz.json b/aio/content/examples/ngcontainer/stackblitz.json deleted file mode 100644 index c4cae8f6637..00000000000 --- a/aio/content/examples/ngcontainer/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "", - "files": [ - "!**/*.d.ts", - "!**/*.js" - ], - "tags": [ - "ngcontainer", "structural", "directives" - ] -} diff --git a/aio/content/examples/ngmodules/BUILD.bazel b/aio/content/examples/ngmodules/BUILD.bazel deleted file mode 100644 index 429d78e538f..00000000000 --- a/aio/content/examples/ngmodules/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "ngmodules", - test = False, -) diff --git a/aio/content/examples/ngmodules/example-config.json b/aio/content/examples/ngmodules/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/ngmodules/src/app/app-routing.module.ts b/aio/content/examples/ngmodules/src/app/app-routing.module.ts deleted file mode 100644 index f915627de8b..00000000000 --- a/aio/content/examples/ngmodules/src/app/app-routing.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; - -export const routes: Routes = [ - { path: '', redirectTo: 'contact', pathMatch: 'full'}, - { path: 'items', loadChildren: () => import('./items/items.module').then(m => m.ItemsModule) }, - { path: 'customers', loadChildren: () => import('./customers/customers.module').then(m => m.CustomersModule) } -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/ngmodules/src/app/app.component.css b/aio/content/examples/ngmodules/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/ngmodules/src/app/app.component.html b/aio/content/examples/ngmodules/src/app/app.component.html deleted file mode 100644 index b6931b538a2..00000000000 --- a/aio/content/examples/ngmodules/src/app/app.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - {{title}} -

    diff --git a/aio/content/examples/ngmodules/src/app/app.component.ts b/aio/content/examples/ngmodules/src/app/app.component.ts deleted file mode 100644 index f2cda931875..00000000000 --- a/aio/content/examples/ngmodules/src/app/app.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - template: ` - - - - ` -}) -export class AppComponent { -} diff --git a/aio/content/examples/ngmodules/src/app/app.module.1.ts b/aio/content/examples/ngmodules/src/app/app.module.1.ts deleted file mode 100644 index f7c3597eea2..00000000000 --- a/aio/content/examples/ngmodules/src/app/app.module.1.ts +++ /dev/null @@ -1,14 +0,0 @@ -// imports -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - -import { AppComponent } from './app.component'; - -// @NgModule decorator with its metadata -@NgModule({ - declarations: [AppComponent], - imports: [BrowserModule], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule {} diff --git a/aio/content/examples/ngmodules/src/app/app.module.ts b/aio/content/examples/ngmodules/src/app/app.module.ts deleted file mode 100644 index c3fde154965..00000000000 --- a/aio/content/examples/ngmodules/src/app/app.module.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docplaster - -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - -/* App Root */ -import { AppComponent } from './app.component'; - -/* Feature Modules */ -import { ContactModule } from './contact/contact.module'; -// #docregion import-for-root -import { GreetingModule } from './greeting/greeting.module'; -// #enddocregion import-for-root - -/* Routing Module */ -import { AppRoutingModule } from './app-routing.module'; - -// #docregion import-for-root -@NgModule({ - imports: [ - // #enddocregion import-for-root - BrowserModule, - ContactModule, - // #docregion import-for-root - GreetingModule.forRoot({userName: 'Miss Marple'}), - // #enddocregion import-for-root - AppRoutingModule - // #docregion import-for-root - ], - // #enddocregion import-for-root - declarations: [ - AppComponent - ], - bootstrap: [AppComponent] - // #docregion import-for-root -}) -// #enddocregion import-for-root -export class AppModule { } diff --git a/aio/content/examples/ngmodules/src/app/contact/contact-routing.module.ts b/aio/content/examples/ngmodules/src/app/contact/contact-routing.module.ts deleted file mode 100644 index a3c11194622..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact-routing.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { ContactComponent } from './contact.component'; - -const routes = [ - { path: 'contact', component: ContactComponent} -]; - -@NgModule({ - imports: [ RouterModule.forChild(routes) ], - exports: [ RouterModule ] -}) -export class ContactRoutingModule {} - diff --git a/aio/content/examples/ngmodules/src/app/contact/contact.component.css b/aio/content/examples/ngmodules/src/app/contact/contact.component.css deleted file mode 100644 index 61fde8d091d..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact.component.css +++ /dev/null @@ -1,17 +0,0 @@ -.button-group { - display: flex; - flex-direction: row; -} -button { - margin: 1rem 1rem 0 0; -} - -input { - padding: .5rem; - margin-left: .5rem; -} - -.alert { - color: red; - font-style: italic; -} diff --git a/aio/content/examples/ngmodules/src/app/contact/contact.component.html b/aio/content/examples/ngmodules/src/app/contact/contact.component.html deleted file mode 100644 index f94dc3528e2..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact.component.html +++ /dev/null @@ -1,30 +0,0 @@ -

    {{userName}}'s Contacts

    -
    {{msg}}
    - -
    -

    {{ contact.name | awesome }}

    - -
    - - -
    - Name is required. -
    - -
    - -
    - - - - - -
    -
    - - diff --git a/aio/content/examples/ngmodules/src/app/contact/contact.component.ts b/aio/content/examples/ngmodules/src/app/contact/contact.component.ts deleted file mode 100644 index 64a7cc31ed4..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -// Exact copy except import UserService from greeting -import {Component, OnInit} from '@angular/core'; -import {FormBuilder, FormGroup, Validators} from '@angular/forms'; - -import {UserService} from '../greeting/user.service'; - -import {Contact, ContactService} from './contact.service'; - -@Component({ - selector: 'app-contact', - templateUrl: './contact.component.html', - styleUrls: ['./contact.component.css'] -}) -export class ContactComponent implements OnInit { - contact!: Contact; - contacts: Contact[] = []; - - msg = 'Loading contacts ...'; - userName = ''; - - contactForm: FormGroup; - - constructor( - private contactService: ContactService, userService: UserService, private formBuilder: FormBuilder) { - this.contactForm = this.formBuilder.group({name: ['', Validators.required]}); - this.userName = userService.userName; - } - - ngOnInit() { - this.setupForm(); - } - - setupForm() { - this.contactService.getContacts().subscribe(contacts => { - this.msg = ''; - this.contacts = contacts; - this.contact = contacts[0]; - this.contactForm.get('name')!.setValue(this.contact.name); - }); - } - - next() { - let ix = 1 + this.contacts.indexOf(this.contact); - if (ix >= this.contacts.length) { - ix = 0; - } - this.contact = this.contacts[ix]; - console.log(this.contacts[ix]); - } - - onSubmit() { - const newName = this.contactForm.get('name')!.value; - this.displayMessage('Saved ' + newName); - this.contact.name = newName; - } - - newContact() { - this.displayMessage('New contact'); - this.contactForm.get('name')!.setValue(''); - this.contact = {id: 42, name: ''}; - this.contacts.push(this.contact); - } - - /** Display a message briefly, then remove it. */ - displayMessage(msg: string) { - this.msg = msg; - setTimeout(() => this.msg = '', 1500); - } -} diff --git a/aio/content/examples/ngmodules/src/app/contact/contact.module.ts b/aio/content/examples/ngmodules/src/app/contact/contact.module.ts deleted file mode 100644 index 78244428b21..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NgModule } from '@angular/core'; -import { SharedModule } from '../shared/shared.module'; -import { ReactiveFormsModule } from '@angular/forms'; - -import { ContactComponent } from './contact.component'; -import { ContactService } from './contact.service'; -import { ContactRoutingModule } from './contact-routing.module'; - -@NgModule({ - imports: [ - SharedModule, - ContactRoutingModule, - ReactiveFormsModule - ], - declarations: [ ContactComponent ], - providers: [ ContactService ] -}) -export class ContactModule { } diff --git a/aio/content/examples/ngmodules/src/app/contact/contact.service.ts b/aio/content/examples/ngmodules/src/app/contact/contact.service.ts deleted file mode 100644 index 1cbae2efc0d..00000000000 --- a/aio/content/examples/ngmodules/src/app/contact/contact.service.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Injectable, OnDestroy } from '@angular/core'; - -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; - -export class Contact { - constructor(public id: number, public name: string) { } -} - -const CONTACTS: Contact[] = [ - new Contact(21, 'Yasha'), - new Contact(22, 'Iulia'), - new Contact(23, 'Karina') -]; - -const FETCH_LATENCY = 500; - -/** Simulate a data service that retrieves contacts from a server */ -@Injectable() -export class ContactService implements OnDestroy { - - constructor() { console.log('ContactService instance created.'); } - ngOnDestroy() { console.log('ContactService instance destroyed.'); } - - getContacts(): Observable { - return of(CONTACTS).pipe(delay(FETCH_LATENCY)); - } - - getContact(id: number | string): Observable { - const contact$ = of(CONTACTS.find(contact => contact.id === +id)!); - return contact$.pipe(delay(FETCH_LATENCY)); - } -} - - diff --git a/aio/content/examples/ngmodules/src/app/customers/customers-detail.component.ts b/aio/content/examples/ngmodules/src/app/customers/customers-detail.component.ts deleted file mode 100644 index 32e50c8de73..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers-detail.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { Customer, - CustomersService } from './customers.service'; - -@Component({ - template: ` -

    Customer Detail

    -
    -
    Id: {{customer.id}}

    - -
    -
    - Customer List - ` -}) -export class CustomersDetailComponent implements OnInit { - customer!: Customer; - - constructor( - private route: ActivatedRoute, - private customersService: CustomersService) { } - - ngOnInit() { - const id = parseInt(this.route.snapshot.paramMap.get('id')!, 10); - this.customersService.getCustomer(id).subscribe(customer => this.customer = customer); - } -} diff --git a/aio/content/examples/ngmodules/src/app/customers/customers-list.component.ts b/aio/content/examples/ngmodules/src/app/customers/customers-list.component.ts deleted file mode 100644 index d29ef6dcfd9..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers-list.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Customer, - CustomersService } from './customers.service'; - -@Component({ - template: ` -

    Customer List

    - - ` -}) - -export class CustomersListComponent { - customers: Observable; - constructor(private customersService: CustomersService) { - this.customers = this.customersService.getCustomers(); - } -} - diff --git a/aio/content/examples/ngmodules/src/app/customers/customers-routing.module.ts b/aio/content/examples/ngmodules/src/app/customers/customers-routing.module.ts deleted file mode 100644 index 035bac5f1a1..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers-routing.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, - RouterModule } from '@angular/router'; - -import { CustomersComponent } from './customers.component'; -import { CustomersListComponent } from './customers-list.component'; -import { CustomersDetailComponent } from './customers-detail.component'; - -const routes: Routes = [ - { path: '', - component: CustomersComponent, - children: [ - { path: '', component: CustomersListComponent }, - { path: ':id', component: CustomersDetailComponent } - ] - } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class CustomersRoutingModule {} diff --git a/aio/content/examples/ngmodules/src/app/customers/customers.component.ts b/aio/content/examples/ngmodules/src/app/customers/customers.component.ts deleted file mode 100644 index a0087247d2e..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component } from '@angular/core'; - -import { CustomersService } from './customers.service'; -import { UserService } from '../greeting/user.service'; - -@Component({ - template: ` -

    Customers of {{userName}}

    - - `, - providers: [ UserService ] -}) -export class CustomersComponent { - userName = ''; - constructor(userService: UserService) { - this.userName = userService.userName; - } -} - diff --git a/aio/content/examples/ngmodules/src/app/customers/customers.module.ts b/aio/content/examples/ngmodules/src/app/customers/customers.module.ts deleted file mode 100644 index baf74678813..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { SharedModule } from '../shared/shared.module'; - -import { CustomersComponent } from './customers.component'; -import { CustomersDetailComponent } from './customers-detail.component'; -import { CustomersListComponent } from './customers-list.component'; -import { CustomersRoutingModule } from './customers-routing.module'; -import { CustomersService } from './customers.service'; - - -@NgModule({ - imports: [ SharedModule, CustomersRoutingModule ], - declarations: [ - CustomersComponent, CustomersDetailComponent, CustomersListComponent, - ], - providers: [CustomersService] -}) -export class CustomersModule { } diff --git a/aio/content/examples/ngmodules/src/app/customers/customers.service.ts b/aio/content/examples/ngmodules/src/app/customers/customers.service.ts deleted file mode 100644 index 0a04ea80834..00000000000 --- a/aio/content/examples/ngmodules/src/app/customers/customers.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Injectable, OnDestroy } from '@angular/core'; - -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; - -export class Customer { - constructor(public id: number, public name: string) { } -} - -const CUSTOMERS: Customer[] = [ - new Customer(11, 'Julian'), - new Customer(12, 'Eric'), - new Customer(13, 'Momi'), - new Customer(14, 'Madeleine'), - new Customer(15, 'Seth'), - new Customer(16, 'Teresa') -]; - -const FETCH_LATENCY = 500; - -/** Simulate a data service that retrieves heroes from a server */ -@Injectable() -export class CustomersService implements OnDestroy { - - constructor() { console.log('CustomersService instance created.'); } - ngOnDestroy() { console.log('CustomersService instance destroyed.'); } - - getCustomers(): Observable { - return of(CUSTOMERS).pipe(delay(FETCH_LATENCY)); - } - - getCustomer(id: number | string): Observable { - const customer$ = of(CUSTOMERS.find(customer => customer.id === +id)!); - return customer$.pipe(delay(FETCH_LATENCY)); - } -} diff --git a/aio/content/examples/ngmodules/src/app/greeting/greeting.component.html b/aio/content/examples/ngmodules/src/app/greeting/greeting.component.html deleted file mode 100644 index ff1975fd687..00000000000 --- a/aio/content/examples/ngmodules/src/app/greeting/greeting.component.html +++ /dev/null @@ -1,4 +0,0 @@ -

    {{title}}

    -

    - Welcome, {{user}} -

    diff --git a/aio/content/examples/ngmodules/src/app/greeting/greeting.component.ts b/aio/content/examples/ngmodules/src/app/greeting/greeting.component.ts deleted file mode 100644 index 0994a2aff62..00000000000 --- a/aio/content/examples/ngmodules/src/app/greeting/greeting.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { UserService } from '../greeting/user.service'; - -@Component({ - selector: 'app-greeting', - templateUrl: './greeting.component.html', -}) -export class GreetingComponent { - title = 'NgModules'; - user = ''; - - constructor(userService: UserService) { - this.user = userService.userName; - } -} diff --git a/aio/content/examples/ngmodules/src/app/greeting/greeting.module.ts b/aio/content/examples/ngmodules/src/app/greeting/greeting.module.ts deleted file mode 100644 index dbd314684d9..00000000000 --- a/aio/content/examples/ngmodules/src/app/greeting/greeting.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docregion whole-greeting-module -import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core'; - -import { CommonModule } from '@angular/common'; - -import { GreetingComponent } from './greeting.component'; -import { UserServiceConfig } from './user.service'; - - -@NgModule({ - imports: [ CommonModule ], - declarations: [ GreetingComponent ], - exports: [ GreetingComponent ] -}) -export class GreetingModule { - // #docregion ctor - constructor(@Optional() @SkipSelf() parentModule?: GreetingModule) { - if (parentModule) { - throw new Error( - 'GreetingModule is already loaded. Import it in the AppModule only'); - } - } - // #enddocregion ctor - - // #docregion for-root - static forRoot(config: UserServiceConfig): ModuleWithProviders { - return { - ngModule: GreetingModule, - providers: [ - {provide: UserServiceConfig, useValue: config } - ] - }; - } - // #enddocregion for-root -} -// #enddocregion whole-greeting-module diff --git a/aio/content/examples/ngmodules/src/app/greeting/user.service.ts b/aio/content/examples/ngmodules/src/app/greeting/user.service.ts deleted file mode 100644 index 4997526edba..00000000000 --- a/aio/content/examples/ngmodules/src/app/greeting/user.service.ts +++ /dev/null @@ -1,28 +0,0 @@ - -import { Injectable, Optional } from '@angular/core'; - -let nextId = 1; - -export class UserServiceConfig { - userName = 'Philip Marlowe'; -} - -@Injectable({ - providedIn: 'root' -}) -export class UserService { - id = nextId++; - - // #docregion ctor - constructor(@Optional() config?: UserServiceConfig) { - if (config) { this._userName = config.userName; } - } - // #enddocregion ctor - - get userName() { - // Demo: add a suffix if this service has been created more than once - const suffix = this.id > 1 ? ` times ${this.id}` : ''; - return this._userName + suffix; - } - private _userName = 'Sherlock Holmes'; -} diff --git a/aio/content/examples/ngmodules/src/app/items/items-detail.component.ts b/aio/content/examples/ngmodules/src/app/items/items-detail.component.ts deleted file mode 100644 index 718dab8acbc..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items-detail.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -@Component({ - template: ` -

    Item Detail

    -
    Item id: {{id}}
    -
    - Items List - ` -}) -export class ItemsDetailComponent implements OnInit { - id = 0; - constructor(private route: ActivatedRoute) { } - - ngOnInit() { - this.id = parseInt(this.route.snapshot.paramMap.get('id')!, 10); - } -} - diff --git a/aio/content/examples/ngmodules/src/app/items/items-list.component.ts b/aio/content/examples/ngmodules/src/app/items/items-list.component.ts deleted file mode 100644 index a60564a76c0..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items-list.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Item, ItemService } from './items.service'; - -@Component({ - template: ` -

    Items List

    - - ` -}) -export class ItemsListComponent { - items: Observable; - - constructor(private itemService: ItemService) { - this.items = this.itemService.getItems(); - } - -} - diff --git a/aio/content/examples/ngmodules/src/app/items/items-routing.module.ts b/aio/content/examples/ngmodules/src/app/items/items-routing.module.ts deleted file mode 100644 index c2c551c7553..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, - RouterModule } from '@angular/router'; - -import { ItemsListComponent } from './items-list.component'; -import { ItemsDetailComponent } from './items-detail.component'; - -const routes: Routes = [ - { path: '', redirectTo: 'list', pathMatch: 'full'}, - { path: 'list', component: ItemsListComponent }, - { path: ':id', component: ItemsDetailComponent } -]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class ItemsRoutingModule {} - diff --git a/aio/content/examples/ngmodules/src/app/items/items.component.css b/aio/content/examples/ngmodules/src/app/items/items.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/ngmodules/src/app/items/items.component.html b/aio/content/examples/ngmodules/src/app/items/items.component.html deleted file mode 100644 index c919a92a2a5..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - items works! -

    diff --git a/aio/content/examples/ngmodules/src/app/items/items.component.ts b/aio/content/examples/ngmodules/src/app/items/items.component.ts deleted file mode 100644 index a9bee4800aa..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-items', - templateUrl: './items.component.html', - styleUrls: ['./items.component.css'] -}) -export class ItemsComponent {} - diff --git a/aio/content/examples/ngmodules/src/app/items/items.module.ts b/aio/content/examples/ngmodules/src/app/items/items.module.ts deleted file mode 100644 index 9b22b489173..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { ItemsComponent } from './items.component'; -import { ItemsListComponent } from './items-list.component'; -import { ItemsDetailComponent } from './items-detail.component'; -import { ItemService } from './items.service'; -import { ItemsRoutingModule } from './items-routing.module'; - -@NgModule({ - imports: [ CommonModule, ItemsRoutingModule ], - declarations: [ ItemsComponent, ItemsDetailComponent, ItemsListComponent ], - providers: [ ItemService ] -}) -export class ItemsModule {} diff --git a/aio/content/examples/ngmodules/src/app/items/items.service.ts b/aio/content/examples/ngmodules/src/app/items/items.service.ts deleted file mode 100644 index 60fd7950c05..00000000000 --- a/aio/content/examples/ngmodules/src/app/items/items.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Injectable, OnDestroy } from '@angular/core'; - -import { Observable, of } from 'rxjs'; -import { delay } from 'rxjs/operators'; - -export class Item { - constructor(public id: number, public name: string) { } -} - -const ITEMS: Item[] = [ - new Item(1, 'Sticky notes'), - new Item(2, 'Dry erase markers'), - new Item(3, 'Erasers'), - new Item(4, 'Whiteboard cleaner'), -]; - -const FETCH_LATENCY = 500; - -/** Simulate a data service that retrieves items from a server */ -@Injectable() -export class ItemService implements OnDestroy { - - constructor() { console.log('ItemService instance created.'); } - ngOnDestroy() { console.log('ItemService instance destroyed.'); } - - getItems(): Observable { - return of(ITEMS).pipe(delay(FETCH_LATENCY)); - } - - getItem(id: number | string): Observable { - const item$ = of(ITEMS.find(item => item.id === +id)!); - return item$.pipe(delay(FETCH_LATENCY)); - } -} - - diff --git a/aio/content/examples/ngmodules/src/app/shared/awesome.pipe.ts b/aio/content/examples/ngmodules/src/app/shared/awesome.pipe.ts deleted file mode 100644 index ffe4949f214..00000000000 --- a/aio/content/examples/ngmodules/src/app/shared/awesome.pipe.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ name: 'awesome' }) -/** Precede the input string with the word "Awesome " */ -export class AwesomePipe implements PipeTransform { - transform(phrase: string) { - return phrase ? 'Awesome ' + phrase : ''; - } -} diff --git a/aio/content/examples/ngmodules/src/app/shared/highlight.directive.ts b/aio/content/examples/ngmodules/src/app/shared/highlight.directive.ts deleted file mode 100644 index 687ee013f48..00000000000 --- a/aio/content/examples/ngmodules/src/app/shared/highlight.directive.ts +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable @angular-eslint/directive-selector */ -// Exact copy of contact/highlight.directive except for color and message -import { Directive, ElementRef } from '@angular/core'; - -@Directive({ selector: '[highlight], input' }) -/** Highlight the attached element or an InputElement in gray */ -export class HighlightDirective { - constructor(el: ElementRef) { - el.nativeElement.style.backgroundColor = '#efeeed'; - console.log( - `* Shared highlight called for ${el.nativeElement.tagName}`); - } -} diff --git a/aio/content/examples/ngmodules/src/app/shared/shared.module.ts b/aio/content/examples/ngmodules/src/app/shared/shared.module.ts deleted file mode 100644 index 95615fba26d..00000000000 --- a/aio/content/examples/ngmodules/src/app/shared/shared.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { AwesomePipe } from './awesome.pipe'; -import { HighlightDirective } from './highlight.directive'; - -@NgModule({ - imports: [ CommonModule ], - declarations: [ AwesomePipe, HighlightDirective ], - exports: [ AwesomePipe, HighlightDirective, - CommonModule, FormsModule ] -}) -export class SharedModule { } diff --git a/aio/content/examples/ngmodules/src/index.html b/aio/content/examples/ngmodules/src/index.html deleted file mode 100644 index eed605031d6..00000000000 --- a/aio/content/examples/ngmodules/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - NgmodulesExample - - - - - - Loading... - - diff --git a/aio/content/examples/ngmodules/src/main.ts b/aio/content/examples/ngmodules/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/ngmodules/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/ngmodules/stackblitz.json b/aio/content/examples/ngmodules/stackblitz.json deleted file mode 100644 index e72529c3e2f..00000000000 --- a/aio/content/examples/ngmodules/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "NgModules", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.module.ts", - "tags": ["NgModules"] -} diff --git a/aio/content/examples/observables-in-angular/BUILD.bazel b/aio/content/examples/observables-in-angular/BUILD.bazel deleted file mode 100644 index ccd988aac21..00000000000 --- a/aio/content/examples/observables-in-angular/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "observables-in-angular", -) diff --git a/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 2a0938c99b9..00000000000 --- a/aio/content/examples/observables-in-angular/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/observables-in-angular/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/observables-in-angular/example-config.json b/aio/content/examples/observables-in-angular/example-config.json deleted file mode 100644 index c07fa9794c5..00000000000 --- a/aio/content/examples/observables-in-angular/example-config.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": [ "tsc", "--project", "./tsconfig.app.json" ] - } - ] -} diff --git a/aio/content/examples/observables-in-angular/src/main.spec.ts b/aio/content/examples/observables-in-angular/src/main.spec.ts deleted file mode 100644 index 2be98b19bb5..00000000000 --- a/aio/content/examples/observables-in-angular/src/main.spec.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { NavigationStart } from '@angular/router'; -import { Subject } from 'rxjs'; - -import { - AsyncObservablePipeComponent, - HeroFormComponent, - Routable1Component, Routable2Component, - ZippyComponent -} from './main'; - -// should write some real tests. -// this placeholder prevents `ng test` from failing and ensures that the example components compile. -describe('observables-in-angular', () => { - it('should write some real tests', () => { - expect(true).toBe(true); - }); - - it('can instantiate AsyncObservablePipeComponent', () => - expect(new AsyncObservablePipeComponent()).toBeDefined() - ); - - it('can instantiate HeroFormComponent', () => - expect(new HeroFormComponent()).toBeDefined() - ); - - it('can instantiate Routable1Component', () => - expect(new Routable1Component(new MockRouter() as any)).toBeDefined() - ); - - it('can instantiate Routable2Component', () => - expect(new Routable2Component(new MockActivatedRoute() as any)).toBeDefined() - ); - - it('can instantiate ZippyComponent', () => - expect(new ZippyComponent()).toBeDefined() - ); -}); - -class MockActivatedRoute { - url = new Subject(); -} - -class MockRouter { - events = new Subject(); -} diff --git a/aio/content/examples/observables-in-angular/src/main.ts b/aio/content/examples/observables-in-angular/src/main.ts deleted file mode 100644 index 9c6124a9276..00000000000 --- a/aio/content/examples/observables-in-angular/src/main.ts +++ /dev/null @@ -1,131 +0,0 @@ -// TODO: Add unit tests for this file. -/* eslint-disable @angular-eslint/no-output-native */ -// #docregion -import { Component, Output, OnInit, EventEmitter, NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { Observable } from 'rxjs'; - -// #docregion eventemitter - -@Component({ - standalone: true, - selector: 'app-zippy', - template: ` -
    - -
    - -
    -
    - `, -}) -export class ZippyComponent { - visible = true; - @Output() open = new EventEmitter(); - @Output() close = new EventEmitter(); - - toggle() { - this.visible = !this.visible; - if (this.visible) { - this.open.emit(null); - } else { - this.close.emit(null); - } - } -} - -// #enddocregion eventemitter - -// #docregion pipe - -@Component({ - standalone: true, - selector: 'async-observable-pipe', - template: `
    observable|async: - Time: {{ time | async }}
    `, - imports: [CommonModule] -}) -export class AsyncObservablePipeComponent { - time = new Observable(observer => { - setInterval(() => observer.next(new Date().toString()), 1000); - }); -} - -// #enddocregion pipe - -// #docregion router - -import { Router, NavigationStart } from '@angular/router'; -import { filter } from 'rxjs'; - -@Component({ - standalone: true, - selector: 'app-routable', - template: 'Routable1Component template' -}) -export class Routable1Component implements OnInit { - - navStart: Observable; - - constructor(router: Router) { - // Create a new Observable that publishes only the NavigationStart event - this.navStart = router.events.pipe( - filter(evt => evt instanceof NavigationStart) - ) as Observable; - } - - ngOnInit() { - this.navStart.subscribe(() => console.log('Navigation Started!')); - } -} - -// #enddocregion router - - -// #docregion activated_route - -import { ActivatedRoute } from '@angular/router'; - -@Component({ - standalone: true, - selector: 'app-routable', - template: 'Routable2Component template' -}) -export class Routable2Component implements OnInit { - constructor(private activatedRoute: ActivatedRoute) { } - - ngOnInit() { - this.activatedRoute.url - .subscribe(url => console.log('The URL changed to: ' + url)); - } -} - -// #enddocregion activated_route - - -// #docregion forms - -import { FormGroup } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-hero-form', - template: 'Hero Form Template' -}) -export class HeroFormComponent implements OnInit { - nameChangeLog: string[] = []; - heroForm!: FormGroup; - - ngOnInit() { - this.logNameChange(); - } - logNameChange() { - const nameControl = this.heroForm.get('name'); - nameControl?.valueChanges.forEach( - (value: string) => this.nameChangeLog.push(value) - ); - } -} - -// #enddocregion forms - diff --git a/aio/content/examples/observables/BUILD.bazel b/aio/content/examples/observables/BUILD.bazel deleted file mode 100644 index f796dbbfa53..00000000000 --- a/aio/content/examples/observables/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "observables", -) diff --git a/aio/content/examples/observables/e2e/src/app.e2e-spec.ts b/aio/content/examples/observables/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1902bcde0a4..00000000000 --- a/aio/content/examples/observables/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/observables/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/observables/example-config.json b/aio/content/examples/observables/example-config.json deleted file mode 100644 index 3aa2059b4d0..00000000000 --- a/aio/content/examples/observables/example-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": ["tsc", "--project", "tsconfig.spec.json", "--module", "commonjs"] - }, - { - "cmd": "yarn", - "args": ["jasmine", "out-tsc/**/*.spec.js"] - } - ] -} diff --git a/aio/content/examples/observables/src/creating.spec.ts b/aio/content/examples/observables/src/creating.spec.ts deleted file mode 100644 index 883b248f685..00000000000 --- a/aio/content/examples/observables/src/creating.spec.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { docRegionSubscriber } from './creating'; - -describe('observables', () => { - it('should create an observable using the constructor', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionSubscriber(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(4); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [1], - [2], - [3], - ['Finished sequence'], - ]); - }); -}); diff --git a/aio/content/examples/observables/src/creating.ts b/aio/content/examples/observables/src/creating.ts deleted file mode 100644 index a36843219e2..00000000000 --- a/aio/content/examples/observables/src/creating.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Observable, Observer } from 'rxjs'; - -export function docRegionSubscriber(console: Console) { - // #docregion subscriber - // This function runs when subscribe() is called - function sequenceSubscriber(observer: Observer) { - // synchronously deliver 1, 2, and 3, then completes - observer.next(1); - observer.next(2); - observer.next(3); - observer.complete(); - - // Return the unsubscribe function. - // This one doesn't do anything - // because values are delivered synchronously - // and there is nothing to clean up. - return {unsubscribe() {}}; - } - - // Create a new Observable that will deliver the above sequence - const sequence = new Observable(sequenceSubscriber); - - // Execute the Observable and print the result of each notification - sequence.subscribe({ - next(num) { console.log(num); }, - complete() { console.log('Finished sequence'); } - }); - - // Logs: - // 1 - // 2 - // 3 - // Finished sequence - // #enddocregion subscriber -} - diff --git a/aio/content/examples/observables/src/geolocation.ts b/aio/content/examples/observables/src/geolocation.ts deleted file mode 100644 index ff2f2e1ab21..00000000000 --- a/aio/content/examples/observables/src/geolocation.ts +++ /dev/null @@ -1,42 +0,0 @@ -// TODO: Add unit tests for this file. -import { Observable } from 'rxjs'; -// #docregion - -// Create an Observable that will start listening to browser geolocation updates -// when a consumer subscribes. -const locations = new Observable((observer) => { - let watchId: number; - - // The geolocation API (if it exists) provides values to publish - if ('geolocation' in navigator) { - watchId = navigator.geolocation.watchPosition( - (position: GeolocationPosition) => observer.next(position), - (error: GeolocationPositionError) => observer.error(error) - ); - } else { - observer.error('Geolocation not available'); - } - - // When the consumer unsubscribes, stop listening to geolocation changes. - return { - unsubscribe() { - navigator.geolocation.clearWatch(watchId); - } - }; -}); - -// Call subscribe() to start listening for geolocation updates. -const locationsSubscription = locations.subscribe({ - next(position) { - console.log('Current Position: ', position); - }, - error(msg) { - console.log('Error Getting Location: ', msg); - } -}); - -// Stop listening for location after 10 seconds -setTimeout(() => { - locationsSubscription.unsubscribe(); -}, 10000); -// #enddocregion diff --git a/aio/content/examples/observables/src/index.html b/aio/content/examples/observables/src/index.html deleted file mode 100755 index 525f8729b4c..00000000000 --- a/aio/content/examples/observables/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - HttpClient Example - - - - - - - - diff --git a/aio/content/examples/observables/src/main.ts b/aio/content/examples/observables/src/main.ts deleted file mode 100644 index f261ad6f292..00000000000 --- a/aio/content/examples/observables/src/main.ts +++ /dev/null @@ -1,3 +0,0 @@ -import './geolocation'; -import './subscribing'; -import './creating'; diff --git a/aio/content/examples/observables/src/subscribing.spec.ts b/aio/content/examples/observables/src/subscribing.spec.ts deleted file mode 100644 index bd6d89068fa..00000000000 --- a/aio/content/examples/observables/src/subscribing.spec.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { docRegionObserver } from './subscribing'; - -describe('subscribing', () => { - it('should subscribe and emit', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionObserver(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(11); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - // Subscribe without parameters emits nothing - // Subscribe with only a next() handler emits 3 values - ['Observable emitted the next value: 1'], - ['Observable emitted the next value: 2'], - ['Observable emitted the next value: 3'], - // Subscribe with an object parameter emits 3 values and the complete notification - ['Observable emitted the next value: 1'], - ['Observable emitted the next value: 2'], - ['Observable emitted the next value: 3'], - ['Observable emitted the complete notification'], - // Subscribe with an object defined by functions emits 3 values and the complete notification - ['Observable emitted the next value: 1'], - ['Observable emitted the next value: 2'], - ['Observable emitted the next value: 3'], - ['Observable emitted the complete notification'], - ]); - }); -}); diff --git a/aio/content/examples/observables/src/subscribing.ts b/aio/content/examples/observables/src/subscribing.ts deleted file mode 100644 index fbfeccfb0b0..00000000000 --- a/aio/content/examples/observables/src/subscribing.ts +++ /dev/null @@ -1,40 +0,0 @@ -// #docplaster -// #docregion observable - import { of } from 'rxjs'; - -// #enddocregion observable -export function docRegionObserver(console: Console) { - - // #docregion observable - const numbers$ = of(1, 2, 3); // simple observable that emits three values - // #enddocregion observable - - // #docregion no-params - numbers$.subscribe(); - // #enddocregion no-params - - // #docregion next-param - numbers$.subscribe( - value => console.log('Observable emitted the next value: ' + value) - ); - // #enddocregion next-param - - // #docregion object-param, next-or-error - numbers$.subscribe({ - next: value => console.log('Observable emitted the next value: ' + value), - error: err => console.error('Observable emitted an error: ' + err), - // #enddocregion next-or-error - complete: () => console.log('Observable emitted the complete notification') - // #docregion next-or-error - }); - // #enddocregion object-param, next-or-error - - // #docregion object-with-fns - numbers$.subscribe({ - next(value) { console.log('Observable emitted the next value: ' + value); }, - error(err) { console.error('Observable emitted an error: ' + err); }, - complete() { console.log('Observable emitted the complete notification'); } - }); - // #enddocregion object-with-fns - -} diff --git a/aio/content/examples/pipes/BUILD.bazel b/aio/content/examples/pipes/BUILD.bazel deleted file mode 100644 index b9ae6c7270c..00000000000 --- a/aio/content/examples/pipes/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "pipes", -) diff --git a/aio/content/examples/pipes/e2e/src/app.e2e-spec.ts b/aio/content/examples/pipes/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 4c348c22dc9..00000000000 --- a/aio/content/examples/pipes/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Pipes', () => { - - beforeAll(() => browser.get('')); - - it('should open correctly', async () => { - expect(await element.all(by.tagName('h1')).get(0).getText()).toEqual('Pipes'); - expect(await element(by.css('app-birthday p')).getText()).toEqual(`The hero's birthday is Apr 15, 1988`); - }); - - it('should show 4 heroes', async () => { - expect(await element.all(by.css('app-hero-list div')).count()).toEqual(4); - }); - - it('should show a familiar hero in json', async () => { - expect(await element(by.cssContainingText('app-hero-list p', 'Heroes as JSON')).getText()).toContain('Bombasto'); - }); - - it('should show alternate birthday formats', async () => { - expect(await element( - by.cssContainingText('app-birthday-formatting > p', `The hero's birthday is 4/15/88`)).isDisplayed()) - .toBe(true); - expect(await element( - by.cssContainingText('app-birthday-formatting > p', `The hero's birthday is Apr 15, 1988`)).isDisplayed()) - .toBe(true); - }); - - it('should be able to chain and compose pipes', async () => { - const chainedPipeEles = element.all( - by.cssContainingText('app-birthday-pipe-chaining p', `The chained hero's`)); - expect(await chainedPipeEles.count()).toBe(2, 'should have 2 chained pipe examples'); - expect(await chainedPipeEles.get(0).getText()).toContain('APR 15, 1988'); - expect(await chainedPipeEles.get(1).getText()).toContain('FRIDAY, APRIL 15, 1988'); - }); - - it('should be able to use ExponentialStrengthPipe pipe', async () => { - const ele = element(by.css('app-power-booster p')); - expect(await ele.getText()).toContain('Super power boost: 1024'); - }); - - it('should be able to use the exponential calculator', async () => { - const eles = element.all(by.css('app-power-boost-calculator input')); - const baseInputEle = eles.get(0); - const factorInputEle = eles.get(1); - const outputEle = element(by.css('app-power-boost-calculator p')); - - await baseInputEle.clear(); - await baseInputEle.sendKeys('7'); - await factorInputEle.clear(); - await factorInputEle.sendKeys('3'); - expect(await outputEle.getText()).toContain('343'); - }); - - - it('should support flying heroes (pure) ', async () => { - const nameEle = element(by.css('app-flying-heroes input[type="text"]')); - const canFlyCheckEle = element(by.css('app-flying-heroes #can-fly')); - const mutateCheckEle = element(by.css('app-flying-heroes #mutate')); - const resetEle = element(by.css('app-flying-heroes button')); - const flyingHeroesEle = element.all(by.css('app-flying-heroes #flyers div')); - - expect(await canFlyCheckEle.getAttribute('checked')).toEqual('true', 'should default to "can fly"'); - expect(await mutateCheckEle.getAttribute('checked')).toEqual('true', 'should default to mutating array'); - expect(await flyingHeroesEle.count()).toEqual(2, 'only two of the original heroes can fly'); - - await nameEle.sendKeys('test1\n'); - expect(await flyingHeroesEle.count()).toEqual(2, 'no change while mutating array'); - - await mutateCheckEle.click(); - await nameEle.sendKeys('test2\n'); - expect(await flyingHeroesEle.count()).toEqual(4, 'not mutating; should see both adds'); - expect(await flyingHeroesEle.get(2).getText()).toContain('test1'); - expect(await flyingHeroesEle.get(3).getText()).toContain('test2'); - - await resetEle.click(); - expect(await flyingHeroesEle.count()).toEqual(2, 'reset should restore original flying heroes'); - }); - - - it('should support flying heroes (impure) ', async () => { - const nameEle = element(by.css('app-flying-heroes-impure input[type="text"]')); - const canFlyCheckEle = element(by.css('app-flying-heroes-impure #can-fly')); - const mutateCheckEle = element(by.css('app-flying-heroes-impure #mutate')); - const flyingHeroesEle = element.all(by.css('app-flying-heroes-impure #flyers div')); - - expect(await canFlyCheckEle.getAttribute('checked')).toEqual('true', 'should default to "can fly"'); - expect(await mutateCheckEle.getAttribute('checked')).toEqual('true', 'should default to mutating array'); - expect(await flyingHeroesEle.count()).toEqual(2, 'only two of the original heroes can fly'); - - await nameEle.sendKeys('test1\n'); - expect(await flyingHeroesEle.count()).toEqual(3, 'new flying hero should show in mutating array'); - }); - - it('should show an async hero message', async () => { - expect(await element.all(by.tagName('app-hero-async-message')).get(0).getText()).toContain('hero'); - }); - -}); diff --git a/aio/content/examples/pipes/example-config.json b/aio/content/examples/pipes/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/pipes/src/app/app.component.html b/aio/content/examples/pipes/src/app/app.component.html deleted file mode 100644 index 8fa923fd86f..00000000000 --- a/aio/content/examples/pipes/src/app/app.component.html +++ /dev/null @@ -1,66 +0,0 @@ -

    Pipes

    -Date Pipe -Date Pipe Formatting -Currency Pipe Formatting -Pipe Chaining -Power Booster custom pipe - -Power Boost Calculator custom pipe with params -Async Messages and AsyncPipe -Json Pipe for Debugging -Pipes and Precedence - -Flying Heroes filter pipe (pure) - -Flying Heroes filter pipe (impure) - -Hero List with caching FetchJsonPipe - -
    -

    Date Pipe

    - - -
    -

    Date Pipe Formatting

    - - -
    -

    Currency Pipe Formatting

    - - -
    -

    Pipe Chaining

    - - -
    - - - -
    -loading - -

    Pipes and Precedence

    - - -
    - - -
    -

    Json Pipe for Debugging

    -

    Use the JsonPipe to display component properties for debugging.

    -data | json -

    - -

    - - -
    - - - -
    - - - -
    - diff --git a/aio/content/examples/pipes/src/app/app.component.ts b/aio/content/examples/pipes/src/app/app.component.ts deleted file mode 100644 index 9541650da6b..00000000000 --- a/aio/content/examples/pipes/src/app/app.component.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Component } from '@angular/core'; - -import { BirthdayComponent } from './birthday.component'; -import { BirthdayFormattingComponent } from './birthday-formatting.component'; -import { CurrencyFormattingComponent } from './currency-formatting.component'; -import { BirthdayPipeChainingComponent } from './birthday-pipe-chaining.component'; -import { FlyingHeroesComponent, FlyingHeroesImpureComponent } from './flying-heroes.component'; -import { HeroAsyncMessageComponent } from './hero-async-message.component'; -import { HeroListComponent } from './hero-list.component'; -import { JsonPipeComponent } from './json-pipe.component'; -import { PowerBoosterComponent } from './power-booster.component'; -import { PowerBoostCalculatorComponent } from './power-boost-calculator.component'; -import { PrecedenceComponent } from './precedence.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - // Example components - BirthdayComponent, - BirthdayFormattingComponent, - BirthdayPipeChainingComponent, - CurrencyFormattingComponent, - FlyingHeroesComponent, FlyingHeroesImpureComponent, - HeroAsyncMessageComponent, - HeroListComponent, - JsonPipeComponent, - PowerBoosterComponent, - PowerBoostCalculatorComponent, - PrecedenceComponent, - ], - styles: [ - 'a[href] {display: block; padding: 10px 0;}', 'a:hover {text-decoration: none;}', - 'h2 {margin: 0;}', - 'code {font-family: monospace; background-color: #eee; padding: 0.5em;}' - ] -}) -export class AppComponent { - birthday = new Date(1988, 3, 15); // April 15, 1988 -- since month parameter is zero-based -} diff --git a/aio/content/examples/pipes/src/app/birthday-formatting.component.html b/aio/content/examples/pipes/src/app/birthday-formatting.component.html deleted file mode 100644 index 7234a14792d..00000000000 --- a/aio/content/examples/pipes/src/app/birthday-formatting.component.html +++ /dev/null @@ -1,6 +0,0 @@ -

    The hero's birthday is {{ birthday | date:"shortDate" }} in the "shortDate" format.

    - -

    The hero's birthday is {{ birthday | date:format }} in "{{format}}" format. - Click the toggle button to change formats.

    - - diff --git a/aio/content/examples/pipes/src/app/birthday-formatting.component.ts b/aio/content/examples/pipes/src/app/birthday-formatting.component.ts deleted file mode 100644 index 31e31ceef5f..00000000000 --- a/aio/content/examples/pipes/src/app/birthday-formatting.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component } from '@angular/core'; -import { DatePipe } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-birthday-formatting', - templateUrl: './birthday-formatting.component.html', - imports: [DatePipe], -}) -export class BirthdayFormattingComponent { - birthday = new Date(1988, 3, 15); // April 15, 1988 -- since month parameter is zero-based - toggle = true; - - get format() { return this.toggle ? 'mediumDate' : 'fullDate'; } - - toggleFormat() { this.toggle = !this.toggle; } -} diff --git a/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.html b/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.html deleted file mode 100644 index 9b5d86a3c88..00000000000 --- a/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    - The chained hero's uppercase birthday is - {{ birthday | date | uppercase}} -

    - -

    - The chained hero's uppercase birthday in "fullDate" format is - {{ birthday | date:'fullDate' | uppercase}} -

    diff --git a/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.ts b/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.ts deleted file mode 100644 index fcb1a635424..00000000000 --- a/aio/content/examples/pipes/src/app/birthday-pipe-chaining.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { DatePipe, UpperCasePipe} from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-birthday-pipe-chaining', - templateUrl: './birthday-pipe-chaining.component.html', - imports: [DatePipe, UpperCasePipe], -}) -export class BirthdayPipeChainingComponent { - birthday = new Date(1988, 3, 15); // April 15, 1988 -- since month parameter is zero-based -} diff --git a/aio/content/examples/pipes/src/app/birthday.component.html b/aio/content/examples/pipes/src/app/birthday.component.html deleted file mode 100644 index 51786992259..00000000000 --- a/aio/content/examples/pipes/src/app/birthday.component.html +++ /dev/null @@ -1 +0,0 @@ -

    The hero's birthday is {{ birthday | date }}

    diff --git a/aio/content/examples/pipes/src/app/birthday.component.ts b/aio/content/examples/pipes/src/app/birthday.component.ts deleted file mode 100644 index e2839928ab1..00000000000 --- a/aio/content/examples/pipes/src/app/birthday.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { DatePipe } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-birthday', - templateUrl: './birthday.component.html', - imports: [DatePipe], -}) -export class BirthdayComponent { - birthday = new Date(1988, 3, 15); // April 15, 1988 -- since month parameter is zero-based -} diff --git a/aio/content/examples/pipes/src/app/currency-formatting.component.html b/aio/content/examples/pipes/src/app/currency-formatting.component.html deleted file mode 100644 index 21ff036957e..00000000000 --- a/aio/content/examples/pipes/src/app/currency-formatting.component.html +++ /dev/null @@ -1,5 +0,0 @@ -

    The amount in the local currency is "{{ amount | currency }}".

    - -

    The amount in Euros (with the default currency symbol) is "{{ amount | currency:'EUR' }}".

    - -

    The amount in Euros (with a label instead of a symbol) is "{{ amount | currency:'EUR':'Euros ' }}".

    diff --git a/aio/content/examples/pipes/src/app/currency-formatting.component.ts b/aio/content/examples/pipes/src/app/currency-formatting.component.ts deleted file mode 100644 index 466ce105015..00000000000 --- a/aio/content/examples/pipes/src/app/currency-formatting.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { CurrencyPipe } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-currency-formatting', - templateUrl: './currency-formatting.component.html', - imports: [CurrencyPipe], -}) -export class CurrencyFormattingComponent { - amount = 42.50; -} diff --git a/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts b/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts deleted file mode 100644 index 45d9b29d9df..00000000000 --- a/aio/content/examples/pipes/src/app/exponential-strength.pipe.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Pipe, PipeTransform } from '@angular/core'; -/* - * Raise the value exponentially - * Takes an exponent argument that defaults to 1. - * Usage: - * value | exponentialStrength:exponent - * Example: - * {{ 2 | exponentialStrength:10 }} - * formats to: 1024 -*/ -@Pipe({ - standalone: true, - name: 'exponentialStrength' -}) -export class ExponentialStrengthPipe implements PipeTransform { - transform(value: number, exponent = 1): number { - return Math.pow(value, exponent); - } -} diff --git a/aio/content/examples/pipes/src/app/fetch-json.pipe.ts b/aio/content/examples/pipes/src/app/fetch-json.pipe.ts deleted file mode 100644 index 7ce5c042f6c..00000000000 --- a/aio/content/examples/pipes/src/app/fetch-json.pipe.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { HttpClient } from '@angular/common/http'; -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ - standalone: true, - name: 'fetch', - pure: false, -}) -export class FetchJsonPipe implements PipeTransform { - private cachedData: any = null; - private cachedUrl = ''; - - constructor(private http: HttpClient) { } - - transform(url: string): any { - if (url !== this.cachedUrl) { - this.cachedData = null; - this.cachedUrl = url; - this.http.get(url).subscribe(result => this.cachedData = result); - } - - return this.cachedData; - } -} diff --git a/aio/content/examples/pipes/src/app/flying-heroes-impure.component.html b/aio/content/examples/pipes/src/app/flying-heroes-impure.component.html deleted file mode 100644 index 5c52ff5388f..00000000000 --- a/aio/content/examples/pipes/src/app/flying-heroes-impure.component.html +++ /dev/null @@ -1,32 +0,0 @@ - - - -

    {{title}}

    - - - -
    - - -
    - -
    - Mutate array - -
    - -

    Heroes who fly (piped)

    -
    - -
    - {{hero.name}} -
    - -
    - -

    All Heroes (no pipe)

    -
    -
    - {{hero.name}} -
    -
    \ No newline at end of file diff --git a/aio/content/examples/pipes/src/app/flying-heroes.component.html b/aio/content/examples/pipes/src/app/flying-heroes.component.html deleted file mode 100644 index 1eda7181ef4..00000000000 --- a/aio/content/examples/pipes/src/app/flying-heroes.component.html +++ /dev/null @@ -1,39 +0,0 @@ - - - -

    {{title}}

    -

    Create a new hero and press enter to add it to the list.

    - - - - -
    - - -
    -
    - - - - - - -
    - -

    Heroes who fly (piped)

    -
    - -
    - {{hero.name}} -
    - -
    - -

    All Heroes (no pipe)

    -
    - -
    - {{hero.name}} -
    - -
    \ No newline at end of file diff --git a/aio/content/examples/pipes/src/app/flying-heroes.component.ts b/aio/content/examples/pipes/src/app/flying-heroes.component.ts deleted file mode 100644 index 52cc9a08f11..00000000000 --- a/aio/content/examples/pipes/src/app/flying-heroes.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -// Only used in deprecated `pipes.md` -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { FlyingHeroesPipe, FlyingHeroesImpurePipe, } from './flying-heroes.pipe'; -import { HEROES } from './heroes'; - -@Component({ - standalone: true, - selector: 'app-flying-heroes', - templateUrl: './flying-heroes.component.html', - imports: [CommonModule, FormsModule, FlyingHeroesPipe], - styles: ['#flyers, #all {font-style: italic}', 'button {display: block}', 'input {margin: .25rem .25rem .5rem 0;}'] -}) -// #docregion v1 -export class FlyingHeroesComponent { - heroes: any[] = []; - canFly = true; - // #enddocregion v1 - mutate = true; - title = 'Flying Heroes (pure pipe)'; - - // #docregion v1 - constructor() { this.reset(); } - - addHero(name: string) { - name = name.trim(); - if (!name) { return; } - const hero = { name, canFly: this.canFly }; - // #enddocregion v1 - if (this.mutate) { - // Pure pipe won't update display because heroes array reference is unchanged - // Impure pipe will display - // #docregion v1 - // #docregion push - this.heroes.push(hero); - // #enddocregion push - // #enddocregion v1 - } else { - // Pipe updates display because heroes array is a new object - this.heroes = this.heroes.concat(hero); - } - // #docregion v1 - } - - reset() { this.heroes = HEROES.slice(); } -} -// #enddocregion v1 - -////// Identical except for impure pipe ////// -@Component({ - standalone: true, - selector: 'app-flying-heroes-impure', - templateUrl: './flying-heroes-impure.component.html', - imports: [CommonModule, FormsModule, FlyingHeroesImpurePipe], - styles: ['#flyers, #all {font-style: italic}', 'button {display: block}', 'input {margin: .25rem .25rem .5rem 0;}'], -}) -export class FlyingHeroesImpureComponent extends FlyingHeroesComponent { - override title = 'Flying Heroes (impure pipe)'; -} diff --git a/aio/content/examples/pipes/src/app/flying-heroes.pipe.ts b/aio/content/examples/pipes/src/app/flying-heroes.pipe.ts deleted file mode 100644 index 59f51872622..00000000000 --- a/aio/content/examples/pipes/src/app/flying-heroes.pipe.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Only used in deprecated `pipes.md` -/* eslint-disable @angular-eslint/use-pipe-transform-interface */ -// #docregion -// #docregion pure -import { Pipe, PipeTransform } from '@angular/core'; - -import { Hero } from './heroes'; - -@Pipe({ - standalone: true, - name: 'flyingHeroes' -}) -export class FlyingHeroesPipe implements PipeTransform { - transform(allHeroes: Hero[]) { - // #docregion filter - return allHeroes.filter(hero => hero.canFly); - // #enddocregion filter - } -} -// #enddocregion pure - -/////// Identical except for the pure flag -// #docregion impure -// #docregion pipe-decorator -@Pipe({ - standalone: true, - name: 'flyingHeroesImpure', - pure: false -}) -// #enddocregion pipe-decorator -export class FlyingHeroesImpurePipe extends FlyingHeroesPipe { } -// #enddocregion impure diff --git a/aio/content/examples/pipes/src/app/hero-async-message.component.ts b/aio/content/examples/pipes/src/app/hero-async-message.component.ts deleted file mode 100644 index 9fd724752f1..00000000000 --- a/aio/content/examples/pipes/src/app/hero-async-message.component.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { Component } from '@angular/core'; -import { AsyncPipe } from '@angular/common'; - -import { Observable, interval } from 'rxjs'; -import { map, startWith, take } from 'rxjs/operators'; - -@Component({ - standalone: true, - selector: 'app-hero-async-message', - template: ` -

    Async Messages and AsyncPipe

    -

    {{ message$ | async }}

    - `, - imports: [AsyncPipe], -}) -export class HeroAsyncMessageComponent { - message$: Observable; - - private messages = [ - 'You are my hero!', - 'You are the best hero!', - 'Will you be my hero?' - ]; - - constructor() { - this.message$ = this.getResendObservable(); - } - - resend() { - this.message$ = this.getResendObservable(); - } - - private getResendObservable() { - return interval(1000).pipe( - map(i => `Message #${i + 1}: ${this.messages[i]}`), - take(this.messages.length), - startWith('Waiting for messages...') - ); - } -} diff --git a/aio/content/examples/pipes/src/app/hero-list.component.ts b/aio/content/examples/pipes/src/app/hero-list.component.ts deleted file mode 100644 index c701d11ef85..00000000000 --- a/aio/content/examples/pipes/src/app/hero-list.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -// Only used in deprecated `pipes.md` -// The `assets/heroes.json` file is only used in this `HeroListComponent` - -// #docregion -import { Component } from '@angular/core'; -import { CommonModule, JsonPipe } from '@angular/common'; - -import { FetchJsonPipe } from './fetch-json.pipe'; - -@Component({ - standalone: true, - selector: 'app-hero-list', - template: ` -

    Heroes from JSON File

    - -
    - {{hero.name}} -
    - -

    Heroes as JSON: - {{'assets/heroes.json' | fetch | json}} -

    `, - imports: [CommonModule, FetchJsonPipe, JsonPipe] -}) -export class HeroListComponent { } diff --git a/aio/content/examples/pipes/src/app/heroes.json b/aio/content/examples/pipes/src/app/heroes.json deleted file mode 100644 index e5f0b77262f..00000000000 --- a/aio/content/examples/pipes/src/app/heroes.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - {"name": "Windstorm", "canFly": true}, - {"name": "Bombasto", "canFly": false}, - {"name": "Magneto", "canFly": false}, - {"name": "Tornado", "canFly": true} -] diff --git a/aio/content/examples/pipes/src/app/heroes.ts b/aio/content/examples/pipes/src/app/heroes.ts deleted file mode 100644 index 29587080656..00000000000 --- a/aio/content/examples/pipes/src/app/heroes.ts +++ /dev/null @@ -1,11 +0,0 @@ -// Only used in deprecated `pipes.md` -export interface Hero { - name: string; - canFly: boolean; -} -export const HEROES: Hero[] = [ - { name: 'Windstorm', canFly: true }, - { name: 'Bombasto', canFly: false }, - { name: 'Magneto', canFly: false }, - { name: 'Tornado', canFly: true } -]; diff --git a/aio/content/examples/pipes/src/app/json-pipe.component.ts b/aio/content/examples/pipes/src/app/json-pipe.component.ts deleted file mode 100644 index 408332bf9e4..00000000000 --- a/aio/content/examples/pipes/src/app/json-pipe.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component } from '@angular/core'; -import { JsonPipe } from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-json-pipe', - template: `{{ data | json }}`, - imports: [JsonPipe], -}) -export class JsonPipeComponent { - data = { - name: 'John Doe', - age: 30, - address: { - street: '123 Main St', - city: 'Anytown', - } - }; -} diff --git a/aio/content/examples/pipes/src/app/power-boost-calculator.component.ts b/aio/content/examples/pipes/src/app/power-boost-calculator.component.ts deleted file mode 100644 index 1668f504076..00000000000 --- a/aio/content/examples/pipes/src/app/power-boost-calculator.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -// Only used in deprecated `pipes.md` -// #docregion -import { Component } from '@angular/core'; -import { FormsModule } from '@angular/forms'; - -import { ExponentialStrengthPipe } from './exponential-strength.pipe'; -@Component({ - standalone: true, - selector: 'app-power-boost-calculator', - template: ` -

    Power Boost Calculator

    - - - - -

    - Super Hero Power: {{power | exponentialStrength: factor}} -

    - `, - imports: [ExponentialStrengthPipe, FormsModule], - styles: ['input {margin: .5rem 0;}'] -}) -export class PowerBoostCalculatorComponent { - power = 5; - factor = 1; -} diff --git a/aio/content/examples/pipes/src/app/power-booster.component.ts b/aio/content/examples/pipes/src/app/power-booster.component.ts deleted file mode 100644 index 4fea10a5a0a..00000000000 --- a/aio/content/examples/pipes/src/app/power-booster.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; -import { ExponentialStrengthPipe } from './exponential-strength.pipe'; - -@Component({ - standalone: true, - selector: 'app-power-booster', - template: ` -

    Power Booster

    -

    Super power boost: {{2 | exponentialStrength: 10}}

    - `, - imports: [ExponentialStrengthPipe] -}) -export class PowerBoosterComponent { } diff --git a/aio/content/examples/pipes/src/app/precedence.component.html b/aio/content/examples/pipes/src/app/precedence.component.html deleted file mode 100644 index dee24cfb3b1..00000000000 --- a/aio/content/examples/pipes/src/app/precedence.component.html +++ /dev/null @@ -1,38 +0,0 @@ -

    - In most cases, you'll wrap the entire ternary expression in parentheses before passing the result to a pipe. -

    - -

    - Example: (isLeft ? 'left' : 'right') | uppercase - - {{ (isLeft ? 'left' : 'right') | uppercase }} - -

    - - - -

    Without parentheses, only the second value is uppercased.

    - -

    Example: isGood ? 'good' : 'bad' | uppercase - - {{ isGood ? 'good' : 'bad' | uppercase }} - -

    - -

    Same as: isGood ? 'good' : ('bad' | uppercase) - - {{ isGood ? 'good' : ('bad' | uppercase) }} - -

    - - - -

    If only one of the values should be passed to a pipe, - be explicit and surround that value with parentheses.

    - -

    Example: isUpper ? ('upper' | uppercase) : 'lower' - - {{ isUpper ? ('upper' | uppercase) : 'lower' }} - -

    - diff --git a/aio/content/examples/pipes/src/app/precedence.component.ts b/aio/content/examples/pipes/src/app/precedence.component.ts deleted file mode 100644 index a8a1544a8c6..00000000000 --- a/aio/content/examples/pipes/src/app/precedence.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component } from '@angular/core'; -import { UpperCasePipe} from '@angular/common'; - -@Component({ - standalone: true, - selector: 'app-pipe-precedence', - templateUrl: './precedence.component.html', - imports: [UpperCasePipe], - styles: ['code {font-family: monospace; background-color: #eee; padding: 0.5em;}'], -}) -export class PrecedenceComponent { - isLeft = true; - toggleDirection() { - this.isLeft = !this.isLeft; - } - - isGood = true; - toggleGood() { - this.isGood = !this.isGood; - } - - isUpper = true; - toggleCase() { - this.isUpper = !this.isUpper; - } -} diff --git a/aio/content/examples/pipes/src/assets/heroes.json b/aio/content/examples/pipes/src/assets/heroes.json deleted file mode 100644 index e5f0b77262f..00000000000 --- a/aio/content/examples/pipes/src/assets/heroes.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - {"name": "Windstorm", "canFly": true}, - {"name": "Bombasto", "canFly": false}, - {"name": "Magneto", "canFly": false}, - {"name": "Tornado", "canFly": true} -] diff --git a/aio/content/examples/pipes/src/index.html b/aio/content/examples/pipes/src/index.html deleted file mode 100644 index 35002638959..00000000000 --- a/aio/content/examples/pipes/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Pipes - - - - - - - - - - diff --git a/aio/content/examples/pipes/src/main.ts b/aio/content/examples/pipes/src/main.ts deleted file mode 100644 index 6491730839e..00000000000 --- a/aio/content/examples/pipes/src/main.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; -import { HttpClientModule } from '@angular/common/http'; -import { importProvidersFrom } from '@angular/core'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - // HttpClientModule is only used in deprecated HeroListComponent - providers: [ - importProvidersFrom(HttpClientModule), - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/pipes/stackblitz.json b/aio/content/examples/pipes/stackblitz.json deleted file mode 100644 index a27408cfec1..00000000000 --- a/aio/content/examples/pipes/stackblitz.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "Pipes", - "files":[ - "!**/*.d.ts", - "!**/*.js"], - "tags": ["pipe"] -} diff --git a/aio/content/examples/practical-observable-usage/BUILD.bazel b/aio/content/examples/practical-observable-usage/BUILD.bazel deleted file mode 100644 index 2b83f924734..00000000000 --- a/aio/content/examples/practical-observable-usage/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "practical-observable-usage", -) diff --git a/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts b/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 83714788dbd..00000000000 --- a/aio/content/examples/practical-observable-usage/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/practical-observable-usage/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/practical-observable-usage/example-config.json b/aio/content/examples/practical-observable-usage/example-config.json deleted file mode 100644 index 3aa2059b4d0..00000000000 --- a/aio/content/examples/practical-observable-usage/example-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": ["tsc", "--project", "tsconfig.spec.json", "--module", "commonjs"] - }, - { - "cmd": "yarn", - "args": ["jasmine", "out-tsc/**/*.spec.js"] - } - ] -} diff --git a/aio/content/examples/practical-observable-usage/src/backoff.spec.ts b/aio/content/examples/practical-observable-usage/src/backoff.spec.ts deleted file mode 100644 index 0390a476d13..00000000000 --- a/aio/content/examples/practical-observable-usage/src/backoff.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -import { interval } from 'rxjs'; -import { tap } from 'rxjs/operators'; -import { backoff } from './backoff'; - -describe('backoff()', () => { - beforeEach(() => jasmine.clock().install()); - afterEach(() => jasmine.clock().uninstall()); - - it('should retry in case of error', () => { - const mockConsole = {log: jasmine.createSpy('log')}; - const source = interval(10).pipe( - tap(i => { - if (i > 0) { - throw new Error('Test error'); - } - }), - backoff(3, 100), - ); - source.subscribe({ - next: v => mockConsole.log(`Emitted: ${v}`), - error: e => mockConsole.log(`Errored: ${e.message || e}`), - complete: () => mockConsole.log('Completed'), - }); - - // Initial try: - // Errors on second emission and schedules retrying (with delay). - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - mockConsole.log.calls.reset(); - - // First re-attempt after 100ms: - // Errors again on second emission and schedules retrying (with larger delay). - jasmine.clock().tick(100); - expect(mockConsole.log).not.toHaveBeenCalled(); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - mockConsole.log.calls.reset(); - - // Second re-attempt after 400ms: - // Errors again on second emission and schedules retrying (with even larger delay). - jasmine.clock().tick(400); - expect(mockConsole.log).not.toHaveBeenCalled(); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - mockConsole.log.calls.reset(); - - // Third re-attempt after 900ms: - // Errors again on second emission and gives up (no retrying). - jasmine.clock().tick(900); - expect(mockConsole.log).not.toHaveBeenCalled(); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Emitted: 0']]); - mockConsole.log.calls.reset(); - - jasmine.clock().tick(10); - expect(mockConsole.log.calls.allArgs()).toEqual([['Errored: Test error']]); - }); -}); diff --git a/aio/content/examples/practical-observable-usage/src/backoff.ts b/aio/content/examples/practical-observable-usage/src/backoff.ts deleted file mode 100644 index 671e40318d7..00000000000 --- a/aio/content/examples/practical-observable-usage/src/backoff.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -// #docregion -import { timer } from 'rxjs'; -import { ajax } from 'rxjs/ajax'; -import { retry } from 'rxjs/operators'; - -export function backoff(maxTries: number, initialDelay: number) { - return retry({ - count: maxTries, - delay: (error, retryCount) => timer(initialDelay * retryCount ** 2), - }); - } - -// #enddocregion -/* - This function declaration is necessary to ensure that it does not get called - when running the unit tests. It will not get rendered into the docs. - The indentation needs to start in the leftmost level position as well because of how - the docplaster combines the different regions together. -*/ -function docRegionAjaxCall() { -// #docregion -ajax('/api/endpoint') - .pipe(backoff(3, 250)) - .subscribe(function handleData(data) { /* ... */ }); -// #enddocregion -} diff --git a/aio/content/examples/practical-observable-usage/src/main.ts b/aio/content/examples/practical-observable-usage/src/main.ts deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/practical-observable-usage/src/typeahead.spec.ts b/aio/content/examples/practical-observable-usage/src/typeahead.spec.ts deleted file mode 100644 index 0f9b0aea302..00000000000 --- a/aio/content/examples/practical-observable-usage/src/typeahead.spec.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { of } from 'rxjs'; -import { docRegionTypeahead } from './typeahead'; - -describe('typeahead', () => { - let document: Document; - let ajax: jasmine.Spy; - let tick: MockClock['tick']; - let triggertInputChange: (e: { target: { value: string } }) => void; - - beforeEach(() => { - const input = { - addEventListener: jasmine - .createSpy('addEvent') - .and.callFake((eventName: string, cb: (e: unknown) => void) => { - if (eventName === 'input') { - triggertInputChange = cb; - } - }), - removeEventListener: jasmine.createSpy('removeEvent'), - }; - - document = { getElementById: (id: string) => input } as unknown as Document; - ajax = jasmine.createSpy('ajax').and.callFake((url: string) => of('foo bar')); - tick = MockClock.install(); - }); - - it('should make an ajax call to the corrent endpoint', () => { - docRegionTypeahead(document, ajax); - triggertInputChange({ target: { value: 'foo' } }); - tick(11); - expect(ajax).toHaveBeenCalledWith('/api/endpoint?search=foo'); - }); - - it('should not make an ajax call, when the input length < 3', () => { - docRegionTypeahead(document, ajax); - triggertInputChange({ target: { value: '' } }); - tick(11); - expect(ajax).not.toHaveBeenCalled(); - triggertInputChange({ target: { value: 'fo' } }); - tick(11); - expect(ajax).not.toHaveBeenCalled(); - }); - - it('should not make an ajax call for intermediate values when debouncing', () => { - docRegionTypeahead(document, ajax); - triggertInputChange({ target: { value: 'foo' } }); - tick(9); - triggertInputChange({ target: { value: 'bar' } }); - tick(9); - triggertInputChange({ target: { value: 'baz' } }); - tick(9); - triggertInputChange({ target: { value: 'qux' } }); - expect(ajax).not.toHaveBeenCalled(); - tick(10); - expect(ajax).toHaveBeenCalledTimes(1); - expect(ajax).toHaveBeenCalledWith('/api/endpoint?search=qux'); - }); - - it('should not make an ajax call, when the input value has not changed', () => { - docRegionTypeahead(document, ajax); - triggertInputChange({ target: { value: 'foo' } }); - tick(11); - expect(ajax).toHaveBeenCalled(); - ajax.calls.reset(); - triggertInputChange({ target: { value: 'foo' } }); - tick(11); - expect(ajax).not.toHaveBeenCalled(); - }); - - // Helpers - interface MockTask { - id: ReturnType; - fn: () => unknown; - delay: number; - recurring: boolean; - nextTriggerTime: number; - } - - class MockClock { - private tasks: MockTask[] = []; - - private constructor(private now: number) {} - - static install(mockTime = 0): MockClock['tick'] { - const mocked = new this(mockTime); - - spyOn(globalThis, 'clearInterval').and.callFake(id => mocked.clearTask(id as MockTask['id'])); - spyOn(globalThis, 'clearTimeout').and.callFake(id => mocked.clearTask(id as MockTask['id'])); - spyOn(globalThis, 'setInterval').and.callFake( - ((fn: () => unknown, delay: number, ...args: any[]) => - mocked.createTask(fn, delay, true, ...args)) as typeof setInterval); - spyOn(globalThis, 'setTimeout').and.callFake( - ((fn: () => unknown, delay: number, ...args: any[]) => - mocked.createTask(fn, delay, false, ...args)) as typeof setTimeout); - - spyOn(Date, 'now').and.callFake(() => mocked.now); - - return mocked.tick.bind(mocked); - } - - private clearTask(id: MockTask['id']): void { - this.tasks = this.tasks.filter(task => task.id !== id); - } - - private createTask( - fn: MockTask['fn'], delay: MockTask['delay'], recurring: MockTask['recurring'], - ...args: any[]): MockTask['id'] { - // Avoid infinite loops. - if (recurring && (delay <= 0)) { - delay = 1; - } - - const task: MockTask = { - id: {} as MockTask['id'], - fn: fn.bind(null, ...args), - delay, - recurring, - nextTriggerTime: this.now + delay, - }; - this.queueTask(task); - - return task.id; - } - - private queueTask(task: MockTask): void { - const firstLaterTaskIdx = this.tasks.findIndex( - otherTask => otherTask.nextTriggerTime > task.nextTriggerTime); - const newTaskIdx = (firstLaterTaskIdx === -1) ? this.tasks.length : firstLaterTaskIdx; - - this.tasks.splice(newTaskIdx, 0, task); - } - - private tick(millis: number): void { - const finalNow = this.now + millis; - - while (this.tasks[0]?.nextTriggerTime <= finalNow) { - const task = this.tasks.shift()!; - this.now = task.nextTriggerTime; - - if (task.recurring) { - this.queueTask({...task, nextTriggerTime: this.now + task.delay}); - } - - try { - task.fn(); - } catch (err) { - console.error(err); - } - } - - this.now = finalNow; - } - } -}); diff --git a/aio/content/examples/practical-observable-usage/src/typeahead.ts b/aio/content/examples/practical-observable-usage/src/typeahead.ts deleted file mode 100644 index db4ee411892..00000000000 --- a/aio/content/examples/practical-observable-usage/src/typeahead.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docplaster -// #docregion - import { fromEvent, Observable } from 'rxjs'; - import { ajax } from 'rxjs/ajax'; - import { debounceTime, distinctUntilChanged, filter, map, switchMap } from 'rxjs/operators'; - -// #enddocregion -// eslint-disable-next-line @typescript-eslint/no-shadow -export function docRegionTypeahead(document: Document, ajax: (url: string) => Observable) { - // #docregion - const searchBox = document.getElementById('search-box') as HTMLInputElement; - - const typeahead = fromEvent(searchBox, 'input').pipe( - map(e => (e.target as HTMLInputElement).value), - filter(text => text.length > 2), - debounceTime(10), - distinctUntilChanged(), - switchMap(searchTerm => ajax(`/api/endpoint?search=${searchTerm}`)) - ); - - typeahead.subscribe(data => { - // Handle the data from the API - }); - - // #enddocregion - return typeahead; -} diff --git a/aio/content/examples/property-binding/BUILD.bazel b/aio/content/examples/property-binding/BUILD.bazel deleted file mode 100644 index 326779c963b..00000000000 --- a/aio/content/examples/property-binding/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "property-binding", -) diff --git a/aio/content/examples/property-binding/e2e/src/app.e2e-spec.ts b/aio/content/examples/property-binding/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 22c90b60274..00000000000 --- a/aio/content/examples/property-binding/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { browser, element, by } from 'protractor'; - - -describe('Property binding e2e tests', () => { - - beforeEach(() => browser.get('')); - - it('should display Property Binding with Angular', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Property Binding with Angular'); - }); - - it('should display four phone pictures', async () => { - expect(await element.all(by.css('img')).isPresent()).toBe(true); - expect(await element.all(by.css('img')).count()).toBe(3); - }); - - it('should display Disabled button', async () => { - expect(await element.all(by.css('button')).get(0).getText()).toBe(`Disabled Button`); - }); - - it('should display Binding to a property of a directive', async () => { - expect(await element.all(by.css('h2')).get(3).getText()).toBe(`Binding to a property of a directive`); - }); - - it('should display blue', async () => { - expect(await element.all(by.css('p')).get(0).getText()).toContain(`blue`); - }); - - it('should display Your item is: lamp', async () => { - expect(await element.all(by.css('p')).get(1).getText()).toContain(`Your item is: lamp`); - }); - - it('should display Your item is: parentItem', async () => { - expect(await element.all(by.css('p')).get(2).getText()).toBe(`Your item is: parentItem`); - }); - - it('should display a ul', async () => { - expect(await element.all(by.css('ul')).get(0).getText()).toContain(`tv`); - }); - - it('should display a ul containing phone', async () => { - expect(await element.all(by.css('ul')).get(1).getText()).toBe(`21 phone`); - }); - - it('should display Malicious content', async () => { - expect(await element.all(by.css('h2')).get(6).getText()).toBe(`Malicious content`); - }); -}); diff --git a/aio/content/examples/property-binding/example-config.json b/aio/content/examples/property-binding/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/property-binding/src/app/app.component.css b/aio/content/examples/property-binding/src/app/app.component.css deleted file mode 100644 index 91bae844fdc..00000000000 --- a/aio/content/examples/property-binding/src/app/app.component.css +++ /dev/null @@ -1,9 +0,0 @@ -div { - margin: 1rem auto; - width: 90% -} -.special { - background-color: #1976d2; - color: #fff; - padding: 1rem; -} diff --git a/aio/content/examples/property-binding/src/app/app.component.html b/aio/content/examples/property-binding/src/app/app.component.html deleted file mode 100644 index d2eb6244b5b..00000000000 --- a/aio/content/examples/property-binding/src/app/app.component.html +++ /dev/null @@ -1,64 +0,0 @@ -
    -

    Property Binding with Angular

    -

    Binding the src property of an image:

    - - item - -
    - -

    Binding to the colSpan property

    - - - - -
    Column 1Column 2
    Span 2 columns
    - - -
    -

    Button disabled state bound to isUnchanged property:

    - - - - -
    - -

    Binding to a property of a directive

    - -

    [ngClass] binding to the classes property making this blue

    - -
    - -

    Model property of a custom component:

    - - - - - - - -

    Pass objects:

    - - - - -
    - -

    Property binding and interpolation

    -

    Interpolated item is the interpolated image.

    -

    Property Bound item is the property bound image.

    - -

    "{{interpolationTitle}}" is the interpolated title.

    -

    "" is the property bound title.

    - -
    - -

    Malicious content

    - -

    "{{evilTitle}}" is the interpolated evil title.

    - - -

    "" is the property bound evil title.

    -
    diff --git a/aio/content/examples/property-binding/src/app/app.component.ts b/aio/content/examples/property-binding/src/app/app.component.ts deleted file mode 100644 index 4570a9a38dd..00000000000 --- a/aio/content/examples/property-binding/src/app/app.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component } from '@angular/core'; -import { NgClass } from '@angular/common'; - -import { ItemDetailComponent } from './item-detail.component'; -import { ItemListComponent } from './item-list.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ItemDetailComponent, ItemListComponent, NgClass], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - // #docregion item-image - itemImageUrl = '../assets/phone.svg'; - // #enddocregion item-image - // #docregion boolean - isUnchanged = true; - // #enddocregion boolean - classes = 'special'; - // #docregion parent-data-type - parentItem = 'lamp'; - // #enddocregion parent-data-type - - // #docregion pass-object - currentItems = [{ - id: 21, - name: 'phone' - }]; - // #enddocregion pass-object - - interpolationTitle = 'Interpolation'; - propertyTitle = 'Property binding'; - - evilTitle = 'Template Syntax'; -} diff --git a/aio/content/examples/property-binding/src/app/item-detail.component.ts b/aio/content/examples/property-binding/src/app/item-detail.component.ts deleted file mode 100644 index 0b96f84b4a7..00000000000 --- a/aio/content/examples/property-binding/src/app/item-detail.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Input } from '@angular/core'; -// import { Item } from '../item'; -// import { ITEMS } from '../mock-items'; - -@Component({ - standalone: true, - selector: 'app-item-detail', - template: `

    Your item is: {{ childItem }}

    `, - imports: [], -}) -export class ItemDetailComponent { - // #docregion input-type - @Input() childItem = ''; - // #enddocregion input-type - - // items = ITEMS; - - currentItem = 'bananas in boxes'; -} diff --git a/aio/content/examples/property-binding/src/app/item-list.component.ts b/aio/content/examples/property-binding/src/app/item-list.component.ts deleted file mode 100644 index 6cf671cb97e..00000000000 --- a/aio/content/examples/property-binding/src/app/item-list.component.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { NgFor } from '@angular/common'; -import { ITEMS } from './mock-items'; -import { Item } from './item'; - -@Component({ - standalone: true, - selector: 'app-item-list', - template: ` -

    Nested component's list of items:

    -
      -
    • {{item.id}} {{item.name}}
    • -
    - -

    Pass an object from parent to nested component:

    -
      -
    • {{item.id}} {{item.name}}
    • -
    - `, - imports: [NgFor], -}) -export class ItemListComponent { - listItems = ITEMS; - // #docregion item-input - @Input() items: Item[] = []; - // #enddocregion item-input - -} diff --git a/aio/content/examples/property-binding/src/app/item.ts b/aio/content/examples/property-binding/src/app/item.ts deleted file mode 100644 index 442f22b9002..00000000000 --- a/aio/content/examples/property-binding/src/app/item.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion item-class -export interface Item { - id: number; - name: string; -} -// #enddocregion item-class - diff --git a/aio/content/examples/property-binding/src/app/mock-items.ts b/aio/content/examples/property-binding/src/app/mock-items.ts deleted file mode 100644 index 43cd74c5c9c..00000000000 --- a/aio/content/examples/property-binding/src/app/mock-items.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Item } from './item'; - -export const ITEMS: Item[] = [ - { id: 11, name: 'bottle' }, - { id: 12, name: 'boombox' }, - { id: 13, name: 'chair' }, - { id: 14, name: 'fishbowl' }, - { id: 15, name: 'lamp' }, - { id: 16, name: 'tv' }, - { id: 17, name: 'mug' }, - { id: 18, name: 'paintbrush' }, - { id: 19, name: 'plant' }, - { id: 20, name: 'teapot' } -]; diff --git a/aio/content/examples/property-binding/src/assets/phone.svg b/aio/content/examples/property-binding/src/assets/phone.svg deleted file mode 100644 index 5f4fb44ad9a..00000000000 --- a/aio/content/examples/property-binding/src/assets/phone.svg +++ /dev/null @@ -1,521 +0,0 @@ - - - diff --git a/aio/content/examples/property-binding/src/index.html b/aio/content/examples/property-binding/src/index.html deleted file mode 100644 index 1e94efa11b9..00000000000 --- a/aio/content/examples/property-binding/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - PropertyBinding - - - - - - - - diff --git a/aio/content/examples/property-binding/src/main.ts b/aio/content/examples/property-binding/src/main.ts deleted file mode 100644 index 5a2dcb1b362..00000000000 --- a/aio/content/examples/property-binding/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/property-binding/stackblitz.json b/aio/content/examples/property-binding/stackblitz.json deleted file mode 100644 index 89869613e48..00000000000 --- a/aio/content/examples/property-binding/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Property Binding", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0,1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["property binding"] -} diff --git a/aio/content/examples/providers-viewproviders/BUILD.bazel b/aio/content/examples/providers-viewproviders/BUILD.bazel deleted file mode 100644 index 346dd8605aa..00000000000 --- a/aio/content/examples/providers-viewproviders/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "providers-viewproviders", -) diff --git a/aio/content/examples/providers-viewproviders/e2e/src/app.e2e-spec.ts b/aio/content/examples/providers-viewproviders/e2e/src/app.e2e-spec.ts deleted file mode 100644 index a351968b704..00000000000 --- a/aio/content/examples/providers-viewproviders/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Providers and ViewProviders', () => { - - beforeEach(() => browser.get('')); - - it('shows basic flower emoji', async () => { - expect(await element.all(by.css('p')).get(0).getText()).toContain('🌺'); - }); - - it('shows whale emoji', async () => { - expect(await element.all(by.css('p')).get(1).getText()).toContain('🐳'); - }); - - it('shows sunflower from FlowerService', async () => { - expect(await element.all(by.css('p')).get(8).getText()).toContain('🌻'); - }); - -}); diff --git a/aio/content/examples/providers-viewproviders/example-config.json b/aio/content/examples/providers-viewproviders/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/providers-viewproviders/src/app/animal.service.ts b/aio/content/examples/providers-viewproviders/src/app/animal.service.ts deleted file mode 100755 index e7f6a98b08e..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/animal.service.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion animal-service -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class AnimalService { - emoji = '🐳'; -} -// #enddocregion animal-service diff --git a/aio/content/examples/providers-viewproviders/src/app/app.component.1.ts b/aio/content/examples/providers-viewproviders/src/app/app.component.1.ts deleted file mode 100755 index 2d626b11a38..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/app.component.1.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Component } from '@angular/core'; -import { FlowerService } from './flower.service'; -import { AnimalService } from './animal.service'; - - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: [ './app.component.css' ] -}) -// #docregion injection -export class AppComponent { - constructor(public flower: FlowerService) {} -} -// #enddocregion injection diff --git a/aio/content/examples/providers-viewproviders/src/app/app.component.css b/aio/content/examples/providers-viewproviders/src/app/app.component.css deleted file mode 100755 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/providers-viewproviders/src/app/app.component.html b/aio/content/examples/providers-viewproviders/src/app/app.component.html deleted file mode 100755 index 1e958b5336c..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/app.component.html +++ /dev/null @@ -1,15 +0,0 @@ - -

    From AppComponent:

    - -

    Emoji from FlowerService: {{flower.emoji}}

    - - -

    Emoji from AnimalService: {{animal.emoji}}

    - - -
    - -

    From ChildComponent:

    - - - diff --git a/aio/content/examples/providers-viewproviders/src/app/app.component.ts b/aio/content/examples/providers-viewproviders/src/app/app.component.ts deleted file mode 100755 index 45eb16e60bf..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/app.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { Component } from '@angular/core'; -import { FlowerService } from './flower.service'; -import { AnimalService } from './animal.service'; -import { ChildComponent } from './child/child.component'; -import { InspectorComponent } from './inspector/inspector.component'; - - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: [ './app.component.css' ], - imports: [ChildComponent, InspectorComponent] -}) -// #docregion inject-animal-service -export class AppComponent { - constructor(public flower: FlowerService, public animal: AnimalService) {} -} -// #enddocregion inject-animal-service - -// When using @Host() together with @SkipSelf() in -// child.component.ts for the AnimalService, add the -// following viewProviders array to the @Component metadata: - -// viewProviders: [{ provide: AnimalService, useValue: { emoji: '🦔' } }] - -// So, the entire ChildComponent @Component() decorator and its -// metadata should be as follows: - -// @Component({ -// selector: 'app-root', -// templateUrl: './app.component.html', -// styleUrls: [ './app.component.css' ], -// viewProviders: [{ provide: AnimalService, useValue: { emoji: '🦔' } }] -// }) diff --git a/aio/content/examples/providers-viewproviders/src/app/app.config.ts b/aio/content/examples/providers-viewproviders/src/app/app.config.ts deleted file mode 100644 index 9478602f4ad..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/app.config.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -const appConfig: ApplicationConfig = { - providers: [ - // required for e2e testing on aio - provideProtractorTestingSupport() - ] -}; - -export default appConfig; diff --git a/aio/content/examples/providers-viewproviders/src/app/child/child.component.1.ts b/aio/content/examples/providers-viewproviders/src/app/child/child.component.1.ts deleted file mode 100755 index d097d596a0e..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/child/child.component.1.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component, OnInit, Host, SkipSelf, Optional } from '@angular/core'; -import { FlowerService } from '../flower.service'; - -// #docregion flowerservice -@Component({ - standalone: true, - selector: 'app-child', - templateUrl: './child.component.html', - styleUrls: ['./child.component.css'], - // use the providers array to provide a service - providers: [{ provide: FlowerService, useValue: { emoji: '🌻' } }] -}) - -export class ChildComponent { - // inject the service - constructor( public flower: FlowerService) { } -} - -// #enddocregion flowerservice - diff --git a/aio/content/examples/providers-viewproviders/src/app/child/child.component.css b/aio/content/examples/providers-viewproviders/src/app/child/child.component.css deleted file mode 100755 index 13fdf763f4e..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/child/child.component.css +++ /dev/null @@ -1,4 +0,0 @@ -.container { - border: 1px solid darkblue; - padding: 1rem; -} \ No newline at end of file diff --git a/aio/content/examples/providers-viewproviders/src/app/child/child.component.html b/aio/content/examples/providers-viewproviders/src/app/child/child.component.html deleted file mode 100755 index 9bc45624f5b..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/child/child.component.html +++ /dev/null @@ -1,24 +0,0 @@ - - - -

    Emoji from FlowerService: {{flower.emoji}}

    - - -

    Emoji from AnimalService: {{animal.emoji}}

    - - -
    -

    Content projection

    - -

    The following is coming from content. It doesn't get to see the puppy because the puppy is declared inside the view only.

    - - -
    - -

    Inside the view

    - -

    The following is inside the view so it does see the puppy.

    - - - - diff --git a/aio/content/examples/providers-viewproviders/src/app/child/child.component.ts b/aio/content/examples/providers-viewproviders/src/app/child/child.component.ts deleted file mode 100755 index bcbed382fe9..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/child/child.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docplaster -import { Component, OnInit, Host, SkipSelf, Optional } from '@angular/core'; -import { FlowerService } from '../flower.service'; -import { AnimalService } from '../animal.service'; -import { InspectorComponent } from '../inspector/inspector.component'; - -// #docregion provide-animal-service -@Component({ - standalone: true, - selector: 'app-child', - templateUrl: './child.component.html', - styleUrls: ['./child.component.css'], - // provide services - providers: [{ provide: FlowerService, useValue: { emoji: '🌻' } }], - viewProviders: [{ provide: AnimalService, useValue: { emoji: '🐶' } }], - imports: [InspectorComponent] -}) - -export class ChildComponent { - // inject service - constructor( public flower: FlowerService, public animal: AnimalService) { } -// #enddocregion provide-animal-service - - // viewProviders ensures that only the view gets to see this. - // With the AnimalService in the viewProviders, the - // InspectorComponent doesn't get to see it because the - // inspector is in the content. - - - // constructor( public flower: FlowerService, @Optional() @Host() public animal?: AnimalService) { } - -// Comment out the above constructor and alternately -// uncomment the two following constructors to see the -// effects of @Host() and @Host() + @SkipSelf(). - -// constructor( -// @Host() public animal : AnimalService, -// @Host() @Optional() public flower ?: FlowerService) { } - -// constructor( -// @SkipSelf() @Host() public animal : AnimalService, -// @SkipSelf() @Host() @Optional() public flower ?: FlowerService) { } - -// #docregion provide-animal-service -} -// #enddocregion provide-animal-service - diff --git a/aio/content/examples/providers-viewproviders/src/app/flower.service.ts b/aio/content/examples/providers-viewproviders/src/app/flower.service.ts deleted file mode 100755 index 00221005a38..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/flower.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Injectable } from '@angular/core'; - -// #docregion flowerservice -@Injectable({ - providedIn: 'root' -}) -export class FlowerService { - emoji = '🌺'; -} -// #enddocregion flowerservice - diff --git a/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.css b/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.css deleted file mode 100755 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.html b/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.html deleted file mode 100755 index fe32d7578ef..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.html +++ /dev/null @@ -1,4 +0,0 @@ - -

    Emoji from FlowerService: {{flower.emoji}}

    -

    Emoji from AnimalService: {{animal.emoji}}

    - diff --git a/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.ts b/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.ts deleted file mode 100755 index b72f14290e8..00000000000 --- a/aio/content/examples/providers-viewproviders/src/app/inspector/inspector.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component } from '@angular/core'; -import { FlowerService } from '../flower.service'; -import { AnimalService } from '../animal.service'; - -@Component({ - standalone: true, - selector: 'app-inspector', - templateUrl: './inspector.component.html', - styleUrls: ['./inspector.component.css'] -}) -// #docregion injection -export class InspectorComponent { - constructor(public flower: FlowerService, public animal: AnimalService) { } -} -// #enddocregion injection diff --git a/aio/content/examples/providers-viewproviders/src/index.html b/aio/content/examples/providers-viewproviders/src/index.html deleted file mode 100644 index f236ae2204b..00000000000 --- a/aio/content/examples/providers-viewproviders/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - providers vs. viewProviders - - - - - - - - diff --git a/aio/content/examples/providers-viewproviders/src/main.ts b/aio/content/examples/providers-viewproviders/src/main.ts deleted file mode 100755 index a964b873df0..00000000000 --- a/aio/content/examples/providers-viewproviders/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfig from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/providers-viewproviders/stackblitz.json b/aio/content/examples/providers-viewproviders/stackblitz.json deleted file mode 100644 index f52293403f6..00000000000 --- a/aio/content/examples/providers-viewproviders/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Inputs and Outputs", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Inputs and Outputs"] -} diff --git a/aio/content/examples/providers/BUILD.bazel b/aio/content/examples/providers/BUILD.bazel deleted file mode 100644 index 49404e4c83b..00000000000 --- a/aio/content/examples/providers/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "providers", -) diff --git a/aio/content/examples/providers/e2e/src/app.e2e-spec.ts b/aio/content/examples/providers/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1281bd97959..00000000000 --- a/aio/content/examples/providers/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { element, by } from 'protractor'; -import { AppPage } from './app.po'; - -describe('providers App', () => { - let page: AppPage; - - beforeEach(async () => { - page = new AppPage(); - await page.navigateTo(); - }); - - it('should display header that says Users list', async () => { - expect(await page.getTitleText()).toEqual('Users list'); - }); - - it('shows a list of customers', async () => { - const items = element.all(by.css('app-root li')); - expect(await items.count()).toBe(10); - expect(await items.get(0).getText()).toBe('1 Maria'); - expect(await items.get(9).getText()).toBe('10 Seth'); - }); - -}); diff --git a/aio/content/examples/providers/example-config.json b/aio/content/examples/providers/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/providers/src/app/app.component.css b/aio/content/examples/providers/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/providers/src/app/app.component.html b/aio/content/examples/providers/src/app/app.component.html deleted file mode 100644 index 7763b93ba8f..00000000000 --- a/aio/content/examples/providers/src/app/app.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    - {{title}} -

    - -
  • -{{user.id}} {{user.name}} -
  • diff --git a/aio/content/examples/providers/src/app/app.component.ts b/aio/content/examples/providers/src/app/app.component.ts deleted file mode 100644 index 8e3f2a934a3..00000000000 --- a/aio/content/examples/providers/src/app/app.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { User, UserService } from './user.service'; - -// #docregion component-providers -@Component({ - // #enddocregion component-providers - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - // #docregion component-providers - providers: [UserService] -}) -// #enddocregion component-providers -export class AppComponent implements OnInit { - title = 'Users list'; - users: User[] = []; - - constructor(private userService: UserService) { } - - ngOnInit(): void { - this.userService.getUsers().then(users => this.users = users); - } - -} diff --git a/aio/content/examples/providers/src/app/app.module.ts b/aio/content/examples/providers/src/app/app.module.ts deleted file mode 100644 index 7152c203c8b..00000000000 --- a/aio/content/examples/providers/src/app/app.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { AppComponent } from './app.component'; -import { UserService } from './user.service'; - -@NgModule({ - imports: [ BrowserModule ], - declarations: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/providers/src/app/user.module.ts b/aio/content/examples/providers/src/app/user.module.ts deleted file mode 100644 index 0b3b67514b6..00000000000 --- a/aio/content/examples/providers/src/app/user.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { UserService } from './user.service'; - -@NgModule({ - providers: [UserService], -}) -export class UserModule { -} diff --git a/aio/content/examples/providers/src/app/user.service.0.ts b/aio/content/examples/providers/src/app/user.service.0.ts deleted file mode 100644 index 8988a99309c..00000000000 --- a/aio/content/examples/providers/src/app/user.service.0.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class UserService { -} diff --git a/aio/content/examples/providers/src/app/user.service.2.ts b/aio/content/examples/providers/src/app/user.service.2.ts deleted file mode 100644 index de97ce6a45e..00000000000 --- a/aio/content/examples/providers/src/app/user.service.2.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'any', -}) -export class UserService { -} diff --git a/aio/content/examples/providers/src/app/user.service.ts b/aio/content/examples/providers/src/app/user.service.ts deleted file mode 100644 index 75cdfeee699..00000000000 --- a/aio/content/examples/providers/src/app/user.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Injectable } from '@angular/core'; - -export interface User { - id: number; - name: string; -} - -@Injectable({ - providedIn: 'root', -}) -export class UserService { - getUsers(): Promise { - return Promise.resolve([ - { id: 1, name: 'Maria' }, - { id: 2, name: 'Alex' }, - { id: 3, name: 'Chuntao' }, - { id: 4, name: 'Béatrice' }, - { id: 5, name: 'Sarah' }, - { id: 6, name: 'Andrés' }, - { id: 7, name: 'Abdul' }, - { id: 8, name: 'Pierre' }, - { id: 9, name: 'Jiao' }, - { id: 10, name: 'Seth' } - ]); - } -} diff --git a/aio/content/examples/providers/src/index.html b/aio/content/examples/providers/src/index.html deleted file mode 100644 index f04a0fc4d0d..00000000000 --- a/aio/content/examples/providers/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Providers - - - - - - Loading... - - diff --git a/aio/content/examples/providers/src/main.ts b/aio/content/examples/providers/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/providers/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/providers/stackblitz.json b/aio/content/examples/providers/stackblitz.json deleted file mode 100644 index 9f21337a056..00000000000 --- a/aio/content/examples/providers/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Providers", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0,1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["providers"] -} diff --git a/aio/content/examples/reactive-forms/BUILD.bazel b/aio/content/examples/reactive-forms/BUILD.bazel deleted file mode 100644 index a971619ceaa..00000000000 --- a/aio/content/examples/reactive-forms/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "reactive-forms", -) diff --git a/aio/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts b/aio/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts deleted file mode 100644 index f4944a7115a..00000000000 --- a/aio/content/examples/reactive-forms/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,139 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Reactive forms', () => { - const nameEditor = element(by.css('app-name-editor')); - const profileEditor = element(by.css('app-profile-editor')); - const nameEditorButton = element(by.cssContainingText('app-root > nav > button', 'Name Editor')); - const profileEditorButton = element(by.cssContainingText('app-root > nav > button', 'Profile Editor')); - - beforeAll(() => browser.get('')); - - describe('Name Editor', () => { - const nameInput = nameEditor.element(by.css('input')); - const updateButton = nameEditor.element(by.buttonText('Update Name')); - const nameText = 'John Smith'; - - beforeAll(async () => { - await nameEditorButton.click(); - }); - - beforeEach(async () => { - await nameInput.clear(); - }); - - it('should update the name value when the name control is updated', async () => { - await nameInput.sendKeys(nameText); - - const value = await nameInput.getAttribute('value'); - - expect(value).toBe(nameText); - }); - - it('should update the name control when the Update Name button is clicked', async () => { - await nameInput.sendKeys(nameText); - const value1 = await nameInput.getAttribute('value'); - - expect(value1).toBe(nameText); - await updateButton.click(); - - const value2 = await nameInput.getAttribute('value'); - - expect(value2).toBe('Nancy'); - }); - - it('should update the displayed control value when the name control updated', async () => { - await nameInput.sendKeys(nameText); - const valueElement = nameEditor.element(by.cssContainingText('p', 'Value:')); - const nameValueElement = await valueElement.getText(); - const nameValue = nameValueElement.toString().replace('Value: ', ''); - - expect(nameValue).toBe(nameText); - }); - }); - - describe('Profile Editor', () => { - const firstNameInput = getInput('firstName'); - const streetInput = getInput('street'); - const addAliasButton = element(by.buttonText('+ Add another alias')); - const updateButton = profileEditor.element(by.buttonText('Update Profile')); - const profile: Record = { - firstName: 'John', - lastName: 'Smith', - street: '345 South Lane', - city: 'Northtown', - state: 'XX', - zip: 12345 - }; - - beforeAll(async () => { - await profileEditorButton.click(); - }); - - beforeEach(async () => { - await browser.get(''); - await profileEditorButton.click(); - }); - - it('should be invalid by default', async () => { - expect(await profileEditor.getText()).toContain('Form Status: INVALID'); - }); - - it('should be valid if the First Name is filled in', async () => { - await firstNameInput.clear(); - await firstNameInput.sendKeys('John Smith'); - - expect(await profileEditor.getText()).toContain('Form Status: VALID'); - }); - - it('should update the name when the button is clicked', async () => { - await firstNameInput.clear(); - await streetInput.clear(); - await firstNameInput.sendKeys('John'); - await streetInput.sendKeys('345 Smith Lane'); - const firstNameInitial = await firstNameInput.getAttribute('value'); - const streetNameInitial = await streetInput.getAttribute('value'); - - expect(firstNameInitial).toBe('John'); - expect(streetNameInitial).toBe('345 Smith Lane'); - await updateButton.click(); - - const nameValue = await firstNameInput.getAttribute('value'); - const streetValue = await streetInput.getAttribute('value'); - - expect(nameValue).toBe('Nancy'); - expect(streetValue).toBe('123 Drew Street'); - }); - - it('should add an alias field when the Add Alias button is clicked', async () => { - await addAliasButton.click(); - - const aliasInputs = profileEditor.all(by.cssContainingText('label', 'Alias')); - - expect(await aliasInputs.count()).toBe(2); - }); - - it('should update the displayed form value when form inputs are updated', async () => { - const aliasText = 'Johnny'; - await Promise.all( - Object.keys(profile) - .map(key => - getInput(key).sendKeys(`${profile[key]}`) - ) - ); - - const aliasInput = profileEditor.all(by.css('#alias-0')); - await aliasInput.sendKeys(aliasText); - const formValueElement = profileEditor.all(by.cssContainingText('p', 'Form Value:')); - const formValue = await formValueElement.getText(); - const formJson = JSON.parse(formValue.toString().replace('Form Value:', '')); - - expect(profile['firstName']).toBe(formJson.firstName); - expect(profile['lastName']).toBe(formJson.lastName); - expect(formJson.aliases[0]).toBe(aliasText); - }); - }); - - function getInput(key: string) { - return element(by.css(`input[formcontrolname=${key}`)); - } -}); diff --git a/aio/content/examples/reactive-forms/example-config.json b/aio/content/examples/reactive-forms/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/reactive-forms/src/app/app.component.1.html b/aio/content/examples/reactive-forms/src/app/app.component.1.html deleted file mode 100644 index 9af7c624c1c..00000000000 --- a/aio/content/examples/reactive-forms/src/app/app.component.1.html +++ /dev/null @@ -1,10 +0,0 @@ - -

    Reactive Forms

    - - - - - - - - diff --git a/aio/content/examples/reactive-forms/src/app/app.component.css b/aio/content/examples/reactive-forms/src/app/app.component.css deleted file mode 100644 index 9336f8f4200..00000000000 --- a/aio/content/examples/reactive-forms/src/app/app.component.css +++ /dev/null @@ -1,4 +0,0 @@ -nav button { - padding: 1rem; - font-size: inherit; -} diff --git a/aio/content/examples/reactive-forms/src/app/app.component.html b/aio/content/examples/reactive-forms/src/app/app.component.html deleted file mode 100644 index 1d9354a72a0..00000000000 --- a/aio/content/examples/reactive-forms/src/app/app.component.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Reactive Forms

    - - - - - - diff --git a/aio/content/examples/reactive-forms/src/app/app.component.ts b/aio/content/examples/reactive-forms/src/app/app.component.ts deleted file mode 100644 index 0d24786d38e..00000000000 --- a/aio/content/examples/reactive-forms/src/app/app.component.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { NgIf } from '@angular/common'; -import { Component } from '@angular/core'; -import { ReactiveFormsModule } from '@angular/forms'; -import { NameEditorComponent } from './name-editor/name-editor.component'; -import { ProfileEditorComponent } from './profile-editor/profile-editor.component'; - -export type EditorType = 'name' | 'profile'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    Reactive Forms

    - - - - - - - `, - styles: [ - ` - nav button { - padding: 1rem; - font-size: inherit; - } - `, - ], - imports: [ - NameEditorComponent, - ProfileEditorComponent, - NgIf, - ReactiveFormsModule, - ], -}) -export class AppComponent { - editor: EditorType = 'name'; - - get showNameEditor() { - return this.editor === 'name'; - } - - get showProfileEditor() { - return this.editor === 'profile'; - } - - toggleEditor(type: EditorType) { - this.editor = type; - } -} diff --git a/aio/content/examples/reactive-forms/src/app/app.config.ts b/aio/content/examples/reactive-forms/src/app/app.config.ts deleted file mode 100644 index 1549f83e2d3..00000000000 --- a/aio/content/examples/reactive-forms/src/app/app.config.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; - -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -export const appConfig: ApplicationConfig = { - providers: [provideProtractorTestingSupport()], -}; diff --git a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.css b/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.css deleted file mode 100644 index 49ae7164a22..00000000000 --- a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.css +++ /dev/null @@ -1,10 +0,0 @@ -label { - font-weight: bold; - padding-bottom: .5rem; - padding-top: 1rem; - display: inline-block; -} - -button { - max-width: 300px; -} diff --git a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.html b/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.html deleted file mode 100644 index 0bf3482d4dc..00000000000 --- a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - -

    Value: {{ name.value }}

    - - - - - diff --git a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.ts b/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.ts deleted file mode 100644 index 7687e5ae909..00000000000 --- a/aio/content/examples/reactive-forms/src/app/name-editor/name-editor.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docplaster -// #docregion create-control -import { Component } from '@angular/core'; -import { FormControl, ReactiveFormsModule } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-name-editor', - templateUrl: './name-editor.component.html', - styleUrls: ['./name-editor.component.css'], - imports: [ReactiveFormsModule], -}) -export class NameEditorComponent { - name = new FormControl(''); - // #enddocregion create-control - - // #docregion update-value - updateName() { - this.name.setValue('Nancy'); - } - // #enddocregion update-value - // #docregion create-control -} -// #enddocregion create-control diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.html b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.html deleted file mode 100644 index 043349e03c3..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.html +++ /dev/null @@ -1,48 +0,0 @@ - - -
    - - - - - - - - - -
    -

    Address

    - - - - - - - - - - - - -
    - - -
    -

    Aliases

    - - -
    - - - -
    -
    - -
    - - -

    Form Value: {{ profileForm.value | json }}

    - - - - diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.ts b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.ts deleted file mode 100644 index 7f73fca058d..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.1.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion formgroup, nested-formgroup -import { Component } from '@angular/core'; -// #docregion imports -import { FormGroup, FormControl } from '@angular/forms'; -// #enddocregion imports - -@Component({ - standalone: true, - selector: 'app-profile-editor', - templateUrl: './profile-editor.component.html', - styleUrls: ['./profile-editor.component.css'], -}) -export class ProfileEditorComponent { - // #docregion formgroup-compare - profileForm = new FormGroup({ - firstName: new FormControl(''), - lastName: new FormControl(''), - // #enddocregion formgroup - address: new FormGroup({ - street: new FormControl(''), - city: new FormControl(''), - state: new FormControl(''), - zip: new FormControl(''), - }), - // #docregion formgroup - }); - // #enddocregion formgroup, nested-formgroup, formgroup-compare - // #docregion patch-value - updateProfile() { - this.profileForm.patchValue({ - firstName: 'Nancy', - address: { - street: '123 Drew Street', - }, - }); - } - // #enddocregion patch-value - // #docregion formgroup, nested-formgroup -} -// #enddocregion formgroup diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.2.ts b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.2.ts deleted file mode 100644 index e04b789dfe5..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.2.ts +++ /dev/null @@ -1,57 +0,0 @@ -// #docplaster -// #docregion form-builder -import { Component } from '@angular/core'; -// #docregion form-builder-imports -import { FormBuilder } from '@angular/forms'; -// #enddocregion form-builder-imports, form-builder -// #docregion form-array-imports -import { FormArray } from '@angular/forms'; -// #docregion form-builder-imports, form-builder -// #enddocregion form-builder-imports, form-array-imports - -@Component({ - standalone: true, - selector: 'app-profile-editor', - templateUrl: './profile-editor.component.html', - styleUrls: ['./profile-editor.component.css'], -}) -export class ProfileEditorComponent { - // #docregion formgroup-compare - profileForm = this.formBuilder.group({ - firstName: [''], - lastName: [''], - address: this.formBuilder.group({ - street: [''], - city: [''], - state: [''], - zip: [''], - }), - // #enddocregion form-builder, formgroup-compare - aliases: this.formBuilder.array([this.formBuilder.control('')]), - // #docregion form-builder, formgroup-compare - }); - // #enddocregion form-builder, formgroup-compare - get aliases() { - return this.profileForm.get('aliases') as FormArray; - } - - // #docregion inject-form-builder, form-builder - - constructor(private formBuilder: FormBuilder) {} - // #enddocregion inject-form-builder, form-builder - - updateProfile() { - this.profileForm.patchValue({ - firstName: 'Nancy', - address: { - street: '123 Drew Street', - }, - }); - } - - addAlias() { - this.aliases.push(this.formBuilder.control('')); - } - // #docregion form-builder -} -// #enddocregion form-builder diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.css b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.css deleted file mode 100644 index 95f895dd1e6..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.css +++ /dev/null @@ -1,11 +0,0 @@ -/* ProfileEditorComponent's private CSS styles */ - -form { - padding-top: 1rem; -} - -label { - display: block; - margin: .5em 0; - font-weight: bold; -} diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.html b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.html deleted file mode 100644 index 079bfb10d4f..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.html +++ /dev/null @@ -1,55 +0,0 @@ - - -
    - - - - - - - -
    -

    Address

    - - - - - - - - - - - - -
    - - -
    -

    Aliases

    - - -
    - - - -
    -
    - - - - -

    Complete the form to enable button.

    - - -
    - -
    - -

    Form Value: {{ profileForm.value | json }}

    - - -

    Form Status: {{ profileForm.status }}

    - - - diff --git a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.ts b/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.ts deleted file mode 100644 index 4f50a33c034..00000000000 --- a/aio/content/examples/reactive-forms/src/app/profile-editor/profile-editor.component.ts +++ /dev/null @@ -1,63 +0,0 @@ -// #docplaster -import { JsonPipe, NgFor } from '@angular/common'; -import { Component } from '@angular/core'; -import { FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms'; -// #docregion validator-imports -import { Validators } from '@angular/forms'; -// #enddocregion validator-imports -import { FormArray } from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-profile-editor', - templateUrl: './profile-editor.component.html', - styleUrls: ['./profile-editor.component.css'], - imports: [NgFor, ReactiveFormsModule, JsonPipe], -}) -export class ProfileEditorComponent { - // #docregion required-validator, aliases - profileForm = this.formBuilder.group({ - firstName: ['', Validators.required], - lastName: [''], - address: this.formBuilder.group({ - street: [''], - city: [''], - state: [''], - zip: [''], - }), - // #enddocregion required-validator - aliases: this.formBuilder.array([this.formBuilder.control('')]), - // #docregion required-validator - }); - // #enddocregion required-validator, aliases - // #docregion aliases-getter - - get aliases() { - return this.profileForm.get('aliases') as FormArray; - } - - // #enddocregion aliases-getter - constructor(private formBuilder: FormBuilder) {} - - updateProfile() { - this.profileForm.patchValue({ - firstName: 'Nancy', - address: { - street: '123 Drew Street', - }, - }); - } - // #docregion add-alias - - addAlias() { - this.aliases.push(this.formBuilder.control('')); - } - // #enddocregion add-alias - // #docregion on-submit - - onSubmit() { - // TODO: Use EventEmitter with form value - console.warn(this.profileForm.value); - } - // #enddocregion on-submit -} diff --git a/aio/content/examples/reactive-forms/src/index.html b/aio/content/examples/reactive-forms/src/index.html deleted file mode 100644 index 4a6b8fdac08..00000000000 --- a/aio/content/examples/reactive-forms/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Angular Reactive Forms - - - - - - - - - diff --git a/aio/content/examples/reactive-forms/src/main.ts b/aio/content/examples/reactive-forms/src/main.ts deleted file mode 100644 index 41893baf92f..00000000000 --- a/aio/content/examples/reactive-forms/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/reactive-forms/stackblitz.json b/aio/content/examples/reactive-forms/stackblitz.json deleted file mode 100644 index 70d789bad32..00000000000 --- a/aio/content/examples/reactive-forms/stackblitz.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "description": "Angular Reactive Forms (Demo runner)", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*", - - "!src/app/app.component.1.ts", - "!src/app/hero-list.component.1.html", - - "!src/app/main-final.ts", - "!src/index-final.html" - ], - "file": "src/app/app.component.ts", - "tags": ["reactive", "forms"] -} diff --git a/aio/content/examples/resolution-modifiers/BUILD.bazel b/aio/content/examples/resolution-modifiers/BUILD.bazel deleted file mode 100644 index 34b20f2c090..00000000000 --- a/aio/content/examples/resolution-modifiers/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "resolution-modifiers", -) diff --git a/aio/content/examples/resolution-modifiers/e2e/src/app.e2e-spec.ts b/aio/content/examples/resolution-modifiers/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 687b2e38b0d..00000000000 --- a/aio/content/examples/resolution-modifiers/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Resolution-modifiers-example', () => { - - beforeAll(() => browser.get('')); - - it('shows basic flower emoji', async () => { - expect(await element.all(by.css('p')).get(0).getText()).toContain('🌸'); - }); - - it('shows basic leaf emoji', async () => { - expect(await element.all(by.css('p')).get(1).getText()).toContain('🌿'); - }); - - it('shows tulip in host child', async () => { - expect(await element.all(by.css('p')).get(9).getText()).toContain('🌷'); - }); - -}); diff --git a/aio/content/examples/resolution-modifiers/example-config.json b/aio/content/examples/resolution-modifiers/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/resolution-modifiers/src/app/app.component.css b/aio/content/examples/resolution-modifiers/src/app/app.component.css deleted file mode 100755 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/resolution-modifiers/src/app/app.component.html b/aio/content/examples/resolution-modifiers/src/app/app.component.html deleted file mode 100755 index dc130393b25..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/app.component.html +++ /dev/null @@ -1,14 +0,0 @@ -

    DI resolution modifiers

    - -

    Basic flower service: {{flower.emoji}}

    -

    Basic leaf service: {{leaf.emoji}}

    - - - - - - - - - - diff --git a/aio/content/examples/resolution-modifiers/src/app/app.component.ts b/aio/content/examples/resolution-modifiers/src/app/app.component.ts deleted file mode 100755 index 3159ab63f44..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/app.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Component } from '@angular/core'; -import { LeafService } from './leaf.service'; -import { FlowerService } from './flower.service'; -import { HostComponent } from './host/host.component'; -import { OptionalComponent } from './optional/optional.component'; -import { SelfComponent } from './self/self.component'; -import { HostParentComponent } from './host-parent/host-parent.component'; -import { HostChildComponent } from './host-child/host-child.component'; -import { SelfNoDataComponent } from './self-no-data/self-no-data.component'; -import { SkipselfComponent } from './skipself/skipself.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: [ './app.component.css' ], - imports: [ - HostComponent, - HostChildComponent, - HostParentComponent, - OptionalComponent, - SelfComponent, - SelfNoDataComponent, - SkipselfComponent - ] -}) -export class AppComponent { - name = 'Angular'; - constructor(public flower: FlowerService, public leaf: LeafService) {} -} diff --git a/aio/content/examples/resolution-modifiers/src/app/app.config.ts b/aio/content/examples/resolution-modifiers/src/app/app.config.ts deleted file mode 100644 index 23310c217df..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/app.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ApplicationConfig } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; - -const appConfig: ApplicationConfig = { - providers: [ - provideProtractorTestingSupport() //only needed for docs e2e testing - ] -}; - -export default appConfig; diff --git a/aio/content/examples/resolution-modifiers/src/app/flower.service.ts b/aio/content/examples/resolution-modifiers/src/app/flower.service.ts deleted file mode 100755 index 6c1eb7ff314..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/flower.service.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' // provide this service in the root ModuleInjector - -}) -export class FlowerService { - emoji = '🌸'; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.css b/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.html b/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.html deleted file mode 100755 index 1170a1cc6a1..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    Child of @Host() Component

    -

    Flower emoji: {{flower.emoji}}

    -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.ts b/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.ts deleted file mode 100755 index 584e77cb861..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-child/host-child.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; -import { FlowerService } from '../flower.service'; - -@Component({ - standalone: true, - selector: 'app-host-child', - templateUrl: './host-child.component.html', - styleUrls: ['./host-child.component.css'] -}) -export class HostChildComponent { - constructor(public flower: FlowerService) { } -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.css b/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.html b/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.html deleted file mode 100755 index 13510b077c2..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
    -

    Parent of @Host() Component

    -

    Flower emoji: {{flower.emoji}}

    - -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.ts b/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.ts deleted file mode 100755 index 57b9887e272..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host-parent/host-parent.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; -import { FlowerService } from '../flower.service'; -import { HostComponent } from '../host/host.component'; - - -@Component({ - standalone: true, - selector: 'app-host-parent', - templateUrl: './host-parent.component.html', - styleUrls: ['./host-parent.component.css'], - providers: [{ provide: FlowerService, useValue: { emoji: '🌺' } }], - imports: [HostComponent] -}) -export class HostParentComponent { - - constructor(public flower: FlowerService) { } - -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host/host.component.css b/aio/content/examples/resolution-modifiers/src/app/host/host.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host/host.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/host/host.component.html b/aio/content/examples/resolution-modifiers/src/app/host/host.component.html deleted file mode 100755 index 2e51694f181..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host/host.component.html +++ /dev/null @@ -1,6 +0,0 @@ -
    -

    @Host() Component

    -

    Flower emoji: {{flower?.emoji}}

    -

    (@Host() stops it here)

    - -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/host/host.component.ts b/aio/content/examples/resolution-modifiers/src/app/host/host.component.ts deleted file mode 100755 index 4ed99c9c906..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/host/host.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component, Host, Optional } from '@angular/core'; -import { FlowerService } from '../flower.service'; -import { HostChildComponent } from '../host-child/host-child.component'; - -// #docregion host-component -@Component({ - standalone: true, - selector: 'app-host', - templateUrl: './host.component.html', - styleUrls: ['./host.component.css'], - // provide the service - providers: [{ provide: FlowerService, useValue: { emoji: '🌷' } }], - imports: [HostChildComponent] -}) -export class HostComponent { - // use @Host() in the constructor when injecting the service - constructor(@Host() @Optional() public flower?: FlowerService) { } - -} -// #enddocregion host-component - -// if you take out @Host() and the providers array, flower will be red hibiscus - - diff --git a/aio/content/examples/resolution-modifiers/src/app/leaf.service.ts b/aio/content/examples/resolution-modifiers/src/app/leaf.service.ts deleted file mode 100755 index 01673173b2b..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/leaf.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -// #docregion leafservice -export class LeafService { - emoji = '🌿'; -} -// #enddocregion leafservice - diff --git a/aio/content/examples/resolution-modifiers/src/app/optional.service.ts b/aio/content/examples/resolution-modifiers/src/app/optional.service.ts deleted file mode 100755 index c536830551d..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/optional.service.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class OptionalService { -} - -// This service isn't provided anywhere. diff --git a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.css b/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.html b/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.html deleted file mode 100755 index 6e6b375db12..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    @Optional() Component

    -

    This component still works even though the OptionalService (notice @Optional() in the constructor isn't provided or configured anywhere. Angular goes through tree and visibility rules, and if it doesn't find the requested service, returns null.

    -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.ts b/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.ts deleted file mode 100755 index d9345f5d9d0..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/optional/optional.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, Optional } from '@angular/core'; -import { OptionalService } from '../optional.service'; - -@Component({ - standalone: true, - selector: 'app-optional', - templateUrl: './optional.component.html', - styleUrls: ['./optional.component.css'] -}) - -// #docregion optional-component -export class OptionalComponent { - constructor(@Optional() public optional?: OptionalService) {} -} -// #enddocregion optional-component - -// The OptionalService isn't provided here, in the @Injectable() -// providers array, or in the NgModule. If you remove @Optional() -// from the constructor, you'll get an error. - - - diff --git a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.css b/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.html b/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.html deleted file mode 100755 index bbf75d0c6c4..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    @Self() Component (without a provider)

    -

    Leaf emoji: {{leaf?.emoji}}

    -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.ts b/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.ts deleted file mode 100755 index 88975e35698..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self-no-data/self-no-data.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Self, Optional } from '@angular/core'; -import { LeafService } from '../leaf.service'; - -// #docregion self-no-data-component -@Component({ - standalone: true, - selector: 'app-self-no-data', - templateUrl: './self-no-data.component.html', - styleUrls: ['./self-no-data.component.css'] -}) -export class SelfNoDataComponent { - constructor(@Self() @Optional() public leaf?: LeafService) { } -} - -// #enddocregion self-no-data-component - -// The app doesn't break because the value being available at self is optional. -// If you remove @Optional(), the app breaks. - diff --git a/aio/content/examples/resolution-modifiers/src/app/self/self.component.css b/aio/content/examples/resolution-modifiers/src/app/self/self.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self/self.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/self/self.component.html b/aio/content/examples/resolution-modifiers/src/app/self/self.component.html deleted file mode 100755 index f93c6352f7f..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self/self.component.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    @Self() Component

    -

    Flower emoji: {{flower?.emoji}}

    -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/self/self.component.ts b/aio/content/examples/resolution-modifiers/src/app/self/self.component.ts deleted file mode 100755 index dd8c63eba24..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/self/self.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, Self } from '@angular/core'; -import { FlowerService } from '../flower.service'; - -// #docregion self-component -@Component({ - standalone: true, - selector: 'app-self', - templateUrl: './self.component.html', - styleUrls: ['./self.component.css'], - providers: [{ provide: FlowerService, useValue: { emoji: '🌷' } }] -}) -export class SelfComponent { - constructor(@Self() public flower: FlowerService) {} -} -// #enddocregion self-component - -// This component provides the FlowerService so the injector -// doesn't have to look further up the injector tree - diff --git a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.css b/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.css deleted file mode 100755 index 78336a39059..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.css +++ /dev/null @@ -1,5 +0,0 @@ -.section { - border: 2px solid #369; - padding: 1rem; - margin: 1rem 0; -} diff --git a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.html b/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.html deleted file mode 100755 index 7417cc4cdf6..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    @SkipSelf() Component

    -

    Leaf emoji: {{leaf.emoji}}

    -
    diff --git a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.ts b/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.ts deleted file mode 100755 index 999d276bb6f..00000000000 --- a/aio/content/examples/resolution-modifiers/src/app/skipself/skipself.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Component, SkipSelf } from '@angular/core'; -import { LeafService } from '../leaf.service'; - -// #docregion skipself-component -@Component({ - standalone: true, - selector: 'app-skipself', - templateUrl: './skipself.component.html', - styleUrls: ['./skipself.component.css'], - // Angular would ignore this LeafService instance - providers: [{ provide: LeafService, useValue: { emoji: '🍁' } }] -}) -export class SkipselfComponent { - // Use @SkipSelf() in the constructor - constructor(@SkipSelf() public leaf: LeafService) { } -} -// #enddocregion skipself-component - -// @SkipSelf(): Specifies that the dependency resolution should start from the parent injector, not here. diff --git a/aio/content/examples/resolution-modifiers/src/index.html b/aio/content/examples/resolution-modifiers/src/index.html deleted file mode 100644 index 4ec849ae7c0..00000000000 --- a/aio/content/examples/resolution-modifiers/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - DI Resolution Modifiers Example - - - - - - Loading... - - diff --git a/aio/content/examples/resolution-modifiers/src/main.ts b/aio/content/examples/resolution-modifiers/src/main.ts deleted file mode 100755 index a964b873df0..00000000000 --- a/aio/content/examples/resolution-modifiers/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import appConfig from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/resolution-modifiers/stackblitz.json b/aio/content/examples/resolution-modifiers/stackblitz.json deleted file mode 100644 index 6bc4252b821..00000000000 --- a/aio/content/examples/resolution-modifiers/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "NgModules", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["NgModules"] -} diff --git a/aio/content/examples/router-tutorial/BUILD.bazel b/aio/content/examples/router-tutorial/BUILD.bazel deleted file mode 100644 index 302f22d4807..00000000000 --- a/aio/content/examples/router-tutorial/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "router-tutorial", -) diff --git a/aio/content/examples/router-tutorial/e2e/src/app.e2e-spec.ts b/aio/content/examples/router-tutorial/e2e/src/app.e2e-spec.ts deleted file mode 100644 index c73d879e8ec..00000000000 --- a/aio/content/examples/router-tutorial/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Router basic tutorial e2e tests', () => { - - beforeEach(() => browser.get('')); - - it('should display Angular Router Sample', async () => { - expect(await element(by.css('h1')).getText()).toBe('Angular Router Sample'); - }); - - it('should display Crisis Center button', async () => { - expect(await element.all(by.css('a')).get(0).getText()).toBe('Crisis Center'); - }); - - it('should display Heroes button', async () => { - expect(await element.all(by.css('a')).get(1).getText()).toBe('Heroes'); - }); - - it('should display HEROES', async () => { - expect(await element(by.css('h3')).getText()).toBe('HEROES'); - }); - - it('should change to display crisis list component', async () => { - const crisisButton = element.all(by.css('a')).get(0); - await crisisButton.click(); - expect(await element(by.css('h3')).getText()).toBe('CRISIS CENTER'); - }); - - it('should change to display heroes component', async () => { - const heroesButton = element.all(by.css('a')).get(1); - await heroesButton.click(); - expect(await element(by.css('h3')).getText()).toBe('HEROES'); - }); - - it('should use wildcard route', async () => { - await browser.get('/fake-page'); - expect(await browser.getCurrentUrl()).toContain('fake-page'); - expect(await element(by.css('h2')).getText()).toBe('Page Not Found'); - }); -}); diff --git a/aio/content/examples/router-tutorial/example-config.json b/aio/content/examples/router-tutorial/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router-tutorial/src/app/app.component.css b/aio/content/examples/router-tutorial/src/app/app.component.css deleted file mode 100644 index d48d0ce9468..00000000000 --- a/aio/content/examples/router-tutorial/src/app/app.component.css +++ /dev/null @@ -1,23 +0,0 @@ -.button { - box-shadow: inset 0 1px 0 0 #ffffff; - background: #ffffff linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%); - border-radius: 6px; - border: 1px solid #dcdcdc; - display: inline-block; - cursor: pointer; - color: #666666; - font-family: Arial, sans-serif; - font-size: 15px; - font-weight: bold; - padding: 6px 24px; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; - outline: 0; -} -.activebutton { - box-shadow: inset 0 1px 0 0 #dcecfb; - background: #bddbfa linear-gradient(to bottom, #bddbfa 5%, #80b5ea 100%); - border: 1px solid #84bbf3; - color: #ffffff; - text-shadow: 0 1px 0 #528ecc; -} diff --git a/aio/content/examples/router-tutorial/src/app/app.component.html b/aio/content/examples/router-tutorial/src/app/app.component.html deleted file mode 100644 index 6cd1864dcd7..00000000000 --- a/aio/content/examples/router-tutorial/src/app/app.component.html +++ /dev/null @@ -1,41 +0,0 @@ - - -

    Angular Router Sample

    - - - - - - - - -
    - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/aio/content/examples/router-tutorial/src/app/app.component.ts b/aio/content/examples/router-tutorial/src/app/app.component.ts deleted file mode 100644 index 9b4935f1e48..00000000000 --- a/aio/content/examples/router-tutorial/src/app/app.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component} from '@angular/core'; -import {RouterLink, RouterLinkActive, RouterOutlet} from '@angular/router'; - -import {CrisisListComponent} from './crisis-list/crisis-list.component'; -import {HeroesListComponent} from './heroes-list/heroes-list.component'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [RouterOutlet, RouterLink, RouterLinkActive, CrisisListComponent, HeroesListComponent], - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'angular-router-sample'; -} diff --git a/aio/content/examples/router-tutorial/src/app/app.config.ts b/aio/content/examples/router-tutorial/src/app/app.config.ts deleted file mode 100644 index 30e834cd354..00000000000 --- a/aio/content/examples/router-tutorial/src/app/app.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {ApplicationConfig} from '@angular/core'; -import {provideProtractorTestingSupport} from '@angular/platform-browser'; -import {provideRouter} from '@angular/router'; - -import {routes} from './app.routes'; - - -export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes), provideProtractorTestingSupport()] -}; diff --git a/aio/content/examples/router-tutorial/src/app/app.routes.ts b/aio/content/examples/router-tutorial/src/app/app.routes.ts deleted file mode 100644 index cc9a18eb14d..00000000000 --- a/aio/content/examples/router-tutorial/src/app/app.routes.ts +++ /dev/null @@ -1,12 +0,0 @@ -import {Routes} from '@angular/router'; - -import {CrisisListComponent} from './crisis-list/crisis-list.component'; -import {HeroesListComponent} from './heroes-list/heroes-list.component'; -import {PageNotFoundComponent} from './page-not-found/page-not-found.component'; - -export const routes: Routes = [ - {path: 'crisis-list', component: CrisisListComponent}, - {path: 'heroes-list', component: HeroesListComponent}, - {path: '', redirectTo: '/heroes-list', pathMatch: 'full'}, - {path: '**', component: PageNotFoundComponent} -]; diff --git a/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.css b/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.html b/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.html deleted file mode 100644 index 76ebcaf88ff..00000000000 --- a/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    CRISIS CENTER

    -

    Get your crisis here

    diff --git a/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.ts b/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.ts deleted file mode 100644 index 72ca57c7b08..00000000000 --- a/aio/content/examples/router-tutorial/src/app/crisis-list/crisis-list.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-crisis-list', - standalone: true, - templateUrl: './crisis-list.component.html', - styleUrls: ['./crisis-list.component.css'] -}) -export class CrisisListComponent { - -} diff --git a/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.css b/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.html b/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.html deleted file mode 100644 index 563d7e44784..00000000000 --- a/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    HEROES

    -

    Get your heroes here

    diff --git a/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.ts b/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.ts deleted file mode 100644 index 73677d8c675..00000000000 --- a/aio/content/examples/router-tutorial/src/app/heroes-list/heroes-list.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-heroes-list', - standalone: true, - templateUrl: './heroes-list.component.html', - styleUrls: ['./heroes-list.component.css'] -}) -export class HeroesListComponent { - -} diff --git a/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.css b/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.html b/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.html deleted file mode 100644 index cd89fb76898..00000000000 --- a/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    Page Not Found

    -

    We couldn't find that page! Not even with x-ray vision.

    diff --git a/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.ts b/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.ts deleted file mode 100644 index 862bc3b7c65..00000000000 --- a/aio/content/examples/router-tutorial/src/app/page-not-found/page-not-found.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - selector: 'app-page-not-found', - standalone: true, - templateUrl: './page-not-found.component.html', - styleUrls: ['./page-not-found.component.css'] -}) -export class PageNotFoundComponent { -} diff --git a/aio/content/examples/router-tutorial/src/index.html b/aio/content/examples/router-tutorial/src/index.html deleted file mode 100644 index edfa60e4c97..00000000000 --- a/aio/content/examples/router-tutorial/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Angular Router Sample - - - - - - - - diff --git a/aio/content/examples/router-tutorial/src/main.ts b/aio/content/examples/router-tutorial/src/main.ts deleted file mode 100644 index 92e4bd8713b..00000000000 --- a/aio/content/examples/router-tutorial/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {bootstrapApplication} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; -import {appConfig} from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/router-tutorial/stackblitz.json b/aio/content/examples/router-tutorial/stackblitz.json deleted file mode 100644 index 7e88374d3fd..00000000000 --- a/aio/content/examples/router-tutorial/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Router", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*" - ], - "tags": ["router-tutorial"] -} diff --git a/aio/content/examples/router/BUILD.bazel b/aio/content/examples/router/BUILD.bazel deleted file mode 100644 index 18083dc5f19..00000000000 --- a/aio/content/examples/router/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "router", -) diff --git a/aio/content/examples/router/e2e/src/app.e2e-spec.ts b/aio/content/examples/router/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 7985d9220d3..00000000000 --- a/aio/content/examples/router/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,191 +0,0 @@ -import { browser, element, by, ExpectedConditions as EC } from 'protractor'; - -const numDashboardTabs = 5; -const numCrises = 4; -const numHeroes = 9; - -describe('Router', () => { - - beforeAll(() => browser.get('')); - - function getPageStruct() { - const hrefEles = element.all(by.css('nav a')); - const crisisDetail = element.all(by.css('app-crisis-center > app-crisis-list > app-crisis-detail > div')).first(); - const heroDetail = element(by.css('app-hero-detail')); - - return { - hrefs: hrefEles, - activeHref: element(by.css('nav a.active')), - - crisisHref: hrefEles.get(0), - crisisList: element.all(by.css('app-crisis-center app-crisis-list li')), - crisisDetail, - crisisDetailTitle: crisisDetail.element(by.xpath('*[1]')), - - heroesHref: hrefEles.get(1), - heroesList: element.all(by.css('app-hero-list li')), - heroDetail, - heroDetailTitle: heroDetail.element(by.xpath('*[2]')), - - adminHref: hrefEles.get(2), - adminPage: element(by.css('app-admin')), - adminPreloadList: element.all(by.css('app-admin > app-admin-dashboard > ul > li')), - - loginHref: hrefEles.get(3), - loginButton: element.all(by.css('app-login > p > button')), - - contactHref: hrefEles.get(4), - contactCancelButton: element.all(by.buttonText('Cancel')), - - primaryOutlet: element.all(by.css('app-hero-list')), - secondaryOutlet: element.all(by.css('app-compose-message')) - }; - } - - it('has expected dashboard tabs', async () => { - const page = getPageStruct(); - expect(await page.hrefs.count()).toEqual(numDashboardTabs, 'dashboard tab count'); - expect(await page.crisisHref.getText()).toEqual('Crisis Center'); - expect(await page.heroesHref.getText()).toEqual('Heroes'); - expect(await page.adminHref.getText()).toEqual('Admin'); - expect(await page.loginHref.getText()).toEqual('Login'); - expect(await page.contactHref.getText()).toEqual('Contact'); - }); - - it('has heroes selected as opening tab', async () => { - const page = getPageStruct(); - expect(await page.activeHref.getText()).toEqual('Heroes'); - }); - - it('has crises center items', async () => { - const page = getPageStruct(); - await page.crisisHref.click(); - expect(await page.activeHref.getText()).toEqual('Crisis Center'); - expect(await page.crisisList.count()).toBe(numCrises, 'crisis list count'); - }); - - it('has hero items', async () => { - const page = getPageStruct(); - await page.heroesHref.click(); - expect(await page.activeHref.getText()).toEqual('Heroes'); - expect(await page.heroesList.count()).toBe(numHeroes, 'hero list count'); - }); - - it('toggles views', async () => { - const page = getPageStruct(); - await page.crisisHref.click(); - expect(await page.activeHref.getText()).toEqual('Crisis Center'); - expect(await page.crisisList.count()).toBe(numCrises, 'crisis list count'); - await page.heroesHref.click(); - expect(await page.activeHref.getText()).toEqual('Heroes'); - expect(await page.heroesList.count()).toBe(numHeroes, 'hero list count'); - }); - - it('saves changed crisis details', async () => { - const page = getPageStruct(); - await page.crisisHref.click(); - await crisisCenterEdit(2, true); - }); - - // TODO: Figure out why this test is failing now - xit('can cancel changed crisis details', async () => { - const page = getPageStruct(); - await page.crisisHref.click(); - await crisisCenterEdit(3, false); - }); - - it('saves changed hero details', async () => { - const page = getPageStruct(); - await page.heroesHref.click(); - await browser.sleep(600); - const heroEle = page.heroesList.get(4); - const text = await heroEle.getText(); - expect(text.length).toBeGreaterThan(0, 'hero item text length'); - // remove leading id from text - const heroText = text.slice(text.indexOf(' ')).trim(); - - await heroEle.click(); - await browser.sleep(600); - expect(await page.heroesList.count()).toBe(0, 'hero list count'); - expect(await page.heroDetail.isPresent()).toBe(true, 'hero detail'); - expect(await page.heroDetailTitle.getText()).toContain(heroText); - const inputEle = page.heroDetail.element(by.css('input')); - await inputEle.sendKeys('-foo'); - expect(await page.heroDetailTitle.getText()).toContain(heroText + '-foo'); - - const buttonEle = page.heroDetail.element(by.css('button')); - await buttonEle.click(); - await browser.sleep(600); - expect(await heroEle.getText()).toContain(heroText + '-foo'); - }); - - it('sees preloaded modules', async () => { - const page = getPageStruct(); - await page.loginHref.click(); - await page.loginButton.click(); - const list = page.adminPreloadList; - expect(await list.count()).toBe(1, 'preloaded module'); - expect(await list.first().getText()).toBe('crisis-center', 'first preloaded module'); - }); - - it('sees the secondary route', async () => { - const page = getPageStruct(); - await page.heroesHref.click(); - await page.contactHref.click(); - expect(await page.primaryOutlet.count()).toBe(1, 'primary outlet'); - expect(await page.secondaryOutlet.count()).toBe(1, 'secondary outlet'); - }); - - it('should redirect with secondary route', async () => { - const page = getPageStruct(); - - // go to login page and login - await browser.get(''); - await page.loginHref.click(); - await page.loginButton.click(); - - // open secondary outlet - await page.contactHref.click(); - - // go to login page and logout - await page.loginHref.click(); - await page.loginButton.click(); - - // attempt to go to admin page, redirects to login with secondary outlet open - await page.adminHref.click(); - - // login, get redirected back to admin with outlet still open - await page.loginButton.click(); - - expect(await page.adminPage.isDisplayed()).toBeTruthy(); - expect(await page.secondaryOutlet.count()).toBeTruthy(); - }); - - async function crisisCenterEdit(index: number, save: boolean) { - const page = getPageStruct(); - await page.crisisHref.click(); - let crisisEle = page.crisisList.get(index); - const text = await crisisEle.getText(); - expect(text.length).toBeGreaterThan(0, 'crisis item text length'); - // remove leading id from text - const crisisText = text.slice(text.indexOf(' ')).trim(); - - await crisisEle.click(); - expect(await page.crisisDetail.isPresent()).toBe(true, 'crisis detail present'); - expect(await page.crisisDetailTitle.getText()).toContain(crisisText); - const inputEle = page.crisisDetail.element(by.css('input')); - await inputEle.sendKeys('-foo'); - - const buttonEle = page.crisisDetail.element(by.buttonText(save ? 'Save' : 'Cancel')); - await buttonEle.click(); - crisisEle = page.crisisList.get(index); - if (save) { - expect(await crisisEle.getText()).toContain(crisisText + '-foo'); - } else { - await browser.wait(EC.alertIsPresent(), 4000); - await browser.switchTo().alert().accept(); - expect(await crisisEle.getText()).toContain(crisisText); - } - } - -}); diff --git a/aio/content/examples/router/example-config.json b/aio/content/examples/router/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.html b/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.html deleted file mode 100644 index 02a0be66a64..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.html +++ /dev/null @@ -1 +0,0 @@ -

    Dashboard

    diff --git a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.ts b/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.ts deleted file mode 100644 index a58f95ef340..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.1.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -@Component({ - selector: 'app-admin-dashboard', - templateUrl: './admin-dashboard.component.html', - styleUrls: ['./admin-dashboard.component.css'] -}) -export class AdminDashboardComponent implements OnInit { - sessionId!: Observable; - token!: Observable; - - constructor(private route: ActivatedRoute) {} - - ngOnInit() { - // Capture the session ID if available - this.sessionId = this.route - .queryParamMap - .pipe(map(params => params.get('session_id') || 'None')); - - // Capture the fragment if available - this.token = this.route - .fragment - .pipe(map(fragment => fragment || 'None')); - } -} diff --git a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.css b/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.html b/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.html deleted file mode 100644 index 04ff184a5f4..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Dashboard

    - -

    Session ID: {{ sessionId | async }}

    -
    -

    Token: {{ token | async }}

    - -Preloaded Modules -
      -
    • {{ module }}
    • -
    diff --git a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.ts b/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.ts deleted file mode 100644 index da9cd828fc8..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-dashboard/admin-dashboard.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { SelectivePreloadingStrategyService } from '../../selective-preloading-strategy.service'; - -@Component({ - selector: 'app-admin-dashboard', - templateUrl: './admin-dashboard.component.html', - styleUrls: ['./admin-dashboard.component.css'] -}) -export class AdminDashboardComponent implements OnInit { - sessionId!: Observable; - token!: Observable; - modules: string[] = []; - - constructor( - private route: ActivatedRoute, - preloadStrategy: SelectivePreloadingStrategyService - ) { - this.modules = preloadStrategy.preloadedModules; - } - - ngOnInit() { - // Capture the session ID if available - this.sessionId = this.route - .queryParamMap - .pipe(map(params => params.get('session_id') || 'None')); - - // Capture the fragment if available - this.token = this.route - .fragment - .pipe(map(fragment => fragment || 'None')); - } -} diff --git a/aio/content/examples/router/src/app/admin/admin-routing.module.1.ts b/aio/content/examples/router/src/app/admin/admin-routing.module.1.ts deleted file mode 100644 index 3f41e273ff6..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-routing.module.1.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { AdminComponent } from './admin/admin.component'; -import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component'; -import { ManageCrisesComponent } from './manage-crises/manage-crises.component'; -import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component'; - -// #docregion admin-routes -const adminRoutes: Routes = [ - { - path: 'admin', - component: AdminComponent, - children: [ - { - path: '', - children: [ - { path: 'crises', component: ManageCrisesComponent }, - { path: 'heroes', component: ManageHeroesComponent }, - { path: '', component: AdminDashboardComponent } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(adminRoutes) - ], - exports: [ - RouterModule - ] -}) -export class AdminRoutingModule {} -// #enddocregion admin-routes -// #enddocregion diff --git a/aio/content/examples/router/src/app/admin/admin-routing.module.2.ts b/aio/content/examples/router/src/app/admin/admin-routing.module.2.ts deleted file mode 100644 index 3949c1c3d68..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-routing.module.2.ts +++ /dev/null @@ -1,37 +0,0 @@ -// #docplaster -// #docregion -import {NgModule} from '@angular/core'; -import {RouterModule, Routes} from '@angular/router'; - -// #docregion admin-route -import {authGuard} from '../auth/auth.guard'; - -import {AdminDashboardComponent} from './admin-dashboard/admin-dashboard.component'; -import {AdminComponent} from './admin/admin.component'; -import {ManageCrisesComponent} from './manage-crises/manage-crises.component'; -import {ManageHeroesComponent} from './manage-heroes/manage-heroes.component'; - -const adminRoutes: Routes = [{ - path: 'admin', - component: AdminComponent, - canActivate: [authGuard], - - // #enddocregion admin-route - // #docregion admin-route - children: [{ - path: '', - children: [ - {path: 'crises', component: ManageCrisesComponent}, - {path: 'heroes', component: ManageHeroesComponent}, - {path: '', component: AdminDashboardComponent} - ], - // #enddocregion admin-route - canActivateChild: [authGuard] - // #docregion admin-route - }] -}]; - -@NgModule({imports: [RouterModule.forChild(adminRoutes)], exports: [RouterModule]}) -export class AdminRoutingModule { -} -// #enddocregion diff --git a/aio/content/examples/router/src/app/admin/admin-routing.module.3.ts b/aio/content/examples/router/src/app/admin/admin-routing.module.3.ts deleted file mode 100644 index 0901e421649..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-routing.module.3.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { AdminComponent } from './admin/admin.component'; -import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component'; -import { ManageCrisesComponent } from './manage-crises/manage-crises.component'; -import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component'; - -import { authGuard } from '../auth/auth.guard'; - -// #docregion can-activate-child -const adminRoutes: Routes = [ - { - path: 'admin', - component: AdminComponent, - canActivate: [authGuard], - children: [ - { - path: '', - canActivateChild: [authGuard], - children: [ - { path: 'crises', component: ManageCrisesComponent }, - { path: 'heroes', component: ManageHeroesComponent }, - { path: '', component: AdminDashboardComponent } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(adminRoutes) - ], - exports: [ - RouterModule - ] -}) -export class AdminRoutingModule {} -// #enddocregion diff --git a/aio/content/examples/router/src/app/admin/admin-routing.module.ts b/aio/content/examples/router/src/app/admin/admin-routing.module.ts deleted file mode 100644 index bbe86679ff5..00000000000 --- a/aio/content/examples/router/src/app/admin/admin-routing.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { AdminComponent } from './admin/admin.component'; -import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component'; -import { ManageCrisesComponent } from './manage-crises/manage-crises.component'; -import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component'; - -import { authGuard } from '../auth/auth.guard'; - -const adminRoutes: Routes = [ - { - path: '', - component: AdminComponent, - canActivate: [authGuard], - children: [ - { - path: '', - canActivateChild: [authGuard], - children: [ - { path: 'crises', component: ManageCrisesComponent }, - { path: 'heroes', component: ManageHeroesComponent }, - { path: '', component: AdminDashboardComponent } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(adminRoutes) - ], - exports: [ - RouterModule - ] -}) -export class AdminRoutingModule {} -// #enddocregion diff --git a/aio/content/examples/router/src/app/admin/admin.module.ts b/aio/content/examples/router/src/app/admin/admin.module.ts deleted file mode 100644 index c17b352d54c..00000000000 --- a/aio/content/examples/router/src/app/admin/admin.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { AdminComponent } from './admin/admin.component'; -import { AdminDashboardComponent } from './admin-dashboard/admin-dashboard.component'; -import { ManageCrisesComponent } from './manage-crises/manage-crises.component'; -import { ManageHeroesComponent } from './manage-heroes/manage-heroes.component'; - -import { AdminRoutingModule } from './admin-routing.module'; - -@NgModule({ - imports: [ - CommonModule, - AdminRoutingModule - ], - declarations: [ - AdminComponent, - AdminDashboardComponent, - ManageCrisesComponent, - ManageHeroesComponent - ] -}) -export class AdminModule {} diff --git a/aio/content/examples/router/src/app/admin/admin/admin.component.css b/aio/content/examples/router/src/app/admin/admin/admin.component.css deleted file mode 100644 index dadbe07a579..00000000000 --- a/aio/content/examples/router/src/app/admin/admin/admin.component.css +++ /dev/null @@ -1,22 +0,0 @@ -nav a { - padding: 1rem; - font-size: 1rem; - background-color: #e8e8e8; - color: #3d3d3d; -} - -@media (min-width: 400px) { - nav a { - font-size: 1.2rem; - } -} - -nav a:hover { - color: white; - background-color: #42545C; - } - -nav a.active { - background-color: black; - color: white; -} diff --git a/aio/content/examples/router/src/app/admin/admin/admin.component.html b/aio/content/examples/router/src/app/admin/admin/admin.component.html deleted file mode 100644 index a04a451ad0e..00000000000 --- a/aio/content/examples/router/src/app/admin/admin/admin.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

    Admin

    - - diff --git a/aio/content/examples/router/src/app/admin/admin/admin.component.ts b/aio/content/examples/router/src/app/admin/admin/admin.component.ts deleted file mode 100644 index beb6b89fcf9..00000000000 --- a/aio/content/examples/router/src/app/admin/admin/admin.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-admin', - templateUrl: './admin.component.html', - styleUrls: ['./admin.component.css'] -}) -export class AdminComponent { -} diff --git a/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.css b/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.html b/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.html deleted file mode 100644 index 4edfa721335..00000000000 --- a/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Manage your crises here

    \ No newline at end of file diff --git a/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.ts b/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.ts deleted file mode 100644 index c3fe3bb92d0..00000000000 --- a/aio/content/examples/router/src/app/admin/manage-crises/manage-crises.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-manage-crises', - templateUrl: './manage-crises.component.html', - styleUrls: ['./manage-crises.component.css'] -}) -export class ManageCrisesComponent { } diff --git a/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.css b/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.html b/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.html deleted file mode 100644 index 3e5256527d8..00000000000 --- a/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Manage your heroes here

    \ No newline at end of file diff --git a/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.ts b/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.ts deleted file mode 100644 index 432621f4fd4..00000000000 --- a/aio/content/examples/router/src/app/admin/manage-heroes/manage-heroes.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-manage-heroes', - templateUrl: './manage-heroes.component.html', - styleUrls: ['./manage-heroes.component.css'] -}) -export class ManageHeroesComponent { } diff --git a/aio/content/examples/router/src/app/animations.ts b/aio/content/examples/router/src/app/animations.ts deleted file mode 100644 index c1cf63f75da..00000000000 --- a/aio/content/examples/router/src/app/animations.ts +++ /dev/null @@ -1,35 +0,0 @@ -// #docregion -import { - trigger, animateChild, group, - transition, animate, style, query -} from '@angular/animations'; - - -// Routable animations -export const slideInAnimation = - trigger('routeAnimation', [ - transition('heroes <=> hero', [ - style({ position: 'relative' }), - query(':enter, :leave', [ - style({ - position: 'absolute', - top: 0, - left: 0, - width: '100%' - }) - ]), - query(':enter', [ - style({ left: '-100%'}) - ]), - query(':leave', animateChild()), - group([ - query(':leave', [ - animate('300ms ease-out', style({ left: '100%'})) - ]), - query(':enter', [ - animate('300ms ease-out', style({ left: '0%'})) - ]) - ]), - query(':enter', animateChild()), - ]) - ]); diff --git a/aio/content/examples/router/src/app/app-routing.module.1.ts b/aio/content/examples/router/src/app/app-routing.module.1.ts deleted file mode 100644 index d568b27de97..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.1.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -import { HeroListComponent } from './hero-list/hero-list.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -// #docregion appRoutes -const appRoutes: Routes = [ - { path: 'crisis-center', component: CrisisListComponent }, - { path: 'heroes', component: HeroListComponent }, - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; -// #enddocregion appRoutes - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/router/src/app/app-routing.module.11.ts b/aio/content/examples/router/src/app/app-routing.module.11.ts deleted file mode 100644 index b25d4aaf8ed..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.11.ts +++ /dev/null @@ -1,32 +0,0 @@ -import {NgModule} from '@angular/core'; -import {provideRouter, Routes, withComponentInputBinding} from '@angular/router'; - -import {authGuard} from './auth/auth.guard'; -import {ComposeMessageComponent} from './compose-message/compose-message.component'; -import {PageNotFoundComponent} from './page-not-found/page-not-found.component'; - -const appRoutes: Routes = [ - {path: 'compose', component: ComposeMessageComponent, outlet: 'popup'}, { - path: 'admin', - loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule), - canMatch: [authGuard] - }, - { - path: 'crisis-center', - loadChildren: () => - import('./crisis-center/crisis-center.module').then(m => m.CrisisCenterModule), - data: {preload: true} - }, - {path: '', redirectTo: '/superheroes', pathMatch: 'full'}, - {path: '**', component: PageNotFoundComponent} -]; - -@NgModule({ - // #docregion withComponentInputBinding - providers: [ - provideRouter(appRoutes, withComponentInputBinding()), - ] - // #enddocregion withComponentInputBinding -}) -export class AppRoutingModule { -} diff --git a/aio/content/examples/router/src/app/app-routing.module.2.ts b/aio/content/examples/router/src/app/app-routing.module.2.ts deleted file mode 100644 index c232c11091e..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.2.ts +++ /dev/null @@ -1,33 +0,0 @@ -// #docregion -// #docregion milestone3 -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -// #enddocregion milestone3 -// import { HeroListComponent } from './hero-list/hero-list.component'; // <-- delete this line -// #docregion milestone3 -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -const appRoutes: Routes = [ - { path: 'crisis-center', component: CrisisListComponent }, -// #enddocregion milestone3 - // { path: 'heroes', component: HeroListComponent }, // <-- delete this line -// #docregion milestone3 - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} -// #enddocregion milestone3 diff --git a/aio/content/examples/router/src/app/app-routing.module.3.ts b/aio/content/examples/router/src/app/app-routing.module.3.ts deleted file mode 100644 index 5d7c74e9215..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.3.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docplaster -// #docregion , v3 -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -// #enddocregion v3 -import { ComposeMessageComponent } from './compose-message/compose-message.component'; -// #docregion v3 -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -const appRoutes: Routes = [ -// #enddocregion v3 -// #docregion compose - { - path: 'compose', - component: ComposeMessageComponent, - outlet: 'popup' - }, -// #enddocregion compose -// #docregion v3 - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/router/src/app/app-routing.module.4.ts b/aio/content/examples/router/src/app/app-routing.module.4.ts deleted file mode 100644 index 892a70fec47..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.4.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { ComposeMessageComponent } from './compose-message/compose-message.component'; -import { CanDeactivateGuard } from './can-deactivate.guard'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -const appRoutes: Routes = [ - { - path: 'compose', - component: ComposeMessageComponent, - outlet: 'popup' - }, - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/router/src/app/app-routing.module.5.ts b/aio/content/examples/router/src/app/app-routing.module.5.ts deleted file mode 100644 index 1c431de2254..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.5.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -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'; - - -const appRoutes: Routes = [ - { - path: 'compose', - component: ComposeMessageComponent, - outlet: 'popup' - }, -// #docregion admin, admin-1 - { - path: 'admin', - loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule), -// #enddocregion admin-1 - canMatch: [authGuard] -// #docregion admin-1 - }, -// #enddocregion admin, admin-1 - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/router/src/app/app-routing.module.6.ts b/aio/content/examples/router/src/app/app-routing.module.6.ts deleted file mode 100644 index 0fb020f4f98..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.6.ts +++ /dev/null @@ -1,53 +0,0 @@ -// #docplaster -// #docregion, preload-v1 -import { NgModule } from '@angular/core'; -import { - RouterModule, Routes, -// #enddocregion preload-v1 - PreloadAllModules -// #docregion preload-v1 -} 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'; - -const appRoutes: Routes = [ - { - path: 'compose', - component: ComposeMessageComponent, - outlet: 'popup' - }, - { - path: 'admin', - loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule), - canMatch: [authGuard] - }, - { - path: 'crisis-center', - loadChildren: () => import('./crisis-center/crisis-center.module').then(m => m.CrisisCenterModule) - }, - { path: '', redirectTo: '/heroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - // #docregion forRoot - RouterModule.forRoot( - appRoutes, - // #enddocregion preload-v1 - { - enableTracing: true, // <-- debugging purposes only - preloadingStrategy: PreloadAllModules - } - // #docregion preload-v1 - ) - // #enddocregion forRoot - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/router/src/app/app-routing.module.7.ts b/aio/content/examples/router/src/app/app-routing.module.7.ts deleted file mode 100644 index f64ff718293..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.7.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; // CLI imports router - -const routes: Routes = []; // sets up routes constant where you define your routes - -// configures NgModule imports and exports -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/router/src/app/app-routing.module.ts b/aio/content/examples/router/src/app/app-routing.module.ts deleted file mode 100644 index db567ecf8ee..00000000000 --- a/aio/content/examples/router/src/app/app-routing.module.ts +++ /dev/null @@ -1,48 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -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 { SelectivePreloadingStrategyService } from './selective-preloading-strategy.service'; - -const appRoutes: Routes = [ - { - path: 'compose', - component: ComposeMessageComponent, - outlet: 'popup' - }, - { - path: 'admin', - loadChildren: () => import('./admin/admin.module').then(m => m.AdminModule), - canMatch: [authGuard] - }, - // #docregion preload-v2 - { - path: 'crisis-center', - loadChildren: () => import('./crisis-center/crisis-center.module').then(m => m.CrisisCenterModule), - data: { preload: true } - }, - // #enddocregion preload-v2 - { path: '', redirectTo: '/superheroes', pathMatch: 'full' }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { - enableTracing: false, // <-- debugging purposes only - preloadingStrategy: SelectivePreloadingStrategyService, - } - ) - ], - exports: [ - RouterModule - ] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/router/src/app/app.component.1.html b/aio/content/examples/router/src/app/app.component.1.html deleted file mode 100644 index 3dd3293f6d6..00000000000 --- a/aio/content/examples/router/src/app/app.component.1.html +++ /dev/null @@ -1,7 +0,0 @@ - -

    Angular Router

    - - \ No newline at end of file diff --git a/aio/content/examples/router/src/app/app.component.1.ts b/aio/content/examples/router/src/app/app.component.1.ts deleted file mode 100644 index 68dc1146612..00000000000 --- a/aio/content/examples/router/src/app/app.component.1.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: 'app.component.html', - styleUrls: ['app.component.css'] -}) -export class AppComponent { } diff --git a/aio/content/examples/router/src/app/app.component.2.html b/aio/content/examples/router/src/app/app.component.2.html deleted file mode 100644 index eb6c268e146..00000000000 --- a/aio/content/examples/router/src/app/app.component.2.html +++ /dev/null @@ -1,9 +0,0 @@ - -

    Angular Router

    - -
    - -
    \ No newline at end of file diff --git a/aio/content/examples/router/src/app/app.component.2.ts b/aio/content/examples/router/src/app/app.component.2.ts deleted file mode 100644 index 8e0a63362d9..00000000000 --- a/aio/content/examples/router/src/app/app.component.2.ts +++ /dev/null @@ -1,23 +0,0 @@ -/* Second Heroes version */ -// #docregion -import { Component } from '@angular/core'; -// #docregion animation-imports -import { ChildrenOutletContexts } from '@angular/router'; -import { slideInAnimation } from './animations'; - -@Component({ - selector: 'app-root', - templateUrl: 'app.component.html', - styleUrls: ['app.component.css'], - animations: [ slideInAnimation ] -}) -// #enddocregion animation-imports -// #docregion function-binding -export class AppComponent { - constructor(private contexts: ChildrenOutletContexts) {} - - getAnimationData() { - return this.contexts.getContext('primary')?.route?.snapshot?.data?.['animation']; - } -} -// #enddocregion function-binding diff --git a/aio/content/examples/router/src/app/app.component.4.html b/aio/content/examples/router/src/app/app.component.4.html deleted file mode 100644 index 77cd0fd3faa..00000000000 --- a/aio/content/examples/router/src/app/app.component.4.html +++ /dev/null @@ -1,15 +0,0 @@ - -

    Angular Router

    - - -
    - -
    - - \ No newline at end of file diff --git a/aio/content/examples/router/src/app/app.component.5.html b/aio/content/examples/router/src/app/app.component.5.html deleted file mode 100644 index 36019eb639b..00000000000 --- a/aio/content/examples/router/src/app/app.component.5.html +++ /dev/null @@ -1,12 +0,0 @@ - -

    Angular Router

    - -
    - -
    - \ No newline at end of file diff --git a/aio/content/examples/router/src/app/app.component.6.html b/aio/content/examples/router/src/app/app.component.6.html deleted file mode 100644 index 9ff4b20c9f5..00000000000 --- a/aio/content/examples/router/src/app/app.component.6.html +++ /dev/null @@ -1,13 +0,0 @@ - -

    Angular Router

    - -
    - -
    - \ No newline at end of file diff --git a/aio/content/examples/router/src/app/app.component.7.html b/aio/content/examples/router/src/app/app.component.7.html deleted file mode 100644 index 7ba23f652a9..00000000000 --- a/aio/content/examples/router/src/app/app.component.7.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Angular Router App

    - - - - diff --git a/aio/content/examples/router/src/app/app.component.css b/aio/content/examples/router/src/app/app.component.css deleted file mode 100644 index 0befc361b91..00000000000 --- a/aio/content/examples/router/src/app/app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -nav a { - padding: 1rem; -} diff --git a/aio/content/examples/router/src/app/app.component.html b/aio/content/examples/router/src/app/app.component.html deleted file mode 100644 index 2183b0fb0be..00000000000 --- a/aio/content/examples/router/src/app/app.component.html +++ /dev/null @@ -1,15 +0,0 @@ - -
    -

    Angular Router

    - -
    - -
    - -
    diff --git a/aio/content/examples/router/src/app/app.component.ts b/aio/content/examples/router/src/app/app.component.ts deleted file mode 100644 index 58f6c90c664..00000000000 --- a/aio/content/examples/router/src/app/app.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { ChildrenOutletContexts } from '@angular/router'; -import { slideInAnimation } from './animations'; - -@Component({ - selector: 'app-root', - templateUrl: 'app.component.html', - styleUrls: ['app.component.css'], - animations: [ slideInAnimation ] -}) -export class AppComponent { - constructor(private contexts: ChildrenOutletContexts) {} - - getRouteAnimationData() { - return this.contexts.getContext('primary')?.route?.snapshot?.data?.['animation']; - } -} diff --git a/aio/content/examples/router/src/app/app.module.0.ts b/aio/content/examples/router/src/app/app.module.0.ts deleted file mode 100644 index df5b74c6d7f..00000000000 --- a/aio/content/examples/router/src/app/app.module.0.ts +++ /dev/null @@ -1,44 +0,0 @@ -// NEVER USED. For docs only. Should compile though -// #docplaster -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { HeroListComponent } from './hero-list/hero-list.component'; -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; -import { PageNotFoundComponent as HeroDetailComponent } from './page-not-found/page-not-found.component'; - -// #docregion -const appRoutes: Routes = [ - { path: 'crisis-center', component: CrisisListComponent }, - { path: 'hero/:id', component: HeroDetailComponent }, - { - path: 'heroes', - component: HeroListComponent, - data: { title: 'Heroes List' } - }, - { path: '', - redirectTo: '/heroes', - pathMatch: 'full' - }, - { path: '**', component: PageNotFoundComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forRoot( - appRoutes, - { enableTracing: true } // <-- debugging purposes only - ) - // other imports here - ], -// #enddocregion -/* -// #docregion - ... -}) -export class AppModule { } -// #enddocregion -*/ -}) -export class AppModule0 { } diff --git a/aio/content/examples/router/src/app/app.module.1.ts b/aio/content/examples/router/src/app/app.module.1.ts deleted file mode 100644 index 16febf37ad1..00000000000 --- a/aio/content/examples/router/src/app/app.module.1.ts +++ /dev/null @@ -1,45 +0,0 @@ -// #docplaster -// #docregion -// #docregion first-config -import {NgModule} from '@angular/core'; -import {FormsModule} from '@angular/forms'; -import {BrowserModule} from '@angular/platform-browser'; -import {RouterModule, Routes} from '@angular/router'; - -import {AppComponent} from './app.component'; -import {CrisisListComponent} from './crisis-list/crisis-list.component'; -import {HeroListComponent} from './hero-list/hero-list.component'; -// #enddocregion first-config -import {PageNotFoundComponent} from './page-not-found/page-not-found.component'; - -// #docregion first-config - -const appRoutes: Routes = [ - {path: 'crisis-center', component: CrisisListComponent}, - {path: 'heroes', component: HeroListComponent}, - // #enddocregion first-config - - {path: '', redirectTo: '/heroes', pathMatch: 'full'}, - // #docregion wildcard - {path: '**', component: PageNotFoundComponent} // #enddocregion wildcard - // #docregion first-config -]; - -@NgModule({ - imports: [ - BrowserModule, FormsModule, - RouterModule.forRoot( - appRoutes, {enableTracing: true} // <-- debugging purposes only - ) - ], - declarations: [ - AppComponent, HeroListComponent, CrisisListComponent, - // #enddocregion first-config - PageNotFoundComponent - // #docregion first-config - ], - bootstrap: [AppComponent] -}) -export class AppModule { -} -// #enddocregion diff --git a/aio/content/examples/router/src/app/app.module.2.ts b/aio/content/examples/router/src/app/app.module.2.ts deleted file mode 100644 index ebdebe57dfd..00000000000 --- a/aio/content/examples/router/src/app/app.module.2.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { AppRoutingModule } from './app-routing.module'; - -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -import { HeroListComponent } from './hero-list/hero-list.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - HeroListComponent, - CrisisListComponent, - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/router/src/app/app.module.3.ts b/aio/content/examples/router/src/app/app.module.3.ts deleted file mode 100644 index 5ead6a2028d..00000000000 --- a/aio/content/examples/router/src/app/app.module.3.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion -// #docregion remove-heroes -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -// #enddocregion remove-heroes -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; - -// #docregion remove-heroes -import { AppComponent } from './app.component'; -import { AppRoutingModule } from './app-routing.module'; -import { HeroesModule } from './heroes/heroes.module'; - -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -@NgModule({ -// #docregion module-imports - imports: [ - BrowserModule, -// #enddocregion module-imports -// #enddocregion remove-heroes - BrowserAnimationsModule, -// #docregion remove-heroes -// #docregion module-imports - FormsModule, - HeroesModule, - AppRoutingModule - ], -// #enddocregion module-imports - declarations: [ - AppComponent, - CrisisListComponent, - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -// #enddocregion remove-heroes -// #enddocregion diff --git a/aio/content/examples/router/src/app/app.module.4.ts b/aio/content/examples/router/src/app/app.module.4.ts deleted file mode 100644 index ae0fe928220..00000000000 --- a/aio/content/examples/router/src/app/app.module.4.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion -// #docregion crisis-center-module, admin-module -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; -import { ComposeMessageComponent } from './compose-message/compose-message.component'; - -import { AppRoutingModule } from './app-routing.module'; -import { HeroesModule } from './heroes/heroes.module'; -import { CrisisCenterModule } from './crisis-center/crisis-center.module'; -// #enddocregion crisis-center-module - -import { AdminModule } from './admin/admin.module'; -// #docregion crisis-center-module - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - HeroesModule, - CrisisCenterModule, -// #enddocregion crisis-center-module - AdminModule, -// #docregion crisis-center-module - AppRoutingModule - ], - declarations: [ - AppComponent, -// #enddocregion crisis-center-module - ComposeMessageComponent, -// #docregion crisis-center-module - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/app.module.5.ts b/aio/content/examples/router/src/app/app.module.5.ts deleted file mode 100644 index 46d3781abfc..00000000000 --- a/aio/content/examples/router/src/app/app.module.5.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { AppRoutingModule } from './app-routing.module'; - -import { HeroesModule } from './heroes/heroes.module'; -import { CrisisCenterModule } from './crisis-center/crisis-center.module'; - -import { ComposeMessageComponent } from './compose-message/compose-message.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -import { AdminModule } from './admin/admin.module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - HeroesModule, - CrisisCenterModule, - AdminModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - ComposeMessageComponent, - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/router/src/app/app.module.6.ts b/aio/content/examples/router/src/app/app.module.6.ts deleted file mode 100644 index f8dd92b2387..00000000000 --- a/aio/content/examples/router/src/app/app.module.6.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -import { Routes, RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; - -const routes: Routes = [ - -]; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule, - RouterModule.forRoot(routes, { useHash: true }) // .../#/crisis-center/ - ], - declarations: [ - AppComponent, - PageNotFoundComponent - ], - providers: [ - - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/router/src/app/app.module.7.ts b/aio/content/examples/router/src/app/app.module.7.ts deleted file mode 100644 index 51a5e8446ce..00000000000 --- a/aio/content/examples/router/src/app/app.module.7.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -import { Router } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; -import { ComposeMessageComponent } from './compose-message/compose-message.component'; - -import { AppRoutingModule } from './app-routing.module'; -import { HeroesModule } from './heroes/heroes.module'; -import { CrisisCenterModule } from './crisis-center/crisis-center.module'; -import { AuthModule } from './auth/auth.module'; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule, - HeroesModule, - CrisisCenterModule, - AuthModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - ComposeMessageComponent, - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -}) -// #docregion inspect-config -export class AppModule { - // Diagnostic only: inspect router configuration - constructor(router: Router) { - // Use a custom replacer to display function names in the route configs - const replacer = (key, value) => (typeof value === 'function') ? value.name : value; - - console.log('Routes: ', JSON.stringify(router.config, replacer, 2)); - } -} -// #enddocregion inspect-config diff --git a/aio/content/examples/router/src/app/app.module.8.ts b/aio/content/examples/router/src/app/app.module.8.ts deleted file mode 100644 index 3f0b1c0c0bf..00000000000 --- a/aio/content/examples/router/src/app/app.module.8.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { AppRoutingModule } from './app-routing.module'; // CLI imports AppRoutingModule -import { AppComponent } from './app.component'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule, - AppRoutingModule // CLI adds AppRoutingModule to the AppModule's imports array - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/router/src/app/app.module.ts b/aio/content/examples/router/src/app/app.module.ts deleted file mode 100644 index 2f5fb97be3b..00000000000 --- a/aio/content/examples/router/src/app/app.module.ts +++ /dev/null @@ -1,56 +0,0 @@ -// #docplaster -// #docregion auth, preload -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -// #docregion animations-module -import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; - -// #enddocregion auth, animations-module -import { Router } from '@angular/router'; - -// #docregion auth -import { AppComponent } from './app.component'; -import { PageNotFoundComponent } from './page-not-found/page-not-found.component'; -import { ComposeMessageComponent } from './compose-message/compose-message.component'; - -import { AppRoutingModule } from './app-routing.module'; -import { HeroesModule } from './heroes/heroes.module'; -import { AuthModule } from './auth/auth.module'; - -// #docregion animations-module -@NgModule({ - imports: [ - // #enddocregion animations-module - BrowserModule, - // #docregion animations-module - BrowserAnimationsModule, - // #enddocregion animations-module - FormsModule, - HeroesModule, - AuthModule, - AppRoutingModule, - // #docregion animations-module - ], - // #enddocregion animations-module - declarations: [ - AppComponent, - ComposeMessageComponent, - PageNotFoundComponent - ], - bootstrap: [ AppComponent ] -// #docregion animations-module -}) -// #enddocregion animations-module -export class AppModule { -// #enddocregion preload, auth - // Diagnostic only: inspect router configuration - constructor(router: Router) { - // Use a custom replacer to display function names in the route configs - // const replacer = (key, value) => (typeof value === 'function') ? value.name : value; - - // console.log('Routes: ', JSON.stringify(router.config, replacer, 2)); - } -// #docregion preload, auth -} -// #enddocregion preload, auth diff --git a/aio/content/examples/router/src/app/auth/auth-routing.module.ts b/aio/content/examples/router/src/app/auth/auth-routing.module.ts deleted file mode 100644 index 009d4803f22..00000000000 --- a/aio/content/examples/router/src/app/auth/auth-routing.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { authGuard } from './auth.guard'; -import { AuthService } from './auth.service'; -import { LoginComponent } from './login/login.component'; - -const authRoutes: Routes = [ - { path: 'login', component: LoginComponent } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(authRoutes) - ], - exports: [ - RouterModule - ] -}) -export class AuthRoutingModule {} diff --git a/aio/content/examples/router/src/app/auth/auth.guard.1.ts b/aio/content/examples/router/src/app/auth/auth.guard.1.ts deleted file mode 100644 index f8385d42d1e..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.guard.1.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion - -export const authGuard = () => { - console.log('authGuard#canActivate called'); - return true; -}; -// #enddocregion diff --git a/aio/content/examples/router/src/app/auth/auth.guard.2.ts b/aio/content/examples/router/src/app/auth/auth.guard.2.ts deleted file mode 100644 index eaad8940d28..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.guard.2.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import {inject} from '@angular/core'; -import { Router } from '@angular/router'; - -import {AuthService} from './auth.service'; - -export const authGuard = () => { - const authService = inject(AuthService); - const router = inject(Router); - - if (authService.isLoggedIn) { - return true; - } - - // Redirect to the login page - return router.parseUrl('/login'); -}; - -// #enddocregion diff --git a/aio/content/examples/router/src/app/auth/auth.guard.3.ts b/aio/content/examples/router/src/app/auth/auth.guard.3.ts deleted file mode 100644 index b18cc3f9639..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.guard.3.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { inject } from '@angular/core'; -import { Router } from '@angular/router'; -import { AuthService } from './auth.service'; - -export const authGuard = () => { - const authService = inject(AuthService); - const router = inject(Router); - - if (authService.isLoggedIn) { - return true; - } - - // Redirect to the login page - return router.parseUrl('/login'); -}; diff --git a/aio/content/examples/router/src/app/auth/auth.guard.4.ts b/aio/content/examples/router/src/app/auth/auth.guard.4.ts deleted file mode 100644 index ae36ede5e85..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.guard.4.ts +++ /dev/null @@ -1,28 +0,0 @@ -// #docplaster -// #docregion -import { inject } from '@angular/core'; -import { Router, NavigationExtras } from '@angular/router'; -import { AuthService } from './auth.service'; - -export const authGuard = () => { - const authService = inject(AuthService); - const router = inject(Router); - - 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' - }; - - // Redirect to the login page with extras - return router.createUrlTree(['/login'], navigationExtras); -}; - diff --git a/aio/content/examples/router/src/app/auth/auth.guard.ts b/aio/content/examples/router/src/app/auth/auth.guard.ts deleted file mode 100644 index 929a85672d3..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.guard.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docplaster -import { inject } from '@angular/core'; -import { - Router, - NavigationExtras, -} from '@angular/router'; -import { AuthService } from './auth.service'; - -export const authGuard = () => { - const router = inject(Router); - const authService = inject(AuthService); - - 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); -}; diff --git a/aio/content/examples/router/src/app/auth/auth.module.ts b/aio/content/examples/router/src/app/auth/auth.module.ts deleted file mode 100644 index ea37f28339c..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.module.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { LoginComponent } from './login/login.component'; -import { AuthRoutingModule } from './auth-routing.module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - AuthRoutingModule - ], - declarations: [ - LoginComponent - ] -}) -export class AuthModule {} diff --git a/aio/content/examples/router/src/app/auth/auth.service.ts b/aio/content/examples/router/src/app/auth/auth.service.ts deleted file mode 100644 index 338f7a19e9f..00000000000 --- a/aio/content/examples/router/src/app/auth/auth.service.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { Observable, of } from 'rxjs'; -import { tap, delay } from 'rxjs/operators'; - -@Injectable({ - providedIn: 'root', -}) -export class AuthService { - isLoggedIn = false; - - // store the URL so we can redirect after logging in - redirectUrl: string | null = null; - - login(): Observable { - return of(true).pipe( - delay(1000), - tap(() => this.isLoggedIn = true) - ); - } - - logout(): void { - this.isLoggedIn = false; - } -} diff --git a/aio/content/examples/router/src/app/auth/login/login.component.1.ts b/aio/content/examples/router/src/app/auth/login/login.component.1.ts deleted file mode 100644 index 78218b3b024..00000000000 --- a/aio/content/examples/router/src/app/auth/login/login.component.1.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Router } from '@angular/router'; -import { AuthService } from '../auth.service'; - -@Component({ - selector: 'app-login', - templateUrl: './login.component.html', - styleUrls: ['./login.component.css'] -}) -export class LoginComponent { - message: string; - - constructor(public authService: AuthService, public router: Router) { - this.message = this.getMessage(); - } - - getMessage() { - return 'Logged ' + (this.authService.isLoggedIn ? 'in' : 'out'); - } - - login() { - this.message = 'Trying to log in ...'; - - this.authService.login().subscribe(() => { - this.message = this.getMessage(); - if (this.authService.isLoggedIn) { - // Usually you would use the redirect URL from the auth service. - // However to keep the example simple, we will always redirect to `/admin`. - const redirectUrl = '/admin'; - - // Redirect the user - this.router.navigate([redirectUrl]); - } - }); - } - - logout() { - this.authService.logout(); - this.message = this.getMessage(); - } -} diff --git a/aio/content/examples/router/src/app/auth/login/login.component.css b/aio/content/examples/router/src/app/auth/login/login.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/auth/login/login.component.html b/aio/content/examples/router/src/app/auth/login/login.component.html deleted file mode 100644 index be2f6372ed7..00000000000 --- a/aio/content/examples/router/src/app/auth/login/login.component.html +++ /dev/null @@ -1,6 +0,0 @@ -

    Login

    -

    {{message}}

    -

    - - -

    diff --git a/aio/content/examples/router/src/app/auth/login/login.component.ts b/aio/content/examples/router/src/app/auth/login/login.component.ts deleted file mode 100644 index 67d15a863be..00000000000 --- a/aio/content/examples/router/src/app/auth/login/login.component.ts +++ /dev/null @@ -1,51 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { NavigationExtras, Router } from '@angular/router'; -import { AuthService } from '../auth.service'; - -@Component({ - selector: 'app-login', - templateUrl: './login.component.html', - styleUrls: ['./login.component.css'] -}) -export class LoginComponent { - message: string; - - constructor(public authService: AuthService, public router: Router) { - this.message = this.getMessage(); - } - - getMessage() { - return 'Logged ' + (this.authService.isLoggedIn ? 'in' : 'out'); - } - - login() { - this.message = 'Trying to log in ...'; - - this.authService.login().subscribe(() => { - this.message = this.getMessage(); - if (this.authService.isLoggedIn) { - // Usually you would use the redirect URL from the auth service. - // However to keep the example simple, we will always redirect to `/admin`. - const redirectUrl = '/admin'; - - // #docregion preserve - // Set our navigation extras object - // that passes on our global query params and fragment - const navigationExtras: NavigationExtras = { - queryParamsHandling: 'preserve', - preserveFragment: true - }; - - // Redirect the user - this.router.navigate([redirectUrl], navigationExtras); - // #enddocregion preserve - } - }); - } - - logout() { - this.authService.logout(); - this.message = this.getMessage(); - } -} diff --git a/aio/content/examples/router/src/app/can-deactivate.guard.1.ts b/aio/content/examples/router/src/app/can-deactivate.guard.1.ts deleted file mode 100644 index 98fc3afd6f6..00000000000 --- a/aio/content/examples/router/src/app/can-deactivate.guard.1.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docregion -import { Observable } from 'rxjs'; -import { CanDeactivateFn, - ActivatedRouteSnapshot, - RouterStateSnapshot } from '@angular/router'; - -import { CrisisDetailComponent } from './crisis-center/crisis-detail/crisis-detail.component'; - -export const canDeactivateGuard: CanDeactivateFn = ( - component: CrisisDetailComponent, - route: ActivatedRouteSnapshot, - state: RouterStateSnapshot - ): Observable | boolean => { - // Get the Crisis Center ID - console.log(route.paramMap.get('id')); - - // Get the current URL - console.log(state.url); - - // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged - if (!component.crisis || component.crisis.name === component.editName) { - return true; - } - // 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?'); - }; diff --git a/aio/content/examples/router/src/app/can-deactivate.guard.ts b/aio/content/examples/router/src/app/can-deactivate.guard.ts deleted file mode 100644 index e4fa9823563..00000000000 --- a/aio/content/examples/router/src/app/can-deactivate.guard.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import { CanDeactivateFn } from '@angular/router'; -import { Observable } from 'rxjs'; - -export interface CanComponentDeactivate { - canDeactivate?: () => Observable | Promise | boolean; -} - -export const canDeactivateGuard: CanDeactivateFn = - (component: CanComponentDeactivate) => component.canDeactivate ? component.canDeactivate() : true; diff --git a/aio/content/examples/router/src/app/compose-message/compose-message.component.css b/aio/content/examples/router/src/app/compose-message/compose-message.component.css deleted file mode 100644 index c7db9a077e1..00000000000 --- a/aio/content/examples/router/src/app/compose-message/compose-message.component.css +++ /dev/null @@ -1,6 +0,0 @@ -textarea { - width: 100%; - margin-top: 1rem; - font-size: 1.2rem; - box-sizing: border-box; -} diff --git a/aio/content/examples/router/src/app/compose-message/compose-message.component.html b/aio/content/examples/router/src/app/compose-message/compose-message.component.html deleted file mode 100644 index cf8e9fdd8d0..00000000000 --- a/aio/content/examples/router/src/app/compose-message/compose-message.component.html +++ /dev/null @@ -1,17 +0,0 @@ - -

    Contact Crisis Center

    -
    - {{ details }} -
    -
    -
    - -
    -
    - -
    -
    -

    - - -

    diff --git a/aio/content/examples/router/src/app/compose-message/compose-message.component.ts b/aio/content/examples/router/src/app/compose-message/compose-message.component.ts deleted file mode 100644 index b06b57240df..00000000000 --- a/aio/content/examples/router/src/app/compose-message/compose-message.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; - -@Component({ - selector: 'app-compose-message', - templateUrl: './compose-message.component.html', - styleUrls: ['./compose-message.component.css'] -}) -export class ComposeMessageComponent { - details = ''; - message = ''; - sending = false; - - constructor(private router: Router, private route: ActivatedRoute) {} - - send() { - this.sending = true; - this.details = 'Sending Message...'; - - setTimeout(() => { - this.sending = false; - this.closePopup(); - }, 1000); - } - - cancel() { - this.closePopup(); - } - - // #docregion closePopup - closePopup() { - // Providing a `null` value to the named outlet - // clears the contents of the named outlet - this.router.navigate([{outlets: {popup: null}}], {relativeTo: this.route.parent}); - } - // #enddocregion closePopup -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.css b/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.html b/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.html deleted file mode 100644 index 430dd849421..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Welcome to the Crisis Center

    diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.ts deleted file mode 100644 index c2b7cde8140..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-home/crisis-center-home.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-crisis-center-home', - templateUrl: './crisis-center-home.component.html', - styleUrls: ['./crisis-center-home.component.css'] -}) -export class CrisisCenterHomeComponent { } diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.1.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.1.ts deleted file mode 100644 index 24dc4f7bc24..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.1.ts +++ /dev/null @@ -1,45 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -import { CrisisListComponent } from './crisis-list/crisis-list.component'; -import { CrisisCenterComponent } from './crisis-center/crisis-center.component'; -import { CrisisDetailComponent } from './crisis-detail/crisis-detail.component'; - -// #docregion routes -const crisisCenterRoutes: Routes = [ - { - path: 'crisis-center', - component: CrisisCenterComponent, - children: [ - { - path: '', - component: CrisisListComponent, - children: [ - { - path: ':id', - component: CrisisDetailComponent - }, - { - path: '', - component: CrisisCenterHomeComponent - } - ] - } - ] - } -]; -// #enddocregion routes - -@NgModule({ - imports: [ - RouterModule.forChild(crisisCenterRoutes) - ], - exports: [ - RouterModule - ] -}) -export class CrisisCenterRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.2.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.2.ts deleted file mode 100644 index 64c1b5a1168..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.2.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -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 { crisisDetailResolver} from './crisis-detail-resolver'; - - -const crisisCenterRoutes: Routes = [ - { - path: 'crisis-center', - component: CrisisCenterComponent, - children: [ - { - path: '', - component: CrisisListComponent, - children: [ - { - path: ':id', - component: CrisisDetailComponent, - canDeactivate: [canDeactivateGuard], - resolve: { - crisis: crisisDetailResolver - } - }, - { - path: '', - component: CrisisCenterHomeComponent - } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(crisisCenterRoutes) - ], - exports: [ - RouterModule - ] -}) -export class CrisisCenterRoutingModule { } diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.3.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.3.ts deleted file mode 100644 index 23db566f14b..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.3.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -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'; - -const crisisCenterRoutes: Routes = [ - { - path: 'crisis-center', - component: CrisisCenterComponent, - children: [ - { - path: '', - component: CrisisListComponent, - children: [ - { - path: ':id', - component: CrisisDetailComponent, - canDeactivate: [canDeactivateGuard] - }, - { - path: '', - component: CrisisCenterHomeComponent - } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(crisisCenterRoutes) - ], - exports: [ - RouterModule - ] -}) -export class CrisisCenterRoutingModule { } diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.4.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.4.ts deleted file mode 100644 index 8fedaf213c3..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.4.ts +++ /dev/null @@ -1,50 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -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 { crisisDetailResolver } from './crisis-detail-resolver'; - -const crisisCenterRoutes: Routes = [ - { - path: 'crisis-center', - component: CrisisCenterComponent, - children: [ - { - path: '', - component: CrisisListComponent, - children: [ - { - path: ':id', - component: CrisisDetailComponent, - canDeactivate: [canDeactivateGuard], - resolve: { - crisis: crisisDetailResolver - } - }, - { - path: '', - component: CrisisCenterHomeComponent - } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(crisisCenterRoutes) - ], - exports: [ - RouterModule - ] -}) -export class CrisisCenterRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.ts deleted file mode 100644 index aa95c688d58..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center-routing.module.ts +++ /dev/null @@ -1,50 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -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 { crisisDetailResolver } from './crisis-detail-resolver'; - -const crisisCenterRoutes: Routes = [ - { - path: '', - component: CrisisCenterComponent, - children: [ - { - path: '', - component: CrisisListComponent, - children: [ - { - path: ':id', - component: CrisisDetailComponent, - canDeactivate: [canDeactivateGuard], - resolve: { - crisis: crisisDetailResolver - } - }, - { - path: '', - component: CrisisCenterHomeComponent - } - ] - } - ] - } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(crisisCenterRoutes) - ], - exports: [ - RouterModule - ] -}) -export class CrisisCenterRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center.module.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center.module.ts deleted file mode 100644 index f14420fe8f3..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center.module.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { CommonModule } from '@angular/common'; - -import { CrisisCenterHomeComponent } from './crisis-center-home/crisis-center-home.component'; -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 { CrisisCenterRoutingModule } from './crisis-center-routing.module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - CrisisCenterRoutingModule - ], - declarations: [ - CrisisCenterComponent, - CrisisListComponent, - CrisisCenterHomeComponent, - CrisisDetailComponent - ] -}) -export class CrisisCenterModule {} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.css b/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.html b/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.html deleted file mode 100644 index 5aace465b54..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    Crisis Center

    - diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.ts b/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.ts deleted file mode 100644 index 5359b9d8efb..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-center/crisis-center.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-crisis-center', - templateUrl: './crisis-center.component.html', - styleUrls: ['./crisis-center.component.css'] -}) -export class CrisisCenterComponent {} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.1.ts b/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.1.ts deleted file mode 100644 index 0bbb69cdf75..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.1.ts +++ /dev/null @@ -1,4 +0,0 @@ -// #docregion - -export function crisisDetailResolver() { -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.ts b/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.ts deleted file mode 100644 index 48a4e6ce32c..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail-resolver.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #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 = (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; - } - })); -}; diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.1.ts b/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.1.ts deleted file mode 100644 index d0f4a6054f3..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.1.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router, ParamMap } from '@angular/router'; -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -import { CrisisService } from '../crisis.service'; -import { Crisis } from '../crisis'; -import { DialogService } from '../../dialog.service'; - -@Component({ - selector: 'app-crisis-detail', - templateUrl: './crisis-detail.component.html', - styleUrls: ['./crisis-detail.component.css'] -}) -export class CrisisDetailComponent implements OnInit { - crisis!: Crisis; - editName = ''; - - constructor( - private service: CrisisService, - private router: Router, - private route: ActivatedRoute, - public dialogService: DialogService - ) {} - - ngOnInit() { - this.route.paramMap - .pipe( - switchMap((params: ParamMap) => - this.service.getCrisis(params.get('id')!))) - .subscribe((crisis: Crisis) => { - if (crisis) { - this.editName = crisis.name; - this.crisis = crisis; - } else { // id not found - this.gotoCrises(); - } - }); - } - - cancel() { - this.gotoCrises(); - } - - save() { - this.crisis.name = this.editName; - this.gotoCrises(); - } - - canDeactivate(): Observable | boolean { - // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged - if (!this.crisis || this.crisis.name === this.editName) { - return true; - } - // Otherwise ask the user with the dialog service and return its - // observable which resolves to true or false when the user decides - return this.dialogService.confirm('Discard changes?'); - } - - gotoCrises() { - const crisisId = this.crisis ? this.crisis.id : null; - // Pass along the crisis id if available - // so that the CrisisListComponent can select that crisis. - // Add a totally useless `foo` parameter for kicks. - // Relative navigation back to the crises - this.router.navigate(['../', { id: crisisId, foo: 'foo' }], { relativeTo: this.route }); - } -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.css b/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.css deleted file mode 100644 index 226dbc12239..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.css +++ /dev/null @@ -1,8 +0,0 @@ -h2 { - font-size: 1.5rem; -} - -input { - font-size: 1rem; - margin-top: 1rem; -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.html b/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.html deleted file mode 100644 index fdf83841d57..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
    -

    {{ editName }}

    -

    Id: {{ crisis.id }}

    - - -
    - - -
    -
    diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts b/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts deleted file mode 100644 index 6dd567d0d75..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-detail/crisis-detail.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { Observable } from 'rxjs'; - -import { Crisis } from '../crisis'; -import { DialogService } from '../../dialog.service'; - -@Component({ - selector: 'app-crisis-detail', - templateUrl: './crisis-detail.component.html', - styleUrls: ['./crisis-detail.component.css'] -}) -export class CrisisDetailComponent implements OnInit { - crisis!: Crisis; - editName = ''; - - constructor( - private route: ActivatedRoute, - private router: Router, - public dialogService: DialogService - ) {} - -// #docregion ngOnInit - ngOnInit() { - this.route.data - .subscribe(data => { - const crisis: Crisis = data['crisis']; - this.editName = crisis.name; - this.crisis = crisis; - }); - } -// #enddocregion ngOnInit - - // #docregion cancel-save - cancel() { - this.gotoCrises(); - } - - save() { - this.crisis.name = this.editName; - this.gotoCrises(); - } - // #enddocregion cancel-save - - // #docregion canDeactivate - canDeactivate(): Observable | boolean { - // Allow synchronous navigation (`true`) if no crisis or the crisis is unchanged - if (!this.crisis || this.crisis.name === this.editName) { - return true; - } - // Otherwise ask the user with the dialog service and return its - // observable which resolves to true or false when the user decides - return this.dialogService.confirm('Discard changes?'); - } - // #enddocregion canDeactivate - - gotoCrises() { - const crisisId = this.crisis ? this.crisis.id : null; - // Pass along the crisis id if available - // so that the CrisisListComponent can select that crisis. - // Add a totally useless `foo` parameter for kicks. - // #docregion gotoCrises-navigate - // Relative navigation back to the crises - this.router.navigate(['../', { id: crisisId, foo: 'foo' }], { relativeTo: this.route }); - // #enddocregion gotoCrises-navigate - } -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.1.ts b/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.1.ts deleted file mode 100644 index a64a924d60d..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.1.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, ParamMap } from '@angular/router'; - -import { CrisisService } from '../crisis.service'; -import { Crisis } from '../crisis'; -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -@Component({ - selector: 'app-crisis-list', - templateUrl: './crisis-list.component.html', - styleUrls: ['./crisis-list.component.css'] -}) -export class CrisisListComponent implements OnInit { - crises$!: Observable; - selectedId = 0; - - constructor( - private service: CrisisService, - private route: ActivatedRoute - ) {} - - - ngOnInit() { - this.crises$ = this.route.paramMap.pipe( - switchMap((params: ParamMap) => { - this.selectedId = parseInt(params.get('id')!, 10); - return this.service.getCrises(); - }) - ); - } -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.css b/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.css deleted file mode 100644 index ac8af4cf148..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.css +++ /dev/null @@ -1,64 +0,0 @@ -/* CrisisListComponent's private CSS styles */ -.crises { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; -} - -.crises li { - position: relative; - cursor: pointer; -} - -.crises li:hover { - left: 0.1em; -} - -.crises a { - color: black; - text-decoration: none; - display: block; - background-color: #eee; - margin: 0.5em 0; - border-radius: 4px; - line-height: 2rem; -} - -@media (min-width: 600px) { - .crises a { - font-size: 1.2rem; - padding: 0.5em 0; - line-height: 1.4rem; - } -} - -.crises a:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: 0.1em; -} - -.crises .selected a { - background: #d6e6f7; -} - -.crises .selected a:hover { - background-color: #bdd7f5; -} - -.heroes .selected a { - background-color: #d6e6f7; -} - -.heroes .selected a:hover { - background-color: #bdd7f5; -} - -.crises .badge { - padding: 0.5em 0.6em; - color: white; - background-color: #435b60; - min-width: 16px; - margin-right: 0.8em; - border-radius: 4px 0 0 4px; -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.html b/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.html deleted file mode 100644 index 4a45de6b2e1..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.html +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.ts b/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.ts deleted file mode 100644 index b70b2a6b2c4..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis-list/crisis-list.component.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { CrisisService } from '../crisis.service'; -import { Crisis } from '../crisis'; -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; - -@Component({ - selector: 'app-crisis-list', - templateUrl: './crisis-list.component.html', - styleUrls: ['./crisis-list.component.css'] -}) -export class CrisisListComponent implements OnInit { - crises$?: Observable; - selectedId = 0; - - constructor( - private service: CrisisService, - private route: ActivatedRoute - ) {} - - ngOnInit() { - this.crises$ = this.route.firstChild?.paramMap.pipe( - switchMap(params => { - this.selectedId = parseInt(params.get('id')!, 10); - return this.service.getCrises(); - }) - ); - } -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis.service.ts b/aio/content/examples/router/src/app/crisis-center/crisis.service.ts deleted file mode 100644 index dd18d82f11b..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docplaster -// #docregion -import { BehaviorSubject } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { Injectable } from '@angular/core'; -import { MessageService } from '../message.service'; -import { Crisis } from './crisis'; -import { CRISES } from './mock-crises'; - -@Injectable({ - providedIn: 'root', -}) -export class CrisisService { - static nextCrisisId = 100; - private crises$: BehaviorSubject = new BehaviorSubject(CRISES); - - constructor(private messageService: MessageService) { } - - getCrises() { return this.crises$; } - - getCrisis(id: number | string) { - return this.getCrises().pipe( - map(crises => crises.find(crisis => crisis.id === +id)!) - ); - } - - // #enddocregion - addCrisis(name: string) { - name = name.trim(); - if (name) { - const crisis = { id: CrisisService.nextCrisisId++, name }; - CRISES.push(crisis); - this.crises$.next(CRISES); - } - } - // #docregion -} diff --git a/aio/content/examples/router/src/app/crisis-center/crisis.ts b/aio/content/examples/router/src/app/crisis-center/crisis.ts deleted file mode 100644 index c7fc032be47..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/crisis.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Crisis { - id: number; - name: string; -} diff --git a/aio/content/examples/router/src/app/crisis-center/mock-crises.ts b/aio/content/examples/router/src/app/crisis-center/mock-crises.ts deleted file mode 100644 index c21611815db..00000000000 --- a/aio/content/examples/router/src/app/crisis-center/mock-crises.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Crisis } from './crisis'; - -export const CRISES: Crisis[] = [ - { id: 1, name: 'Dragon Burning Cities' }, - { id: 2, name: 'Sky Rains Great White Sharks' }, - { id: 3, name: 'Giant Asteroid Heading For Earth' }, - { id: 4, name: 'Procrastinators Meeting Delayed Again' }, -]; diff --git a/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.css b/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.html b/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.html deleted file mode 100644 index aabd2a641e7..00000000000 --- a/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.html +++ /dev/null @@ -1,2 +0,0 @@ -

    CRISIS CENTER

    -

    Get your crisis here

    diff --git a/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.ts b/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.ts deleted file mode 100644 index e8945db6388..00000000000 --- a/aio/content/examples/router/src/app/crisis-list/crisis-list.component.1.ts +++ /dev/null @@ -1,10 +0,0 @@ -// Initial empty version -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-crisis-list', - templateUrl: './crisis-list.component.1.html', - styleUrls: ['./crisis-list.component.1.css'] -}) -export class CrisisListComponent { } diff --git a/aio/content/examples/router/src/app/dialog.service.ts b/aio/content/examples/router/src/app/dialog.service.ts deleted file mode 100644 index 2c4de6b403e..00000000000 --- a/aio/content/examples/router/src/app/dialog.service.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { Observable, of } from 'rxjs'; - -/** - * Async modal dialog service - * DialogService makes this app easier to test by faking this service. - * TODO: better modal implementation that doesn't use window.confirm - */ -@Injectable({ - providedIn: 'root', -}) -export class DialogService { - /** - * Ask user to confirm an action. `message` explains the action and choices. - * Returns observable resolving to `true`=confirm or `false`=cancel - */ - confirm(message?: string): Observable { - const confirmation = window.confirm(message || 'Is it OK?'); - - return of(confirmation); - } -} diff --git a/aio/content/examples/router/src/app/hero-list/hero-list.component.1.css b/aio/content/examples/router/src/app/hero-list/hero-list.component.1.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/hero-list/hero-list.component.1.html b/aio/content/examples/router/src/app/hero-list/hero-list.component.1.html deleted file mode 100644 index f1d912d5a94..00000000000 --- a/aio/content/examples/router/src/app/hero-list/hero-list.component.1.html +++ /dev/null @@ -1,6 +0,0 @@ - -

    HEROES

    -

    Get your heroes here

    - - - diff --git a/aio/content/examples/router/src/app/hero-list/hero-list.component.1.ts b/aio/content/examples/router/src/app/hero-list/hero-list.component.1.ts deleted file mode 100644 index cbf2e54d991..00000000000 --- a/aio/content/examples/router/src/app/hero-list/hero-list.component.1.ts +++ /dev/null @@ -1,10 +0,0 @@ - -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-hero-list', - templateUrl: './hero-list.component.1.html', - styleUrls: ['./hero-list.component.1.css'] -}) -export class HeroListComponent { } diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.1.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.1.ts deleted file mode 100644 index 6b1f113d817..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.1.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #docplaster -// #docregion -import { switchMap } from 'rxjs/operators'; -import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; -// #docregion imports -import { Router, ActivatedRoute, ParamMap } from '@angular/router'; -// #enddocregion imports - -import { HeroService } from '../hero.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent implements OnInit { - hero$!: Observable; - - constructor( - private route: ActivatedRoute, - private router: Router, - private service: HeroService - ) {} - - ngOnInit() { - this.hero$ = this.route.paramMap.pipe( - switchMap((params: ParamMap) => - this.service.getHero(params.get('id')!)) - ); - } - - // #docregion gotoHeroes - gotoHeroes() { - this.router.navigate(['/heroes']); - } - // #enddocregion gotoHeroes -} diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts deleted file mode 100644 index b0896899df9..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.2.ts +++ /dev/null @@ -1,35 +0,0 @@ -// Snapshot version -// #docregion -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; -import { Observable } from 'rxjs'; - -import { HeroService } from '../hero.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent implements OnInit { - hero$!: Observable; - - constructor( - private route: ActivatedRoute, - private router: Router, - private service: HeroService - ) {} - - // #docregion snapshot - ngOnInit() { - const id = this.route.snapshot.paramMap.get('id')!; - - this.hero$ = this.service.getHero(id); - } - // #enddocregion snapshot - - gotoHeroes() { - this.router.navigate(['/heroes']); - } -} diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.3.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.3.ts deleted file mode 100644 index a910ab508b0..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.3.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docplaster -// #docregion -// #docregion rxjs-operator-import -import { switchMap } from 'rxjs/operators'; -// #enddocregion rxjs-operator-import -import { Component, OnInit } from '@angular/core'; -import { Router, ActivatedRoute, ParamMap } from '@angular/router'; -import { Observable } from 'rxjs'; - -import { HeroService } from '../hero.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent implements OnInit { - hero$!: Observable; - - // #docregion ctor - constructor( - private route: ActivatedRoute, - private router: Router, - private service: HeroService - ) {} - // #enddocregion ctor - - // #docregion ngOnInit - ngOnInit() { - this.hero$ = this.route.paramMap.pipe( - switchMap((params: ParamMap) => - this.service.getHero(params.get('id')!)) - ); - } - // #enddocregion ngOnInit - - // #docregion gotoHeroes - gotoHeroes(hero: Hero) { - const heroId = hero ? hero.id : null; - // Pass along the hero id if available - // so that the HeroList component can select that hero. - // Include a junk 'foo' property for fun. - this.router.navigate(['/heroes', { id: heroId, foo: 'foo' }]); - } - // #enddocregion gotoHeroes -} diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.4.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.4.ts deleted file mode 100644 index 9f0ff36efef..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.4.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docplaster -// #docregion -import {Component, Input, OnInit} from '@angular/core'; -import {Router} from '@angular/router'; -import {Observable} from 'rxjs'; - -import {Hero} from '../hero'; -import {HeroService} from '../hero.service'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent { - hero$!: Observable; - - constructor(private router: Router, private service: HeroService) {} - - // #docregion id-input - @Input() - set id(heroId: string) { - this.hero$ = this.service.getHero(heroId); - } - // #enddocregion id-input - - gotoHeroes(hero: Hero) { - const heroId = hero ? hero.id : null; - // Pass along the hero id if available - // so that the HeroList component can select that hero. - // Include a junk 'foo' property for fun. - this.router.navigate(['/superheroes', {id: heroId, foo: 'foo'}]); - } -} diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css deleted file mode 100644 index 8f1e21cbe3b..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,8 +0,0 @@ -button { - margin-top: 1rem; -} - -label { - display: block; - margin-bottom: .5rem; -} diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.html b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.html deleted file mode 100644 index c5734751830..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,8 +0,0 @@ -

    Heroes

    -
    -

    {{ hero.name }}

    -

    Id: {{ hero.id }}

    - - - -
    diff --git a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.ts b/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.ts deleted file mode 100644 index a7c7f7c612c..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -// #docplaster -// #docregion -import {Component, OnInit} from '@angular/core'; -import {ActivatedRoute, ParamMap, Router} from '@angular/router'; -import {Observable} from 'rxjs'; -import {switchMap} from 'rxjs/operators'; - -import {Hero} from '../hero'; -import {HeroService} from '../hero.service'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent implements OnInit { - hero$!: Observable; - - constructor(private route: ActivatedRoute, private router: Router, private service: HeroService) { - } - - - ngOnInit() { - this.hero$ = this.route.paramMap.pipe( - switchMap((params: ParamMap) => this.service.getHero(params.get('id')!))); - } - - // #docregion redirect - gotoHeroes(hero: Hero) { - const heroId = hero ? hero.id : null; - // Pass along the hero id if available - // so that the HeroList component can select that hero. - // Include a junk 'foo' property for fun. - this.router.navigate(['/superheroes', {id: heroId, foo: 'foo'}]); - } - // #enddocregion redirect -} diff --git a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.html b/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.html deleted file mode 100644 index b3802d30b7b..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.html +++ /dev/null @@ -1,12 +0,0 @@ -

    Heroes

    - - - diff --git a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.ts b/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.ts deleted file mode 100644 index 2d059a787f0..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.1.ts +++ /dev/null @@ -1,23 +0,0 @@ -// TODO: Feature Componentized like HeroCenter -import { Component, OnInit } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { HeroService } from '../hero.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-list', - templateUrl: './hero-list.component.1.html', - styleUrls: ['./hero-list.component.css'] -}) -export class HeroListComponent implements OnInit { - heroes$!: Observable; - - constructor( - private service: HeroService - ) {} - - ngOnInit() { - this.heroes$ = this.service.getHeroes(); - } -} diff --git a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.css b/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.css deleted file mode 100644 index 606deceae53..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.css +++ /dev/null @@ -1,55 +0,0 @@ -/* HeroListComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 100%; -} -.heroes li { - position: relative; - cursor: pointer; -} - -.heroes li:hover { - left: .1em; -} - -.heroes a { - color: black; - text-decoration: none; - display: block; - font-size: 1.2rem; - background-color: #eee; - margin: .5rem .5rem .5rem 0; - padding: .5rem 0; - border-radius: 4px; -} - -.heroes a:hover { - color: #2c3a41; - background-color: #e6e6e6; -} - -.heroes a:active { - background-color: #525252; - color: #fafafa; -} - -/* #docregion selected */ -.heroes .selected a { - background-color: #d6e6f7; -} - -.heroes .selected a:hover { - background-color: #bdd7f5; -} -/* #enddocregion selected */ - -.heroes .badge { - padding: .5em .6em; - color: white; - background-color: #435b60; - min-width: 16px; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} diff --git a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.html b/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.html deleted file mode 100644 index ebaa0ef826d..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.html +++ /dev/null @@ -1,10 +0,0 @@ -

    Heroes

    - - - diff --git a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.ts b/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.ts deleted file mode 100644 index bb56bcf04ed..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero-list/hero-list.component.ts +++ /dev/null @@ -1,42 +0,0 @@ -// #docplaster -// #docregion -// TODO: Feature Componentized like CrisisCenter -// #docregion rxjs-imports -import { Observable } from 'rxjs'; -import { switchMap } from 'rxjs/operators'; -// #enddocregion rxjs-imports -import { Component, OnInit } from '@angular/core'; -// #docregion import-router -import { ActivatedRoute } from '@angular/router'; -// #enddocregion import-router - -import { HeroService } from '../hero.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-list', - templateUrl: './hero-list.component.html', - styleUrls: ['./hero-list.component.css'] -}) -// #docregion ctor -export class HeroListComponent implements OnInit { - heroes$!: Observable; - selectedId = 0; - - constructor( - private service: HeroService, - private route: ActivatedRoute - ) {} - - ngOnInit() { - this.heroes$ = this.route.paramMap.pipe( - switchMap(params => { - this.selectedId = parseInt(params.get('id')!, 10); - return this.service.getHeroes(); - }) - ); - } - // #enddocregion ctor -// #docregion ctor -} -// #enddocregion diff --git a/aio/content/examples/router/src/app/heroes/hero.service.ts b/aio/content/examples/router/src/app/heroes/hero.service.ts deleted file mode 100644 index 79ace7ae29b..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero.service.ts +++ /dev/null @@ -1,31 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { Observable, of } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { Hero } from './hero'; -import { HEROES } from './mock-heroes'; -import { MessageService } from '../message.service'; - -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - - constructor(private messageService: MessageService) { } - - getHeroes(): Observable { - // TODO: send the message _after_ fetching the heroes - this.messageService.add('HeroService: fetched heroes'); - return of(HEROES); - } - - getHero(id: number | string) { - return this.getHeroes().pipe( - // (+) before `id` turns the string into a number - map((heroes: Hero[]) => heroes.find(hero => hero.id === +id)!) - ); - } -} - diff --git a/aio/content/examples/router/src/app/heroes/hero.ts b/aio/content/examples/router/src/app/heroes/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/router/src/app/heroes/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/router/src/app/heroes/heroes-routing.module.1.ts b/aio/content/examples/router/src/app/heroes/heroes-routing.module.1.ts deleted file mode 100644 index 5cb604444a1..00000000000 --- a/aio/content/examples/router/src/app/heroes/heroes-routing.module.1.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { HeroListComponent } from './hero-list/hero-list.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -const heroesRoutes: Routes = [ - { path: 'heroes', component: HeroListComponent }, -// #docregion hero-detail-route - { path: 'hero/:id', component: HeroDetailComponent } -// #enddocregion hero-detail-route -]; - -@NgModule({ - imports: [ - RouterModule.forChild(heroesRoutes) - ], - exports: [ - RouterModule - ] -}) -export class HeroesRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/heroes/heroes-routing.module.2.ts b/aio/content/examples/router/src/app/heroes/heroes-routing.module.2.ts deleted file mode 100644 index ae041fbaee8..00000000000 --- a/aio/content/examples/router/src/app/heroes/heroes-routing.module.2.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { HeroListComponent } from './hero-list/hero-list.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -const heroesRoutes: Routes = [ - { path: 'heroes', component: HeroListComponent, data: { animation: 'heroes' } }, - { path: 'hero/:id', component: HeroDetailComponent, data: { animation: 'hero' } } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(heroesRoutes) - ], - exports: [ - RouterModule - ] -}) -export class HeroesRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/heroes/heroes-routing.module.ts b/aio/content/examples/router/src/app/heroes/heroes-routing.module.ts deleted file mode 100644 index 5903bd5407a..00000000000 --- a/aio/content/examples/router/src/app/heroes/heroes-routing.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { HeroListComponent } from './hero-list/hero-list.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -const heroesRoutes: Routes = [ - { path: 'heroes', redirectTo: '/superheroes' }, - { path: 'hero/:id', redirectTo: '/superhero/:id' }, - { path: 'superheroes', component: HeroListComponent, data: { animation: 'heroes' } }, - { path: 'superhero/:id', component: HeroDetailComponent, data: { animation: 'hero' } } -]; - -@NgModule({ - imports: [ - RouterModule.forChild(heroesRoutes) - ], - exports: [ - RouterModule - ] -}) -export class HeroesRoutingModule { } -// #enddocregion diff --git a/aio/content/examples/router/src/app/heroes/heroes.module.ts b/aio/content/examples/router/src/app/heroes/heroes.module.ts deleted file mode 100644 index dca5e08e2f1..00000000000 --- a/aio/content/examples/router/src/app/heroes/heroes.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { HeroListComponent } from './hero-list/hero-list.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -import { HeroesRoutingModule } from './heroes-routing.module'; - -@NgModule({ - imports: [ - CommonModule, - FormsModule, - HeroesRoutingModule - ], - declarations: [ - HeroListComponent, - HeroDetailComponent - ] -}) -export class HeroesModule {} diff --git a/aio/content/examples/router/src/app/heroes/mock-heroes.ts b/aio/content/examples/router/src/app/heroes/mock-heroes.ts deleted file mode 100644 index 33729c43e37..00000000000 --- a/aio/content/examples/router/src/app/heroes/mock-heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/router/src/app/message.service.ts b/aio/content/examples/router/src/app/message.service.ts deleted file mode 100644 index d72412e115e..00000000000 --- a/aio/content/examples/router/src/app/message.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/router/src/app/page-not-found/page-not-found.component.css b/aio/content/examples/router/src/app/page-not-found/page-not-found.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/router/src/app/page-not-found/page-not-found.component.html b/aio/content/examples/router/src/app/page-not-found/page-not-found.component.html deleted file mode 100644 index 6c581c4fc8e..00000000000 --- a/aio/content/examples/router/src/app/page-not-found/page-not-found.component.html +++ /dev/null @@ -1 +0,0 @@ -

    Page not found

    \ No newline at end of file diff --git a/aio/content/examples/router/src/app/page-not-found/page-not-found.component.ts b/aio/content/examples/router/src/app/page-not-found/page-not-found.component.ts deleted file mode 100644 index 644ac672e2e..00000000000 --- a/aio/content/examples/router/src/app/page-not-found/page-not-found.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-page-not-found', - templateUrl: './page-not-found.component.html', - styleUrls: ['./page-not-found.component.css'] -}) -export class PageNotFoundComponent {} - diff --git a/aio/content/examples/router/src/app/selective-preloading-strategy.service.ts b/aio/content/examples/router/src/app/selective-preloading-strategy.service.ts deleted file mode 100644 index 889502bbf78..00000000000 --- a/aio/content/examples/router/src/app/selective-preloading-strategy.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { PreloadingStrategy, Route } from '@angular/router'; -import { Observable, of } from 'rxjs'; - -@Injectable({ - providedIn: 'root', -}) -export class SelectivePreloadingStrategyService implements PreloadingStrategy { - preloadedModules: string[] = []; - - preload(route: Route, load: () => Observable): Observable { - if (route.canMatch === undefined && route.data?.['preload'] && route.path != null) { - // add the route path to the preloaded module array - this.preloadedModules.push(route.path); - - // log the route path to the console - console.log('Preloaded: ' + route.path); - - return load(); - } else { - return of(null); - } - } -} diff --git a/aio/content/examples/router/src/index.html b/aio/content/examples/router/src/index.html deleted file mode 100644 index edb919d1ec9..00000000000 --- a/aio/content/examples/router/src/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - Angular Router - - - - - - - - - - diff --git a/aio/content/examples/router/src/main.ts b/aio/content/examples/router/src/main.ts deleted file mode 100644 index 49432aa0877..00000000000 --- a/aio/content/examples/router/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/router/stackblitz.json b/aio/content/examples/router/stackblitz.json deleted file mode 100644 index 043d2e74306..00000000000 --- a/aio/content/examples/router/stackblitz.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "description": "Router", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*", - "!src/app/crisis-list/*.*", - "!src/app/hero-list/*.*" - ], - "tags": ["router"], - "file": "src/app/app-routing.module.ts" -} diff --git a/aio/content/examples/routing-with-urlmatcher/BUILD.bazel b/aio/content/examples/routing-with-urlmatcher/BUILD.bazel deleted file mode 100644 index 51a0f4991cb..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "routing-with-urlmatcher", -) diff --git a/aio/content/examples/routing-with-urlmatcher/e2e/src/app.e2e-spec.ts b/aio/content/examples/routing-with-urlmatcher/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1a20600161b..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Routing with Custom Matching', () => { - - beforeAll(() => browser.get('')); - - it('should display Routing with Custom Matching ', async () => { - expect(await element(by.css('h2')).getText()).toEqual('Routing with Custom Matching'); - }); - -}); diff --git a/aio/content/examples/routing-with-urlmatcher/example-config.json b/aio/content/examples/routing-with-urlmatcher/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.css b/aio/content/examples/routing-with-urlmatcher/src/app/app.component.css deleted file mode 100644 index b7ef084c563..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.css +++ /dev/null @@ -1,3 +0,0 @@ -p { - font-family: Lato; -} \ No newline at end of file diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.html b/aio/content/examples/routing-with-urlmatcher/src/app/app.component.html deleted file mode 100644 index 82a05fb3069..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.html +++ /dev/null @@ -1,5 +0,0 @@ -

    Routing with Custom Matching

    - -Navigate to my profile - - \ No newline at end of file diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.ts b/aio/content/examples/routing-with-urlmatcher/src/app/app.component.ts deleted file mode 100644 index 65f24dbd12c..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component, VERSION} from '@angular/core'; -import {RouterLink, RouterOutlet} from '@angular/router'; - -@Component({ - selector: 'app-root', - standalone: true, - imports: [RouterOutlet, RouterLink], - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - name = 'Angular ' + VERSION.major; -} diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/app.config.ts b/aio/content/examples/routing-with-urlmatcher/src/app/app.config.ts deleted file mode 100644 index 3ca59974eb9..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/app.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import {ApplicationConfig} from '@angular/core'; -import {provideProtractorTestingSupport} from '@angular/platform-browser'; -import {provideRouter, withComponentInputBinding} from '@angular/router'; - -import {routes} from './app.routes'; - -export const appConfig: ApplicationConfig = { - providers: [provideRouter(routes, withComponentInputBinding()), provideProtractorTestingSupport()] -}; diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/app.routes.ts b/aio/content/examples/routing-with-urlmatcher/src/app/app.routes.ts deleted file mode 100644 index f58e7b22845..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/app.routes.ts +++ /dev/null @@ -1,18 +0,0 @@ -import {Routes, UrlSegment} from '@angular/router'; - -import {ProfileComponent} from './profile/profile.component'; - -export const routes: Routes = [ - // #docregion matcher - { - matcher: (url) => { - if (url.length === 1 && url[0].path.match(/^@[\w]+$/gm)) { - return {consumed: url, posParams: {username: new UrlSegment(url[0].path.slice(1), {})}}; - } - - return null; - }, - component: ProfileComponent - }, - // #enddocregion matcher -]; diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.css b/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.html b/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.html deleted file mode 100644 index 8a002a4a5b7..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - Hello {{ username }}! -

    \ No newline at end of file diff --git a/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.ts b/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.ts deleted file mode 100644 index cc22077cc73..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/app/profile/profile.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import {Component, Input} from '@angular/core'; - -@Component({ - selector: 'app-profile', - standalone: true, - templateUrl: './profile.component.html', - styleUrls: ['./profile.component.css'] -}) -export class ProfileComponent { - @Input() username!: string; -} diff --git a/aio/content/examples/routing-with-urlmatcher/src/index.html b/aio/content/examples/routing-with-urlmatcher/src/index.html deleted file mode 100644 index 8117be96b32..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/index.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Angular App - - - loading - - diff --git a/aio/content/examples/routing-with-urlmatcher/src/main.ts b/aio/content/examples/routing-with-urlmatcher/src/main.ts deleted file mode 100644 index 7e8072d147b..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import {bootstrapApplication} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; -import {appConfig} from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig); diff --git a/aio/content/examples/routing-with-urlmatcher/stackblitz.json b/aio/content/examples/routing-with-urlmatcher/stackblitz.json deleted file mode 100644 index 1c644da6b2e..00000000000 --- a/aio/content/examples/routing-with-urlmatcher/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Router", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0-9].*" - ], - "tags": ["router-with-custom-matching"] -} diff --git a/aio/content/examples/rx-library/BUILD.bazel b/aio/content/examples/rx-library/BUILD.bazel deleted file mode 100644 index ff1505d70af..00000000000 --- a/aio/content/examples/rx-library/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "rx-library", -) diff --git a/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts b/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 611b56b20e6..00000000000 --- a/aio/content/examples/rx-library/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* - * This example project is special in that it is not a cli app. To run tests appropriate for this - * project, the test command is overwritten in `aio/content/examples/rx-library/example-config.json`. - * - * This is an empty placeholder file to ensure that `aio/tools/examples/run-example-e2e.mjs` runs - * tests for this project. - * - * TODO: Fix our infrastructure/tooling, so that this hack is not necessary. - */ diff --git a/aio/content/examples/rx-library/example-config.json b/aio/content/examples/rx-library/example-config.json deleted file mode 100644 index 3aa2059b4d0..00000000000 --- a/aio/content/examples/rx-library/example-config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "tests": [ - { - "cmd": "yarn", - "args": ["tsc", "--project", "tsconfig.spec.json", "--module", "commonjs"] - }, - { - "cmd": "yarn", - "args": ["jasmine", "out-tsc/**/*.spec.js"] - } - ] -} diff --git a/aio/content/examples/rx-library/src/app/app.component.css b/aio/content/examples/rx-library/src/app/app.component.css deleted file mode 100644 index c6ab6d408ef..00000000000 --- a/aio/content/examples/rx-library/src/app/app.component.css +++ /dev/null @@ -1,26 +0,0 @@ -button { - box-shadow: inset 0 1px 0 0 #ffffff; - background: #ffffff linear-gradient(to bottom, #ffffff 5%, #f6f6f6 100%); - border-radius: 6px; - border: 1px solid #dcdcdc; - display: inline-block; - cursor: pointer; - color: #666666; - font-family: Arial, sans-serif; - font-size: 15px; - font-weight: bold; - margin-right: 4px; - padding: 6px 24px; - text-decoration: none; - text-shadow: 0 1px 0 #ffffff; - outline: 0; -} - -h2 { - color: #0a57a5; - font-weight: bold; -} - -.small { - font-size: 80%; -} diff --git a/aio/content/examples/rx-library/src/app/app.component.html b/aio/content/examples/rx-library/src/app/app.component.html deleted file mode 100644 index 2a2bf0971a8..00000000000 --- a/aio/content/examples/rx-library/src/app/app.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    Angular RxJS Example

    - -

    Message Subject

    -
    - - -
    - - - -

    Unicast / Multicast

    - - diff --git a/aio/content/examples/rx-library/src/app/app.component.ts b/aio/content/examples/rx-library/src/app/app.component.ts deleted file mode 100644 index 169d4475199..00000000000 --- a/aio/content/examples/rx-library/src/app/app.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; - -import { MessageComponent } from './message.component'; -import { MessageService } from './message.service'; -import { UniMultiCastComponent } from './uni-multi-cast.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ MessageComponent, UniMultiCastComponent ], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - private errorCount = 0; - private warningCount = 0; - - // #docregion add-messages - constructor(private messageService: MessageService) { } - - addError(text: string) { - this.messageService.addError(text); - } - - addWarning(text: string) { - this.messageService.addWarning(text); - } - // #enddocregion add-messages - - createErrorMessage() { - this.addError(`error #${++this.errorCount}`); - } - - createWarningMessage() { - this.addWarning(`warning #${++this.warningCount}`); - } -} diff --git a/aio/content/examples/rx-library/src/app/message.component.css b/aio/content/examples/rx-library/src/app/message.component.css deleted file mode 100644 index 71281c49f91..00000000000 --- a/aio/content/examples/rx-library/src/app/message.component.css +++ /dev/null @@ -1,11 +0,0 @@ -div { - margin: 0.5rem 0; -} - -span { - font-weight: bold; -} - -.small { - font-size: 80%; -} diff --git a/aio/content/examples/rx-library/src/app/message.component.html b/aio/content/examples/rx-library/src/app/message.component.html deleted file mode 100644 index b8f5e904ff4..00000000000 --- a/aio/content/examples/rx-library/src/app/message.component.html +++ /dev/null @@ -1,13 +0,0 @@ -
    - Received message, "{{message.text}}", of type "{{message.type}}." -
    - -
    - Last Error: - {{ errors$ | async }} -
    - -
    - Last Warning: - {{ warnings$ | async }} -
    diff --git a/aio/content/examples/rx-library/src/app/message.component.ts b/aio/content/examples/rx-library/src/app/message.component.ts deleted file mode 100644 index e351322d3d1..00000000000 --- a/aio/content/examples/rx-library/src/app/message.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { Message, MessageService } from './message.service'; -import { Observable, filter, map, startWith } from 'rxjs'; - -/** Display messages received from the MessageService */ -@Component({ - standalone: true, - selector: 'app-message', - templateUrl: './message.component.html', - imports: [ CommonModule ], - styleUrls: [ './message.component.css'] -}) -export class MessageComponent { - - /** Observable of all messages from the MessageService */ - messages$: Observable; - - /** Observable of Error message texts */ - errors$: Observable; - - /** Observable of Warning message texts */ - warnings$: Observable; - - constructor(messageService: MessageService) { - // #docregion observables - // Observable of ALL messages - this.messages$ = messageService.messages$; - - // Derived string observable of just the error message texts - this.errors$ = this.messages$.pipe( - filter(m => m.type === 'Error'), - map(m => m.text), - // #enddocregion observables - startWith('none') - // #docregion observables - ); - - // Derived string observable of just the warning message texts - this.warnings$ = this.messages$.pipe( - filter(m => m.type === 'Warning'), - map(m => m.text), - // #enddocregion observables - startWith('none') - // #docregion observables - ); - // #enddocregion observables - - } - -} diff --git a/aio/content/examples/rx-library/src/app/message.service.ts b/aio/content/examples/rx-library/src/app/message.service.ts deleted file mode 100644 index 664b640eb2d..00000000000 --- a/aio/content/examples/rx-library/src/app/message.service.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Subject } from 'rxjs'; - -/** The interface for values emitted by the Message Service */ -export interface Message { - type: 'Warning' | 'Error'; - text: string; -} - -@Injectable({providedIn: 'root'}) -export class MessageService { - // Tip: never expose the Subject itself. - private messageSubject = new Subject(); - - /** Observable of all messages */ - messages$ = this.messageSubject.asObservable(); - - /** Add an error message to the Subject */ - addError(text: string) { - this.messageSubject.next({ type: 'Error', text }); - } - - /** Add a warning message to the Subject */ - addWarning(text: string) { - this.messageSubject.next({ type: 'Warning', text }); - } -} diff --git a/aio/content/examples/rx-library/src/app/uni-multi-cast.component.ts b/aio/content/examples/rx-library/src/app/uni-multi-cast.component.ts deleted file mode 100644 index 0c69d1a1c21..00000000000 --- a/aio/content/examples/rx-library/src/app/uni-multi-cast.component.ts +++ /dev/null @@ -1,93 +0,0 @@ -// #docplaster -import { Component, OnDestroy } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -import { Observable, interval, shareReplay, Subscription } from 'rxjs'; - -@Component({ - standalone: true, - selector: 'app-uni-multi-cast', - template: ` - Unicast Subscriber(s): -
    -
    {{uni}}
    -
    - -
    no unicast subscribers
    -
    -
    - Multicast ShareReplay Subscriber(s): -
    -
    {{multi}}
    -
    - -
    no multicast shareReplay subscribers
    -
    - - -
    - - - -
    - `, - imports: [ CommonModule], - styleUrls: ['./app.component.css'] -}) -export class UniMultiCastComponent implements OnDestroy { - // #docregion unicast-observable - /** Unicast observable that emits integers every 1/2 second. */ - numbers$: Observable = interval(500); - // #enddocregion unicast-observable - - // #docregion shareReplay-observable - /** Multicast the interval by extending `numbers$` with `shareReplay` */ - multiCastNumber$ = this.numbers$.pipe( - // Replay 1 item; never forgets, never completes. - shareReplay({ bufferSize: 1, refCount: false }) - ); - // #enddocregion shareReplay-observable - - unicastSubscribers = [] as string[]; - shareReplaySubscribers = [] as string[]; - subscriptions = new Subscription(); - - ngOnDestroy() { - this.subscriptions.unsubscribe(); - } - - addUnicastSubscriber() { - const index = this.unicastSubscribers.length; - const id = index + 1; - this.unicastSubscribers[index] = `Unicast Subscriber #${id} added`; - - // Add a subscriber to the unicast observable - const newSubscription = this.numbers$.subscribe(num => { - this.unicastSubscribers[index] = `Unicast Subscriber #${id} received ${num}`; - }); - - this.subscriptions.add(newSubscription); - } - - addShareReplaySubscriber() { - const index = this.shareReplaySubscribers.length; - const id = index + 1; - this.shareReplaySubscribers[index] = `ShareReplay Subscriber #${id} added`; - - // Add a subscriber to the multicast observable - const newSubscription = this.multiCastNumber$.subscribe(num => { - this.shareReplaySubscribers[index] = `ShareReplay Subscriber #${id} received ${num}`; - }); - - this.subscriptions.add(newSubscription); - } - - unsubscribeAll() { - this.subscriptions.unsubscribe(); // unsubscribe all - this.subscriptions = new Subscription(); - - this.unicastSubscribers[this.unicastSubscribers.length] = - this.shareReplaySubscribers[this.shareReplaySubscribers.length] = - '-- unsubscribed --'; - } -} diff --git a/aio/content/examples/rx-library/src/error-handling.spec.ts b/aio/content/examples/rx-library/src/error-handling.spec.ts deleted file mode 100644 index c358658f74b..00000000000 --- a/aio/content/examples/rx-library/src/error-handling.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Subject, throwError } from 'rxjs'; -import { docRegionDefault } from './error-handling'; - -describe('error-handling', () => { - let consoleSpy: jasmine.SpyObj; - let ajaxSubject: Subject; - let ajax: jasmine.Spy; - - beforeEach(() => { - consoleSpy = jasmine.createSpyObj('console', ['log']); - ajaxSubject = new Subject(); - ajax = jasmine - .createSpy('ajax') - .and.callFake((url: string) => ajaxSubject); - }); - - afterEach(() => ajaxSubject.unsubscribe()); - - it('should return the response object', () => { - docRegionDefault(consoleSpy, ajax); - - ajaxSubject.next({response: {foo: 'bar'}}); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['data: ', {foo: 'bar'}] - ]); - }); - - it('should return an empty array when using an object without a `response` property', () => { - docRegionDefault(consoleSpy, ajax); - - ajaxSubject.next({foo: 'bar'}); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['data: ', []] - ]); - }); - - it('should return an empty array when the ajax observable errors', () => { - ajax.and.returnValue(throwError('Test Error')); - - docRegionDefault(consoleSpy, ajax); - - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['data: ', []] - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/error-handling.ts b/aio/content/examples/rx-library/src/error-handling.ts deleted file mode 100644 index 7929e87df07..00000000000 --- a/aio/content/examples/rx-library/src/error-handling.ts +++ /dev/null @@ -1,40 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion - import { Observable, of } from 'rxjs'; - import { ajax } from 'rxjs/ajax'; - import { map, catchError } from 'rxjs/operators'; - -// #enddocregion - -// eslint-disable-next-line @typescript-eslint/no-shadow -export function docRegionDefault(console: Console, ajax: (url: string) => Observable) { - // #docregion - // Return good response from the API. - // If the response is bad, throw an error. - const apiData = ajax('/api/data').pipe( - map((res: any) => { - if (!res?.response) { - throw new Error('Value expected!'); - } - return res.response; - }), - /* - * Catch the error, either from the AJAX call or from the map operator, - * and return an observable of empty array. - * The `catchError` argument must be a function that returns an observable. - */ - catchError(() => of([])) - ); - - apiData.subscribe({ - next(x: T) { console.log('data: ', x); }, - error() { console.log('errors already caught... will not run'); } - }); - - // #enddocregion - return apiData; -} diff --git a/aio/content/examples/rx-library/src/index.html b/aio/content/examples/rx-library/src/index.html deleted file mode 100644 index 2b4971c1677..00000000000 --- a/aio/content/examples/rx-library/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Angular RxJS Library Example - - - - - - - - diff --git a/aio/content/examples/rx-library/src/main.ts b/aio/content/examples/rx-library/src/main.ts deleted file mode 100644 index 964eff71b77..00000000000 --- a/aio/content/examples/rx-library/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/rx-library/src/operators.1.spec.ts b/aio/content/examples/rx-library/src/operators.1.spec.ts deleted file mode 100644 index eb31815a93e..00000000000 --- a/aio/content/examples/rx-library/src/operators.1.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { docRegionDefault } from './operators.1'; - -describe('squareOdd - operators.1.ts', () => { - it('should return square odds', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionDefault(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(3); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [1], - [9], - [25], - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/operators.1.ts b/aio/content/examples/rx-library/src/operators.1.ts deleted file mode 100644 index 0b07b2fd57a..00000000000 --- a/aio/content/examples/rx-library/src/operators.1.ts +++ /dev/null @@ -1,28 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion - import { of, filter, map, pipe } from 'rxjs'; - -// #enddocregion - -export function docRegionDefault(console: Console) { - // #docregion - const nums = of(1, 2, 3, 4, 5); - - // Create a function that accepts an Observable. - const squareOddVals = pipe( - filter((n: number) => n % 2 === 1), - map(n => n * n) - ); - - // Create an Observable that will run the filter and map functions - const squareOdd = squareOddVals(nums); - - // Subscribe to run the combined functions - squareOdd.subscribe(x => console.log(x)); - - // #enddocregion -} diff --git a/aio/content/examples/rx-library/src/operators.2.spec.ts b/aio/content/examples/rx-library/src/operators.2.spec.ts deleted file mode 100644 index 79ccba2503a..00000000000 --- a/aio/content/examples/rx-library/src/operators.2.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { docRegionDefault } from './operators.2'; - -describe('squareOdd - operators.2.ts', () => { - it('should return square odds', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionDefault(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(3); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [1], - [9], - [25], - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/operators.2.ts b/aio/content/examples/rx-library/src/operators.2.ts deleted file mode 100644 index 619fdaafd14..00000000000 --- a/aio/content/examples/rx-library/src/operators.2.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion - import { of, filter, map } from 'rxjs'; - -// #enddocregion - -export function docRegionDefault(console: Console) { - // #docregion - const squareOdd = of(1, 2, 3, 4, 5) - .pipe( - filter(n => n % 2 === 1), - map(n => n * n) - ); - - // Subscribe to get values - squareOdd.subscribe(x => console.log(x)); - - // #enddocregion -} diff --git a/aio/content/examples/rx-library/src/operators.spec.ts b/aio/content/examples/rx-library/src/operators.spec.ts deleted file mode 100644 index c4fccc3626e..00000000000 --- a/aio/content/examples/rx-library/src/operators.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { docRegionDefault, docRegionCustomOperator } from './operators'; - -describe('squaredNums - operators.ts', () => { - it('default example should return square odds', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionDefault(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(3); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [1], [4], [9], - ]); - }); - - it('custom operator example should return square odds twice', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - docRegionCustomOperator(consoleSpy); - expect(consoleSpy.log).toHaveBeenCalledTimes(6); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [1], [4], [9], - [1], [4], [9], - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/operators.ts b/aio/content/examples/rx-library/src/operators.ts deleted file mode 100644 index bdaf62ac660..00000000000 --- a/aio/content/examples/rx-library/src/operators.ts +++ /dev/null @@ -1,49 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion - import { of, map } from 'rxjs'; - - /** source observable of integers. */ - const nums = of(1, 2, 3); -// #enddocregion - -export function docRegionDefault(console: Console) { - // #docregion - - /** A new squares observable created by piping through the `map` operator. */ - const squares = nums.pipe( - map(num => num * num) // `map` configured with a function that squares each value. - ); - - // subscribe to the new observable - squares.subscribe(value => console.log(value)); - - // Logs - // 1 - // 4 - // 9 - // #enddocregion -} - -// #region former examples that might be worth documenting - -export function docRegionCustomOperator(console: Console) { - /** A custom operator created by capturing the result of a configured operator */ - const squareValuesOperator = map((value: number) => value * value); - - // Use it like any other operator - nums.pipe(squareValuesOperator).subscribe( - value => console.log(value) - ); - - /** Squaring observable created by passing the source observable directly to the operator (rare) */ - const squaredNums = squareValuesOperator(nums); - - squaredNums.subscribe(console.log); // same as subscribe(value => console.log(value) -} - -// #endregion former examples that might be worth documenting - diff --git a/aio/content/examples/rx-library/src/retry-on-error.spec.ts b/aio/content/examples/rx-library/src/retry-on-error.spec.ts deleted file mode 100644 index 61a983dbb9e..00000000000 --- a/aio/content/examples/rx-library/src/retry-on-error.spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { of, throwError } from 'rxjs'; -import { mergeMap, tap } from 'rxjs/operators'; -import { docRegionDefault } from './retry-on-error'; - -describe('retry-on-error', () => { - let consoleSpy: jasmine.SpyObj; - beforeEach(() => consoleSpy = jasmine.createSpyObj('console', ['log'])); - - it('should return the response object', () => { - const ajax = () => of({ response: { foo: 'bar' } }); - - docRegionDefault(consoleSpy, ajax); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['data: ', { foo: 'bar' }], - ]); - }); - - it('should return an empty array after 3 retries + 1 initial request', () => { - const ajax = - () => of({ noresponse: true }).pipe(tap(() => consoleSpy.log('Subscribed to AJAX'))); - - docRegionDefault(consoleSpy, ajax); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['Subscribed to AJAX'], - ['Error occurred.'], - ['Subscribed to AJAX'], - ['Error occurred.'], - ['Subscribed to AJAX'], - ['Error occurred.'], - ['Subscribed to AJAX'], - ['Error occurred.'], - ['data: ', []], - ]); - }); - - it('should return the response if the request succeeds upon retrying', () => { - // Fail on the first two requests, but succeed from the 3rd onwards. - let failCount = 2; - const ajax = () => of(null).pipe( - tap(() => consoleSpy.log('Subscribed to AJAX')), - // Fail on the first 2 requests, but succeed from the 3rd onwards. - mergeMap(() => { - if (failCount > 0) { - failCount--; - return throwError('Test error'); - } - return of({ response: { foo: 'bar' } }); - }), - ); - - docRegionDefault(consoleSpy, ajax); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['Subscribed to AJAX'], // Initial request | 1st attempt overall - ['Subscribed to AJAX'], // 1st retry attempt | 2nd attempt overall - ['Subscribed to AJAX'], // 2nd retry attempt | 3rd attempt overall - ['data: ', { foo: 'bar' }], - ]); - }); - - it('should return an empty array when the ajax observable throws an error', () => { - const ajax = () => throwError('Test Error'); - - docRegionDefault(consoleSpy, ajax); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['data: ', []], - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/retry-on-error.ts b/aio/content/examples/rx-library/src/retry-on-error.ts deleted file mode 100644 index a8863c3f1d5..00000000000 --- a/aio/content/examples/rx-library/src/retry-on-error.ts +++ /dev/null @@ -1,34 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion - import { Observable, of } from 'rxjs'; - import { ajax } from 'rxjs/ajax'; - import { map, retry, catchError } from 'rxjs/operators'; - -// #enddocregion - -// eslint-disable-next-line @typescript-eslint/no-shadow -export function docRegionDefault(console: Console, ajax: (url: string) => Observable) { - // #docregion - const apiData = ajax('/api/data').pipe( - map((res: any) => { - if (!res.response) { - console.log('Error occurred.'); - throw new Error('Value expected!'); - } - return res.response; - }), - retry(3), // Retry up to 3 times before failing - catchError(() => of([])) - ); - - apiData.subscribe({ - next(x: T) { console.log('data: ', x); }, - error() { console.log('errors already caught... will not run'); } - }); - - // #enddocregion -} diff --git a/aio/content/examples/rx-library/src/simple-creation.1.spec.ts b/aio/content/examples/rx-library/src/simple-creation.1.spec.ts deleted file mode 100644 index 278b053f6c3..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.1.spec.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { of } from 'rxjs'; -import { docRegionPromise } from './simple-creation.1'; - -describe('simple-creation.1', () => { - it('should create a promise from an observable and return an empty object', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - const fetch = () => of({foo: 42}); - docRegionPromise(consoleSpy, fetch); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - [{foo: 42}], - ['Completed'], - ]); - }); -}); diff --git a/aio/content/examples/rx-library/src/simple-creation.1.ts b/aio/content/examples/rx-library/src/simple-creation.1.ts deleted file mode 100644 index 30cd630f03f..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.1.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion promise - import { from, Observable } from 'rxjs'; - -// #enddocregion promise - -export function docRegionPromise(console: Console, fetch: (url: string) => Observable) { - // #docregion promise - // Create an Observable out of a promise - const data = from(fetch('/api/endpoint')); - // Subscribe to begin listening for async result - data.subscribe({ - next(response) { console.log(response); }, - error(err) { console.error('Error: ' + err); }, - complete() { console.log('Completed'); } - }); - - // #enddocregion promise -} diff --git a/aio/content/examples/rx-library/src/simple-creation.2.spec.ts b/aio/content/examples/rx-library/src/simple-creation.2.spec.ts deleted file mode 100644 index 633ddb1df46..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.2.spec.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { docRegionInterval } from './simple-creation.2'; - -describe('simple-creation.2', () => { - beforeEach(() => jasmine.clock().install()); - afterEach(() => jasmine.clock().uninstall()); - - it('should create an Observable that will publish a value on an interval', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - const subscription = docRegionInterval(consoleSpy); - jasmine.clock().tick(1000); - expect(consoleSpy.log).toHaveBeenCalledWith("It's been 1 seconds since subscribing!"); - consoleSpy.log.calls.reset(); - - jasmine.clock().tick(999); - expect(consoleSpy.log).not.toHaveBeenCalled(); - - jasmine.clock().tick(1); - expect(consoleSpy.log).toHaveBeenCalledWith("It's been 2 seconds since subscribing!"); - subscription.unsubscribe(); - }); -}); diff --git a/aio/content/examples/rx-library/src/simple-creation.2.ts b/aio/content/examples/rx-library/src/simple-creation.2.ts deleted file mode 100644 index 5425f28b3aa..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.2.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion interval - import { interval } from 'rxjs'; - -// #enddocregion interval - -export function docRegionInterval(console: Console) { - // #docregion interval - // Create an Observable that will publish a value on an interval - const secondsCounter = interval(1000); - // Subscribe to begin publishing values - const subscription = secondsCounter.subscribe(n => - console.log(`It's been ${n + 1} seconds since subscribing!`)); - - // #enddocregion interval - return subscription; -} diff --git a/aio/content/examples/rx-library/src/simple-creation.3.spec.ts b/aio/content/examples/rx-library/src/simple-creation.3.spec.ts deleted file mode 100644 index 3d3182c5ccf..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.3.spec.ts +++ /dev/null @@ -1,53 +0,0 @@ -import { docRegionEvent } from './simple-creation.3'; - -describe('simple-creation.3', () => { - let triggerMousemove: (event: Partial) => void; - let consoleSpy: jasmine.SpyObj; - let input: HTMLInputElement; - let mockDocument: Document; - - beforeEach(() => { - consoleSpy = jasmine.createSpyObj('console', ['log']); - input = { - addEventListener: jasmine - .createSpy('addEventListener') - .and.callFake((eventName, cb) => { - if (eventName === 'mousemove') { - triggerMousemove = cb; - } - }), - removeEventListener: jasmine.createSpy('removeEventListener'), - } as unknown as HTMLInputElement; - mockDocument = { getElementById: () => input } as unknown as Document; - }); - - it('should log coords when subscribing', () => { - docRegionEvent(consoleSpy, mockDocument); - - expect(consoleSpy.log).not.toHaveBeenCalled(); - - triggerMousemove({ clientX: 50, clientY: 50 }); - triggerMousemove({ clientX: 30, clientY: 50 }); - triggerMousemove({ clientX: 50, clientY: 30 }); - expect(consoleSpy.log).toHaveBeenCalledTimes(3); - expect(consoleSpy.log.calls.allArgs()).toEqual([ - ['Coords: 50 X 50'], - ['Coords: 30 X 50'], - ['Coords: 50 X 30'] - ]); - }); - - it('should call unsubscribe when clientX and clientY are below < 40 ', () => { - docRegionEvent(consoleSpy, mockDocument); - - expect(consoleSpy.log).not.toHaveBeenCalled(); - - // Ensure that we have unsubscribed. - triggerMousemove({ clientX: 30, clientY: 30 }); - expect(input.removeEventListener).toHaveBeenCalledWith('mousemove', triggerMousemove, undefined); - consoleSpy.log.calls.reset(); - - triggerMousemove({ clientX: 50, clientY: 50 }); - expect(consoleSpy.log).not.toHaveBeenCalled(); - }); -}); diff --git a/aio/content/examples/rx-library/src/simple-creation.3.ts b/aio/content/examples/rx-library/src/simple-creation.3.ts deleted file mode 100644 index b7b23f1272d..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.3.ts +++ /dev/null @@ -1,31 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion event - import { fromEvent } from 'rxjs'; - -// #enddocregion event - -export function docRegionEvent(console: Console, document: Document) { - // #docregion event - const el = document.getElementById('my-element')!; - - // Create an Observable that will publish mouse movements - const mouseMoves = fromEvent(el, 'mousemove'); - - // Subscribe to start listening for mouse-move events - const subscription = mouseMoves.subscribe(evt => { - // Log coords of mouse movements - console.log(`Coords: ${evt.clientX} X ${evt.clientY}`); - - // When the mouse is over the upper-left of the screen, - // unsubscribe to stop listening for mouse movements - if (evt.clientX < 40 && evt.clientY < 40) { - subscription.unsubscribe(); - } - }); - - // #enddocregion event -} diff --git a/aio/content/examples/rx-library/src/simple-creation.spec.ts b/aio/content/examples/rx-library/src/simple-creation.spec.ts deleted file mode 100644 index 07184ad0cd8..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { of } from 'rxjs'; -import { docRegionAjax } from './simple-creation'; - -describe('ajax', () => { - it('should make a request and console log the status and response', () => { - const consoleSpy = jasmine.createSpyObj('console', ['log']); - const ajax = jasmine.createSpy('ajax').and.callFake( - (url: string) => of({status: 200, response: 'foo bar'})); - - docRegionAjax(consoleSpy, ajax); - expect(consoleSpy.log).toHaveBeenCalledWith(200, 'foo bar'); - }); -}); diff --git a/aio/content/examples/rx-library/src/simple-creation.ts b/aio/content/examples/rx-library/src/simple-creation.ts deleted file mode 100644 index 6e78c368bbb..00000000000 --- a/aio/content/examples/rx-library/src/simple-creation.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docplaster -/* - Because of how the code is merged together using the doc regions, - we need to indent the imports with the function below. -*/ -// #docregion ajax - import { Observable } from 'rxjs'; - import { ajax } from 'rxjs/ajax'; - -// #enddocregion ajax - -export function docRegionAjax(console: Console, - // eslint-disable-next-line @typescript-eslint/no-shadow - ajax: (url: string) => Observable<{status: number, response: T}>) { - // #docregion ajax - // Create an Observable that will create an AJAX request - const apiData = ajax('/api/data'); - // Subscribe to create the request - apiData.subscribe(res => console.log(res.status, res.response)); - // #enddocregion ajax -} diff --git a/aio/content/examples/rx-library/stackblitz.json b/aio/content/examples/rx-library/stackblitz.json deleted file mode 100644 index 0cbb5df7e23..00000000000 --- a/aio/content/examples/rx-library/stackblitz.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "description": "RxJS Library", - "files":[ - "!**/*.d.ts", - "!**/*.js"], - "tags": ["RxJS"] -} diff --git a/aio/content/examples/schematics-for-libraries/BUILD.bazel b/aio/content/examples/schematics-for-libraries/BUILD.bazel deleted file mode 100644 index b7fee148a9f..00000000000 --- a/aio/content/examples/schematics-for-libraries/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "schematics-for-libraries", - test = False, -) diff --git a/aio/content/examples/schematics-for-libraries/example-config.json b/aio/content/examples/schematics-for-libraries/example-config.json deleted file mode 100644 index 7f9f83ed6b6..00000000000 --- a/aio/content/examples/schematics-for-libraries/example-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectType": "schematics" -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/ng-package.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/ng-package.json deleted file mode 100644 index 7ca31cd5281..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/ng-package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", - "dest": "../../dist/my-lib", - "lib": { - "entryFile": "src/public_api.ts" - } -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/package.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/package.json deleted file mode 100644 index 215aac7878d..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/package.json +++ /dev/null @@ -1,28 +0,0 @@ -// #docplaster -// #docregion collection -{ - "name": "my-lib", - "version": "0.0.1", -// #enddocregion collection - "scripts": { - "build": "tsc -p tsconfig.schematics.json", - "postbuild": "copyfiles schematics/*/schema.json schematics/*/files/** schematics/collection.json ../../dist/my-lib/" - }, - "peerDependencies": { - "@angular/common": "^16.1.0", - "@angular/core": "^16.1.0" - }, -// #docregion collection - "schematics": "./schematics/collection.json", -// #enddocregion collection -// #docregion ng-add - "ng-add": { - "save": "devDependencies" - }, -// #enddocregion ng-add - "devDependencies": { - "copyfiles": "file:../../node_modules/copyfiles", - "typescript": "file:../../node_modules/typescript" - } -// #docregion collection -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.1.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.1.json deleted file mode 100644 index 890d3c9a4dd..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.1.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", - "schematics": { - "ng-add": { - "description": "Add my library to the project.", - "factory": "./ng-add/index#ngAdd", - "schema": "./ng-add/schema.json" - } - } -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.json deleted file mode 100644 index 95fb494933b..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/collection.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "../../../node_modules/@angular-devkit/schematics/collection-schema.json", - "schematics": { - "ng-add": { - "description": "Add my library to the project.", - "factory": "./ng-add/index#ngAdd", - "schema": "./ng-add/schema.json" - }, - "my-service": { - "description": "Generate a service in the project.", - "factory": "./my-service/index#myService", - "schema": "./my-service/schema.json" - } - } -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/files/__name@dasherize__.service.ts.template b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/files/__name@dasherize__.service.ts.template deleted file mode 100644 index 0001ceda9a4..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/files/__name@dasherize__.service.ts.template +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion template -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -@Injectable({ - providedIn: 'root' -}) -export class <%= classify(name) %>Service { - constructor(private http: HttpClient) { } -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts deleted file mode 100644 index 0820fc6722c..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.1.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Rule, Tree } from '@angular-devkit/schematics'; - -import { Schema as MyServiceSchema } from './schema'; - -// #docregion factory -export function myService(options: MyServiceSchema): Rule { - return (tree: Tree) => tree; -} -// #enddocregion factory diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts deleted file mode 100644 index e35daf2903b..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/index.ts +++ /dev/null @@ -1,76 +0,0 @@ -// #docplaster -// #docregion schematics-imports, schema-imports, workspace -import { - Rule, Tree, SchematicsException, - apply, url, applyTemplates, move, - chain, mergeWith -} from '@angular-devkit/schematics'; - -import { strings, normalize, virtualFs, workspaces } from '@angular-devkit/core'; -// #enddocregion schematics-imports - -import { Schema as MyServiceSchema } from './schema'; -// #enddocregion schema-imports - -function createHost(tree: Tree): workspaces.WorkspaceHost { - return { - async readFile(path: string): Promise { - const data = tree.read(path); - if (!data) { - throw new SchematicsException('File not found.'); - } - return virtualFs.fileBufferToString(data); - }, - async writeFile(path: string, data: string): Promise { - return tree.overwrite(path, data); - }, - async isDirectory(path: string): Promise { - return !tree.exists(path) && tree.getDir(path).subfiles.length > 0; - }, - async isFile(path: string): Promise { - return tree.exists(path); - }, - }; -} - -export function myService(options: MyServiceSchema): Rule { - return async (tree: Tree) => { - const host = createHost(tree); - const { workspace } = await workspaces.readWorkspace('/', host); - -// #enddocregion workspace - -// #docregion project-info - const project = (options.project != null) ? workspace.projects.get(options.project) : null; - if (!project) { - throw new SchematicsException(`Invalid project name: ${options.project}`); - } - - const projectType = project.extensions.projectType === 'application' ? 'app' : 'lib'; -// #enddocregion project-info - -// #docregion path - if (options.path === undefined) { - options.path = `${project.sourceRoot}/${projectType}`; - } -// #enddocregion path - -// #docregion template - const templateSource = apply(url('./files'), [ - applyTemplates({ - classify: strings.classify, - dasherize: strings.dasherize, - name: options.name - }), - move(normalize(options.path as string)) - ]); -// #enddocregion template - -// #docregion chain - return chain([ - mergeWith(templateSource) - ]); -// #enddocregion chain -// #docregion workspace - }; -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json deleted file mode 100644 index 672069b27fa..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "SchematicsMyService", - "title": "My Service Schema", - "type": "object", - "properties": { - "name": { - "description": "The name of the service.", - "type": "string" - }, - "path": { - "type": "string", - "format": "path", - "description": "The path to create the service.", - "visible": false - }, - "project": { - "type": "string", - "description": "The name of the project.", - "$default": { - "$source": "projectName" - } - } - }, - "required": [ - "name" - ] -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts deleted file mode 100644 index 4389b72f59c..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/my-service/schema.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface Schema { - // The name of the service. - name: string; - - // The path to create the service. - path?: string; - - // The name of the project. - project?: string; -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts deleted file mode 100644 index e674cd2c438..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/index.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Rule } from '@angular-devkit/schematics'; -import { addRootImport } from '@schematics/angular/utility'; -import { Schema } from './schema'; - -export function ngAdd(options: Schema): Rule { - // Add an import `MyLibModule` from `my-lib` to the root of the user's project. - return addRootImport(options.project, ({code, external}) => - code`${external('MyLibModule', 'my-lib')}`); -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.json deleted file mode 100644 index 32ac585d585..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "$schema": "http://json-schema.org/schema", - "$id": "SchematicsMyLibNgAdd", - "title": "MyLib ng add Schema", - "type": "object", - "properties": { - "project": { - "type": "string", - "description": "Name of the project.", - "$default": { - "$source": "projectName" - } - } - } -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.ts deleted file mode 100644 index e9989c2defe..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/schematics/ng-add/schema.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Schema { - // Name of the project. - project: string; -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts deleted file mode 100644 index ca72b617a9e..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.spec.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -import { MyLibComponent } from './my-lib.component'; - -describe('MyLibComponent', () => { - let component: MyLibComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({declarations: [MyLibComponent]}).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(MyLibComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.ts deleted file mode 100644 index e11e7b56585..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'lib-my-lib', - template: ` -

    - my-lib works! -

    - `, - styles: [] -}) -export class MyLibComponent {} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.module.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.module.ts deleted file mode 100644 index b48e140f604..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { MyLibComponent } from './my-lib.component'; - -@NgModule({ - declarations: [MyLibComponent], - imports: [ - ], - exports: [MyLibComponent] -}) -export class MyLibModule { } diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.spec.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.spec.ts deleted file mode 100644 index f1e55519c69..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { MyLibService } from './my-lib.service'; - -describe('MyLibService', () => { - beforeEach(() => TestBed.configureTestingModule({})); - - it('should be created', () => { - const service: MyLibService = TestBed.inject(MyLibService); - expect(service).toBeTruthy(); - }); -}); diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.ts deleted file mode 100644 index 5176bc5befd..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/lib/my-lib.service.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root' -}) -export class MyLibService {} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/public_api.ts b/aio/content/examples/schematics-for-libraries/projects/my-lib/src/public_api.ts deleted file mode 100644 index 0b6a50ce9b6..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/src/public_api.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* - * Public API Surface of my-lib - */ - -export * from './lib/my-lib.service'; -export * from './lib/my-lib.component'; -export * from './lib/my-lib.module'; diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.lib.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.lib.json deleted file mode 100644 index defd9582532..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.lib.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/lib", - "target": "es2015", - "module": "es2015", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "inlineSources": true, - "experimentalDecorators": true, - "importHelpers": true, - "types": [], - "lib": [ - "dom", - "es2018" - ] - }, - "angularCompilerOptions": { - "disableTypeScriptVersionCheck": true, - "strictTemplates": true, - "strictInjectionParameters": true - }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] -} diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.schematics.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.schematics.json deleted file mode 100644 index 4722c6029ac..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.schematics.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "lib": [ - "es2018", - "dom" - ], - "declaration": true, - "module": "commonjs", - "moduleResolution": "node", - "noEmitOnError": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitThis": true, - "noUnusedParameters": true, - "noUnusedLocals": true, - "rootDir": "schematics", - "outDir": "../../dist/my-lib/schematics", - "skipDefaultLibCheck": true, - "skipLibCheck": true, - "sourceMap": true, - "strictNullChecks": true, - "target": "es6", - "types": [ - "jasmine", - "node" - ] - }, - "include": [ - "schematics/**/*" - ], - "exclude": [ - "schematics/*/files/**/*" - ] -} \ No newline at end of file diff --git a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.spec.json b/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.spec.json deleted file mode 100644 index 16da33db072..00000000000 --- a/aio/content/examples/schematics-for-libraries/projects/my-lib/tsconfig.spec.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "extends": "../../tsconfig.json", - "compilerOptions": { - "outDir": "../../out-tsc/spec", - "types": [ - "jasmine", - "node" - ] - }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] -} diff --git a/aio/content/examples/schematics-for-libraries/src/app/app.component.ts b/aio/content/examples/schematics-for-libraries/src/app/app.component.ts deleted file mode 100644 index 7befb56b706..00000000000 --- a/aio/content/examples/schematics-for-libraries/src/app/app.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - template: ` -

    Library Schematics

    - `, - styles: [] -}) -export class AppComponent { - title = 'schematics-for-libraries'; -} diff --git a/aio/content/examples/schematics-for-libraries/src/app/app.module.ts b/aio/content/examples/schematics-for-libraries/src/app/app.module.ts deleted file mode 100644 index f65716351aa..00000000000 --- a/aio/content/examples/schematics-for-libraries/src/app/app.module.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - -import { AppComponent } from './app.component'; - -@NgModule({ - declarations: [ - AppComponent - ], - imports: [ - BrowserModule - ], - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/schematics-for-libraries/src/index.html b/aio/content/examples/schematics-for-libraries/src/index.html deleted file mode 100644 index e2eadbd1aed..00000000000 --- a/aio/content/examples/schematics-for-libraries/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - SchematicsForLibraries - - - - - - - - diff --git a/aio/content/examples/schematics-for-libraries/src/main.ts b/aio/content/examples/schematics-for-libraries/src/main.ts deleted file mode 100644 index 0a621147e30..00000000000 --- a/aio/content/examples/schematics-for-libraries/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/schematics-for-libraries/zipper.json b/aio/content/examples/schematics-for-libraries/zipper.json deleted file mode 100644 index d5e148b7d98..00000000000 --- a/aio/content/examples/schematics-for-libraries/zipper.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Schematics For Libraries", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*", - "**/*.template" - ], - "tags": ["Angular", "Libraries", "Schematics"] -} diff --git a/aio/content/examples/security/BUILD.bazel b/aio/content/examples/security/BUILD.bazel deleted file mode 100644 index 37bc3076c34..00000000000 --- a/aio/content/examples/security/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "security", -) diff --git a/aio/content/examples/security/e2e/src/app.e2e-spec.ts b/aio/content/examples/security/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 1f00858235a..00000000000 --- a/aio/content/examples/security/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { browser, element, By } from 'protractor'; - -describe('Security E2E Tests', () => { - beforeAll(() => browser.get('')); - - it('sanitizes innerHTML', async () => { - const interpolated = element(By.className('e2e-inner-html-interpolated')); - expect(await interpolated.getText()) - .toContain('Template Syntax'); - const bound = element(By.className('e2e-inner-html-bound')); - expect(await bound.getText()).toContain('Template Syntax'); - const bold = element(By.css('.e2e-inner-html-bound b')); - expect(await bold.getText()).toContain('Syntax'); - }); - - it('escapes untrusted URLs', async () => { - const untrustedUrl = element(By.className('e2e-dangerous-url')); - expect(await untrustedUrl.getAttribute('href')).toMatch(/^unsafe:javascript/); - }); - - it('binds trusted URLs', async () => { - const trustedUrl = element(By.className('e2e-trusted-url')); - expect(await trustedUrl.getAttribute('href')).toMatch(/^javascript:alert/); - }); - - it('escapes untrusted resource URLs', async () => { - const iframe = element(By.className('e2e-iframe-untrusted-src')); - expect(await iframe.getAttribute('src')).toBe(''); - }); - - it('binds trusted resource URLs', async () => { - const iframe = element(By.className('e2e-iframe-trusted-src')); - expect(await iframe.getAttribute('src')).toMatch(/^https:\/\/www\.youtube\.com\//); - }); -}); diff --git a/aio/content/examples/security/example-config.json b/aio/content/examples/security/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/security/src/app/app.component.ts b/aio/content/examples/security/src/app/app.component.ts deleted file mode 100644 index 178f2c6e617..00000000000 --- a/aio/content/examples/security/src/app/app.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -import {BypassSecurityComponent} from './bypass-security.component'; -import {InnerHtmlBindingComponent} from './inner-html-binding.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` -

    Security

    - - - `, - imports: [BypassSecurityComponent, InnerHtmlBindingComponent], -}) -export class AppComponent {} diff --git a/aio/content/examples/security/src/app/bypass-security.component.html b/aio/content/examples/security/src/app/bypass-security.component.html deleted file mode 100644 index 54ab69cc3a6..00000000000 --- a/aio/content/examples/security/src/app/bypass-security.component.html +++ /dev/null @@ -1,17 +0,0 @@ - -

    Bypass Security Component

    - - -

    An untrusted URL:

    -

    Click me

    -

    A trusted URL:

    -

    Click me

    - - - -

    Resource URL:

    -

    Showing: {{dangerousVideoUrl}}

    -

    Trusted:

    - -

    Untrusted:

    - diff --git a/aio/content/examples/security/src/app/bypass-security.component.ts b/aio/content/examples/security/src/app/bypass-security.component.ts deleted file mode 100644 index 2b25aec9d42..00000000000 --- a/aio/content/examples/security/src/app/bypass-security.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docplaster -// #docregion -import {Component} from '@angular/core'; -import {DomSanitizer, SafeResourceUrl, SafeUrl} from '@angular/platform-browser'; - -@Component({ - standalone: true, - selector: 'app-bypass-security', - templateUrl: './bypass-security.component.html', -}) -export class BypassSecurityComponent { - dangerousUrl: string; - trustedUrl: SafeUrl; - dangerousVideoUrl!: string; - videoUrl!: SafeResourceUrl; - - // #docregion trust-url - constructor(private sanitizer: DomSanitizer) { - // javascript: URLs are dangerous if attacker controlled. - // Angular sanitizes them in data binding, but you can - // explicitly tell Angular to trust this value: - this.dangerousUrl = 'javascript:alert("Hi there")'; - this.trustedUrl = sanitizer.bypassSecurityTrustUrl(this.dangerousUrl); - // #enddocregion trust-url - this.updateVideoUrl('PUBnlbjZFAI'); - } - - // #docregion trust-video-url - updateVideoUrl(id: string) { - // Appending an ID to a YouTube URL is safe. - // Always make sure to construct SafeValue objects as - // close as possible to the input data so - // that it's easier to check if the value is safe. - this.dangerousVideoUrl = 'https://www.youtube.com/embed/' + id; - this.videoUrl = this.sanitizer.bypassSecurityTrustResourceUrl(this.dangerousVideoUrl); - } - // #enddocregion trust-video-url -} diff --git a/aio/content/examples/security/src/app/inner-html-binding.component.html b/aio/content/examples/security/src/app/inner-html-binding.component.html deleted file mode 100644 index fe540d25fe5..00000000000 --- a/aio/content/examples/security/src/app/inner-html-binding.component.html +++ /dev/null @@ -1,6 +0,0 @@ - -

    Binding innerHTML

    -

    Bound value:

    -

    {{htmlSnippet}}

    -

    Result of binding to innerHTML:

    -

    diff --git a/aio/content/examples/security/src/app/inner-html-binding.component.ts b/aio/content/examples/security/src/app/inner-html-binding.component.ts deleted file mode 100644 index 8728200a866..00000000000 --- a/aio/content/examples/security/src/app/inner-html-binding.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-inner-html-binding', - templateUrl: './inner-html-binding.component.html', -}) -// #docregion class -export class InnerHtmlBindingComponent { - // For example, a user/attacker-controlled value from a URL. - htmlSnippet = 'Template Syntax'; -} diff --git a/aio/content/examples/security/src/index.html b/aio/content/examples/security/src/index.html deleted file mode 100644 index 4cf1cd64285..00000000000 --- a/aio/content/examples/security/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Angular Content Security - - - - - - - - - diff --git a/aio/content/examples/security/src/main.ts b/aio/content/examples/security/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/security/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/security/stackblitz.json b/aio/content/examples/security/stackblitz.json deleted file mode 100644 index b3e933d44c3..00000000000 --- a/aio/content/examples/security/stackblitz.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "description": "Content Security", - "files": [ - "!**/*.d.ts", - "!**/*.js" - ], - "file": "src/app/app.component.ts", - "tags": ["security"] -} diff --git a/aio/content/examples/service-worker-getting-started/BUILD.bazel b/aio/content/examples/service-worker-getting-started/BUILD.bazel deleted file mode 100644 index 427a3a11412..00000000000 --- a/aio/content/examples/service-worker-getting-started/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "service-worker-getting-started", - test = False, -) diff --git a/aio/content/examples/service-worker-getting-started/e2e/src/app.e2e-spec.ts b/aio/content/examples/service-worker-getting-started/e2e/src/app.e2e-spec.ts deleted file mode 100755 index e0d18fc72cc..00000000000 --- a/aio/content/examples/service-worker-getting-started/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { AppPage } from './app.po'; -import { element, by } from 'protractor'; - - -describe('sw-example App', () => { - let page: AppPage; - - beforeEach(async () => { - page = new AppPage(); - await page.navigateTo(); - }); - - it('should display welcome message', async () => { - expect(await page.getTitleText()).toEqual('Welcome to Service Workers!'); - }); - - it('should display the Angular logo', async () => { - const logo = element(by.css('img')); - expect(await logo.isPresent()).toBe(true); - }); - - it('should show a header for the list of links', async () => { - const listHeader = element(by.css('app-root > h2')); - expect(await listHeader.getText()).toEqual('Here are some links to help you start:'); - }); - - it('should show a list of links', async () => { - const items = await element.all(by.css('ul > li > h2 > a')); - - expect(items.length).toBe(4); - expect(await items[0].getText()).toBe('Angular Service Worker Intro'); - expect(await items[1].getText()).toBe('Tour of Heroes'); - expect(await items[2].getText()).toBe('CLI Documentation'); - expect(await items[3].getText()).toBe('Angular blog'); - }); - - // Check for a rejected promise as the service worker is not enabled - it('SwUpdate.checkForUpdate() should return a rejected promise', async () => { - const button = element(by.css('button')); - const rejectMessage = element(by.css('p')); - await button.click(); - expect(await rejectMessage.getText()).toContain('rejected: '); - }); -}); diff --git a/aio/content/examples/service-worker-getting-started/example-config.json b/aio/content/examples/service-worker-getting-started/example-config.json deleted file mode 100644 index b7f7d031108..00000000000 --- a/aio/content/examples/service-worker-getting-started/example-config.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "projectType": "service-worker", - "tests": [ - {"cmd": "yarn", "args": ["e2e", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]}, - {"cmd": "yarn", "args": ["build"]}, - {"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw.json'), 'ngsw.json is missing')"]}, - {"cmd": "node", "args": ["--eval", "assert(fs.existsSync('./dist/ngsw-worker.js'), 'ngsw-worker.js is missing')"]}, - {"cmd": "node", "args": ["--eval", "assert(require('./package.json').dependencies['@angular/service-worker'], '@angular/service-worker is missing')"]} - ] -} diff --git a/aio/content/examples/service-worker-getting-started/src/app/app.component.html b/aio/content/examples/service-worker-getting-started/src/app/app.component.html deleted file mode 100755 index 24f16a54b44..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/app.component.html +++ /dev/null @@ -1,26 +0,0 @@ - -
    -

    - Welcome to {{title}}! -

    - Angular Logo -
    - - -

    {{updateCheckText}}

    - -

    Here are some links to help you start:

    - diff --git a/aio/content/examples/service-worker-getting-started/src/app/app.component.ts b/aio/content/examples/service-worker-getting-started/src/app/app.component.ts deleted file mode 100755 index d0dc473a4b4..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/app.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Component } from '@angular/core'; -import { SwUpdate } from '@angular/service-worker'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent { - title = 'Service Workers'; - updateCheckText = ''; - - constructor(private update: SwUpdate) {} - - updateCheck(): void { - this.update - .checkForUpdate() - .then(() => this.updateCheckText = 'resolved') - .catch(err => this.updateCheckText = `rejected: ${err.message}`); - } -} diff --git a/aio/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts b/aio/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts deleted file mode 100755 index 2a575a047c7..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { ApplicationRef, Injectable } from '@angular/core'; -import { SwUpdate } from '@angular/service-worker'; -import { concat, interval } from 'rxjs'; -import { first } from 'rxjs/operators'; - -@Injectable({providedIn: 'root'}) -export class CheckForUpdateService { - - constructor(appRef: ApplicationRef, updates: SwUpdate) { - // Allow the app to stabilize first, before starting - // polling for updates with `interval()`. - const appIsStable$ = appRef.isStable.pipe(first(isStable => isStable === true)); - const everySixHours$ = interval(6 * 60 * 60 * 1000); - const everySixHoursOnceAppIsStable$ = concat(appIsStable$, everySixHours$); - - everySixHoursOnceAppIsStable$.subscribe(async () => { - try { - const updateFound = await updates.checkForUpdate(); - console.log(updateFound ? 'A new version is available.' : 'Already on the latest version.'); - } catch (err) { - console.error('Failed to check for updates:', err); - } - }); - } -} diff --git a/aio/content/examples/service-worker-getting-started/src/app/handle-unrecoverable-state.service.ts b/aio/content/examples/service-worker-getting-started/src/app/handle-unrecoverable-state.service.ts deleted file mode 100644 index b22260a22b9..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/handle-unrecoverable-state.service.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Injectable } from '@angular/core'; -import { SwUpdate } from '@angular/service-worker'; - -function notifyUser(message: string): void { } - -// #docregion sw-unrecoverable-state -@Injectable({providedIn: 'root'}) -export class HandleUnrecoverableStateService { - constructor(updates: SwUpdate) { - updates.unrecoverable.subscribe(event => { - notifyUser( - 'An error occurred that we cannot recover from:\n' + - event.reason + - '\n\nPlease reload the page.' - ); - }); - } -} -// #enddocregion sw-unrecoverable-state diff --git a/aio/content/examples/service-worker-getting-started/src/app/log-update.service.ts b/aio/content/examples/service-worker-getting-started/src/app/log-update.service.ts deleted file mode 100755 index 1bb2c6a65c3..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/log-update.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; -import { SwUpdate, VersionReadyEvent } from '@angular/service-worker'; - -// #docregion sw-update -@Injectable({providedIn: 'root'}) -export class LogUpdateService { - - constructor(updates: SwUpdate) { - updates.versionUpdates.subscribe(evt => { - switch (evt.type) { - case 'VERSION_DETECTED': - console.log(`Downloading new app version: ${evt.version.hash}`); - break; - case 'VERSION_READY': - console.log(`Current app version: ${evt.currentVersion.hash}`); - console.log(`New app version ready for use: ${evt.latestVersion.hash}`); - break; - case 'VERSION_INSTALLATION_FAILED': - console.log(`Failed to install app version '${evt.version.hash}': ${evt.error}`); - break; - } - }); - } -} -// #enddocregion sw-update diff --git a/aio/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts b/aio/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts deleted file mode 100755 index 0f3fe53c6fe..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docplaster -import { Injectable } from '@angular/core'; -import { filter, map } from 'rxjs/operators'; -import { SwUpdate, VersionReadyEvent } from '@angular/service-worker'; - -function promptUser(event: VersionReadyEvent): boolean { - return true; -} - -// #docregion sw-version-ready -@Injectable({providedIn: 'root'}) -export class PromptUpdateService { - - constructor(swUpdate: SwUpdate) { - swUpdate.versionUpdates - .pipe(filter((evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY')) - .subscribe(evt => { - if (promptUser(evt)) { - // Reload the page to update to the latest version. - document.location.reload(); - } - }); - // #enddocregion sw-version-ready - // ... - const updatesAvailable = swUpdate.versionUpdates.pipe( - filter((evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY'), - map(evt => ({ - type: 'UPDATE_AVAILABLE', - current: evt.currentVersion, - available: evt.latestVersion, - }))); - // #docregion sw-version-ready - } - -} -// #enddocregion sw-version-ready diff --git a/aio/content/examples/service-worker-getting-started/src/index.html b/aio/content/examples/service-worker-getting-started/src/index.html deleted file mode 100755 index 9b548d69464..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SwExample - - - - - - - diff --git a/aio/content/examples/service-worker-getting-started/src/main.ts b/aio/content/examples/service-worker-getting-started/src/main.ts deleted file mode 100755 index 964eff71b77..00000000000 --- a/aio/content/examples/service-worker-getting-started/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [ - provideProtractorTestingSupport(), // essential for e2e testing - ] -}); diff --git a/aio/content/examples/service-worker-getting-started/zipper.json b/aio/content/examples/service-worker-getting-started/zipper.json deleted file mode 100644 index ce44927d99c..00000000000 --- a/aio/content/examples/service-worker-getting-started/zipper.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [ - "!dist/", - "!**/*.d.ts", - "!**/src/**/*.js" - ] -} diff --git a/aio/content/examples/setup/BUILD.bazel b/aio/content/examples/setup/BUILD.bazel deleted file mode 100644 index 8ff89624254..00000000000 --- a/aio/content/examples/setup/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "setup", -) diff --git a/aio/content/examples/setup/e2e/src/app.e2e-spec.ts b/aio/content/examples/setup/e2e/src/app.e2e-spec.ts deleted file mode 100644 index db185ac5d91..00000000000 --- a/aio/content/examples/setup/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('QuickStart E2E Tests', () => { - - const expectedMsg = 'Hello Angular'; - - beforeEach(() => browser.get('')); - - it(`should display: ${expectedMsg}`, async () => { - expect(await element(by.css('h1')).getText()).toEqual(expectedMsg); - }); - -}); diff --git a/aio/content/examples/setup/example-config.json b/aio/content/examples/setup/example-config.json deleted file mode 100644 index ccf472031b4..00000000000 --- a/aio/content/examples/setup/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "tests": [ - {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadlessNoSandbox", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]} - ] -} diff --git a/aio/content/examples/setup/non-essential-files.txt b/aio/content/examples/setup/non-essential-files.txt deleted file mode 100644 index 6389af193ce..00000000000 --- a/aio/content/examples/setup/non-essential-files.txt +++ /dev/null @@ -1,13 +0,0 @@ -.git -.gitignore -.travis.yml -*.spec*.ts -CHANGELOG.md -e2e -favicon.ico -karma.conf.js -karma-test-shim.js -LICENSE -non-essential-files.txt -protractor.config.js -README.md diff --git a/aio/content/examples/setup/src/app/app.component.spec.ts b/aio/content/examples/setup/src/app/app.component.spec.ts deleted file mode 100644 index 36ded934371..00000000000 --- a/aio/content/examples/setup/src/app/app.component.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { DebugElement } from '@angular/core'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { - let de: DebugElement; - let comp: AppComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({declarations: [AppComponent]}).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(AppComponent); - comp = fixture.componentInstance; - de = fixture.debugElement.query(By.css('h1')); - }); - - it('should create component', () => expect(comp).toBeDefined()); - - it('should have expected

    text', () => { - fixture.detectChanges(); - const h1 = de.nativeElement; - expect(h1.textContent).toMatch(/angular/i, '

    should say something about "Angular"'); - }); -}); diff --git a/aio/content/examples/setup/src/app/app.component.ts b/aio/content/examples/setup/src/app/app.component.ts deleted file mode 100644 index 34fe904bee2..00000000000 --- a/aio/content/examples/setup/src/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - template: '

    Hello {{name}}

    ' -}) -export class AppComponent { name = 'Angular'; } diff --git a/aio/content/examples/setup/src/app/app.module.ts b/aio/content/examples/setup/src/app/app.module.ts deleted file mode 100644 index 321a2e0b4ac..00000000000 --- a/aio/content/examples/setup/src/app/app.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { AppComponent } from './app.component'; - -@NgModule({ - imports: [ BrowserModule ], - declarations: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/setup/src/index.html b/aio/content/examples/setup/src/index.html deleted file mode 100644 index d293eaf0594..00000000000 --- a/aio/content/examples/setup/src/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Angular Quickstart Seed - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/setup/src/main.ts b/aio/content/examples/setup/src/main.ts deleted file mode 100644 index 49432aa0877..00000000000 --- a/aio/content/examples/setup/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); diff --git a/aio/content/examples/setup/src/systemjs.config.extras.js b/aio/content/examples/setup/src/systemjs.config.extras.js deleted file mode 100644 index 027dfe58cf2..00000000000 --- a/aio/content/examples/setup/src/systemjs.config.extras.js +++ /dev/null @@ -1,11 +0,0 @@ -/** - * Add barrels and stuff - * Adjust as necessary for your application needs. - */ -// (function (global) { -// System.config({ -// packages: { -// // add packages here -// } -// }); -// })(this); diff --git a/aio/content/examples/ssr/BUILD.bazel b/aio/content/examples/ssr/BUILD.bazel deleted file mode 100644 index bd3b8556dc4..00000000000 --- a/aio/content/examples/ssr/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "ssr", -) diff --git a/aio/content/examples/ssr/doc-files/app/app.component.ts b/aio/content/examples/ssr/doc-files/app/app.component.ts deleted file mode 100644 index 439eb130713..00000000000 --- a/aio/content/examples/ssr/doc-files/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// Old AppComponent, before refactoring -import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -@Component({ - standalone: true, - selector: 'app-root', - template: '... the template ...', - imports: [ RouterLink, RouterOutlet ] -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/ssr/doc-files/main.old.ts b/aio/content/examples/ssr/doc-files/main.old.ts deleted file mode 100644 index 5b1144a8233..00000000000 --- a/aio/content/examples/ssr/doc-files/main.old.ts +++ /dev/null @@ -1,39 +0,0 @@ -// #region Dummy components to satisfy the router -import { Component } from '@angular/core'; - -@Component({ standalone: true, selector: 'app-dashboard', template: '' }) - -class DashboardComponent {} -@Component({ standalone: true, selector: 'app-dashboard', template: '' }) -class HeroDetailComponent {} - -@Component({ standalone: true, selector: 'app-dashboard', template: '' }) -class HeroesComponent {} - -// #endregion Dummy components to satisfy the router - -// #docregion - -import { bootstrapApplication } from '@angular/platform-browser'; -import { provideRouter, Routes} from '@angular/router'; -import { provideHttpClient } from '@angular/common/http'; - -import { AppComponent } from './app/app.component'; - -// ... more imports ... - -export const routes: Routes = [ - { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, - { path: 'dashboard', component: DashboardComponent }, - { path: 'detail/:id', component: HeroDetailComponent }, - { path: 'heroes', component: HeroesComponent } -]; - -bootstrapApplication(AppComponent, { - providers: [ - provideRouter(routes), - provideHttpClient(), - ] -}).catch(err => console.error(err)); - -// #enddocregion diff --git a/aio/content/examples/ssr/e2e/src/app.e2e-spec.ts b/aio/content/examples/ssr/e2e/src/app.e2e-spec.ts deleted file mode 100644 index b9fbf6ca0c2..00000000000 --- a/aio/content/examples/ssr/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,300 +0,0 @@ -import { browser, by, element, ElementArrayFinder, ElementFinder, logging } from 'protractor'; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Hero from string formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Hero from hero list
  • element. - static async fromLi(li: ElementFinder): Promise { - const stringsFromA = await li.all(by.css('a')).getText(); - const strings = stringsFromA[0].split(' '); - return { id: +strings[0], name: strings[1] }; - } - - // Hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return { - id: +id.slice(id.indexOf(' ') + 1), - name: name.substring(0, name.lastIndexOf(' ')) - }; - } -} - -describe('Universal', () => { - const expectedH1 = 'Tour of Heroes'; - const expectedTitle = `${expectedH1}`; - const targetHero = { id: 15, name: 'Magneta' }; - const targetHeroDashboardIndex = 2; - const nameSuffix = 'X'; - const newHeroName = targetHero.name + nameSuffix; - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - const severeLogs = logs.filter(entry => entry.level === logging.Level.SEVERE); - expect(severeLogs).toEqual([]); - }); - - describe('Initial page', () => { - beforeAll(() => browser.get('')); - - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - const expectedViewNames = ['Dashboard', 'Heroes']; - it(`has views ${expectedViewNames}`, async () => { - const viewNames = await getPageElts().navElts.map(el => el!.getText()); - expect(viewNames).toEqual(expectedViewNames); - }); - - it('has dashboard as the active view', async () => { - const page = getPageElts(); - expect(await page.appDashboard.isPresent()).toBeTruthy(); - }); - }); - - describe('Dashboard tests', () => { - beforeAll(() => browser.get('')); - - it('has top heroes', async () => { - const page = getPageElts(); - expect(await page.topHeroes.count()).toEqual(4); - }); - - it(`selects and routes to ${targetHero.name} details`, dashboardSelectTargetHero); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`cancels and shows ${targetHero.name} in Dashboard`, async () => { - await element(by.buttonText('go back')).click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(targetHero.name); - }); - - it(`selects and routes to ${targetHero.name} details`, dashboardSelectTargetHero); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`saves and shows ${newHeroName} in Dashboard`, async () => { - await element(by.buttonText('save')).click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(newHeroName); - }); - }); - - describe('Heroes tests', () => { - beforeAll(() => browser.get('')); - - it('can switch to Heroes view', async () => { - await getPageElts().appHeroesHref.click(); - const page = getPageElts(); - expect(await page.appHeroes.isPresent()).toBeTruthy(); - expect(await page.allHeroes.count()).toEqual(9, 'number of heroes'); - }); - - it('can route to hero details', async () => { - await getHeroLiEltById(targetHero.id).click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - }); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`shows ${newHeroName} in Heroes list`, async () => { - await element(by.buttonText('save')).click(); - await browser.waitForAngular(); - const expectedText = `${targetHero.id} ${newHeroName}`; - expect(await getHeroAEltById(targetHero.id).getText()).toEqual(expectedText); - }); - - it(`deletes ${newHeroName} from Heroes list`, async () => { - const heroesBefore = await toHeroArray(getPageElts().allHeroes); - const li = getHeroLiEltById(targetHero.id); - await li.element(by.buttonText('x')).click(); - - const page = getPageElts(); - expect(await page.appHeroes.isPresent()).toBeTruthy(); - expect(await page.allHeroes.count()).toEqual(8, 'number of heroes'); - const heroesAfter = await toHeroArray(page.allHeroes); - // console.log(await Hero.fromLi(page.allHeroes[0])); - const expectedHeroes = heroesBefore.filter(h => h.name !== newHeroName); - expect(heroesAfter).toEqual(expectedHeroes); - // expect(await page.selectedHeroSubview.isPresent()).toBeFalsy(); - }); - - it(`adds back ${targetHero.name}`, async () => { - const updatedHeroName = 'Alice'; - const heroesBefore = await toHeroArray(getPageElts().allHeroes); - const numHeroes = heroesBefore.length; - - await element(by.css('input')).sendKeys(updatedHeroName); - await element(by.buttonText('add')).click(); - - const page = getPageElts(); - const heroesAfter = await toHeroArray(page.allHeroes); - expect(heroesAfter.length).toEqual(numHeroes + 1, 'number of heroes'); - - expect(heroesAfter.slice(0, numHeroes)).toEqual(heroesBefore, 'Old heroes are still there'); - - const maxId = heroesBefore[heroesBefore.length - 1].id; - expect(heroesAfter[numHeroes]).toEqual({id: maxId + 1, name: updatedHeroName}); - }); - - it('displays correctly styled buttons', async () => { - const buttons = await element.all(by.buttonText('x')); - - for (const button of buttons) { - // Inherited styles from styles.css - expect(await button.getCssValue('font-family')).toBe('Arial, sans-serif'); - expect(await button.getCssValue('border')).toContain('none'); - expect(await button.getCssValue('padding')).toBe('5px 10px'); - expect(await button.getCssValue('border-radius')).toBe('4px'); - // Styles defined in heroes.component.css - expect(await button.getCssValue('right')).toBe('0px'); - expect(await button.getCssValue('top')).toBe('0px'); - expect(await button.getCssValue('bottom')).toBe('0px'); - } - - const addButton = element(by.buttonText('add')); - // Inherited styles from styles.css - expect(await addButton.getCssValue('font-family')).toBe('Arial, sans-serif'); - expect(await addButton.getCssValue('border')).toContain('none'); - expect(await addButton.getCssValue('padding')).toBe('5px 10px'); - expect(await addButton.getCssValue('border-radius')).toBe('4px'); - }); - }); - - describe('Progressive hero search', () => { - beforeAll(() => browser.get('')); - - it(`searches for 'Ma'`, async () => { - await getPageElts().searchBox.sendKeys('Ma'); - await browser.sleep(1000); - - expect(await getPageElts().searchResults.count()).toBe(4); - }); - - it(`continues search with 'g'`, async () => { - await getPageElts().searchBox.sendKeys('g'); - await browser.sleep(1000); - expect(await getPageElts().searchResults.count()).toBe(2); - }); - - it(`continues search with 'n' and gets ${targetHero.name}`, async () => { - await getPageElts().searchBox.sendKeys('n'); - await browser.sleep(1000); - const page = getPageElts(); - expect(await page.searchResults.count()).toBe(1); - const hero = page.searchResults.get(0); - expect(await hero.getText()).toEqual(targetHero.name); - }); - - it(`navigates to ${targetHero.name} details view`, async () => { - const hero = getPageElts().searchResults.get(0); - expect(await hero.getText()).toEqual(targetHero.name); - await hero.click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero2 = await Hero.fromDetail(page.heroDetail); - expect(hero2.id).toEqual(targetHero.id); - expect(hero2.name).toEqual(targetHero.name.toUpperCase()); - }); - }); - - // Helpers - async function addToHeroName(text: string): Promise { - await element(by.css('input')).sendKeys(text); - } - - async function dashboardSelectTargetHero(): Promise { - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(targetHero.name); - await targetHeroElt.click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - } - - async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); - } - - function getHeroAEltById(id: number): ElementFinder { - const spanForId = element(by.cssContainingText('li span.badge', id.toString())); - return spanForId.element(by.xpath('..')); - } - - function getHeroLiEltById(id: number): ElementFinder { - const spanForId = element(by.cssContainingText('li span.badge', id.toString())); - return spanForId.element(by.xpath('../..')); - } - - function getPageElts() { - const navElts = element.all(by.css('app-root nav a')); - - return { - navElts, - - appDashboardHref: navElts.get(0), - appDashboard: element(by.css('app-root app-dashboard')), - topHeroes: element.all(by.css('app-root app-dashboard > div h4')), - - appHeroesHref: navElts.get(1), - appHeroes: element(by.css('app-root app-heroes')), - allHeroes: element.all(by.css('app-root app-heroes li')), - selectedHeroSubview: element(by.css('app-root app-heroes > div:last-child')), - - heroDetail: element(by.css('app-root app-hero-detail > div')), - - searchBox: element(by.css('#search-box')), - searchResults: element.all(by.css('.search-result li')) - }; - } - - async function toHeroArray(allHeroes: ElementArrayFinder): Promise { - return await allHeroes.map(hero => Hero.fromLi(hero!)); - } - - async function updateHeroNameInDetailView(): Promise { - // Assumes that the current view is the hero details view. - await addToHeroName(nameSuffix); - - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newHeroName.toUpperCase()); - } -}); diff --git a/aio/content/examples/ssr/example-config.json b/aio/content/examples/ssr/example-config.json deleted file mode 100644 index d170d9ff8bf..00000000000 --- a/aio/content/examples/ssr/example-config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "projectType": "ssr", - "e2e": [ - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]}, - {"cmd": "yarn", "args": ["build"]} - ] -} diff --git a/aio/content/examples/ssr/readme.md b/aio/content/examples/ssr/readme.md deleted file mode 100644 index 26a204eabcf..00000000000 --- a/aio/content/examples/ssr/readme.md +++ /dev/null @@ -1,9 +0,0 @@ -# Instructions for Angular SSR Example Download - -This is the downloaded sample code for the [Angular SSR (Standalone) guide](https://angular.io/guide/ssr). - -## Install and Run - -1. `npm install` to install the `node_module` packages -2. `ng serve` to launch the dev-server -3. Launch the browser to `http://localhost:4200` diff --git a/aio/content/examples/ssr/server.ts b/aio/content/examples/ssr/server.ts deleted file mode 100644 index 520f15e7b72..00000000000 --- a/aio/content/examples/ssr/server.ts +++ /dev/null @@ -1,61 +0,0 @@ -// #docplaster - -import {APP_BASE_HREF} from '@angular/common'; -import {CommonEngine} from '@angular/ssr'; -import express from 'express'; -import {dirname, join, resolve} from 'node:path'; -import {fileURLToPath} from 'node:url'; - -import bootstrap from './src/main.server'; - -// The Express app is exported so that it can be used by serverless Functions. -export function app(): express.Express { - const server = express(); - const serverDistFolder = dirname(fileURLToPath(import.meta.url)); - const browserDistFolder = resolve(serverDistFolder, '../browser'); - const indexHtml = join(serverDistFolder, 'index.server.html'); - const commonEngine = new CommonEngine(); - - server.set('view engine', 'html'); - server.set('views', browserDistFolder); - - // TODO: implement data requests securely - // Serve data from URLS that begin "/api/" - server.get('/api/**', (req, res) => { - res.status(404).send('data requests are not yet supported'); - }); - // Serve static files from /browser - server.get('*.*', express.static(browserDistFolder, {maxAge: '1y'})); - - // #docregion navigation-request - // All regular routes use the Angular engine - server.get('*', (req, res, next) => { - const {protocol, originalUrl, baseUrl, headers} = req; - - commonEngine - .render({ - bootstrap, - documentFilePath: indexHtml, - url: `${protocol}://${headers.host}${originalUrl}`, - publicPath: browserDistFolder, - providers: [{provide: APP_BASE_HREF, useValue: req.baseUrl}], - }) - .then((html) => res.send(html)) - .catch((err) => next(err)); - }); - // #enddocregion navigation-request - - return server; -} - -function run(): void { - const port = process.env['PORT'] || 4000; - - // Start up the Node server - const server = app(); - server.listen(port, () => { - console.log(`Node Express server listening on http://localhost:${port}`); - }); -} - -run(); diff --git a/aio/content/examples/ssr/src/app/app.component.css b/aio/content/examples/ssr/src/app/app.component.css deleted file mode 100644 index 1bdf7bdd583..00000000000 --- a/aio/content/examples/ssr/src/app/app.component.css +++ /dev/null @@ -1,23 +0,0 @@ -/* AppComponent's private CSS styles */ -h1 { - font-size: 1.2em; - margin-bottom: 0; -} -nav a { - padding: 5px 10px; - text-decoration: none; - margin-top: 10px; - display: inline-block; - background-color: #eee; - border-radius: 4px; -} -nav a:visited, a:link { - color: #334953; -} -nav a:hover { - color: #039be5; - background-color: #CFD8DC; -} -nav a.active { - color: #039be5; -} diff --git a/aio/content/examples/ssr/src/app/app.component.html b/aio/content/examples/ssr/src/app/app.component.html deleted file mode 100644 index 49c7d171b69..00000000000 --- a/aio/content/examples/ssr/src/app/app.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    {{title}}

    - - - diff --git a/aio/content/examples/ssr/src/app/app.component.ts b/aio/content/examples/ssr/src/app/app.component.ts deleted file mode 100644 index 6ceafa20c9e..00000000000 --- a/aio/content/examples/ssr/src/app/app.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -import { PLATFORM_ID, APP_ID, Inject } from '@angular/core'; -import { isPlatformBrowser } from '@angular/common'; - -import { MessagesComponent } from './messages/messages.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ RouterLink, RouterOutlet, MessagesComponent ], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Tour of Heroes'; - - constructor( - @Inject(PLATFORM_ID) platformId: object, - @Inject(APP_ID) appId: string) { - const platform = isPlatformBrowser(platformId) ? - 'in the browser' : 'on the server'; - console.log(`Running ${platform} with appId=${appId}`); - } - -} diff --git a/aio/content/examples/ssr/src/app/app.config.server.ts b/aio/content/examples/ssr/src/app/app.config.server.ts deleted file mode 100644 index 1980cfe118b..00000000000 --- a/aio/content/examples/ssr/src/app/app.config.server.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { mergeApplicationConfig, ApplicationConfig } from '@angular/core'; -import { provideServerRendering } from '@angular/platform-server'; -import { appConfig } from './app.config'; - -const serverConfig: ApplicationConfig = { - providers: [provideServerRendering()], -}; - -export const config = mergeApplicationConfig(appConfig, serverConfig); diff --git a/aio/content/examples/ssr/src/app/app.config.ts b/aio/content/examples/ssr/src/app/app.config.ts deleted file mode 100644 index 3b77d1ef9a8..00000000000 --- a/aio/content/examples/ssr/src/app/app.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -import {provideHttpClient, withFetch} from '@angular/common/http'; -import {ApplicationConfig, importProvidersFrom} from '@angular/core'; -import {provideClientHydration, provideProtractorTestingSupport} from '@angular/platform-browser'; -import {provideRouter} from '@angular/router'; -import {HttpClientInMemoryWebApiModule} from 'angular-in-memory-web-api'; - -import {routes} from './app.routes'; -import {InMemoryDataService} from './in-memory-data.service'; - -export const appConfig: ApplicationConfig = { - providers: [ - provideRouter(routes), - // TODO: Enable using Fetch API when disabling `HttpClientInMemoryWebApiModule`. - provideHttpClient(/* withFetch()*/), - provideClientHydration(), - provideProtractorTestingSupport(), // essential for e2e testing - - // TODO: Remove from production apps - importProvidersFrom( - // The HttpClientInMemoryWebApiModule module intercepts HTTP requests - // and returns simulated server responses. - // Remove it when a real server is ready to receive requests. - HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, {dataEncapsulation: false})), - // ... - ], -}; diff --git a/aio/content/examples/ssr/src/app/app.routes.ts b/aio/content/examples/ssr/src/app/app.routes.ts deleted file mode 100644 index bcd8c149f6f..00000000000 --- a/aio/content/examples/ssr/src/app/app.routes.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Routes } from '@angular/router'; - -import { DashboardComponent } from './dashboard/dashboard.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -export const routes: Routes = [ - { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, - { path: 'dashboard', component: DashboardComponent }, - { path: 'detail/:id', component: HeroDetailComponent }, - { path: 'heroes', component: HeroesComponent } -]; diff --git a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.css b/aio/content/examples/ssr/src/app/dashboard/dashboard.component.css deleted file mode 100644 index 031b2e382fb..00000000000 --- a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.css +++ /dev/null @@ -1,61 +0,0 @@ -/* DashboardComponent's private CSS styles */ -[class*='col-'] { - float: left; - padding-right: 20px; - padding-bottom: 20px; -} -[class*='col-']:last-of-type { - padding-right: 0; -} -a { - text-decoration: none; -} -*, *::after, *::before { - box-sizing: border-box; -} -h3 { - text-align: center; - margin-bottom: 0; -} -h4 { - position: relative; -} -.grid { - margin: 0; -} -.col-1-4 { - width: 25%; -} -.module { - padding: 20px; - text-align: center; - color: #eee; - max-height: 120px; - min-width: 120px; - background-color: #3f525c; - border-radius: 2px; -} -.module:hover { - background-color: #EEE; - cursor: pointer; - color: #607d8b; -} -.grid-pad { - padding: 10px 0; -} -.grid-pad > [class*='col-']:last-of-type { - padding-right: 20px; -} -@media (max-width: 600px) { - .module { - font-size: 10px; - max-height: 75px; } -} -@media (max-width: 1024px) { - .grid { - margin: 0; - } - .module { - min-width: 60px; - } -} diff --git a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.html b/aio/content/examples/ssr/src/app/dashboard/dashboard.component.html deleted file mode 100644 index b70c0c7d6e4..00000000000 --- a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.html +++ /dev/null @@ -1,11 +0,0 @@ -

    Top Heroes

    - - - diff --git a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.ts b/aio/content/examples/ssr/src/app/dashboard/dashboard.component.ts deleted file mode 100644 index 5aba951cabb..00000000000 --- a/aio/content/examples/ssr/src/app/dashboard/dashboard.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgFor } from '@angular/common'; -import { RouterLink } from '@angular/router'; - -import { Hero } from '../hero'; -import { HeroSearchComponent } from '../hero-search/hero-search.component'; -import { HeroService } from '../hero.service'; - -@Component({ - standalone: true, - selector: 'app-dashboard', - templateUrl: './dashboard.component.html', - imports: [ NgFor, RouterLink, HeroSearchComponent ], - styleUrls: [ './dashboard.component.css' ] -}) -export class DashboardComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit() { - this.getHeroes(); - } - - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes.slice(1, 5)); - } -} diff --git a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.css deleted file mode 100644 index 6a860b871da..00000000000 --- a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,30 +0,0 @@ -/* HeroDetailComponent's private CSS styles */ -label { - display: inline-block; - width: 3em; - margin: .5em 0; - color: #607D8B; - font-weight: bold; -} -input { - height: 2em; - font-size: 1em; - padding-left: .4em; -} -button { - margin-top: 20px; - font-family: Arial, sans-serif; - background-color: #eee; - border: none; - padding: 5px 10px; - border-radius: 4px; - cursor: pointer; -} -button:hover { - background-color: #cfd8dc; -} -button:disabled { - background-color: #eee; - color: #ccc; - cursor: auto; -} diff --git a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.html deleted file mode 100644 index 6625082ec96..00000000000 --- a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -

    {{hero.name | uppercase}} Details

    -
    id: {{hero.id}}
    -
    - -
    - - -
    diff --git a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.ts deleted file mode 100644 index 07506603559..00000000000 --- a/aio/content/examples/ssr/src/app/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnInit, Input} from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Location, NgIf, UpperCasePipe } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - standalone: true, - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - imports: [ FormsModule, NgIf, UpperCasePipe ], - styleUrls: [ './hero-detail.component.css' ] -}) -export class HeroDetailComponent implements OnInit { - @Input() hero!: Hero; - - constructor( - private route: ActivatedRoute, - private heroService: HeroService, - private location: Location - ) {} - - ngOnInit(): void { - this.getHero(); - } - - getHero(): void { - const id = parseInt(this.route.snapshot.paramMap.get('id')!, 10); - this.heroService.getHero(id) - .subscribe(hero => this.hero = hero); - } - - goBack(): void { - this.location.back(); - } - - save(): void { - this.heroService.updateHero(this.hero) - .subscribe(() => this.goBack()); - } -} diff --git a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.css b/aio/content/examples/ssr/src/app/hero-search/hero-search.component.css deleted file mode 100644 index 190d9bbc107..00000000000 --- a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.css +++ /dev/null @@ -1,39 +0,0 @@ -/* HeroSearch private styles */ -.search-result li { - border-bottom: 1px solid gray; - border-left: 1px solid gray; - border-right: 1px solid gray; - width: 195px; - height: 16px; - padding: 5px; - background-color: white; - cursor: pointer; - list-style-type: none; -} - -.search-result li:hover { - background-color: #607D8B; -} - -.search-result li a { - color: #888; - display: block; - text-decoration: none; -} - -.search-result li a:hover { - color: white; -} -.search-result li a:active { - color: white; -} -#search-box { - width: 200px; - height: 20px; -} - - -ul.search-result { - margin-top: 0; - padding-left: 0; -} diff --git a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.html b/aio/content/examples/ssr/src/app/hero-search/hero-search.component.html deleted file mode 100644 index cce62888acb..00000000000 --- a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.html +++ /dev/null @@ -1,13 +0,0 @@ -
    -

    - - - - -
    diff --git a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.ts b/aio/content/examples/ssr/src/app/hero-search/hero-search.component.ts deleted file mode 100644 index a8208f499b8..00000000000 --- a/aio/content/examples/ssr/src/app/hero-search/hero-search.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { AsyncPipe, NgFor } from '@angular/common'; -import { RouterLink } from '@angular/router'; - -import { Observable, Subject } from 'rxjs'; - -import { - debounceTime, distinctUntilChanged, switchMap - } from 'rxjs/operators'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - standalone: true, - selector: 'app-hero-search', - templateUrl: './hero-search.component.html', - imports: [ AsyncPipe, NgFor, RouterLink ], - styleUrls: [ './hero-search.component.css' ] -}) -export class HeroSearchComponent implements OnInit { - heroes$!: Observable; - private searchTerms = new Subject(); - - constructor(private heroService: HeroService) {} - - // Push a search term into the observable stream. - search(term: string): void { - this.searchTerms.next(term); - } - - ngOnInit(): void { - this.heroes$ = this.searchTerms.pipe( - // wait 300ms after each keystroke before considering the term - debounceTime(300), - - // ignore new term if same as previous term - distinctUntilChanged(), - - // switch to new search observable each time the term changes - switchMap((term: string) => this.heroService.searchHeroes(term)), - ); - } -} diff --git a/aio/content/examples/ssr/src/app/hero.service.ts b/aio/content/examples/ssr/src/app/hero.service.ts deleted file mode 100644 index 361b36c14bd..00000000000 --- a/aio/content/examples/ssr/src/app/hero.service.ts +++ /dev/null @@ -1,124 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient, HttpHeaders } from '@angular/common/http'; - -import { Observable, of } from 'rxjs'; -import { catchError, map, tap } from 'rxjs/operators'; - -import { Hero } from './hero'; -import { MessageService } from './message.service'; - - -@Injectable({ providedIn: 'root' }) -export class HeroService { - - private heroesUrl = 'api/heroes'; // URL to web api - - httpOptions = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - }; - - constructor( - private http: HttpClient, - private messageService: MessageService) { } - - /** GET heroes from the server */ - getHeroes(): Observable { - return this.http.get(this.heroesUrl) - .pipe( - tap(_ => this.log('fetched heroes')), - catchError(this.handleError('getHeroes', [])) - ); - } - - /** GET hero by id. Return `undefined` when id not found */ - getHeroNo404(id: number): Observable { - const url = `${this.heroesUrl}/?id=${id}`; - return this.http.get(url) - .pipe( - map(heroes => heroes[0]), // returns a {0|1} element array - tap(h => { - const outcome = h ? 'fetched' : 'did not find'; - this.log(`${outcome} hero id=${id}`); - }), - catchError(this.handleError(`getHero id=${id}`)) - ); - } - - /** GET hero by id. Will 404 if id not found */ - getHero(id: number): Observable { - const url = `${this.heroesUrl}/${id}`; - return this.http.get(url).pipe( - tap(_ => this.log(`fetched hero id=${id}`)), - catchError(this.handleError(`getHero id=${id}`)) - ); - } - - /* GET heroes whose name contains search term */ - searchHeroes(term: string): Observable { - if (!term.trim()) { - // if not search term, return empty hero array. - return of([]); - } - return this.http.get(`${this.heroesUrl}/?name=${term}`).pipe( - tap(x => x.length ? - this.log(`found heroes matching "${term}"`) : - this.log(`no heroes matching "${term}"`)), - catchError(this.handleError('searchHeroes', [])) - ); - } - - //////// Save methods ////////// - - /** POST: add a new hero to the server */ - addHero(hero: Hero): Observable { - return this.http.post(this.heroesUrl, hero, this.httpOptions).pipe( - tap((newHero: Hero) => this.log(`added hero w/ id=${newHero.id}`)), - catchError(this.handleError('addHero')) - ); - } - - /** DELETE: delete the hero from the server */ - deleteHero(hero: Hero | number): Observable { - const id = typeof hero === 'number' ? hero : hero.id; - const url = `${this.heroesUrl}/${id}`; - - return this.http.delete(url, this.httpOptions).pipe( - tap(_ => this.log(`deleted hero id=${id}`)), - catchError(this.handleError('deleteHero')) - ); - } - - /** PUT: update the hero on the server */ - updateHero(hero: Hero): Observable { - return this.http.put(this.heroesUrl, hero, this.httpOptions).pipe( - tap(_ => this.log(`updated hero id=${hero.id}`)), - catchError(this.handleError('updateHero')) - ); - } - - /** - * Handle Http operation that failed. - * Let the app continue. - * - * @param operation - name of the operation that failed - * @param result - optional value to return as the observable result - */ - private handleError(operation = 'operation', result?: T) { - return (error: any): Observable => { - - // TODO: send the error to remote logging infrastructure - console.error(error); // log to console instead - - // TODO: better job of transforming error for user consumption - this.log(`${operation} failed: ${error.message}`); - - // Let the app keep running by returning an empty result. - return of(result as T); - }; - } - - /** Log a HeroService message with the MessageService */ - private log(message: string) { - this.messageService.add(`HeroService: ${message}`); - } -} diff --git a/aio/content/examples/ssr/src/app/hero.ts b/aio/content/examples/ssr/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/ssr/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/ssr/src/app/heroes/heroes.component.css b/aio/content/examples/ssr/src/app/heroes/heroes.component.css deleted file mode 100644 index ccb1e57e352..00000000000 --- a/aio/content/examples/ssr/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,76 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -.heroes li { - position: relative; - cursor: pointer; - background-color: #EEE; - margin: .5em; - padding: .3em 0; - height: 1.6em; - border-radius: 4px; -} - -.heroes li:hover { - color: #607D8B; - background-color: #DDD; - left: .1em; -} - -.heroes a { - color: #333; - text-decoration: none; - position: relative; - display: block; - width: 250px; -} - -.heroes a:hover { - color: #607D8B; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - position: relative; - left: -1px; - top: -4px; - height: 1.8em; - min-width: 16px; - text-align: right; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -button { - background-color: #eee; - border: none; - padding: 5px 10px; - border-radius: 4px; - cursor: pointer; - font-family: Arial, sans-serif; -} - -button:hover { - background-color: #cfd8dc; -} - -button.delete { - position: absolute; - right: 0; - top: 0; - bottom: 0; - background-color: gray !important; - color: white; - margin: 0; -} - diff --git a/aio/content/examples/ssr/src/app/heroes/heroes.component.html b/aio/content/examples/ssr/src/app/heroes/heroes.component.html deleted file mode 100644 index 0afd75048b3..00000000000 --- a/aio/content/examples/ssr/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,21 +0,0 @@ -

    My Heroes

    - -
    - - - -
    - - diff --git a/aio/content/examples/ssr/src/app/heroes/heroes.component.ts b/aio/content/examples/ssr/src/app/heroes/heroes.component.ts deleted file mode 100644 index 9166135023e..00000000000 --- a/aio/content/examples/ssr/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { NgFor } from '@angular/common'; -import { RouterLink } from '@angular/router'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - standalone: true, - selector: 'app-heroes', - templateUrl: './heroes.component.html', - imports: [ NgFor, RouterLink ], - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit() { - this.getHeroes(); - } - - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes); - } - - add(name: string): void { - name = name.trim(); - if (!name) { return; } - this.heroService.addHero({ name } as Hero) - .subscribe(hero => { - this.heroes.push(hero); - }); - } - - delete(hero: Hero): void { - this.heroes = this.heroes.filter(h => h !== hero); - this.heroService.deleteHero(hero).subscribe(); - } - -} diff --git a/aio/content/examples/ssr/src/app/in-memory-data.service.ts b/aio/content/examples/ssr/src/app/in-memory-data.service.ts deleted file mode 100644 index 9402d9e7110..00000000000 --- a/aio/content/examples/ssr/src/app/in-memory-data.service.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Injectable } from '@angular/core'; -import { InMemoryDbService } from 'angular-in-memory-web-api'; -import { Hero } from './hero'; - -@Injectable({ - providedIn: 'root', -}) -export class InMemoryDataService implements InMemoryDbService { - createDb() { - const heroes = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } - ]; - return {heroes}; - } - - // Overrides the genId method to ensure that a hero always has an id. - // If the heroes array is empty, - // the method below returns the initial number (11). - // if the heroes array is not empty, the method below returns the highest - // hero id + 1. - genId(heroes: Hero[]): number { - return heroes.length > 0 ? Math.max(...heroes.map(hero => hero.id)) + 1 : 11; - } -} diff --git a/aio/content/examples/ssr/src/app/message.service.ts b/aio/content/examples/ssr/src/app/message.service.ts deleted file mode 100644 index 30614a8af4f..00000000000 --- a/aio/content/examples/ssr/src/app/message.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ providedIn: 'root' }) -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/ssr/src/app/messages/messages.component.css b/aio/content/examples/ssr/src/app/messages/messages.component.css deleted file mode 100644 index 08585dcbaf8..00000000000 --- a/aio/content/examples/ssr/src/app/messages/messages.component.css +++ /dev/null @@ -1,20 +0,0 @@ -/* MessagesComponent's private CSS styles */ -h2 { - color: red; - font-family: Arial, Helvetica, sans-serif; - font-weight: lighter; -} - -button.clear { - font-family: Arial, sans-serif; - color: #333; - background-color: #eee; - margin-bottom: 12px; - border: none; - padding: 5px 10px; - border-radius: 4px; - cursor: pointer; -} -button:hover { - background-color: #cfd8dc; -} diff --git a/aio/content/examples/ssr/src/app/messages/messages.component.html b/aio/content/examples/ssr/src/app/messages/messages.component.html deleted file mode 100644 index 55714e93167..00000000000 --- a/aio/content/examples/ssr/src/app/messages/messages.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
    - -

    Messages

    - -
    {{message}}
    - -
    diff --git a/aio/content/examples/ssr/src/app/messages/messages.component.ts b/aio/content/examples/ssr/src/app/messages/messages.component.ts deleted file mode 100644 index 974ca5c7f5d..00000000000 --- a/aio/content/examples/ssr/src/app/messages/messages.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; -import { NgFor, NgIf } from '@angular/common'; - - -import { MessageService } from '../message.service'; - -@Component({ - standalone: true, - selector: 'app-messages', - templateUrl: './messages.component.html', - imports: [ NgFor, NgIf ], - styleUrls: ['./messages.component.css'] -}) -export class MessagesComponent { - - constructor(public messageService: MessageService) {} - -} diff --git a/aio/content/examples/ssr/src/app/mock-heroes.ts b/aio/content/examples/ssr/src/app/mock-heroes.ts deleted file mode 100644 index 33729c43e37..00000000000 --- a/aio/content/examples/ssr/src/app/mock-heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/ssr/src/index.html b/aio/content/examples/ssr/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/ssr/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/ssr/src/main.server.ts b/aio/content/examples/ssr/src/main.server.ts deleted file mode 100644 index 804e9284285..00000000000 --- a/aio/content/examples/ssr/src/main.server.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { config } from './app/app.config.server'; - -const bootstrap = () => bootstrapApplication(AppComponent, config); -export default bootstrap; diff --git a/aio/content/examples/ssr/src/main.ts b/aio/content/examples/ssr/src/main.ts deleted file mode 100644 index ca4b4a154d9..00000000000 --- a/aio/content/examples/ssr/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig) - .catch(err => console.error(err)); diff --git a/aio/content/examples/ssr/tsconfig.app.json b/aio/content/examples/ssr/tsconfig.app.json deleted file mode 100644 index 7dc7284f6c9..00000000000 --- a/aio/content/examples/ssr/tsconfig.app.json +++ /dev/null @@ -1,18 +0,0 @@ -/* To learn more about this file see: https://angular.io/config/tsconfig. */ -{ - "extends": "./tsconfig.json", - "compilerOptions": { - "outDir": "./out-tsc/app", - "types": [ - "node" - ] - }, - "files": [ - "src/main.ts", - "src/main.server.ts", - "server.ts" - ], - "include": [ - "src/**/*.d.ts" - ] -} diff --git a/aio/content/examples/ssr/zipper.json b/aio/content/examples/ssr/zipper.json deleted file mode 100644 index ce44927d99c..00000000000 --- a/aio/content/examples/ssr/zipper.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [ - "!dist/", - "!**/*.d.ts", - "!**/src/**/*.js" - ] -} diff --git a/aio/content/examples/structural-directives/BUILD.bazel b/aio/content/examples/structural-directives/BUILD.bazel deleted file mode 100644 index bebda694745..00000000000 --- a/aio/content/examples/structural-directives/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "structural-directives", -) diff --git a/aio/content/examples/structural-directives/e2e/src/app.e2e-spec.ts b/aio/content/examples/structural-directives/e2e/src/app.e2e-spec.ts deleted file mode 100644 index e053a7ca473..00000000000 --- a/aio/content/examples/structural-directives/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,48 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Structural Directives', () => { - - beforeAll(() => browser.get('')); - - it('first div should show hero name with *ngIf', async () => { - const allDivs = element.all(by.tagName('div')); - expect(await allDivs.get(0).getText()).toEqual('Dr. Nice'); - }); - - it('first li should show hero name with *ngFor', async () => { - const allLis = element.all(by.tagName('li')); - expect(await allLis.get(0).getText()).toEqual('Dr. Nice'); - }); - - it('ngSwitch have two instances', async () => { - const happyHeroEls = element.all(by.tagName('app-happy-hero')); - expect(await happyHeroEls.count()).toEqual(2); - }); - - it('should toggle *ngIf="hero" with a button', async () => { - const toggleHeroButton = element.all(by.cssContainingText('button', 'Toggle hero')).get(0); - const paragraph = element.all(by.cssContainingText('p', 'I turned the corner')); - expect(await paragraph.get(0).getText()).toContain('I waved'); - await toggleHeroButton.click(); - expect(await paragraph.get(0).getText()).not.toContain('I waved'); - }); - - it('appUnless should show 3 paragraph (A)s and (B)s at the start', async () => { - const paragraph = element.all(by.css('p.unless')); - expect(await paragraph.count()).toEqual(3); - for (let i = 0; i < 3; i++) { - expect(await paragraph.get(i).getText()).toContain('(A)'); - } - }); - - it('appUnless should show 1 paragraph (B) after toggling condition', async () => { - const toggleConditionButton = element.all(by.cssContainingText('button', 'Toggle condition')).get(0); - const paragraph = element.all(by.css('p.unless')); - - await toggleConditionButton.click(); - - expect(await paragraph.count()).toEqual(1); - expect(await paragraph.get(0).getText()).toContain('(B)'); - }); -}); - diff --git a/aio/content/examples/structural-directives/example-config.json b/aio/content/examples/structural-directives/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/structural-directives/src/app/app.component.css b/aio/content/examples/structural-directives/src/app/app.component.css deleted file mode 100644 index 132e7864311..00000000000 --- a/aio/content/examples/structural-directives/src/app/app.component.css +++ /dev/null @@ -1,71 +0,0 @@ -/* #docregion */ -button { - min-width: 100px; - font-size: 100%; -} - -.box { - border: 1px solid gray; - max-width: 600px; - padding: 4px; -} -.choices { - font-style: italic; -} - -code, .code { - background-color: #eee; - color: black; - font-family: Courier, sans-serif; - font-size: 85%; -} - -div.code { - width: 400px; -} - -.heroic { - font-size: 150%; - font-weight: bold; -} - -hr { - margin: 40px 0; -} - -.odd { - background-color: palegoldenrod; -} - -td, th { - text-align: left; - vertical-align: top; -} - -p span { - color: red; - font-size: 70%; -} - -.unless { - border: 2px solid; - padding: 6px; -} - -p.unless { - width: 500px; -} - -button.a, span.a, .unless.a { - color: red; - border-color: gold; - background-color: yellow; - font-size: 100%; -} - -button.b, span.b, .unless.b { - color: black; - border-color: green; - background-color: lightgreen; - font-size: 100%; -} diff --git a/aio/content/examples/structural-directives/src/app/app.component.html b/aio/content/examples/structural-directives/src/app/app.component.html deleted file mode 100644 index 81380c34220..00000000000 --- a/aio/content/examples/structural-directives/src/app/app.component.html +++ /dev/null @@ -1,228 +0,0 @@ - - -

    Structural Directives

    - -

    Conditional display of hero

    - -
    - -
    {{hero.name}}
    - -
    - -

    List of heroes

    - -
      -
    • {{hero.name}}
    • -
    - -
    - -

    NgIf

    - -

    - Expression is true and ngIf is true. - This paragraph is in the DOM. -

    -

    - Expression is false and ngIf is false. - This paragraph is not in the DOM. -

    - -

    - Expression sets display to "block". - This paragraph is visible. -

    -

    - Expression sets display to "none". - This paragraph is hidden but still in the DOM. -

    - -

    NgIf with template

    -

    <ng-template> element

    - - -
    {{hero.name}}
    -
    - - -
    - -

    <ng-container>

    - -

    *ngIf with a <ng-container>

    - - - - -

    - I turned the corner - - and saw {{hero.name}}. I waved - - and continued on my way. -

    - - -

    - I turned the corner - - and saw {{hero.name}}. I waved - - and continued on my way. -

    - -

    <select> with <span>

    - -
    - Pick your favorite hero - () -
    - - -

    <select> with <ng-container>

    - -
    - Pick your favorite hero - () -
    - - -

    - -
    - -

    NgFor

    - -
    - -

    <div *ngFor="let hero of heroes; let i=index; let odd=odd; trackBy: trackById" [class.odd]="odd">

    - -
    - ({{i}}) {{hero.name}} -
    - - -

    <ng-template ngFor let-hero [ngForOf]="heroes" let-i="index" let-odd="odd" [ngForTrackBy]="trackById"/>

    - - -
    - ({{i}}) {{hero.name}} -
    -
    - - -
    -
    - -

    NgSwitch

    - -
    Pick your favorite hero
    -

    - - -

    - -

    NgSwitch

    - -
    - - - - -
    - -

    NgSwitch with <ng-template>

    -
    - - - - - - - - - - - - -
    - -
    - - -

    UnlessDirective

    - -

    - The condition is currently - {{condition}}. - -

    - - - -

    - (A) This paragraph is displayed because the condition is false. -

    - -

    - (B) Although the condition is true, - this paragraph is displayed because appUnless is set to false. -

    - - - -

    UnlessDirective with template

    - - -

    Show this sentence unless the condition is true.

    - - -

    - (A) <p *appUnless="condition" class="code unless"> -

    - - -

    - (A) <ng-template [appUnless]="condition"> -

    -
    - -
    - -

    IfLoadedDirective

    - - -
    - -

    TrigonometryDirective

    - - -
      -
    • sin(30°): {{ s }}
    • -
    • cos(30°): {{ c }}
    • -
    • tan(30°): {{ t }}
    • -
    - diff --git a/aio/content/examples/structural-directives/src/app/app.component.ts b/aio/content/examples/structural-directives/src/app/app.component.ts deleted file mode 100644 index 118c55bc903..00000000000 --- a/aio/content/examples/structural-directives/src/app/app.component.ts +++ /dev/null @@ -1,39 +0,0 @@ -import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; -import {FormsModule} from '@angular/forms'; - -import {heroSwitchComponents} from './hero-switch.components'; -import {HeroComponent} from './hero.component'; -import {UnlessDirective} from './unless.directive'; -import {TrigonometryDirective} from './trigonometry.directive'; - -import {Hero, heroes} from './hero'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [ - CommonModule, - FormsModule, - heroSwitchComponents, - HeroComponent, - UnlessDirective, - TrigonometryDirective, - ], -}) -export class AppComponent { - heroes = heroes; - hero: Hero | null = this.heroes[0]; - // #docregion condition - condition = false; - // #enddocregion condition - logs: string[] = []; - showSad = true; - status = 'ready'; - - trackById(index: number, hero: Hero): number { - return hero.id; - } -} diff --git a/aio/content/examples/structural-directives/src/app/hero-switch.components.ts b/aio/content/examples/structural-directives/src/app/hero-switch.components.ts deleted file mode 100644 index 5fcb6477e04..00000000000 --- a/aio/content/examples/structural-directives/src/app/hero-switch.components.ts +++ /dev/null @@ -1,51 +0,0 @@ -// #docregion -import {Component, Input} from '@angular/core'; -import {Hero} from './hero'; - -@Component({ - standalone: true, - selector: 'app-happy-hero', - template: 'Wow. You like {{hero.name}}. What a happy hero ... just like you.', -}) -export class HappyHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-sad-hero', - template: 'You like {{hero.name}}? Such a sad hero. Are you sad too?', -}) -export class SadHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-confused-hero', - template: 'Are you as confused as {{hero.name}}?', -}) -export class ConfusedHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-unknown-hero', - template: '{{message}}', -}) -export class UnknownHeroComponent { - @Input() hero!: Hero; - get message() { - return this.hero && this.hero.name - ? `${this.hero.name} is strange and mysterious.` - : 'Are you feeling indecisive?'; - } -} - -export const heroSwitchComponents = [ - HappyHeroComponent, - SadHeroComponent, - ConfusedHeroComponent, - UnknownHeroComponent, -]; diff --git a/aio/content/examples/structural-directives/src/app/hero.component.ts b/aio/content/examples/structural-directives/src/app/hero.component.ts deleted file mode 100644 index f724dedf99e..00000000000 --- a/aio/content/examples/structural-directives/src/app/hero.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; - -import {IfLoadedDirective} from './if-loaded.directive'; - -import {LoadingState} from './loading-state'; -import {Hero, heroes} from './hero'; - -@Component({ - standalone: true, - selector: 'app-hero', - template: ` - -

    {{ heroLoadingState.data | json }}

    - `, - imports: [CommonModule, IfLoadedDirective], -}) -export class HeroComponent { - heroLoadingState: LoadingState = {type: 'loading'}; - - onLoadHero(): void { - this.heroLoadingState = {type: 'loaded', data: heroes[0]}; - } -} diff --git a/aio/content/examples/structural-directives/src/app/hero.ts b/aio/content/examples/structural-directives/src/app/hero.ts deleted file mode 100644 index 27b4a79ab1d..00000000000 --- a/aio/content/examples/structural-directives/src/app/hero.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; - emotion?: string; -} - -export const heroes: Hero[] = [ - { id: 1, name: 'Dr. Nice', emotion: 'happy'}, - { id: 2, name: 'RubberMan', emotion: 'sad' }, - { id: 3, name: 'Windstorm', emotion: 'confused' }, - { id: 4, name: 'Magneta'} -]; diff --git a/aio/content/examples/structural-directives/src/app/if-loaded.directive.ts b/aio/content/examples/structural-directives/src/app/if-loaded.directive.ts deleted file mode 100644 index 3d103c8b09f..00000000000 --- a/aio/content/examples/structural-directives/src/app/if-loaded.directive.ts +++ /dev/null @@ -1,33 +0,0 @@ -import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core'; - -import {Loaded, LoadingState} from './loading-state'; - -@Directive({ - standalone: true, - selector: '[appIfLoaded]', -}) -export class IfLoadedDirective { - private isViewCreated = false; - - @Input('appIfLoaded') set state(state: LoadingState) { - if (!this.isViewCreated && state.type === 'loaded') { - this.viewContainerRef.createEmbeddedView(this.templateRef); - this.isViewCreated = true; - } else if (this.isViewCreated && state.type !== 'loaded') { - this.viewContainerRef.clear(); - this.isViewCreated = false; - } - } - - constructor( - private readonly viewContainerRef: ViewContainerRef, - private readonly templateRef: TemplateRef, - ) {} - - static ngTemplateGuard_appIfLoaded( - dir: IfLoadedDirective, - state: LoadingState, - ): state is Loaded { - return true; - } -} diff --git a/aio/content/examples/structural-directives/src/app/loading-state.ts b/aio/content/examples/structural-directives/src/app/loading-state.ts deleted file mode 100644 index 5213eb22777..00000000000 --- a/aio/content/examples/structural-directives/src/app/loading-state.ts +++ /dev/null @@ -1,5 +0,0 @@ -export type Loaded = { type: 'loaded', data: T }; - -export type Loading = { type: 'loading' }; - -export type LoadingState = Loaded | Loading; diff --git a/aio/content/examples/structural-directives/src/app/scrap.txt b/aio/content/examples/structural-directives/src/app/scrap.txt deleted file mode 100644 index d3773b72638..00000000000 --- a/aio/content/examples/structural-directives/src/app/scrap.txt +++ /dev/null @@ -1,20 +0,0 @@ -// interesting but unused code - heroChooser(picker: HTMLFieldSetElement) { - let choices = picker.children; - this.favoriteHero = undefined; - for (let i = 0; i < choices.length; i++) { - let choice = choices[i].children[0] as HTMLInputElement; - if (choice.checked) { this.favoriteHero = this.heroes[i]; } - } - } - -

    Switch with *ngFor repeated switchCases using <ng-container>

    - -
    - Your favorite hero is ... - - {{hero.name}} - - None of the above -
    - diff --git a/aio/content/examples/structural-directives/src/app/trigonometry.directive.ts b/aio/content/examples/structural-directives/src/app/trigonometry.directive.ts deleted file mode 100644 index a7a425a5857..00000000000 --- a/aio/content/examples/structural-directives/src/app/trigonometry.directive.ts +++ /dev/null @@ -1,46 +0,0 @@ -import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[appTrigonometry]', -}) -export class TrigonometryDirective { - private isViewCreated = false; - private readonly context = new TrigonometryContext(); - - @Input('appTrigonometry') set angle(angleInDegrees: number) { - const angleInRadians = toRadians(angleInDegrees); - this.context.sin = Math.sin(angleInRadians); - this.context.cos = Math.cos(angleInRadians); - this.context.tan = Math.tan(angleInRadians); - - if (!this.isViewCreated) { - this.viewContainerRef.createEmbeddedView(this.templateRef, this.context); - this.isViewCreated = true; - } - } - - constructor( - private readonly viewContainerRef: ViewContainerRef, - private readonly templateRef: TemplateRef, - ) {} - - // Make sure the template checker knows the type of the context with which the - // template of this directive will be rendered - static ngTemplateContextGuard( - directive: TrigonometryDirective, - context: unknown, - ): context is TrigonometryContext { - return true; - } -} - -class TrigonometryContext { - sin = 0; - cos = 0; - tan = 0; -} - -function toRadians(degrees: number): number { - return degrees * (Math.PI / 180); -} diff --git a/aio/content/examples/structural-directives/src/app/unless.directive.ts b/aio/content/examples/structural-directives/src/app/unless.directive.ts deleted file mode 100644 index 8c97a543376..00000000000 --- a/aio/content/examples/structural-directives/src/app/unless.directive.ts +++ /dev/null @@ -1,54 +0,0 @@ -// #docplaster -// #docregion -// #docregion no-docs, skeleton -import {Directive, Input, TemplateRef, ViewContainerRef} from '@angular/core'; - -// #enddocregion skeleton -/** - * Add the template content to the DOM unless the condition is true. -// #enddocregion no-docs - * - * If the expression assigned to `appUnless` evaluates to a truthy value - * then the templated elements are removed from the DOM, - * the templated elements are (re)inserted into the DOM. - * - *
    - * Congrats! Everything is great! - *
    - * - * ### Syntax - * - * - `
    ...
    ` - * - `
    ...
    ` - * -// #docregion no-docs - */ -// #docregion skeleton -@Directive({ - standalone: true, - selector: '[appUnless]', -}) -export class UnlessDirective { - // #enddocregion skeleton - private hasView = false; - - // #docregion ctor - constructor( - private templateRef: TemplateRef, - private viewContainer: ViewContainerRef, - ) {} - // #enddocregion ctor - - // #docregion set - @Input() set appUnless(condition: boolean) { - if (!condition && !this.hasView) { - this.viewContainer.createEmbeddedView(this.templateRef); - this.hasView = true; - } else if (condition && this.hasView) { - this.viewContainer.clear(); - this.hasView = false; - } - } - // #enddocregion set - // #docregion skeleton -} diff --git a/aio/content/examples/structural-directives/src/index.html b/aio/content/examples/structural-directives/src/index.html deleted file mode 100644 index 451b66ce357..00000000000 --- a/aio/content/examples/structural-directives/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - Angular Structural Directives - - - - - - - - - - diff --git a/aio/content/examples/structural-directives/src/main.ts b/aio/content/examples/structural-directives/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/structural-directives/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/structural-directives/stackblitz.json b/aio/content/examples/structural-directives/stackblitz.json deleted file mode 100644 index 1580621675f..00000000000 --- a/aio/content/examples/structural-directives/stackblitz.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "description": "Structural directives", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!src/app/scrap.txt" - ], - "file": "src/app/app.component.ts", - "tags": [ - "structural", "directives", "template", "ngIf", - "ngSwitch", "ngFor" - ] -} diff --git a/aio/content/examples/styleguide/BUILD.bazel b/aio/content/examples/styleguide/BUILD.bazel deleted file mode 100644 index 3548f430d77..00000000000 --- a/aio/content/examples/styleguide/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "styleguide", -) diff --git a/aio/content/examples/styleguide/e2e/src/app.e2e-spec.ts b/aio/content/examples/styleguide/e2e/src/app.e2e-spec.ts deleted file mode 100644 index b88ac84eef5..00000000000 --- a/aio/content/examples/styleguide/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,140 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Style Guide', () => { - it('01-01', async () => { - await browser.get('#/01-01'); - - const pre = element(by.tagName('toh-heroes > pre')); - expect(await pre.getText()).toContain('Bombasto'); - expect(await pre.getText()).toContain('Tornado'); - expect(await pre.getText()).toContain('Magneta'); - }); - - it('02-07', async () => { - await browser.get('#/02-07'); - - const hero = element(by.tagName('toh-hero > div')); - const users = element(by.tagName('admin-users > div')); - - expect(await hero.getText()).toBe('hero component'); - expect(await users.getText()).toBe('users component'); - }); - - it('02-08', async () => { - await browser.get('#/02-08'); - - const input = element(by.tagName('input[tohvalidate]')); - expect(await input.isPresent()).toBe(true); - }); - - it('04-10', async () => { - await browser.get('#/04-10'); - - const div = element(by.tagName('sg-app > toh-heroes > div')); - expect(await div.getText()).toBe('This is heroes component'); - }); - - it('05-02', async () => { - await browser.get('#/05-02'); - - const button = element(by.tagName('sg-app > toh-hero-button > button')); - expect(await button.getText()).toBe('Hero button'); - }); - - it('05-03', async () => { - await browser.get('#/05-03'); - - const button = element(by.tagName('sg-app > toh-hero-button > button')); - expect(await button.getText()).toBe('Hero button'); - }); - - it('05-04', async () => { - await browser.get('#/05-04'); - - const h2 = element(by.tagName('sg-app > toh-heroes > div > h2')); - expect(await h2.getText()).toBe('My Heroes'); - }); - - it('05-12', async () => { - await browser.get('#/05-12'); - - const button = element(by.tagName('sg-app > toh-hero-button > button')); - expect(await button.getText()).toBe('OK'); - }); - - it('05-13', async () => { - await browser.get('#/05-13'); - - const button = element(by.tagName('sg-app > toh-hero-button > button')); - expect(await button.getText()).toBe('OK'); - }); - - it('05-14', async () => { - await browser.get('#/05-14'); - - const toast = element(by.tagName('sg-app > toh-toast')); - expect(await toast.getText()).toBe('...'); - }); - - it('05-15', async () => { - await browser.get('#/05-15'); - - const heroList = element(by.tagName('sg-app > toh-hero-list')); - expect(await heroList.getText()).toBe('...'); - }); - - it('05-16', async () => { - await browser.get('#/05-16'); - - const hero = element(by.tagName('sg-app > toh-hero')); - expect(await hero.getText()).toBe('...'); - }); - - it('05-17', async () => { - await browser.get('#/05-17'); - - const section = element(by.tagName('sg-app > toh-hero-list > section')); - expect(await section.getText()).toContain('Our list of heroes'); - expect(await section.getText()).toContain('Total powers'); - expect(await section.getText()).toContain('Average power'); - }); - - it('06-01', async () => { - await browser.get('#/06-01'); - - const div = element(by.tagName('sg-app > div[tohhighlight]')); - expect(await div.getText()).toBe('Bombasta'); - }); - - it('06-03', async () => { - await browser.get('#/06-03'); - - const input = element(by.tagName('input[tohvalidator]')); - expect(await input.isPresent()).toBe(true); - }); - - // temporarily disabled because of a weird issue when used with rxjs v6 with rxjs-compat - xit('07-01', async () => { - await browser.get('#/07-01'); - - const lis = element.all(by.tagName('sg-app > ul > li')); - expect(await lis.get(0).getText()).toBe('Windstorm'); - expect(await lis.get(1).getText()).toBe('Bombasto'); - expect(await lis.get(2).getText()).toBe('Magneta'); - expect(await lis.get(3).getText()).toBe('Tornado'); - }); - - it('07-04', async () => { - await browser.get('#/07-04'); - - const pre = element(by.tagName('toh-app > pre')); - expect(await pre.getText()).toContain('[]'); - }); - - it('09-01', async () => { - await browser.get('#/09-01'); - - const button = element(by.tagName('sg-app > toh-hero-button > button')); - expect(await button.getText()).toBe('OK'); - }); -}); diff --git a/aio/content/examples/styleguide/example-config.json b/aio/content/examples/styleguide/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/styleguide/src/01-01/app/app.component.css b/aio/content/examples/styleguide/src/01-01/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/styleguide/src/01-01/app/app.component.ts b/aio/content/examples/styleguide/src/01-01/app/app.component.ts deleted file mode 100644 index 7e7444d3aed..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/app.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { HeroService } from './heroes'; - -@Component({ - selector: 'toh-app', - template: ` - - `, - styleUrls: ['./app.component.css'], - providers: [HeroService] -}) -export class AppComponent {} diff --git a/aio/content/examples/styleguide/src/01-01/app/app.module.ts b/aio/content/examples/styleguide/src/01-01/app/app.module.ts deleted file mode 100644 index 53f29ea8cba..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/app.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroesComponent } from './heroes/heroes.component'; - -@NgModule({ - imports: [ - BrowserModule, - // #enddocregion - RouterModule.forChild([{ path: '01-01', component: AppComponent }]) - // #docregion - ], - declarations: [ - AppComponent, - HeroesComponent - ], - exports: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -// #enddocregion - - diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/hero.component.avoid.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/hero.component.avoid.ts deleted file mode 100644 index d0cc29cf3f7..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/hero.component.avoid.ts +++ /dev/null @@ -1,48 +0,0 @@ -// #docregion -/* avoid */ -import { Component, NgModule, OnInit } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -interface Hero { - id: number; - name: string; -} - -@Component({ - selector: 'app-root', - template: ` -

    {{title}}

    -
    {{heroes | json}}
    - `, - styleUrls: ['app/app.component.css'] -}) -class AppComponent implements OnInit { - title = 'Tour of Heroes'; - - heroes: Hero[] = []; - - ngOnInit() { - getHeroes().then(heroes => (this.heroes = heroes)); - } -} - -@NgModule({ - imports: [BrowserModule], - declarations: [AppComponent], - exports: [AppComponent], - bootstrap: [AppComponent] -}) -export class AppModule {} - -platformBrowserDynamic().bootstrapModule(AppModule); - -const HEROES: Hero[] = [ - { id: 1, name: 'Bombasto' }, - { id: 2, name: 'Tornado' }, - { id: 3, name: 'Magneta' } -]; - -function getHeroes(): Promise { - return Promise.resolve(HEROES); // TODO: get hero data from the server; -} diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/heroes.component.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/heroes.component.ts deleted file mode 100644 index 9e3546db900..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/heroes.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; - -import { Hero, HeroService } from './shared'; - -@Component({ - selector: 'toh-heroes', - template: ` -
    {{heroes | json}}
    - ` -}) -export class HeroesComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) {} - - ngOnInit() { - this.heroService.getHeroes() - .then(heroes => this.heroes = heroes); - } -} diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/index.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/index.ts deleted file mode 100644 index a8d7f1d4220..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './heroes.component'; diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.service.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.service.ts deleted file mode 100644 index d94e5bacac5..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/hero.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { HEROES } from './mock-heroes'; - -@Injectable() -export class HeroService { - getHeroes() { - return Promise.resolve(HEROES); - } -} diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/shared/index.ts deleted file mode 100644 index c0c1a87eb25..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './hero.model'; -export * from './hero.service'; -export * from './mock-heroes'; diff --git a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/mock-heroes.ts b/aio/content/examples/styleguide/src/01-01/app/heroes/shared/mock-heroes.ts deleted file mode 100644 index f3a0ef7ce4e..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/heroes/shared/mock-heroes.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { Hero } from './hero.model'; - -export const HEROES: Hero[] = [ - { id: 1, name: 'Bombasto' }, - { id: 2, name: 'Tornado' }, - { id: 3, name: 'Magneta' } -]; diff --git a/aio/content/examples/styleguide/src/01-01/app/index.ts b/aio/content/examples/styleguide/src/01-01/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/01-01/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/01-01/main.ts b/aio/content/examples/styleguide/src/01-01/main.ts deleted file mode 100644 index f332d1d2451..00000000000 --- a/aio/content/examples/styleguide/src/01-01/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/styleguide/src/02-05/app/app.component.ts b/aio/content/examples/styleguide/src/02-05/app/app.component.ts deleted file mode 100644 index 66ebfa954e5..00000000000 --- a/aio/content/examples/styleguide/src/02-05/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'toh-app', - template: ` - Tour of Heroes - ` -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/02-05/app/app.module.ts b/aio/content/examples/styleguide/src/02-05/app/app.module.ts deleted file mode 100644 index 306ec125e03..00000000000 --- a/aio/content/examples/styleguide/src/02-05/app/app.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; - -@NgModule({ - imports: [ - BrowserModule, - // #enddocregion - RouterModule.forChild([{ path: '02-05', component: AppComponent }]) - // #docregion - ], - declarations: [ - AppComponent - ], - exports: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } -// #enddocregion diff --git a/aio/content/examples/styleguide/src/02-05/main.ts b/aio/content/examples/styleguide/src/02-05/main.ts deleted file mode 100644 index 9e1b271ce41..00000000000 --- a/aio/content/examples/styleguide/src/02-05/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .then(success => console.log(`Bootstrap success`)) - .catch(err => console.error(err)); diff --git a/aio/content/examples/styleguide/src/02-07/app/app.component.ts b/aio/content/examples/styleguide/src/02-07/app/app.component.ts deleted file mode 100644 index c82e12624d8..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: ` - - - ` -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/02-07/app/app.module.ts b/aio/content/examples/styleguide/src/02-07/app/app.module.ts deleted file mode 100644 index 4320fe67d5d..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/app.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroComponent } from './heroes'; -import { UsersComponent } from './users'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '02-07', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroComponent, - UsersComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.avoid.ts b/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.avoid.ts deleted file mode 100644 index 976fcb6cdfc..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.avoid.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -// #docregion example -/* avoid */ - -// HeroComponent is in the Tour of Heroes feature -@Component({ - selector: 'hero' -}) -export class HeroComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.ts b/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.ts deleted file mode 100644 index 44c04dd8558..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/heroes/hero.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; - -// #docregion example -@Component({ - // #enddocregion example - template: '
    hero component
    ', - // #docregion example - selector: 'toh-hero' -}) -export class HeroComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/02-07/app/heroes/index.ts b/aio/content/examples/styleguide/src/02-07/app/heroes/index.ts deleted file mode 100644 index 084f36d7034..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.component'; diff --git a/aio/content/examples/styleguide/src/02-07/app/index.ts b/aio/content/examples/styleguide/src/02-07/app/index.ts deleted file mode 100644 index fc87f976b3f..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './heroes'; -export * from './users'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/02-07/app/users/index.ts b/aio/content/examples/styleguide/src/02-07/app/users/index.ts deleted file mode 100644 index 475ba6d2a73..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/users/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './users.component'; diff --git a/aio/content/examples/styleguide/src/02-07/app/users/users.component.avoid.ts b/aio/content/examples/styleguide/src/02-07/app/users/users.component.avoid.ts deleted file mode 100644 index 9a5bd936e96..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/users/users.component.avoid.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -// #docregion example -/* avoid */ - -// UsersComponent is in an Admin feature -@Component({ - selector: 'users' -}) -export class UsersComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/02-07/app/users/users.component.ts b/aio/content/examples/styleguide/src/02-07/app/users/users.component.ts deleted file mode 100644 index 2fb6d54ebe0..00000000000 --- a/aio/content/examples/styleguide/src/02-07/app/users/users.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; - -// #docregion example -@Component({ - // #enddocregion example - template: '
    users component
    ', - // #docregion example - selector: 'admin-users' -}) -export class UsersComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/02-08/app/app.component.ts b/aio/content/examples/styleguide/src/02-08/app/app.component.ts deleted file mode 100644 index bf27aeaf8a0..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/02-08/app/app.module.ts b/aio/content/examples/styleguide/src/02-08/app/app.module.ts deleted file mode 100644 index e840cc50a53..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/app.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { InputHighlightDirective, - ValidateDirective } from './shared'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '02-08', component: AppComponent }]) - ], - declarations: [ - AppComponent, - InputHighlightDirective, - ValidateDirective - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/02-08/app/index.ts b/aio/content/examples/styleguide/src/02-08/app/index.ts deleted file mode 100644 index ebe5c92f039..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/02-08/app/shared/index.ts b/aio/content/examples/styleguide/src/02-08/app/shared/index.ts deleted file mode 100644 index b844b754925..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/shared/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './input-highlight.directive'; -export * from './validate.directive'; diff --git a/aio/content/examples/styleguide/src/02-08/app/shared/input-highlight.directive.ts b/aio/content/examples/styleguide/src/02-08/app/shared/input-highlight.directive.ts deleted file mode 100644 index f2ead8eb6de..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/shared/input-highlight.directive.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Directive, ElementRef } from '@angular/core'; - -// eslint-disable-next-line @angular-eslint/directive-selector -@Directive({ selector: 'input'}) -/** Highlight the attached input text element in blue */ -export class InputHighlightDirective { - constructor(el: ElementRef) { - el.nativeElement.style.backgroundColor = 'powderblue'; - } -} diff --git a/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.avoid.ts b/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.avoid.ts deleted file mode 100644 index b038f370753..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.avoid.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import { Directive } from '@angular/core'; -// #docregion example -/* avoid */ - -@Directive({ - selector: '[validate]' -}) -export class ValidateDirective {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.ts b/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.ts deleted file mode 100644 index 039afb846f7..00000000000 --- a/aio/content/examples/styleguide/src/02-08/app/shared/validate.directive.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Directive } from '@angular/core'; - -// #docregion example -@Directive({ - selector: '[tohValidate]' -}) -export class ValidateDirective {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/04-08/app/app.component.ts b/aio/content/examples/styleguide/src/04-08/app/app.component.ts deleted file mode 100644 index fdd8e6ef561..00000000000 --- a/aio/content/examples/styleguide/src/04-08/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/04-08/app/app.module.ts b/aio/content/examples/styleguide/src/04-08/app/app.module.ts deleted file mode 100644 index 1dc0c048d5c..00000000000 --- a/aio/content/examples/styleguide/src/04-08/app/app.module.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -// #docregion -// #docregion example -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -// #enddocregion example -import { RouterModule } from '@angular/router'; -// #docregion example - -import { AppComponent } from './app.component'; -import { HeroesComponent } from './heroes/heroes.component'; - -@NgModule({ - imports: [ - BrowserModule, -// #enddocregion example - RouterModule.forChild([{ path: '04-08', component: AppComponent }]) -// #docregion example - ], - declarations: [ - AppComponent, - HeroesComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.html b/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.html deleted file mode 100644 index 1244e68a4ad..00000000000 --- a/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.html +++ /dev/null @@ -1 +0,0 @@ -
    This is heroes component
    diff --git a/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.ts b/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.ts deleted file mode 100644 index b60652d1e4a..00000000000 --- a/aio/content/examples/styleguide/src/04-08/app/heroes/heroes.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'toh-heroes', - templateUrl: './heroes.component.html' -}) -export class HeroesComponent {} diff --git a/aio/content/examples/styleguide/src/04-10/app/app.component.ts b/aio/content/examples/styleguide/src/04-10/app/app.component.ts deleted file mode 100644 index fdd8e6ef561..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/04-10/app/app.module.ts b/aio/content/examples/styleguide/src/04-10/app/app.module.ts deleted file mode 100644 index 34b229f6ec2..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/app.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { SharedModule } from './shared/shared.module'; - -@NgModule({ - imports: [ - BrowserModule, - SharedModule, - RouterModule.forChild([{ path: '04-10', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroesComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.html b/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.html deleted file mode 100644 index 170f76aee12..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.html +++ /dev/null @@ -1,8 +0,0 @@ - -
    This is heroes component
    -
      -
    • - {{hero.name}} -
    • -
    - diff --git a/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.ts b/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.ts deleted file mode 100644 index 376567650e3..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/heroes/heroes.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { FilterTextService } from '../shared/filter-text/filter-text.service'; - -@Component({ - selector: 'toh-heroes', - templateUrl: './heroes.component.html' -}) -export class HeroesComponent { - - heroes = [ - { id: 1, name: 'Windstorm' }, - { id: 2, name: 'Bombasto' }, - { id: 3, name: 'Magneta' }, - { id: 4, name: 'Tornado' } - ]; - - filteredHeroes = this.heroes; - - constructor(private filterService: FilterTextService) { } - - filterChanged(searchText: string) { - this.filteredHeroes = this.filterService.filter(searchText, ['id', 'name'], this.heroes); - } -} - diff --git a/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.component.ts b/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.component.ts deleted file mode 100644 index 2fb0e9c0f44..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -import { Component, EventEmitter, Output } from '@angular/core'; - -@Component({ - selector: 'toh-filter-text', - template: '' -}) -export class FilterTextComponent { - @Output() changed: EventEmitter; - - filter = ''; - - constructor() { - this.changed = new EventEmitter(); - } - - clear() { - this.filter = ''; - } - - filterChanged(event: any) { - event.preventDefault(); - console.log(`Filter Changed: ${this.filter}`); - this.changed.emit(this.filter); - } -} diff --git a/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.service.ts b/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.service.ts deleted file mode 100644 index 131c79ad649..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/shared/filter-text/filter-text.service.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -@Injectable() -export class FilterTextService { - constructor() { - console.log('Created an instance of FilterTextService'); - } - - filter(data: string, props: Array, originalList: Array) { - let filteredList: any[]; - if (data && props && originalList) { - data = data.toLowerCase(); - const filtered = originalList.filter(item => { - let match = false; - for (const prop of props) { - if (item[prop].toString().toLowerCase().indexOf(data) > -1) { - match = true; - break; - } - } - return match; - }); - filteredList = filtered; - } else { - filteredList = originalList; - } - return filteredList; - } -} diff --git a/aio/content/examples/styleguide/src/04-10/app/shared/init-caps.pipe.ts b/aio/content/examples/styleguide/src/04-10/app/shared/init-caps.pipe.ts deleted file mode 100644 index 5019bcb234f..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/shared/init-caps.pipe.ts +++ /dev/null @@ -1,7 +0,0 @@ -// #docregion -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ name: 'initCaps' }) -export class InitCapsPipe implements PipeTransform { - transform = (value: string) => value; -} diff --git a/aio/content/examples/styleguide/src/04-10/app/shared/shared.module.ts b/aio/content/examples/styleguide/src/04-10/app/shared/shared.module.ts deleted file mode 100644 index 1b698a052d1..00000000000 --- a/aio/content/examples/styleguide/src/04-10/app/shared/shared.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { FilterTextComponent } from './filter-text/filter-text.component'; -import { FilterTextService } from './filter-text/filter-text.service'; -import { InitCapsPipe } from './init-caps.pipe'; - -@NgModule({ - imports: [CommonModule, FormsModule], - declarations: [ - FilterTextComponent, - InitCapsPipe - ], - providers: [FilterTextService], - exports: [ - CommonModule, - FormsModule, - FilterTextComponent, - InitCapsPipe - ] -}) -export class SharedModule { } diff --git a/aio/content/examples/styleguide/src/05-02/app/app.component.html b/aio/content/examples/styleguide/src/05-02/app/app.component.html deleted file mode 100644 index 607d068557b..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/aio/content/examples/styleguide/src/05-02/app/app.component.ts b/aio/content/examples/styleguide/src/05-02/app/app.component.ts deleted file mode 100644 index 7c9f37919f4..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-02/app/app.module.ts b/aio/content/examples/styleguide/src/05-02/app/app.module.ts deleted file mode 100644 index 1c458e2ca17..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroButtonComponent } from './heroes'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '05-02', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroButtonComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-02/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.avoid.ts b/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.avoid.ts deleted file mode 100644 index e48d41f7218..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.avoid.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docplaster -import { Component } from '@angular/core'; -// #docregion example -/* avoid */ - -@Component({ - selector: 'tohHeroButton', - templateUrl: './hero-button.component.html' -}) -export class HeroButtonComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.html b/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.html deleted file mode 100644 index 0096b4e899d..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.ts b/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.ts deleted file mode 100644 index c90c966f1af..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/hero-button.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero-button', - templateUrl: './hero-button.component.html' -}) -export class HeroButtonComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/index.ts b/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/index.ts deleted file mode 100644 index 6bb67c56704..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/hero-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button.component'; diff --git a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-02/app/heroes/shared/index.ts deleted file mode 100644 index 2334d49c9ad..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button'; diff --git a/aio/content/examples/styleguide/src/05-02/app/index.ts b/aio/content/examples/styleguide/src/05-02/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-02/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-03/app/app.component.avoid.html b/aio/content/examples/styleguide/src/05-03/app/app.component.avoid.html deleted file mode 100644 index 91bdbe403c8..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/app.component.avoid.html +++ /dev/null @@ -1,4 +0,0 @@ - - - -
    diff --git a/aio/content/examples/styleguide/src/05-03/app/app.component.html b/aio/content/examples/styleguide/src/05-03/app/app.component.html deleted file mode 100644 index 607d068557b..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/aio/content/examples/styleguide/src/05-03/app/app.component.ts b/aio/content/examples/styleguide/src/05-03/app/app.component.ts deleted file mode 100644 index 7c9f37919f4..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-03/app/app.module.ts b/aio/content/examples/styleguide/src/05-03/app/app.module.ts deleted file mode 100644 index 1b754e3ee50..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroButtonComponent } from './heroes'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '05-03', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroButtonComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-03/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.avoid.ts b/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.avoid.ts deleted file mode 100644 index 74f5c36339d..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.avoid.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; -// #docregion example -/* avoid */ - -@Component({ - selector: '[tohHeroButton]', - templateUrl: './hero-button.component.html' -}) -export class HeroButtonComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.html b/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.html deleted file mode 100644 index 0096b4e899d..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.ts b/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.ts deleted file mode 100644 index c90c966f1af..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/hero-button.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero-button', - templateUrl: './hero-button.component.html' -}) -export class HeroButtonComponent {} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/index.ts b/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/index.ts deleted file mode 100644 index 6bb67c56704..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/hero-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button.component'; diff --git a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-03/app/heroes/shared/index.ts deleted file mode 100644 index 2334d49c9ad..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button'; diff --git a/aio/content/examples/styleguide/src/05-03/app/index.ts b/aio/content/examples/styleguide/src/05-03/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-03/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-04/app/app.component.ts b/aio/content/examples/styleguide/src/05-04/app/app.component.ts deleted file mode 100644 index 0e43893f7fe..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-04/app/app.module.ts b/aio/content/examples/styleguide/src/05-04/app/app.module.ts deleted file mode 100644 index c925f6c7e03..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/app.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroesComponent } from './heroes'; -import { HeroService } from './heroes/shared'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '05-04', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroesComponent - ], - exports: [ AppComponent ], - providers: [ HeroService ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.avoid.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.avoid.ts deleted file mode 100644 index ab95062ce7b..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.avoid.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Hero, HeroService } from './shared'; - -// #docregion example -/* avoid */ - -@Component({ - selector: 'toh-heroes', - template: ` -
    -

    My Heroes

    -
      -
    • - {{hero.id}} {{hero.name}} -
    • -
    -
    -

    {{selectedHero.name | uppercase}} is my hero

    -
    -
    - `, - styles: [` - .heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; - } - .heroes li { - cursor: pointer; - position: relative; - left: 0; - background-color: #EEE; - margin: .5em; - padding: .3em 0; - height: 1.6em; - border-radius: 4px; - } - .heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #607D8B; - line-height: 1em; - position: relative; - left: -1px; - top: -4px; - height: 1.8em; - margin-right: .8em; - border-radius: 4px 0 0 4px; - } - `] -}) -export class HeroesComponent { - heroes: Observable; - selectedHero!: Hero; - - constructor(private heroService: HeroService) { - this.heroes = this.heroService.getHeroes(); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.css b/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.css deleted file mode 100644 index 56d32632637..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.css +++ /dev/null @@ -1,66 +0,0 @@ -/* #docregion */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -.heroes li { - display: flex; -} - -.heroes button { - flex: 1; - cursor: pointer; - position: relative; - left: 0; - background-color: #EEE; - margin: .5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; - height: 1.8em; -} - -.heroes button:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: .1em; -} - -.heroes button:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.selected { - background-color: black; - color: white; -} - -.heroes button.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - align-self: center; -} diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.html b/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.html deleted file mode 100644 index a71c9e45757..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.html +++ /dev/null @@ -1,15 +0,0 @@ - -
    -

    My Heroes

    -
      -
    • - -
    • -
    -
    -

    {{selectedHero.name | uppercase}} is my hero

    -
    -
    diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.ts deleted file mode 100644 index f0bbe09e861..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/heroes.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Component } from '@angular/core'; -import { Observable } from 'rxjs'; - -import { Hero, HeroService } from './shared'; - -// #docregion example -@Component({ - selector: 'toh-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent { - heroes: Observable; - selectedHero!: Hero; - - constructor(private heroService: HeroService) { - this.heroes = this.heroService.getHeroes(); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/index.ts deleted file mode 100644 index a8d7f1d4220..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './heroes.component'; diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.service.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.service.ts deleted file mode 100644 index 78b3e247c23..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/hero.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { Observable } from 'rxjs'; - -import { Hero } from './hero.model'; - -@Injectable() -export class HeroService { - - constructor(private http: HttpClient) {} - - getHeroes(): Observable { - return this.http.get('api/heroes'); - } -} diff --git a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-04/app/heroes/shared/index.ts deleted file mode 100644 index dbb150d3f80..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/heroes/shared/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './hero.model'; -export * from './hero.service'; diff --git a/aio/content/examples/styleguide/src/05-04/app/index.ts b/aio/content/examples/styleguide/src/05-04/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-04/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-12/app/app.component.ts b/aio/content/examples/styleguide/src/05-12/app/app.component.ts deleted file mode 100644 index dac40205c97..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-12/app/app.module.ts b/aio/content/examples/styleguide/src/05-12/app/app.module.ts deleted file mode 100644 index 5177b2cc64e..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroButtonComponent } from './heroes'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '05-12', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroButtonComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-12/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-12/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.avoid.ts b/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.avoid.ts deleted file mode 100644 index 8c4bb75e2c9..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.avoid.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docregion -import { Component, EventEmitter } from '@angular/core'; -// #docregion example -/* avoid */ - -@Component({ - selector: 'toh-hero-button', - template: ``, - inputs: [ - 'label' - ], - outputs: [ - 'heroChange' - ] -}) -export class HeroButtonComponent { - heroChange = new EventEmitter(); - label: string; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.ts b/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.ts deleted file mode 100644 index ba3ff8afb4b..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/hero-button.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero-button', - template: `` -}) -export class HeroButtonComponent { - @Output() heroChange = new EventEmitter(); - @Input() label = ''; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/index.ts b/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/index.ts deleted file mode 100644 index 6bb67c56704..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/hero-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button.component'; diff --git a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-12/app/heroes/shared/index.ts deleted file mode 100644 index 2334d49c9ad..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button'; diff --git a/aio/content/examples/styleguide/src/05-12/app/index.ts b/aio/content/examples/styleguide/src/05-12/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-12/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-13/app/app.component.avoid.html b/aio/content/examples/styleguide/src/05-13/app/app.component.avoid.html deleted file mode 100644 index 0a263a6a95d..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/app.component.avoid.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/aio/content/examples/styleguide/src/05-13/app/app.component.html b/aio/content/examples/styleguide/src/05-13/app/app.component.html deleted file mode 100644 index 3cd94ca7724..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/app.component.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - -

    The Great Bombasto

    diff --git a/aio/content/examples/styleguide/src/05-13/app/app.component.ts b/aio/content/examples/styleguide/src/05-13/app/app.component.ts deleted file mode 100644 index 3b440ba42ec..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html' -}) -export class AppComponent { - - doSomething() {} -} diff --git a/aio/content/examples/styleguide/src/05-13/app/app.module.ts b/aio/content/examples/styleguide/src/05-13/app/app.module.ts deleted file mode 100644 index 7ebe91dbbcf..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroButtonComponent, HeroHighlightDirective } from './heroes'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '05-13', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroButtonComponent, HeroHighlightDirective - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.avoid.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.avoid.ts deleted file mode 100644 index f3dc04440e5..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.avoid.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Component, EventEmitter, Input, Output } from '@angular/core'; -// #docregion example -/* avoid pointless aliasing */ - -@Component({ - selector: 'toh-hero-button', - template: `` -}) -export class HeroButtonComponent { - // Pointless aliases - @Output('heroChangeEvent') heroChange = new EventEmitter(); - @Input('labelAttribute') label: string; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.ts deleted file mode 100644 index 162f3bd155a..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/hero-button.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero-button', - template: `` -}) -export class HeroButtonComponent { - // No aliases - @Output() heroChange = new EventEmitter(); - @Input() label = ''; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/index.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/index.ts deleted file mode 100644 index 6bb67c56704..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button.component'; diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-highlight.directive.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-highlight.directive.ts deleted file mode 100644 index ac8eda67bda..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/hero-highlight.directive.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Directive, ElementRef, Input, OnChanges } from '@angular/core'; - -// eslint-disable-next-line @angular-eslint/directive-selector -@Directive({ selector: '[heroHighlight]' }) -export class HeroHighlightDirective implements OnChanges { - - // Aliased because `color` is a better property name than `heroHighlight` - @Input('heroHighlight') color = ''; - - constructor(private el: ElementRef) {} - - ngOnChanges() { - this.el.nativeElement.style.backgroundColor = this.color || 'yellow'; - } -} diff --git a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-13/app/heroes/shared/index.ts deleted file mode 100644 index 565f46cf4fa..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/heroes/shared/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './hero-button'; -export * from './hero-highlight.directive'; diff --git a/aio/content/examples/styleguide/src/05-13/app/index.ts b/aio/content/examples/styleguide/src/05-13/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-13/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-14/app/app.component.ts b/aio/content/examples/styleguide/src/05-14/app/app.component.ts deleted file mode 100644 index 8ed6da4c822..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: `` -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-14/app/app.module.ts b/aio/content/examples/styleguide/src/05-14/app/app.module.ts deleted file mode 100644 index 0b294573d27..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { ToastComponent } from './shared'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '05-14', component: AppComponent }]) - ], - declarations: [ - AppComponent, - ToastComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-14/app/index.ts b/aio/content/examples/styleguide/src/05-14/app/index.ts deleted file mode 100644 index ebe5c92f039..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-14/app/shared/index.ts b/aio/content/examples/styleguide/src/05-14/app/shared/index.ts deleted file mode 100644 index 7ff6d415e70..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './toast'; diff --git a/aio/content/examples/styleguide/src/05-14/app/shared/toast/index.ts b/aio/content/examples/styleguide/src/05-14/app/shared/toast/index.ts deleted file mode 100644 index 6502de796e0..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/shared/toast/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './toast.component'; diff --git a/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.avoid.ts b/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.avoid.ts deleted file mode 100644 index 101652bb91c..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.avoid.ts +++ /dev/null @@ -1,40 +0,0 @@ -// #docregion -import { OnInit } from '@angular/core'; -// #docregion example -/* avoid */ - -export class ToastComponent implements OnInit { - - private defaults = { - title: '', - message: 'May the Force be with you' - }; - message: string; - title: string; - private toastElement: any; - - ngOnInit() { - this.toastElement = document.getElementById('toh-toast'); - } - - // private methods - private hide() { - this.toastElement.style.opacity = 0; - setTimeout(() => this.toastElement.style.zIndex = 0, 400); - } - - activate(message = this.defaults.message, title = this.defaults.title) { - this.title = title; - this.message = message; - this.show(); - } - - private show() { - console.log(this.message); - this.toastElement.style.opacity = 1; - this.toastElement.style.zIndex = 9999; - - setTimeout(() => this.hide(), 2500); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.ts b/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.ts deleted file mode 100644 index 4feaa972692..00000000000 --- a/aio/content/examples/styleguide/src/05-14/app/shared/toast/toast.component.ts +++ /dev/null @@ -1,45 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; - -@Component({ - selector: 'toh-toast', - template: `...` -}) -// #docregion example -export class ToastComponent implements OnInit { - // public properties - message = ''; - title = ''; - - // private fields - private defaults = { - title: '', - message: 'May the Force be with you' - }; - private toastElement: any; - - // public methods - activate(message = this.defaults.message, title = this.defaults.title) { - this.title = title; - this.message = message; - this.show(); - } - - ngOnInit() { - this.toastElement = document.getElementById('toh-toast'); - } - - // private methods - private hide() { - this.toastElement.style.opacity = 0; - setTimeout(() => this.toastElement.style.zIndex = 0, 400); - } - - private show() { - console.log(this.message); - this.toastElement.style.opacity = 1; - this.toastElement.style.zIndex = 9999; - setTimeout(() => this.hide(), 2500); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-15/app/app.component.ts b/aio/content/examples/styleguide/src/05-15/app/app.component.ts deleted file mode 100644 index 91b569b1e7e..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -import { HeroService } from './heroes'; - -@Component({ - selector: 'sg-app', - template: '', - providers: [HeroService] -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-15/app/app.module.ts b/aio/content/examples/styleguide/src/05-15/app/app.module.ts deleted file mode 100644 index 9bd4b8c9a2a..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/app.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroListComponent } from './heroes'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '05-15', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroListComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.avoid.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.avoid.ts deleted file mode 100644 index 5a27406eed3..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.avoid.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docregion -/* avoid */ - -import { OnInit } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { Observable } from 'rxjs'; -import { catchError, finalize } from 'rxjs/operators'; - -import { Hero } from '../shared/hero.model'; - -const heroesUrl = 'http://angular.io'; - -export class HeroListComponent implements OnInit { - heroes: Hero[]; - constructor(private http: HttpClient) {} - getHeroes() { - this.heroes = []; - this.http.get(heroesUrl).pipe( - catchError(this.catchBadResponse), - finalize(() => this.hideSpinner()) - ).subscribe((heroes: Hero[]) => this.heroes = heroes); - } - ngOnInit() { - this.getHeroes(); - } - - private catchBadResponse(err: any, source: Observable) { - // log and handle the exception - return new Observable(); - } - - private hideSpinner() { - // hide the spinner - } -} diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.ts deleted file mode 100644 index 15e0c9f8760..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/hero-list.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion example -import { Component, OnInit } from '@angular/core'; - -import { Hero, HeroService } from '../shared'; - -@Component({ - selector: 'toh-hero-list', - template: `...` -}) -export class HeroListComponent implements OnInit { - heroes: Hero[] = []; - constructor(private heroService: HeroService) {} - getHeroes() { - this.heroes = []; - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes); - } - ngOnInit() { - this.getHeroes(); - } -} -// #enddocregion example - diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/index.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/index.ts deleted file mode 100644 index c4bcb3278ed..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/hero-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-list.component'; diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/index.ts deleted file mode 100644 index f1112f1c7cc..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './hero-list'; -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.service.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.service.ts deleted file mode 100644 index 94bdf2615cb..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/hero.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { of } from 'rxjs'; - -import { Hero } from './hero.model'; - -@Injectable() -export class HeroService { - getHeroes() { - const heroes: Hero[] = []; - return of(heroes); - } -} diff --git a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-15/app/heroes/shared/index.ts deleted file mode 100644 index 27516fdedd0..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/heroes/shared/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -// #docregion -export * from './hero.model'; -export * from './hero.service'; diff --git a/aio/content/examples/styleguide/src/05-15/app/index.ts b/aio/content/examples/styleguide/src/05-15/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-15/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-16/app/app.component.avoid.html b/aio/content/examples/styleguide/src/05-16/app/app.component.avoid.html deleted file mode 100644 index 2c0cea58e24..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/app.component.avoid.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/aio/content/examples/styleguide/src/05-16/app/app.component.html b/aio/content/examples/styleguide/src/05-16/app/app.component.html deleted file mode 100644 index 4883a6940a3..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/aio/content/examples/styleguide/src/05-16/app/app.component.ts b/aio/content/examples/styleguide/src/05-16/app/app.component.ts deleted file mode 100644 index 4d549e7166b..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html' -}) -export class AppComponent { - - onSavedTheDay(event$: any) { } -} diff --git a/aio/content/examples/styleguide/src/05-16/app/app.module.ts b/aio/content/examples/styleguide/src/05-16/app/app.module.ts deleted file mode 100644 index c3fb36f8acc..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/app.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroComponent } from './heroes'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '05-16', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.avoid.ts b/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.avoid.ts deleted file mode 100644 index 823aa2e1c7c..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.avoid.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import { Component, EventEmitter, Output } from '@angular/core'; -// #docregion example -/* avoid */ - -@Component({ - selector: 'toh-hero', - template: `...` -}) -export class HeroComponent { - @Output() onSavedTheDay = new EventEmitter(); -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.ts b/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.ts deleted file mode 100644 index bbd4a4b5f39..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/heroes/hero.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Component, EventEmitter, Output } from '@angular/core'; - -@Component({ - selector: 'toh-hero', - template: `...` -}) -// #docregion example -export class HeroComponent { - @Output() savedTheDay = new EventEmitter(); -} -// #enddocregion example - - diff --git a/aio/content/examples/styleguide/src/05-16/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-16/app/heroes/index.ts deleted file mode 100644 index 084f36d7034..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.component'; diff --git a/aio/content/examples/styleguide/src/05-16/app/index.ts b/aio/content/examples/styleguide/src/05-16/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-16/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-17/app/app.component.ts b/aio/content/examples/styleguide/src/05-17/app/app.component.ts deleted file mode 100644 index 86728b8b801..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-17/app/app.module.ts b/aio/content/examples/styleguide/src/05-17/app/app.module.ts deleted file mode 100644 index e850d80ae39..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/app.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroComponent, HeroListComponent } from './heroes'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '05-17', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroComponent, - HeroListComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.avoid.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.avoid.ts deleted file mode 100644 index 0b704d2b878..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.avoid.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { Hero } from '../shared/hero.model'; -// #docregion example -/* avoid */ - -@Component({ - selector: 'toh-hero-list', - template: ` -
    - Our list of heroes: - - - Total powers: {{totalPowers}}
    - Average power: {{totalPowers / heroes.length}} -
    - ` -}) -export class HeroListComponent { - heroes: Hero[]; - totalPowers: number; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.ts deleted file mode 100644 index a3904abbe0b..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/hero-list.component.ts +++ /dev/null @@ -1,35 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; - -import { Hero } from '../shared/hero.model'; - -// #docregion example -@Component({ - selector: 'toh-hero-list', - template: ` -
    - Our list of heroes: - - - Total powers: {{totalPowers}}
    - Average power: {{avgPower}} -
    - ` -}) -export class HeroListComponent { - heroes: Hero[]; - totalPowers = 0; - - // #enddocregion example - // testing harness - constructor() { - this.heroes = []; - } - - // #docregion example - get avgPower() { - return this.totalPowers / this.heroes.length; - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/index.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/index.ts deleted file mode 100644 index c4bcb3278ed..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/hero-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-list.component'; diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/hero/hero.component.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/hero/hero.component.ts deleted file mode 100644 index 095358d2c8e..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/hero/hero.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component, Input } from '@angular/core'; - -import { Hero } from '../shared/hero.model'; - -@Component({ - selector: 'toh-hero', - template: `...` -}) -export class HeroComponent { - @Input() hero!: Hero; -} - - diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/hero/index.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/hero/index.ts deleted file mode 100644 index 084f36d7034..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/hero/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.component'; diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/index.ts deleted file mode 100644 index dcf3e79bd34..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './hero'; -export * from './hero-list'; -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/05-17/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-17/app/heroes/shared/index.ts deleted file mode 100644 index 0dceb684c40..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.model'; diff --git a/aio/content/examples/styleguide/src/05-17/app/index.ts b/aio/content/examples/styleguide/src/05-17/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-17/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/05-18/app/app.component.ts b/aio/content/examples/styleguide/src/05-18/app/app.component.ts deleted file mode 100644 index 86728b8b801..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/05-18/app/app.module.ts b/aio/content/examples/styleguide/src/05-18/app/app.module.ts deleted file mode 100644 index fe0b893ff27..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/app.module.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroComponent, HeroListComponent } from './heroes'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '05-18', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroComponent, - HeroListComponent - ], - exports: [AppComponent] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/hero-list.component.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/hero-list.component.ts deleted file mode 100644 index 5f82e7ec11a..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/hero-list.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { Component } from '@angular/core'; - -import { Hero } from '../shared/hero.model'; - -@Component({ - selector: 'toh-hero-list', - template: ` -
    - Our list of heroes: - - - Total powers: {{totalPowers}}
    - Average power: {{avgPower}} -
    - ` -}) -export class HeroListComponent { - heroes: Hero[] = []; - totalPowers = 1; - - get avgPower() { - return this.totalPowers / this.heroes.length; - } -} diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/index.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/index.ts deleted file mode 100644 index c4bcb3278ed..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero-list/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-list.component'; diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.avoid.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.avoid.ts deleted file mode 100644 index 6aa0a4edf4f..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.avoid.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Component, Input } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero', - template: `...` -}) -export class HeroComponent { - // The exclamation mark suppresses errors that a property is - // not initialized. - // Ignoring this enforcement can prevent the type checker - // from finding potential issues. - @Input() id!: string; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.optional.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.optional.ts deleted file mode 100644 index f116c7d3014..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.optional.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Component, Input } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero', - template: `...` -}) -export class HeroComponent { - @Input() id?: string; - - process() { - if (this.id) { - // ... - } - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.ts deleted file mode 100644 index a8d5677fb47..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/hero.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Component, Input } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero', - template: `...` -}) -export class HeroComponent { - @Input() id = 'default_id'; -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/index.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/hero/index.ts deleted file mode 100644 index 084f36d7034..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/hero/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.component'; diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/index.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/index.ts deleted file mode 100644 index dcf3e79bd34..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './hero'; -export * from './hero-list'; -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/shared/hero.model.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/05-18/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/05-18/app/heroes/shared/index.ts deleted file mode 100644 index 0dceb684c40..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero.model'; diff --git a/aio/content/examples/styleguide/src/05-18/app/index.ts b/aio/content/examples/styleguide/src/05-18/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/05-18/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/06-01/app/app.component.html b/aio/content/examples/styleguide/src/06-01/app/app.component.html deleted file mode 100644 index 2ccf87d0f51..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ - -
    Bombasta
    diff --git a/aio/content/examples/styleguide/src/06-01/app/app.component.ts b/aio/content/examples/styleguide/src/06-01/app/app.component.ts deleted file mode 100644 index 7c9f37919f4..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/06-01/app/app.module.ts b/aio/content/examples/styleguide/src/06-01/app/app.module.ts deleted file mode 100644 index 318cd306d75..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HighlightDirective } from './shared'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '06-01', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HighlightDirective - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/06-01/app/index.ts b/aio/content/examples/styleguide/src/06-01/app/index.ts deleted file mode 100644 index ebe5c92f039..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/06-01/app/shared/highlight.directive.ts b/aio/content/examples/styleguide/src/06-01/app/shared/highlight.directive.ts deleted file mode 100644 index 991a6c5d25f..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/shared/highlight.directive.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import { Directive, HostListener } from '@angular/core'; - -// #docregion example -@Directive({ - selector: '[tohHighlight]' -}) -export class HighlightDirective { - @HostListener('mouseover') onMouseEnter() { - // do highlight work - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/06-01/app/shared/index.ts b/aio/content/examples/styleguide/src/06-01/app/shared/index.ts deleted file mode 100644 index 105a0356808..00000000000 --- a/aio/content/examples/styleguide/src/06-01/app/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './highlight.directive'; diff --git a/aio/content/examples/styleguide/src/06-03/app/app.component.ts b/aio/content/examples/styleguide/src/06-03/app/app.component.ts deleted file mode 100644 index 0d0a7d107b2..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/app.component.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: ` - - ` -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/06-03/app/app.module.ts b/aio/content/examples/styleguide/src/06-03/app/app.module.ts deleted file mode 100644 index b19f3fdc00b..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { ValidatorDirective, Validator2Directive } from './shared'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '06-03', component: AppComponent }]) - ], - declarations: [ - AppComponent, - ValidatorDirective, Validator2Directive - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/06-03/app/index.ts b/aio/content/examples/styleguide/src/06-03/app/index.ts deleted file mode 100644 index ebe5c92f039..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './shared'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/06-03/app/shared/index.ts b/aio/content/examples/styleguide/src/06-03/app/shared/index.ts deleted file mode 100644 index ba25e4c4585..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/shared/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './validator.directive'; -export * from './validator2.directive'; diff --git a/aio/content/examples/styleguide/src/06-03/app/shared/validator.directive.ts b/aio/content/examples/styleguide/src/06-03/app/shared/validator.directive.ts deleted file mode 100644 index d9e32c017fe..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/shared/validator.directive.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import { Directive, HostBinding, HostListener } from '@angular/core'; - -@Directive({ - selector: '[tohValidator]' -}) -export class ValidatorDirective { - @HostBinding('attr.role') role = 'button'; - @HostListener('mouseenter') onMouseEnter() { - // do work - } -} diff --git a/aio/content/examples/styleguide/src/06-03/app/shared/validator2.directive.ts b/aio/content/examples/styleguide/src/06-03/app/shared/validator2.directive.ts deleted file mode 100644 index 50af4b7fc13..00000000000 --- a/aio/content/examples/styleguide/src/06-03/app/shared/validator2.directive.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* eslint-disable @angular-eslint/no-host-metadata-property */ -// #docregion -import { Directive } from '@angular/core'; - -@Directive({ - selector: '[tohValidator2]', - host: { - '[attr.role]': 'role', - '(mouseenter)': 'onMouseEnter()' - } -}) -export class Validator2Directive { - role = 'button'; - onMouseEnter() { - // do work - } -} diff --git a/aio/content/examples/styleguide/src/07-01/app/app.component.html b/aio/content/examples/styleguide/src/07-01/app/app.component.html deleted file mode 100644 index 3c05329f3f4..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/app.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
      -
    • - {{hero.name}} -
    • -
    diff --git a/aio/content/examples/styleguide/src/07-01/app/app.component.ts b/aio/content/examples/styleguide/src/07-01/app/app.component.ts deleted file mode 100644 index 50c86e91bf0..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/app.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { Hero, HeroService } from './heroes'; - -@Component({ - selector: 'sg-app', - templateUrl: './app.component.html', - providers: [HeroService] -}) -export class AppComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit() { - this.heroService.getHeroes().subscribe(heroes => this.heroes = heroes); - } -} diff --git a/aio/content/examples/styleguide/src/07-01/app/app.module.ts b/aio/content/examples/styleguide/src/07-01/app/app.module.ts deleted file mode 100644 index 0077500deaf..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '07-01', component: AppComponent }]) - ], - declarations: [ - AppComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/07-01/app/heroes/index.ts b/aio/content/examples/styleguide/src/07-01/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.service.ts b/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.service.ts deleted file mode 100644 index 5affff16ae4..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/hero.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { Hero } from './hero.model'; - -@Injectable() -// #docregion example -export class HeroService { - constructor(private http: HttpClient) { } - - getHeroes() { - return this.http.get('api/heroes'); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/07-01/app/heroes/shared/index.ts deleted file mode 100644 index dbb150d3f80..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/heroes/shared/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './hero.model'; -export * from './hero.service'; diff --git a/aio/content/examples/styleguide/src/07-01/app/index.ts b/aio/content/examples/styleguide/src/07-01/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/07-01/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/07-04/app/app.component.ts b/aio/content/examples/styleguide/src/07-04/app/app.component.ts deleted file mode 100644 index b0bc9677fea..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/app.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; - -import { HeroArena, HeroService, Hero } from './heroes'; - -@Component({ - selector: 'toh-app', - template: '
    {{heroes | json}}
    ', - providers: [HeroArena, HeroService] -}) -export class AppComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroArena: HeroArena) { } - - ngOnInit() { - this.heroArena.getParticipants().subscribe(heroes => this.heroes = heroes); - } -} diff --git a/aio/content/examples/styleguide/src/07-04/app/app.module.ts b/aio/content/examples/styleguide/src/07-04/app/app.module.ts deleted file mode 100644 index 71c515c9c92..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; - -@NgModule({ - imports: [ - BrowserModule, - RouterModule.forChild([{ path: '07-04', component: AppComponent }]) - ], - declarations: [ - AppComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/index.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.avoid.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.avoid.ts deleted file mode 100644 index 76815e51d76..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.avoid.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Inject } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { HeroService } from './hero.service'; -// #docregion example -/* avoid */ - -export class HeroArena { - constructor( - @Inject(HeroService) private heroService: HeroService, - @Inject(HttpClient) private http: HttpClient) {} -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.ts deleted file mode 100644 index 339d8116376..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero-arena.service.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docplaster -// #docregion -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; - -import { HeroService } from './hero.service'; - -// #docregion example -@Injectable() -export class HeroArena { - constructor( - private heroService: HeroService, - private http: HttpClient) {} - // #enddocregion example - // test harness - getParticipants() { - return this.heroService.getHeroes(); - } - // #docregion example -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.model.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.model.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.model.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.service.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.service.ts deleted file mode 100644 index 94bdf2615cb..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/hero.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; - -import { of } from 'rxjs'; - -import { Hero } from './hero.model'; - -@Injectable() -export class HeroService { - getHeroes() { - const heroes: Hero[] = []; - return of(heroes); - } -} diff --git a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/07-04/app/heroes/shared/index.ts deleted file mode 100644 index e8ba54b5403..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/heroes/shared/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -// #docregion -export * from './hero.model'; -export * from './hero.service'; -export * from './hero-arena.service'; diff --git a/aio/content/examples/styleguide/src/07-04/app/index.ts b/aio/content/examples/styleguide/src/07-04/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/07-04/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/09-01/app/app.component.ts b/aio/content/examples/styleguide/src/09-01/app/app.component.ts deleted file mode 100644 index ebc904f7226..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'sg-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/09-01/app/app.module.ts b/aio/content/examples/styleguide/src/09-01/app/app.module.ts deleted file mode 100644 index 5872e801d66..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/app.module.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { HeroButtonComponent } from './heroes'; - -@NgModule({ - imports: [ - RouterModule.forChild([{ path: '09-01', component: AppComponent }]) - ], - declarations: [ - AppComponent, - HeroButtonComponent - ], - exports: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/styleguide/src/09-01/app/heroes/index.ts b/aio/content/examples/styleguide/src/09-01/app/heroes/index.ts deleted file mode 100644 index c3da79f741b..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/heroes/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './shared'; diff --git a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.avoid.ts b/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.avoid.ts deleted file mode 100644 index 091f118a500..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.avoid.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -// #docregion example -/* avoid */ - -@Component({ - selector: 'toh-hero-button', - template: `` -}) -export class HeroButtonComponent { - onInit() { // misspelled - console.log('The component is initialized'); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.ts b/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.ts deleted file mode 100644 index 73ebda45421..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/hero-button.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; - -// #docregion example -@Component({ - selector: 'toh-hero-button', - template: `` -}) -export class HeroButtonComponent implements OnInit { - ngOnInit() { - console.log('The component is initialized'); - } -} -// #enddocregion example diff --git a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/index.ts b/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/index.ts deleted file mode 100644 index 6bb67c56704..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/hero-button/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button.component'; diff --git a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/index.ts b/aio/content/examples/styleguide/src/09-01/app/heroes/shared/index.ts deleted file mode 100644 index 2334d49c9ad..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/heroes/shared/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './hero-button'; diff --git a/aio/content/examples/styleguide/src/09-01/app/index.ts b/aio/content/examples/styleguide/src/09-01/app/index.ts deleted file mode 100644 index fe8300f1dd4..00000000000 --- a/aio/content/examples/styleguide/src/09-01/app/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './heroes'; -export * from './app.component'; diff --git a/aio/content/examples/styleguide/src/app/app.component.html b/aio/content/examples/styleguide/src/app/app.component.html deleted file mode 100644 index 0680b43f9c6..00000000000 --- a/aio/content/examples/styleguide/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ - diff --git a/aio/content/examples/styleguide/src/app/app.component.ts b/aio/content/examples/styleguide/src/app/app.component.ts deleted file mode 100644 index 968036cb8c2..00000000000 --- a/aio/content/examples/styleguide/src/app/app.component.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html' -}) -export class AppComponent { } diff --git a/aio/content/examples/styleguide/src/app/app.module.ts b/aio/content/examples/styleguide/src/app/app.module.ts deleted file mode 100644 index 8a6bed738e2..00000000000 --- a/aio/content/examples/styleguide/src/app/app.module.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; - -import { HttpClientModule } from '@angular/common/http'; -import { InMemoryWebApiModule } from 'angular-in-memory-web-api'; - -import { RouterModule } from '@angular/router'; - -import { HashLocationStrategy, - LocationStrategy } from '@angular/common'; - -import { HeroData } from '../app/hero-data'; -import { AppComponent } from '../app/app.component'; - -import * as s0101 from '../01-01/app/app.module'; -import * as s0205 from '../02-05/app/app.module'; -import * as s0207 from '../02-07/app/app.module'; -import * as s0208 from '../02-08/app/app.module'; -import * as s0408 from '../04-08/app/app.module'; -import * as s0410 from '../04-10/app/app.module'; -import * as s0502 from '../05-02/app/app.module'; -import * as s0503 from '../05-03/app/app.module'; -import * as s0504 from '../05-04/app/app.module'; -import * as s0512 from '../05-12/app/app.module'; -import * as s0513 from '../05-13/app/app.module'; -import * as s0514 from '../05-14/app/app.module'; -import * as s0515 from '../05-15/app/app.module'; -import * as s0516 from '../05-16/app/app.module'; -import * as s0517 from '../05-17/app/app.module'; -import * as s0601 from '../06-01/app/app.module'; -import * as s0603 from '../06-03/app/app.module'; -import * as s0701 from '../07-01/app/app.module'; -import * as s0704 from '../07-04/app/app.module'; -import * as s0901 from '../09-01/app/app.module'; - -@NgModule({ - imports: [ - BrowserModule, - HttpClientModule, - InMemoryWebApiModule.forRoot(HeroData), - - s0101.AppModule, - s0205.AppModule, - s0207.AppModule, - s0208.AppModule, - s0408.AppModule, - s0410.AppModule, - s0502.AppModule, - s0503.AppModule, - s0504.AppModule, - s0512.AppModule, - s0513.AppModule, - s0514.AppModule, - s0515.AppModule, - s0516.AppModule, - s0517.AppModule, - s0601.AppModule, - s0603.AppModule, - s0701.AppModule, - s0704.AppModule, - s0901.AppModule, - - RouterModule.forRoot([ - { path: '', redirectTo: '/01-01', pathMatch: 'full' } - ], {/* enableTracing: true */}), - ], - providers: [ - { provide: LocationStrategy, useClass: HashLocationStrategy } - ], - declarations: [ AppComponent ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/styleguide/src/app/app.routes.ts b/aio/content/examples/styleguide/src/app/app.routes.ts deleted file mode 100644 index bce6b4df06f..00000000000 --- a/aio/content/examples/styleguide/src/app/app.routes.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Routes } from '@angular/router'; - -import { AppComponent as S0101 } from '../01-01/app'; - -export const routes: Routes = [ - { path: '', redirectTo: '/01-01', pathMatch: 'full' }, - { path: '01-01', component: S0101 }, -]; diff --git a/aio/content/examples/styleguide/src/app/hero-data.ts b/aio/content/examples/styleguide/src/app/hero-data.ts deleted file mode 100644 index 893b5f8b8d5..00000000000 --- a/aio/content/examples/styleguide/src/app/hero-data.ts +++ /dev/null @@ -1,11 +0,0 @@ -export class HeroData { - createDb() { - const heroes = [ - { id: 1, name: 'Windstorm' }, - { id: 2, name: 'Bombasto' }, - { id: 3, name: 'Magneta' }, - { id: 4, name: 'Tornado' } - ]; - return {heroes}; - } -} diff --git a/aio/content/examples/styleguide/src/index.html b/aio/content/examples/styleguide/src/index.html deleted file mode 100644 index ba0335c7e7a..00000000000 --- a/aio/content/examples/styleguide/src/index.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - Style Guide Sample - - - - - - - - - - diff --git a/aio/content/examples/styleguide/src/main.ts b/aio/content/examples/styleguide/src/main.ts deleted file mode 100644 index 537b861085e..00000000000 --- a/aio/content/examples/styleguide/src/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app/app.module'; - - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/template-expression-operators/BUILD.bazel b/aio/content/examples/template-expression-operators/BUILD.bazel deleted file mode 100644 index 74a8c673fc4..00000000000 --- a/aio/content/examples/template-expression-operators/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "template-expression-operators", -) diff --git a/aio/content/examples/template-expression-operators/e2e/src/app.e2e-spec.ts b/aio/content/examples/template-expression-operators/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 3a993ebd5f9..00000000000 --- a/aio/content/examples/template-expression-operators/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Archived: see only referencing guide, `template-expression-operators.md`. -import { browser, element, by } from 'protractor'; - -describe('Template Expression Operators', () => { - - beforeAll(() => browser.get('')); - - it('should have title Inputs and Outputs', async () => { - const title = element.all(by.css('h1')).get(0); - expect(await title.getText()).toEqual('Template Expression Operators'); - }); - - it('should display json data', async () => { - const jsonDate = element.all(by.css('p')).get(4); - expect(await jsonDate.getText()).toContain('1980'); - }); - - it('should display $98', async () => { - const jsonDate = element.all(by.css('p')).get(5); - expect(await jsonDate.getText()).toContain('$98.00'); - }); - - it('should display Telephone', async () => { - const jsonDate = element.all(by.css('p')).get(6); - expect(await jsonDate.getText()).toContain('Telephone'); - }); - -}); diff --git a/aio/content/examples/template-expression-operators/example-config.json b/aio/content/examples/template-expression-operators/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/template-expression-operators/src/app/app.component.css b/aio/content/examples/template-expression-operators/src/app/app.component.css deleted file mode 100644 index d440697d07f..00000000000 --- a/aio/content/examples/template-expression-operators/src/app/app.component.css +++ /dev/null @@ -1,11 +0,0 @@ -/* Archived: see only referencing guide, `template-expression-operators.md`. */ -.no-show-div { - background-color: #ecfdff; - border: 1px #444 solid; - padding: 1rem; - color: #444; -} - -.error { - color: red; -} diff --git a/aio/content/examples/template-expression-operators/src/app/app.component.html b/aio/content/examples/template-expression-operators/src/app/app.component.html deleted file mode 100644 index 1d95208e1a4..00000000000 --- a/aio/content/examples/template-expression-operators/src/app/app.component.html +++ /dev/null @@ -1,67 +0,0 @@ - -

    {{title}}

    - -
    - -

    Pipes

    -

    Title through uppercase pipe: {{title | uppercase}}

    - -

    Title through a pipe chain: {{title | uppercase | lowercase}}

    - - -

    Manufacture date with date format pipe: {{item.manufactureDate | date:'longDate'}}

    -

    Manufacture date with uppercase pipe: {{(item.manufactureDate | date:'longDate') | uppercase}}

    -

    Item json pipe: {{item | json}}

    - -

    Price with currency pipe: {{item.price | currency:'USD'}}

    -
    - -

    Safe navigation operator: ? and null

    -

    The item name is: {{item.name}}

    - -

    The nullItem name is: {{nullItem?.name}}

    - -
    - -

    Error because nullItem is null:

    - - - -
    -

    Uncomment above paragraph and see console log for error about nullItem.name:

    -

    TypeError: Cannot read property 'name' of null

    -
    - -
    - -

    The div will not display so there's no error when reading `nullItem.name`:

    -
    -

    There's a child paragraph element in here that doesn't show.

    -

    The null item's name {{nullItem.name}}

    -
    -
    - -

    Div shows but interpolation doesn't:

    -
    -

    Using and (&&)

    -

    The null item's name is: {{nullItem && nullItem.name}}

    -
    - -
    -

    Using safe navigation operator (?)

    - -

    The null item's name is: {{nullItem?.name}}

    -
    - - - -
    -

    Non-null assertion operator (!)

    -
    - - -

    The item's color is: {{item.color!.toUpperCase()}}

    - - - - diff --git a/aio/content/examples/template-expression-operators/src/app/app.component.ts b/aio/content/examples/template-expression-operators/src/app/app.component.ts deleted file mode 100644 index 33268f12d5d..00000000000 --- a/aio/content/examples/template-expression-operators/src/app/app.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -// Archived: see only referencing guide, `template-expression-operators.md`. -import { Component } from '@angular/core'; -import { CommonModule } from '@angular/common'; - - -interface Item { - name: string; - manufactureDate: Date; - color?: string | null; - price: number; -} - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ CommonModule ], // no need to enumerate pipes as they are all in CommonModule - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Template Expression Operators'; - - item: Item = { - name : 'Telephone', - manufactureDate : new Date(1980, 1, 25), - color: 'orange', - price: 98, - }; - - nullItem: Item | null = null; - -} - diff --git a/aio/content/examples/template-expression-operators/src/index.html b/aio/content/examples/template-expression-operators/src/index.html deleted file mode 100644 index 6a6161b4871..00000000000 --- a/aio/content/examples/template-expression-operators/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - Template Expression Operators Example - - - - - - Loading... - - diff --git a/aio/content/examples/template-expression-operators/src/main.ts b/aio/content/examples/template-expression-operators/src/main.ts deleted file mode 100644 index 7d814b1c3c0..00000000000 --- a/aio/content/examples/template-expression-operators/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -// Archived: see only referencing guide, `template-expression-operators.md`. -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { providers: [provideProtractorTestingSupport()] }) - .catch(err => console.error(err)); diff --git a/aio/content/examples/template-expression-operators/stackblitz.json b/aio/content/examples/template-expression-operators/stackblitz.json deleted file mode 100644 index 9b210405458..00000000000 --- a/aio/content/examples/template-expression-operators/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Template Expression Operators", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Template Expression Operators"] -} diff --git a/aio/content/examples/template-reference-variables/BUILD.bazel b/aio/content/examples/template-reference-variables/BUILD.bazel deleted file mode 100644 index 995a996b619..00000000000 --- a/aio/content/examples/template-reference-variables/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "template-reference-variables", -) diff --git a/aio/content/examples/template-reference-variables/e2e/src/app.e2e-spec.ts b/aio/content/examples/template-reference-variables/e2e/src/app.e2e-spec.ts deleted file mode 100644 index d93d0f734e5..00000000000 --- a/aio/content/examples/template-reference-variables/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - -describe('Template-reference-variables-example', () => { - beforeEach(() => browser.get('')); - - // helper function used to test what's logged to the console - async function logChecker(contents: string) { - const logs = await browser - .manage() - .logs() - .get(logging.Type.BROWSER); - const messages = logs.filter(({ message }) => message.indexOf(contents) !== -1); - expect(messages.length).toBeGreaterThan(0); - } - - it('should display Template reference variables', async () => { - expect(await element(by.css('h1')).getText()).toEqual( - 'Template reference variables' - ); - }); - - it('should log a Calling 123 ... message', async () => { - const callButton = element.all(by.css('button')).get(0); - const phoneInput = element.all(by.css('input')).get(0); - await phoneInput.sendKeys('123'); - await callButton.click(); - const contents = 'Calling 123 ...'; - await logChecker(contents); - }); - - it('should submit form', async () => { - const submitButton = element.all(by.css('button')).get(2); - const nameInput = element.all(by.css('input')).get(1); - await nameInput.sendKeys('123'); - await submitButton.click(); - expect(await element.all(by.css('div > p')).get(2).getText()).toEqual('Submitted. Form value is {"name":"123"}'); - }); - -}); diff --git a/aio/content/examples/template-reference-variables/example-config.json b/aio/content/examples/template-reference-variables/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/template-reference-variables/src/app/app.component.css b/aio/content/examples/template-reference-variables/src/app/app.component.css deleted file mode 100644 index 9a9e6dc50f0..00000000000 --- a/aio/content/examples/template-reference-variables/src/app/app.component.css +++ /dev/null @@ -1,14 +0,0 @@ -h3 { - font-weight: 700; -} - -pre, .wrapper { - background-color: rgb(240, 250, 250); - padding: 1rem; - border: 1px solid #444; -} - -input { - margin: .5rem; - padding: .5rem; -} diff --git a/aio/content/examples/template-reference-variables/src/app/app.component.html b/aio/content/examples/template-reference-variables/src/app/app.component.html deleted file mode 100644 index de6de41ec25..00000000000 --- a/aio/content/examples/template-reference-variables/src/app/app.component.html +++ /dev/null @@ -1,101 +0,0 @@ -

    Template reference variables

    - -
    -

    Pass value to an event handler

    -

    See console for output.

    - - - - - - - - - - -
    - -
    - -
    -

    Template reference variable with disabled button

    -

    btn refers to the button element.

    - -
    - -
    - -

    Reference variables, forms, and NgForm

    - -
    - - - -
    - -
    -

    {{ submitMessage }}

    -
    - - - - -

    JSON: {{ itemForm.form.value | json }}

    - -
    - -

    Template Reference Variable Scope

    - -

    This section demonstrates in which situations you can access local template reference variables (#ref).

    - -

    Accessing in a child template

    - - -
    - - - Value: {{ ref1.value }} - -
    - - - -

    Here's the desugared syntax:

    -
    - -

    Accessing from outside parent template. (Doesn't work.)

    - - -
    - - - -
    - -

    Here's the desugared syntax:

    -
    - -

    *ngFor and template reference variable scope

    - - - -
    - -

    Accessing a on an ng-template

    - -See the console output to see that when you declare the variable on an ng-template, the variable refers to a TemplateRef instance, which represents the template. - - - diff --git a/aio/content/examples/template-reference-variables/src/app/app.component.ts b/aio/content/examples/template-reference-variables/src/app/app.component.ts deleted file mode 100644 index ea6883b023c..00000000000 --- a/aio/content/examples/template-reference-variables/src/app/app.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -import { Component, ViewChild } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { NgForm, FormsModule } from '@angular/forms'; - - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ CommonModule, FormsModule ], - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - - public firstExample = 'Hello, World!'; - public secondExample = 'Hello, World!'; - - public ref2 = ''; - - public desugared1 = ` - - - - Value: {{ ref1.value }} - ` - ; - - public desugared2 = ` - - - - - - Value: {{ ref2?.value }}`; - - public ngForExample = ` - - - - - - {{ ref.value }}`; - - @ViewChild('itemForm', { static: false }) form!: NgForm; - - get submitMessage() { return this._submitMessage; } - private _submitMessage = ''; - - onSubmit(form: NgForm) { - this._submitMessage = 'Submitted. Form value is ' + JSON.stringify(form.value); - } - - callPhone(value: string) { - console.warn(`Calling ${value} ...`); - } - - callFax(value: string) { - console.warn(`Faxing ${value} ...`); - } - - log(ref3: any) { - console.warn(ref3.constructor); - } -} diff --git a/aio/content/examples/template-reference-variables/src/index.html b/aio/content/examples/template-reference-variables/src/index.html deleted file mode 100644 index 679d64c77fe..00000000000 --- a/aio/content/examples/template-reference-variables/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Template Reference Variables Example - - - - - - Loading... - - diff --git a/aio/content/examples/template-reference-variables/src/main.ts b/aio/content/examples/template-reference-variables/src/main.ts deleted file mode 100644 index 7e10ffabd9a..00000000000 --- a/aio/content/examples/template-reference-variables/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { providers: [provideProtractorTestingSupport()] }) - .catch(err => console.error(err)); diff --git a/aio/content/examples/template-reference-variables/stackblitz.json b/aio/content/examples/template-reference-variables/stackblitz.json deleted file mode 100644 index b683ad18b92..00000000000 --- a/aio/content/examples/template-reference-variables/stackblitz.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "description": "Template Reference Variables", - "files": ["!**/*.d.ts", "!**/*.js", "!**/*.[1,2].*"], - "file": "src/app/app.component.ts", - "tags": ["Template Reference Variables"] -} diff --git a/aio/content/examples/template-syntax/BUILD.bazel b/aio/content/examples/template-syntax/BUILD.bazel deleted file mode 100644 index 02a641f4adc..00000000000 --- a/aio/content/examples/template-syntax/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "template-syntax", -) diff --git a/aio/content/examples/template-syntax/e2e/src/app.e2e-spec.ts b/aio/content/examples/template-syntax/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 6c2f9a7f396..00000000000 --- a/aio/content/examples/template-syntax/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { browser, element, by } from 'protractor'; - -// TODO Not yet complete -describe('Template Syntax', () => { - - beforeAll(() => browser.get('')); - - it('should be able to use interpolation with a hero', async () => { - const heroInterEle = element.all(by.css('h2+p')).get(0); - expect(await heroInterEle.getText()).toEqual('My current hero is Hercules'); - }); - - it('should be able to use interpolation with a calculation', async () => { - const theSumEles = element.all(by.cssContainingText('h3~p', 'The sum of')); - expect(await theSumEles.count()).toBe(2); - expect(await theSumEles.get(0).getText()).toEqual('The sum of 1 + 1 is 2'); - expect(await theSumEles.get(1).getText()).toEqual('The sum of 1 + 1 is not 4'); - }); - - it('should be able to use class binding syntax', async () => { - const specialEle = element(by.cssContainingText('div', 'Special')); - expect(await specialEle.getAttribute('class')).toMatch('special'); - }); - - it('should be able to use style binding syntax', async () => { - const specialButtonEle = element(by.cssContainingText('div.special~button', 'button')); - expect(await specialButtonEle.getAttribute('style')).toMatch('color: red'); - }); - - it('should two-way bind to sizer', async () => { - const div = element(by.css('div#two-way-1')); - const incButton = div.element(by.buttonText('+')); - const input = div.element(by.css('input')); - const initSize = await input.getAttribute('value'); - await incButton.click(); - expect(await input.getAttribute('value')).toEqual((+initSize + 1).toString()); - }); - - it("should change SVG rectangle's fill color on click", async () => { - const div = element(by.css('app-svg')); - const colorSquare = div.element(by.css('rect')); - const initialColor = await colorSquare.getAttribute('fill'); - await colorSquare.click(); - expect(await colorSquare.getAttribute('fill')).not.toEqual(initialColor); - }); -}); diff --git a/aio/content/examples/template-syntax/example-config.json b/aio/content/examples/template-syntax/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/template-syntax/src/app/app.component.css b/aio/content/examples/template-syntax/src/app/app.component.css deleted file mode 100644 index 01163bffbca..00000000000 --- a/aio/content/examples/template-syntax/src/app/app.component.css +++ /dev/null @@ -1,17 +0,0 @@ -a.to-toc { margin: 30px 0; } -button { font-size: 100%; margin: 0 2px; } -div[clickable] {cursor: pointer; max-width: 200px; margin: 16px 0} -#noTrackByCnt, #withTrackByCnt {color: darkred; max-width: 450px; margin: 4px;} -img {height: 100px;} -.box {border: 1px solid black; padding: 6px; max-width: 450px;} -.child-div {margin-left: 1em; font-weight: normal} -.context {margin-left: 1em;} -.hidden {display: none} -.parent-div {margin-top: 1em; font-weight: bold} -.special {font-weight:bold; font-size: x-large} -.bad {color: red;} -.saveable {color: limegreen;} -.curly, .modified {font-family: "Brush Script MT", cursive} -.toe {margin-left: 1em; font-style: italic;} -little-hero {color:blue; font-size: smaller; background-color: Turquoise } -.to-toc {margin-top: 10px; display: block} diff --git a/aio/content/examples/template-syntax/src/app/app.component.html b/aio/content/examples/template-syntax/src/app/app.component.html deleted file mode 100644 index cfd035c9532..00000000000 --- a/aio/content/examples/template-syntax/src/app/app.component.html +++ /dev/null @@ -1,709 +0,0 @@ - -

    Template Syntax

    -Interpolation
    -Expression context
    -Statement context
    -Mental Model
    -Buttons
    -Properties vs. Attributes
    -
    -Property Binding
    - -
    -Event Binding
    -Two-way Binding
    -
    -
    Directives
    - -
    -Template reference variables
    -Inputs and outputs
    -Pipes
    -Safe navigation operator ?.
    -Non-null assertion operator !.
    -Enums
    -SVG Templates
    - - -

    Interpolation

    - -

    My current hero is {{currentHero.name}}

    - -

    - {{title}} - {{hero.name}} -

    - - -

    The sum of 1 + 1 is {{1 + 1}}

    - - -

    The sum of 1 + 1 is not {{1 + 1 + getVal()}}

    - -top - -

    Expression context

    - -

    Component expression context ({{title}}, [hidden]="isUnchanged")

    -
    - {{title}} - changed -
    - - -

    Template input variable expression context (let hero)

    - - -
    {{hero.name}}
    -
    - -

    Template reference variable expression context (#heroInput)

    -
    - Type something: - {{heroInput.value}} -
    - -top - -

    Statement context

    - -

    Component statement context ( (click)="onSave() ) -

    - - - -
    - -

    Template $event statement context

    -
    - - - -
    - -

    Template input variable statement context (let hero)

    - -
    - - - -
    - -

    Template reference variable statement context (#heroForm)

    -
    - -
    ...
    - -
    - -top - - -

    New Mental Model

    - - - -
    Mental Model
    - - -

    - -
    - -
    Mental Model
    - - -
    -

    - -
    - - -
    -

    - -
    - - - -
    - -
    -

    - - - - -
    click me
    - -{{clicked}} -

    - -
    - Hero Name: - - - - {{name}} -
    -

    - - - - -

    - - -
    Special
    - -

    - - - - -top - - - -

    Property vs. Attribute (img examples)

    - - - -

    - -icon -villain-image - -top - - -

    Buttons

    - - - - -

    - - -

    - - -top - - -

    Property Binding

    - - - -
    [ngClass] binding to the classes property
    - - - - - - - -

    - interpolated image of {{currentHero.name}} - is the interpolated image. -

    -

    - - is the property bound image. -

    - -

    "{{title}}" is the interpolated title.

    -

    "" is the property bound title.

    - - -

    "{{evilTitle}}" is the interpolated evil title.

    -

    "" is the property bound evil title.

    - -top - - -

    Attribute Binding

    - - - - - - - - - -
    One-Two
    FiveSix
    - -
    - - -

    - - -
    - - - - - - - -
    - -top - - -

    Class Binding

    - - -
    Bad curly special
    - - -
    Bad curly
    - - -
    The class binding is special
    - - -
    This one is not so special
    - -top - - -

    Style Binding

    - - - - - - - -top - - -

    Event Binding

    - - - -
    - -
    click with myClick
    -{{clickMessage}} -
    - - - - -
    - - - - - - -
    Click me -
    Click me too!
    -
    - - -
    - -
    - - -
    - -
    - - - -top - -

    Two-way Binding

    -
    - -
    Resizable Text
    - -
    -
    -
    -

    De-sugared two-way binding

    - -
    - -top - - -

    NgModel (two-way) Binding

    - -

    Result: {{currentHero.name}}

    - - -without NgModel -
    - -[(ngModel)] -
    - -(ngModelChange)="...name=$event" -
    - -(ngModelChange)="setUppercaseName($event)" - -top - - -

    NgClass Binding

    - -

    currentClasses is {{currentClasses | json}}

    -
    This div is initially saveable, unchanged, and special
    - - -
    - | - | - - -

    -
    - This div should be {{ canSave ? "": "not"}} saveable, - {{ isUnchanged ? "unchanged" : "modified" }} and, - {{ isSpecial ? "": "not"}} special after clicking "Refresh".
    -

    - -
    This div is special
    - -
    Bad curly special
    -
    Curly special
    - -top - - -

    NgStyle Binding

    - -
    - This div is x-large or smaller. -
    - -

    [ngStyle] binding to currentStyles - CSS property names

    -

    currentStyles is {{currentStyles | json}}

    -
    - This div is initially italic, normal weight, and extra large (24px). -
    - - -
    - | - | - - -

    -
    - This div should be {{ canSave ? "italic": "plain"}}, - {{ isUnchanged ? "normal weight" : "bold" }} and, - {{ isSpecial ? "extra large": "normal size"}} after clicking "Refresh".
    - -top - - -

    NgIf Binding

    - - - -
    Hello, {{currentHero.name}}
    -
    Hello, {{nullHero.name}}
    - - - -Add {{currentHero.name}} with template - - -
    Hero Detail removed from DOM (via template) because isActive is false
    - - - - - -
    Show with class
    -
    Hide with class
    - - - - -
    Show with style
    -
    Hide with style
    - -top - - -

    NgFor Binding

    - -
    -
    {{hero.name}}
    -
    -
    - -
    - - -
    - -top - -

    *ngFor with index

    -

    with semi-colon separator

    -
    -
    {{i + 1}} - {{hero.name}}
    -
    - -

    with comma separator

    -
    - -
    {{i + 1}} - {{hero.name}}
    -
    - -top - -

    *ngFor trackBy

    - - - - -

    without trackBy

    -
    -
    ({{hero.id}}) {{hero.name}}
    - -
    - Hero DOM elements change #{{heroesNoTrackByCount}} without trackBy -
    -
    - -

    with trackBy

    -
    -
    ({{hero.id}}) {{hero.name}}
    - -
    - Hero DOM elements change #{{heroesWithTrackByCount}} with trackBy -
    -
    - -


    - -

    with trackBy and semi-colon separator

    -
    -
    - ({{hero.id}}) {{hero.name}} -
    -
    - -

    with trackBy and comma separator

    -
    -
    ({{hero.id}}) {{hero.name}}
    -
    - -

    with trackBy and space separator

    -
    -
    ({{hero.id}}) {{hero.name}}
    -
    - -

    with generic trackById function

    -
    -
    ({{hero.id}}) {{hero.name}}
    -
    - -top - - -

    NgSwitch Binding

    - -

    Pick your favorite hero

    -
    - -
    - -
    - - - -
    Are you as confused as {{currentHero.name}}?
    - -
    - -top - - -

    Template reference variables

    - - - - - - - - - - - -

    Example Form

    - - -top - - -

    Inputs and Outputs

    - -icon - - - - - -
    myClick2
    -{{clickMessage2}} - -top - - -

    Pipes

    - -
    Title through uppercase pipe: {{title | uppercase}}
    - - -
    - Title through a pipe chain: - {{title | uppercase | lowercase}} -
    - - -
    Birthdate: {{currentHero.birthdate | date:'longDate'}}
    - -
    {{currentHero | json}}
    - -
    Birthdate: {{(currentHero.birthdate | date:'longDate') | uppercase}}
    - -
    - - Price: {{product.price | currency:'USD':'symbol'}} -
    - -top - - -

    Safe navigation operator ?.

    - -
    - The title is {{title}} -
    - -
    - The current hero's name is {{currentHero.name}} -
    - -
    - The current hero's name is {{currentHero.name}} -
    - - - - - -
    The null hero's name is {{nullHero.name}}
    - -
    -The null hero's name is {{nullHero && nullHero.name}} -
    - -
    - - The null hero's name is {{nullHero?.name}} -
    - - -top - - -

    Non-null assertion operator !.

    - -
    - -
    - The hero's name is {{hero!.name}} -
    -
    - -top - - -

    $any type cast function $any( ).

    - -
    - -
    - The hero's marker is {{$any(hero).marker}} -
    -
    - -
    - -
    - Undeclared members is {{$any(this).member}} -
    -
    - -top - - - -

    Enums in binding

    - -

    - The name of the Color.Red enum is {{Color[Color.Red]}}.
    - The current color is {{Color[color]}} and its number is {{color}}.
    - -

    - -top - -

    SVG Templates

    - -top diff --git a/aio/content/examples/template-syntax/src/app/app.component.ts b/aio/content/examples/template-syntax/src/app/app.component.ts deleted file mode 100644 index f3355b35b9e..00000000000 --- a/aio/content/examples/template-syntax/src/app/app.component.ts +++ /dev/null @@ -1,200 +0,0 @@ -import { AfterViewInit, Component, ElementRef, OnInit, QueryList, ViewChildren } from '@angular/core'; -import { CommonModule, DatePipe } from '@angular/common'; -import { FormsModule } from '@angular/forms'; - -import { BigHeroDetailComponent, HeroDetailComponent } from './hero-detail.component'; -import { ClickDirective, ClickDirective2 } from './click.directive'; -import { HeroFormComponent } from './hero-form.component'; -import { heroSwitchComponents } from './hero-switch.components'; -import { SizerComponent } from './sizer.component'; -import { SvgComponent } from './svg.component'; - -import { Hero } from './hero'; - -export enum Color {Red, Green, Blue} - -/** - * Giant grab bag of stuff to drive the chapter - */ -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - // Angular Sources - CommonModule, FormsModule, - DatePipe, - - // Sample Components and Directives - BigHeroDetailComponent, - ClickDirective, - ClickDirective2, - HeroDetailComponent, - HeroFormComponent, - heroSwitchComponents, // an array of components - SizerComponent, - SvgComponent - ], - styleUrls: [ './app.component.css' ] -}) -export class AppComponent implements AfterViewInit, OnInit { - - ngOnInit() { - this.resetHeroes(); - this.setCurrentClasses(); - this.setCurrentStyles(); - } - - ngAfterViewInit() { - // Detect effects of NgForTrackBy - trackChanges(this.heroesNoTrackBy, () => this.heroesNoTrackByCount++); - trackChanges(this.heroesWithTrackBy, () => this.heroesWithTrackByCount++); - } - - @ViewChildren('noTrackBy') heroesNoTrackBy!: QueryList; - @ViewChildren('withTrackBy') heroesWithTrackBy!: QueryList; - - actionName = 'Go for it'; - badCurly = 'bad curly'; - classes = 'special'; - help = ''; - - alert(msg?: string) { window.alert(msg); } - callFax(value: string) { this.alert(`Faxing ${value} ...`); } - callPhone(value: string) { this.alert(`Calling ${value} ...`); } - canSave = true; - - changeIds() { - this.resetHeroes(); - this.heroes.forEach(h => h.id += 10 * this.heroIdIncrement++); - this.heroesWithTrackByCountReset = -1; - } - - clearTrackByCounts() { - const trackByCountReset = this.heroesWithTrackByCountReset; - this.resetHeroes(); - this.heroesNoTrackByCount = -1; - this.heroesWithTrackByCount = trackByCountReset; - this.heroIdIncrement = 1; - } - - clicked = ''; - clickMessage = ''; - clickMessage2 = ''; - - Color = Color; - color = Color.Red; - colorToggle() {this.color = (this.color === Color.Red) ? Color.Blue : Color.Red; } - - currentHero!: Hero; - - updateCurrentHeroName(event: Event) { - this.currentHero.name = (event.target as any).value; - } - - deleteHero(hero?: Hero) { - this.alert(`Delete ${hero ? hero.name : 'the hero'}.`); - } - - evilTitle = 'Template Syntax'; - - fontSizePx = 16; - - title = 'Template Syntax'; - - getVal(): number { return 2; } - - name: string = Hero.heroes[0].name || ''; - hero!: Hero; // defined to demonstrate template context precedence - heroes: Hero[] = []; - - // trackBy change counting - heroesNoTrackByCount = 0; - heroesWithTrackByCount = 0; - heroesWithTrackByCountReset = 0; - - heroIdIncrement = 1; - - // heroImageUrl = 'https://wpclipart.com/dl.php?img=/cartoon/people/hero/hero_silhoutte.svg'; - // Public Domain terms of use: https://wpclipart.com/terms.html - heroImageUrl = 'assets/images/hero.svg'; - // villainImageUrl = 'http://www.clker.com/cliparts/u/s/y/L/x/9/villain-man.svg' - // Public Domain terms of use https://www.clker.com/disclaimer.html - villainImageUrl = 'assets/images/villain.svg'; - - iconUrl = 'assets/images/ng-logo.svg'; - isActive = false; - isSpecial = true; - isUnchanged = true; - - get nullHero(): Hero | null { return null; } - - onClickMe(event?: MouseEvent) { - const evtMsg = event ? ' Event target class is ' + (event.target as HTMLElement).className : ''; - this.alert('Click me.' + evtMsg); - } - - onSave(event?: MouseEvent) { - const evtMsg = event ? ' Event target is ' + (event.target as HTMLElement).textContent : ''; - this.alert('Saved.' + evtMsg); - if (event) { event.stopPropagation(); } - } - - onSubmit(data: any) {/* referenced but not used */} - - product = { - name: 'frimfram', - price: 42 - }; - - // updates with fresh set of cloned heroes - resetHeroes() { - this.heroes = Hero.heroes.map(hero => hero.clone()); - this.currentHero = this.heroes[0]; - this.hero = this.currentHero; - this.heroesWithTrackByCountReset = 0; - } - - setUppercaseName(name: string) { - this.currentHero.name = name.toUpperCase(); - } - - currentClasses: Record = {}; - setCurrentClasses() { - // CSS classes: added/removed per current state of component properties - this.currentClasses = { - saveable: this.canSave, - modified: !this.isUnchanged, - special: this.isSpecial - }; - } - - currentStyles: Record = {}; - setCurrentStyles() { - // CSS styles: set per current state of component properties - this.currentStyles = { - 'font-style': this.canSave ? 'italic' : 'normal', - 'font-weight': !this.isUnchanged ? 'bold' : 'normal', - 'font-size': this.isSpecial ? '24px' : '12px' - }; - } - - trackByHeroes(index: number, hero: Hero): number { return hero.id; } - - trackById(index: number, item: any): number { return item.id; } -} - -// helper to track changes to viewChildren -function trackChanges(views: QueryList, changed: () => void) { - let oldRefs = views.toArray(); - views.changes.subscribe((changes: QueryList) => { - const changedRefs = changes.toArray(); - // Check if every changed Element is the same as old and in the same position - const isSame = oldRefs.every((v, i) => v.nativeElement === changedRefs[i].nativeElement); - if (!isSame) { - oldRefs = changedRefs; - // wait a tick because called after views are constructed - setTimeout(changed, 0); - } - }); -} diff --git a/aio/content/examples/template-syntax/src/app/click.directive.ts b/aio/content/examples/template-syntax/src/app/click.directive.ts deleted file mode 100644 index 7362a211045..00000000000 --- a/aio/content/examples/template-syntax/src/app/click.directive.ts +++ /dev/null @@ -1,41 +0,0 @@ -/* eslint-disable @angular-eslint/directive-class-suffix, - @angular-eslint/directive-selector, - @angular-eslint/no-output-rename, - @angular-eslint/no-outputs-metadata-property */ -import { Directive, ElementRef, EventEmitter, Output } from '@angular/core'; - -@Directive({ - standalone: true, - selector: '[myClick]' -}) -export class ClickDirective { - @Output('myClick') clicks = new EventEmitter(); // @Output(alias) propertyName = ... - - toggle = false; - - constructor(el: ElementRef) { - el.nativeElement - .addEventListener('click', (event: Event) => { - this.toggle = !this.toggle; - this.clicks.emit(this.toggle ? 'Click!' : ''); - }); - } -} - -@Directive({ - standalone: true, - selector: '[myClick2]', - outputs: ['clicks:myClick'] // propertyName:alias -}) -export class ClickDirective2 { - clicks = new EventEmitter(); - toggle = false; - - constructor(el: ElementRef) { - el.nativeElement - .addEventListener('click', (event: Event) => { - this.toggle = !this.toggle; - this.clicks.emit(this.toggle ? 'Click2!' : ''); - }); - } -} diff --git a/aio/content/examples/template-syntax/src/app/hero-detail.component.ts b/aio/content/examples/template-syntax/src/app/hero-detail.component.ts deleted file mode 100644 index b9eba321bc9..00000000000 --- a/aio/content/examples/template-syntax/src/app/hero-detail.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint-disable @angular-eslint/no-inputs-metadata-property, @angular-eslint/no-outputs-metadata-property */ -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { CurrencyPipe, DatePipe } from '@angular/common'; - -import { Hero } from './hero'; - -@Component({ - standalone: true, - selector: 'app-hero-detail', - inputs: ['hero'], - outputs: ['deleteRequest'], - styles: ['button {margin-left: 8px} div {margin: 8px 0} img {height:24px}'], - template: ` -
    - {{hero.name}} - - {{prefix}} {{hero.name}} - - -
    ` -}) -export class HeroDetailComponent { - hero = new Hero(-1, '', 'Zzzzzzzz'); // default sleeping hero - // heroImageUrl = 'https://wpclipart.com/cartoon/people/hero/hero_silhoutte.png.html'; - // Public Domain terms of use: https://wpclipart.com/terms.html - heroImageUrl = 'assets/images/hero.svg'; - lineThrough = ''; - @Input() prefix = ''; - - // This component makes a request but it can't actually delete a hero. - deleteRequest = new EventEmitter(); - - delete() { - this.deleteRequest.emit(this.hero); - this.lineThrough = this.lineThrough ? '' : 'line-through'; - } -} - -@Component({ - standalone: true, - selector: 'app-big-hero-detail', - template: ` -
    - {{hero.name}} -
    {{hero.name}}
    -
    Name: {{hero.name}}
    -
    Emotion: {{hero.emotion}}
    -
    Birthdate: {{hero.birthdate | date:'longDate'}}
    - -
    Rate/hr: {{hero.rate | currency:'EUR'}}
    -
    - -
    - `, - imports: [CurrencyPipe, DatePipe], - styles: [` - .detail { border: 1px solid black; padding: 4px; max-width: 450px; } - img { float: left; margin-right: 8px; height: 100px; } - `] -}) -export class BigHeroDetailComponent extends HeroDetailComponent { - - @Input() override hero!: Hero; - @Output() override deleteRequest = new EventEmitter(); - - override delete() { - this.deleteRequest.emit(this.hero); - } -} diff --git a/aio/content/examples/template-syntax/src/app/hero-form.component.html b/aio/content/examples/template-syntax/src/app/hero-form.component.html deleted file mode 100644 index 66d2657fd43..00000000000 --- a/aio/content/examples/template-syntax/src/app/hero-form.component.html +++ /dev/null @@ -1,21 +0,0 @@ -
    - -
    -
    - - -
    - -
    -
    - {{submitMessage}} -
    - -
    diff --git a/aio/content/examples/template-syntax/src/app/hero-form.component.ts b/aio/content/examples/template-syntax/src/app/hero-form.component.ts deleted file mode 100644 index ab8c7cfcbdb..00000000000 --- a/aio/content/examples/template-syntax/src/app/hero-form.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Component, Input, ViewChild } from '@angular/core'; -import { FormsModule, NgForm } from '@angular/forms'; - -import { Hero } from './hero'; - -@Component({ - standalone: true, - selector: 'app-hero-form', - templateUrl: './hero-form.component.html', - imports: [ FormsModule ], - styles: [` - button { margin: 6px 0; } - #heroForm { border: 1px solid black; margin: 20px 0; padding: 8px; max-width: 350px; } - `] -}) -export class HeroFormComponent { - @Input() hero!: Hero; - @ViewChild('heroForm') form!: NgForm; - - private _submitMessage = ''; - - get submitMessage() { - if (this.form && !this.form.valid) { - this._submitMessage = ''; - } - return this._submitMessage; - } - - onSubmit(form: NgForm) { - this._submitMessage = 'Submitted. form value is ' + JSON.stringify(form.value); - } -} diff --git a/aio/content/examples/template-syntax/src/app/hero-switch.components.ts b/aio/content/examples/template-syntax/src/app/hero-switch.components.ts deleted file mode 100644 index 74c36772e2c..00000000000 --- a/aio/content/examples/template-syntax/src/app/hero-switch.components.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Hero } from './hero'; - -@Component({ - standalone: true, - selector: 'app-happy-hero', - template: 'Wow. You like {{hero.name}}. What a happy hero ... just like you.' -}) -export class HappyHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-sad-hero', - template: 'You like {{hero.name}}? Such a sad hero. Are you sad too?' -}) -export class SadHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-confused-hero', - template: 'Are you as confused as {{hero.name}}?' -}) -export class ConfusedHeroComponent { - @Input() hero!: Hero; -} - -@Component({ - standalone: true, - selector: 'app-unknown-hero', - template: '{{message}}' -}) -export class UnknownHeroComponent { - @Input() hero!: Hero; - get message() { - return this.hero && this.hero.name ? - `${this.hero.name} is strange and mysterious.` : - 'Are you feeling indecisive?'; - } -} - -export const heroSwitchComponents = - [ HappyHeroComponent, SadHeroComponent, ConfusedHeroComponent, UnknownHeroComponent ]; diff --git a/aio/content/examples/template-syntax/src/app/hero.ts b/aio/content/examples/template-syntax/src/app/hero.ts deleted file mode 100644 index c39ce3ef8e9..00000000000 --- a/aio/content/examples/template-syntax/src/app/hero.ts +++ /dev/null @@ -1,32 +0,0 @@ -export class Hero { - static nextId = 0; - - static heroes: Hero[] = [ - new Hero( - 0, - 'Hercules', - 'happy', - new Date(1970, 1, 25), - 'https://www.imdb.com/title/tt0065832/', - 325 - ), - new Hero(1, 'Dr Nice', 'happy'), - new Hero(2, 'RubberMan', 'sad'), - new Hero(3, 'Windstorm', 'confused'), - new Hero(4, 'Magneta') - ]; - - - constructor( - public id = Hero.nextId++, - public name?: string, - public emotion?: string, - public birthdate?: Date, - public url?: string, - public rate = 100, - ) {} - - clone(): Hero { - return Object.assign(new Hero(), this); - } -} diff --git a/aio/content/examples/template-syntax/src/app/sizer.component.ts b/aio/content/examples/template-syntax/src/app/sizer.component.ts deleted file mode 100644 index 25a0509d7c2..00000000000 --- a/aio/content/examples/template-syntax/src/app/sizer.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-sizer', - template: ` -
    - - - FontSize: {{size}}px -
    ` -}) -export class SizerComponent { - @Input() size!: number | string; - @Output() sizeChange = new EventEmitter(); - - dec() { this.resize(-1); } - inc() { this.resize(+1); } - - resize(delta: number) { - this.size = Math.min(40, Math.max(8, +this.size + delta)); - this.sizeChange.emit(this.size); - } -} diff --git a/aio/content/examples/template-syntax/src/app/svg.component.css b/aio/content/examples/template-syntax/src/app/svg.component.css deleted file mode 100644 index c849558dfec..00000000000 --- a/aio/content/examples/template-syntax/src/app/svg.component.css +++ /dev/null @@ -1,4 +0,0 @@ -svg { - display: block; - width: 100%; -} diff --git a/aio/content/examples/template-syntax/src/app/svg.component.svg b/aio/content/examples/template-syntax/src/app/svg.component.svg deleted file mode 100644 index 634b66df8ca..00000000000 --- a/aio/content/examples/template-syntax/src/app/svg.component.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - click the rectangle to change the fill color - - diff --git a/aio/content/examples/template-syntax/src/app/svg.component.ts b/aio/content/examples/template-syntax/src/app/svg.component.ts deleted file mode 100644 index a90720b7354..00000000000 --- a/aio/content/examples/template-syntax/src/app/svg.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-svg', - templateUrl: './svg.component.svg', - styleUrls: ['./svg.component.css'] -}) -export class SvgComponent { - fillColor = 'rgb(255, 0, 0)'; - - changeColor() { - const r = Math.floor(Math.random() * 256); - const g = Math.floor(Math.random() * 256); - const b = Math.floor(Math.random() * 256); - this.fillColor = `rgb(${r}, ${g}, ${b})`; - } -} diff --git a/aio/content/examples/template-syntax/src/assets/images/hero.svg b/aio/content/examples/template-syntax/src/assets/images/hero.svg deleted file mode 100644 index f0a002fc724..00000000000 --- a/aio/content/examples/template-syntax/src/assets/images/hero.svg +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - image/svg+xml - - - - - - Layer 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/template-syntax/src/assets/images/ng-logo.svg b/aio/content/examples/template-syntax/src/assets/images/ng-logo.svg deleted file mode 100644 index ac78f203d21..00000000000 --- a/aio/content/examples/template-syntax/src/assets/images/ng-logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - diff --git a/aio/content/examples/template-syntax/src/assets/images/villain.svg b/aio/content/examples/template-syntax/src/assets/images/villain.svg deleted file mode 100644 index 75851ef7d96..00000000000 --- a/aio/content/examples/template-syntax/src/assets/images/villain.svg +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/template-syntax/src/index.html b/aio/content/examples/template-syntax/src/index.html deleted file mode 100644 index 866fc067cb4..00000000000 --- a/aio/content/examples/template-syntax/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - Template Syntax - - - - - - - - - - diff --git a/aio/content/examples/template-syntax/src/main.ts b/aio/content/examples/template-syntax/src/main.ts deleted file mode 100644 index 7e10ffabd9a..00000000000 --- a/aio/content/examples/template-syntax/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { bootstrapApplication, provideProtractorTestingSupport } from '@angular/platform-browser'; - -import { AppComponent } from './app/app.component'; - -bootstrapApplication(AppComponent, { providers: [provideProtractorTestingSupport()] }) - .catch(err => console.error(err)); diff --git a/aio/content/examples/template-syntax/stackblitz.json b/aio/content/examples/template-syntax/stackblitz.json deleted file mode 100644 index 5ba51f973b3..00000000000 --- a/aio/content/examples/template-syntax/stackblitz.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "description": "Template Syntax Collection", - "files":["!**/*.d.ts", "!**/*.js"], - "tags": ["template"] -} diff --git a/aio/content/examples/testing/BUILD.bazel b/aio/content/examples/testing/BUILD.bazel deleted file mode 100644 index 268d296a042..00000000000 --- a/aio/content/examples/testing/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "testing", -) diff --git a/aio/content/examples/testing/e2e/src/app.e2e-spec.ts b/aio/content/examples/testing/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 4d7246b83fb..00000000000 --- a/aio/content/examples/testing/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Testing Example', () => { - const expectedViewNames = ['Dashboard', 'Heroes', 'About']; - - beforeAll(() => browser.get('')); - - function getPageElts() { - return { - navElts: element.all(by.css('app-root nav a')), - appDashboard: element(by.css('app-root app-dashboard')), - }; - } - - it('has title', async () => { - expect(await browser.getTitle()).toEqual('App Under Test'); - }); - - it(`has views ${expectedViewNames}`, async () => { - const viewNames = await getPageElts().navElts.map(el => el!.getText()); - - expect(viewNames).toEqual(expectedViewNames); - }); - - it('has dashboard as the active view', async () => { - const page = getPageElts(); - - expect(await page.appDashboard.isPresent()).toBeTruthy(); - }); -}); diff --git a/aio/content/examples/testing/example-config.json b/aio/content/examples/testing/example-config.json deleted file mode 100644 index 239710e2cd0..00000000000 --- a/aio/content/examples/testing/example-config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "projectType": "testing", - "tests": [ - {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadlessNoSandbox", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]} - ] -} diff --git a/aio/content/examples/testing/src/app/about/about.component.spec.ts b/aio/content/examples/testing/src/app/about/about.component.spec.ts deleted file mode 100755 index 647cbb66234..00000000000 --- a/aio/content/examples/testing/src/app/about/about.component.spec.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { provideHttpClient } from '@angular/common/http'; -import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { UserService } from '../model'; -import { TwainService } from '../twain/twain.service'; - -import { AboutComponent } from './about.component'; - -let fixture: ComponentFixture; - -describe('AboutComponent (highlightDirective)', () => { - // #docregion tests - beforeEach(() => { - fixture = TestBed.configureTestingModule({ - imports: [AboutComponent], - providers: [provideHttpClient(), TwainService, UserService], - schemas: [CUSTOM_ELEMENTS_SCHEMA], - }).createComponent(AboutComponent); - fixture.detectChanges(); // initial binding - }); - - it('should have skyblue

    ', () => { - const h2: HTMLElement = fixture.nativeElement.querySelector('h2'); - const bgColor = h2.style.backgroundColor; - expect(bgColor).toBe('skyblue'); - }); - // #enddocregion tests -}); diff --git a/aio/content/examples/testing/src/app/about/about.component.ts b/aio/content/examples/testing/src/app/about/about.component.ts deleted file mode 100755 index 6857e145cd1..00000000000 --- a/aio/content/examples/testing/src/app/about/about.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { HighlightDirective } from '../shared/highlight.directive'; -import { TwainComponent } from '../twain/twain.component'; - -@Component({ - standalone: true, - template: ` -

    About

    -

    Quote of the day:

    - - `, - imports: [TwainComponent, HighlightDirective], -}) -export class AboutComponent {} diff --git a/aio/content/examples/testing/src/app/app-initial.component.spec.ts b/aio/content/examples/testing/src/app/app-initial.component.spec.ts deleted file mode 100755 index 95facd880c0..00000000000 --- a/aio/content/examples/testing/src/app/app-initial.component.spec.ts +++ /dev/null @@ -1,70 +0,0 @@ -// #docplaster -// #docregion -import { TestBed, waitForAsync } from '@angular/core/testing'; -// #enddocregion -import { AppComponent } from './app-initial.component'; -/* -// #docregion -import { AppComponent } from './app.component'; - -describe('AppComponent', () => { -// #enddocregion -*/ -describe('AppComponent (initial CLI version)', () => { - // #docregion - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - imports: [AppComponent], - }).compileComponents(); - })); - it('should create the app', waitForAsync(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app).toBeTruthy(); - })); - it("should have as title 'app'", waitForAsync(() => { - const fixture = TestBed.createComponent(AppComponent); - const app = fixture.componentInstance; - expect(app.title).toEqual('app'); - })); - it('should render title', waitForAsync(() => { - const fixture = TestBed.createComponent(AppComponent); - fixture.detectChanges(); - const compiled = fixture.nativeElement as HTMLElement; - expect(compiled.querySelector('h1')?.textContent).toContain('Welcome to app!'); - })); -}); -// #enddocregion - -/// As it should be -import { DebugElement } from '@angular/core'; -import { ComponentFixture } from '@angular/core/testing'; - -describe('AppComponent (initial CLI version - as it should be)', () => { - let app: AppComponent; - let de: DebugElement; - let fixture: ComponentFixture; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [AppComponent], - }); - - fixture = TestBed.createComponent(AppComponent); - app = fixture.componentInstance; - de = fixture.debugElement; - }); - - it('should create the app', () => { - expect(app).toBeDefined(); - }); - - it("should have as title 'app'", () => { - expect(app.title).toEqual('app'); - }); - - it('should render title in an h1 tag', () => { - fixture.detectChanges(); - expect(de.nativeElement.querySelector('h1').textContent).toContain('Welcome to app!'); - }); -}); diff --git a/aio/content/examples/testing/src/app/app-initial.component.ts b/aio/content/examples/testing/src/app/app-initial.component.ts deleted file mode 100755 index 068bae4ed5b..00000000000 --- a/aio/content/examples/testing/src/app/app-initial.component.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -// Reduced version of the initial AppComponent generated by CLI -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - template: '

    Welcome to {{title}}!

    ', -}) -export class AppComponent { - title = 'app'; -} diff --git a/aio/content/examples/testing/src/app/app.component.html b/aio/content/examples/testing/src/app/app.component.html deleted file mode 100644 index d73c1162c03..00000000000 --- a/aio/content/examples/testing/src/app/app.component.html +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - diff --git a/aio/content/examples/testing/src/app/app.component.router.spec.ts b/aio/content/examples/testing/src/app/app.component.router.spec.ts deleted file mode 100755 index d34f015edac..00000000000 --- a/aio/content/examples/testing/src/app/app.component.router.spec.ts +++ /dev/null @@ -1,174 +0,0 @@ -// For more examples: -// https://github.com/angular/angular/blob/main/packages/router/test/integration.spec.ts - -import { Location } from '@angular/common'; -import { provideLocationMocks, SpyLocation } from '@angular/common/testing'; -import { DebugElement, Type } from '@angular/core'; -import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { provideRouter, Router, RouterLink } from '@angular/router'; - -import { asyncData, click } from '../testing'; - -import { AboutComponent } from './about/about.component'; -import { AppComponent } from './app.component'; -import { DashboardComponent } from './dashboard/dashboard.component'; -import { HeroService, TestHeroService } from './model/testing/test-hero.service'; -import { TwainService } from './twain/twain.service'; - -let comp: AppComponent; -let fixture: ComponentFixture; -let page: Page; -let router: Router; -let location: SpyLocation; - -describe('AppComponent & router testing', () => { - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - providers: [ - { provide: HeroService, useClass: TestHeroService }, - UserService, - TwainService, - provideHttpClient(), - provideLocationMocks(), - provideRouter([ - { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, - { path: 'about', component: AboutComponent }, - { path: 'dashboard', component: DashboardComponent }, - ]), - ], - }), - ).compileComponents(); - })); - - it('should navigate to "Dashboard" immediately', fakeAsync(() => { - createComponent(); - tick(); // wait for async data to arrive - expectPathToBe('/dashboard', 'after initialNavigation()'); - expectElementOf(DashboardComponent); - })); - - it('should navigate to "About" on click', fakeAsync(() => { - createComponent(); - click(page.aboutLinkDe); - // page.aboutLinkDe.nativeElement.click(); // ok but fails in phantom - - advance(); - expectPathToBe('/about'); - expectElementOf(AboutComponent); - })); - - it('should navigate to "About" w/ browser location URL change', fakeAsync(() => { - createComponent(); - location.simulateHashChange('/about'); - advance(); - expectPathToBe('/about'); - expectElementOf(AboutComponent); - })); - - // Can't navigate to lazy loaded modules with this technique - xit('should navigate to "Heroes" on click (not working yet)', fakeAsync(() => { - createComponent(); - page.heroesLinkDe.nativeElement.click(); - advance(); - expectPathToBe('/heroes'); - })); -}); - -/////////////// - -import { HeroListComponent } from './hero/hero-list.component'; -import { appConfig } from './app.config'; -import heroRoutes from './hero/hero.routes'; -import { UserService } from './model'; -import { provideHttpClient } from '@angular/common/http'; - -///////// Can't get lazy loaded Heroes to work yet -xdescribe('AppComponent & Lazy Loading (not working yet)', () => { - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule(appConfig).compileComponents(); - })); - - beforeEach(fakeAsync(() => { - createComponent(); - router.resetConfig([{ path: 'heroes', loadChildren: () => heroRoutes }]); - })); - - it('should navigate to "Heroes" on click', waitForAsync(() => { - page.heroesLinkDe.nativeElement.click(); - advance(); - expectPathToBe('/heroes'); - expectElementOf(HeroListComponent); - })); - - it('can navigate to "Heroes" w/ browser location URL change', fakeAsync(() => { - location.go('/heroes'); - advance(); - expectPathToBe('/heroes'); - expectElementOf(HeroListComponent); - })); -}); - -////// Helpers ///////// - -/** - * Advance to the routed page - * Wait a tick, then detect changes, and tick again - */ -function advance(): void { - tick(); // wait while navigating - fixture.detectChanges(); // update view - tick(); // wait for async data to arrive -} - -function createComponent() { - fixture = TestBed.createComponent(AppComponent); - comp = fixture.componentInstance; - - const injector = fixture.debugElement.injector; - location = injector.get(Location) as SpyLocation; - router = injector.get(Router); - router.initialNavigation(); - spyOn(injector.get(TwainService), 'getQuote') - // fake fast async observable - .and.returnValue(asyncData('Test Quote')); - advance(); - - page = new Page(); -} - -class Page { - aboutLinkDe: DebugElement; - dashboardLinkDe: DebugElement; - heroesLinkDe: DebugElement; - - // for debugging - comp: AppComponent; - router: Router; - fixture: ComponentFixture; - - constructor() { - const links = fixture.debugElement.queryAll(By.directive(RouterLink)); - this.aboutLinkDe = links[2]; - this.dashboardLinkDe = links[0]; - this.heroesLinkDe = links[1]; - - // for debugging - this.comp = comp; - this.fixture = fixture; - this.router = router; - } -} - -function expectPathToBe(path: string, expectationFailOutput?: any) { - expect(location.path()) - .withContext(expectationFailOutput || 'location.path()') - .toEqual(path); -} - -function expectElementOf(type: Type): any { - const el = fixture.debugElement.query(By.directive(type)); - expect(el).withContext(`expected an element for ${type.name}`).toBeTruthy(); - return el; -} diff --git a/aio/content/examples/testing/src/app/app.component.spec.ts b/aio/content/examples/testing/src/app/app.component.spec.ts deleted file mode 100755 index 768d132420c..00000000000 --- a/aio/content/examples/testing/src/app/app.component.spec.ts +++ /dev/null @@ -1,117 +0,0 @@ -// #docplaster -import { Component, DebugElement, NO_ERRORS_SCHEMA } from '@angular/core'; -import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { provideRouter, Router, RouterLink } from '@angular/router'; - -import { AppComponent } from './app.component'; -import { appConfig } from './app.config'; -import { UserService } from './model'; - -// #docregion component-stubs -@Component({ standalone: true, selector: 'app-banner', template: '' }) -class BannerStubComponent {} - -@Component({ standalone: true, selector: 'router-outlet', template: '' }) -class RouterOutletStubComponent {} - -@Component({ standalone: true, selector: 'app-welcome', template: '' }) -class WelcomeStubComponent {} -// #enddocregion component-stubs - -let comp: AppComponent; -let fixture: ComponentFixture; - -describe('AppComponent & TestModule', () => { - beforeEach(waitForAsync(() => { - // #docregion testbed-stubs - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [ - AppComponent, - BannerStubComponent, - RouterLink, - RouterOutletStubComponent, - WelcomeStubComponent, - ], - providers: [provideRouter([]), UserService], - }), - ) - // #enddocregion testbed-stubs - .compileComponents() - .then(() => { - fixture = TestBed.createComponent(AppComponent); - comp = fixture.componentInstance; - }); - })); - tests(); -}); - -//////// Testing w/ NO_ERRORS_SCHEMA ////// -describe('AppComponent & NO_ERRORS_SCHEMA', () => { - beforeEach(waitForAsync(() => { - // #docregion no-errors-schema, mixed-setup - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [ - AppComponent, - // #enddocregion no-errors-schema - BannerStubComponent, - // #docregion no-errors-schema - RouterLink, - ], - providers: [provideRouter([]), UserService], - schemas: [NO_ERRORS_SCHEMA], - }), - ) - // #enddocregion no-errors-schema, mixed-setup - .compileComponents() - .then(() => { - fixture = TestBed.createComponent(AppComponent); - comp = fixture.componentInstance; - }); - })); - tests(); -}); - -function tests() { - let routerLinks: RouterLink[]; - let linkDes: DebugElement[]; - - // #docregion test-setup - beforeEach(() => { - fixture.detectChanges(); // trigger initial data binding - - // find DebugElements with an attached RouterLinkStubDirective - linkDes = fixture.debugElement.queryAll(By.directive(RouterLink)); - - // get attached link directive instances - // using each DebugElement's injector - routerLinks = linkDes.map((de) => de.injector.get(RouterLink)); - }); - // #enddocregion test-setup - - it('can instantiate the component', () => { - expect(comp).not.toBeNull(); - }); - - // #docregion tests - it('can get RouterLinks from template', () => { - expect(routerLinks.length).withContext('should have 3 routerLinks').toBe(3); - expect(routerLinks[0].href).toBe('/dashboard'); - expect(routerLinks[1].href).toBe('/heroes'); - expect(routerLinks[2].href).toBe('/about'); - }); - - it('can click Heroes link in template', fakeAsync(() => { - const heroesLinkDe = linkDes[1]; // heroes link DebugElement - - TestBed.inject(Router).resetConfig([{ path: '**', children: [] }]); - heroesLinkDe.triggerEventHandler('click', { button: 0 }); - tick(); - fixture.detectChanges(); - - expect(TestBed.inject(Router).url).toBe('/heroes'); - })); - // #enddocregion tests -} diff --git a/aio/content/examples/testing/src/app/app.component.ts b/aio/content/examples/testing/src/app/app.component.ts deleted file mode 100755 index f61c66b9753..00000000000 --- a/aio/content/examples/testing/src/app/app.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { RouterLink, RouterOutlet } from '@angular/router'; - -import { BannerComponent } from './banner/banner.component'; -import { WelcomeComponent } from './welcome/welcome.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [BannerComponent, WelcomeComponent, RouterOutlet, RouterLink], -}) -export class AppComponent {} diff --git a/aio/content/examples/testing/src/app/app.config.ts b/aio/content/examples/testing/src/app/app.config.ts deleted file mode 100644 index dfcc94b59f0..00000000000 --- a/aio/content/examples/testing/src/app/app.config.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { provideHttpClient } from '@angular/common/http'; -import { ApplicationConfig, importProvidersFrom } from '@angular/core'; -import { provideProtractorTestingSupport } from '@angular/platform-browser'; -import { provideRouter } from '@angular/router'; -import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; - -import { routes } from './app.routes'; -import { InMemoryDataService } from './in-memory-data.service'; -import { HeroService } from './model/hero.service'; -import { UserService } from './model/user.service'; -import { TwainService } from './twain/twain.service'; - -export const appProviders = [ - provideRouter(routes), - provideHttpClient(), - provideProtractorTestingSupport(), - importProvidersFrom( - // The HttpClientInMemoryWebApiModule module intercepts HTTP requests - // and returns simulated server responses. - // Remove it when a real server is ready to receive requests. - HttpClientInMemoryWebApiModule.forRoot(InMemoryDataService, { dataEncapsulation: false }), - ), - HeroService, - TwainService, - UserService, -]; - -export const appConfig: ApplicationConfig = { - providers: appProviders, -}; diff --git a/aio/content/examples/testing/src/app/app.routes.ts b/aio/content/examples/testing/src/app/app.routes.ts deleted file mode 100644 index 8c4985ea6b9..00000000000 --- a/aio/content/examples/testing/src/app/app.routes.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Routes } from '@angular/router'; - -import { AboutComponent } from './about/about.component'; -import { DashboardComponent } from './dashboard/dashboard.component'; - -export const routes: Routes = [ - { path: '', redirectTo: 'dashboard', pathMatch: 'full' }, - { path: 'about', component: AboutComponent }, - { path: 'dashboard', component: DashboardComponent }, - { path: 'heroes', loadChildren: () => import('./hero/hero.routes') }, -]; diff --git a/aio/content/examples/testing/src/app/banner/banner-external.component.css b/aio/content/examples/testing/src/app/banner/banner-external.component.css deleted file mode 100644 index 333c9a102f5..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-external.component.css +++ /dev/null @@ -1,4 +0,0 @@ -h1 { - color: green; - font-size: 350%; -} diff --git a/aio/content/examples/testing/src/app/banner/banner-external.component.html b/aio/content/examples/testing/src/app/banner/banner-external.component.html deleted file mode 100644 index b6515528b8c..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-external.component.html +++ /dev/null @@ -1 +0,0 @@ -

    {{ title }}

    diff --git a/aio/content/examples/testing/src/app/banner/banner-external.component.spec.ts b/aio/content/examples/testing/src/app/banner/banner-external.component.spec.ts deleted file mode 100755 index f9d97c34e50..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-external.component.spec.ts +++ /dev/null @@ -1,78 +0,0 @@ -// #docplaster -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BannerComponent } from './banner-external.component'; - -describe('BannerComponent (external files)', () => { - let component: BannerComponent; - let fixture: ComponentFixture; - let h1: HTMLElement; - - describe('setup that may fail', () => { - // #docregion setup-may-fail - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [BannerComponent], - }); // missing call to compileComponents() - fixture = TestBed.createComponent(BannerComponent); - }); - // #enddocregion setup-may-fail - - it('should create', () => { - expect(fixture.componentInstance).toBeDefined(); - }); - }); - - describe('Two beforeEach', () => { - // #docregion async-before-each - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [BannerComponent], - }).compileComponents(); // compile template and css - }); - // #enddocregion async-before-each - - // synchronous beforeEach - // #docregion sync-before-each - beforeEach(() => { - fixture = TestBed.createComponent(BannerComponent); - component = fixture.componentInstance; // BannerComponent test instance - h1 = fixture.nativeElement.querySelector('h1'); - }); - // #enddocregion sync-before-each - - tests(); - }); - - describe('One beforeEach', () => { - // #docregion one-before-each - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [BannerComponent], - }).compileComponents(); - fixture = TestBed.createComponent(BannerComponent); - component = fixture.componentInstance; - h1 = fixture.nativeElement.querySelector('h1'); - }); - // #enddocregion one-before-each - - tests(); - }); - - function tests() { - it('no title in the DOM until manually call `detectChanges`', () => { - expect(h1.textContent).toEqual(''); - }); - - it('should display original title', () => { - fixture.detectChanges(); - expect(h1.textContent).toContain(component.title); - }); - - it('should display a different test title', () => { - component.title = 'Test Title'; - fixture.detectChanges(); - expect(h1.textContent).toContain('Test Title'); - }); - } -}); diff --git a/aio/content/examples/testing/src/app/banner/banner-external.component.ts b/aio/content/examples/testing/src/app/banner/banner-external.component.ts deleted file mode 100755 index 95cce3aec9f..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-external.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; - -// #docregion metadata -@Component({ - standalone: true, - selector: 'app-banner', - templateUrl: './banner-external.component.html', - styleUrls: ['./banner-external.component.css'], -}) -// #enddocregion metadata -export class BannerComponent { - title = 'Test Tour of Heroes'; -} diff --git a/aio/content/examples/testing/src/app/banner/banner-initial.component.spec.ts b/aio/content/examples/testing/src/app/banner/banner-initial.component.spec.ts deleted file mode 100755 index d8efc606e4a..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-initial.component.spec.ts +++ /dev/null @@ -1,113 +0,0 @@ -// #docplaster -// #docregion import-debug-element -import { DebugElement } from '@angular/core'; -// #enddocregion import-debug-element -// #docregion v1 -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; - -// #enddocregion v1 -// #docregion import-by -import { By } from '@angular/platform-browser'; -// #enddocregion import-by -import { BannerComponent } from './banner-initial.component'; - -/* -// #docregion v1 -import { BannerComponent } from './banner.component'; - -describe('BannerComponent', () => { -// #enddocregion v1 -*/ -describe('BannerComponent (initial CLI generated)', () => { - // #docregion v1 - let component: BannerComponent; - let fixture: ComponentFixture; - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ imports: [BannerComponent] }).compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(BannerComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it('should create', () => { - expect(component).toBeDefined(); - }); -}); -// #enddocregion v1 - -// #docregion v2 -describe('BannerComponent (minimal)', () => { - it('should create', () => { - // #docregion configureTestingModule - TestBed.configureTestingModule({ imports: [BannerComponent] }); - // #enddocregion configureTestingModule - // #docregion createComponent - const fixture = TestBed.createComponent(BannerComponent); - // #enddocregion createComponent - // #docregion componentInstance - const component = fixture.componentInstance; - expect(component).toBeDefined(); - // #enddocregion componentInstance - }); -}); -// #enddocregion v2 - -// #docregion v3 -describe('BannerComponent (with beforeEach)', () => { - let component: BannerComponent; - let fixture: ComponentFixture; - - beforeEach(() => { - TestBed.configureTestingModule({ imports: [BannerComponent] }); - fixture = TestBed.createComponent(BannerComponent); - component = fixture.componentInstance; - }); - - it('should create', () => { - expect(component).toBeDefined(); - }); - // #enddocregion v3 - - // #docregion v4-test-2 - it('should contain "banner works!"', () => { - const bannerElement: HTMLElement = fixture.nativeElement; - expect(bannerElement.textContent).toContain('banner works!'); - }); - // #enddocregion v4-test-2 - - // #docregion v4-test-3 - it('should have

    with "banner works!"', () => { - // #docregion nativeElement - const bannerElement: HTMLElement = fixture.nativeElement; - // #enddocregion nativeElement - const p = bannerElement.querySelector('p')!; - expect(p.textContent).toEqual('banner works!'); - }); - // #enddocregion v4-test-3 - - // #docregion v4-test-4 - it('should find the

    with fixture.debugElement.nativeElement)', () => { - // #docregion debugElement-nativeElement - const bannerDe: DebugElement = fixture.debugElement; - const bannerEl: HTMLElement = bannerDe.nativeElement; - // #enddocregion debugElement-nativeElement - const p = bannerEl.querySelector('p')!; - expect(p.textContent).toEqual('banner works!'); - }); - // #enddocregion v4-test-4 - - // #docregion v4-test-5 - it('should find the

    with fixture.debugElement.query(By.css)', () => { - const bannerDe: DebugElement = fixture.debugElement; - const paragraphDe = bannerDe.query(By.css('p')); - const p: HTMLElement = paragraphDe.nativeElement; - expect(p.textContent).toEqual('banner works!'); - }); - // #enddocregion v4-test-5 - // #docregion v3 -}); -// #enddocregion v3 diff --git a/aio/content/examples/testing/src/app/banner/banner-initial.component.ts b/aio/content/examples/testing/src/app/banner/banner-initial.component.ts deleted file mode 100755 index bdd344812e2..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner-initial.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -// BannerComponent as initially generated by the CLI -// #docregion -import { Component } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-banner', - template: '

    banner works!

    ', - styles: [], -}) -export class BannerComponent {} diff --git a/aio/content/examples/testing/src/app/banner/banner.component.detect-changes.spec.ts b/aio/content/examples/testing/src/app/banner/banner.component.detect-changes.spec.ts deleted file mode 100755 index 8a13cd1f4e9..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner.component.detect-changes.spec.ts +++ /dev/null @@ -1,46 +0,0 @@ -// #docplaster -// #docregion -// #docregion import-ComponentFixtureAutoDetect -import { ComponentFixtureAutoDetect } from '@angular/core/testing'; -// #enddocregion import-ComponentFixtureAutoDetect -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BannerComponent } from './banner.component'; - -describe('BannerComponent (AutoChangeDetect)', () => { - let comp: BannerComponent; - let fixture: ComponentFixture; - let h1: HTMLElement; - - beforeEach(() => { - // #docregion auto-detect - TestBed.configureTestingModule({ - imports: [BannerComponent], - providers: [{ provide: ComponentFixtureAutoDetect, useValue: true }], - }); - // #enddocregion auto-detect - fixture = TestBed.createComponent(BannerComponent); - comp = fixture.componentInstance; - h1 = fixture.nativeElement.querySelector('h1'); - }); - - // #docregion auto-detect-tests - it('should display original title', () => { - // Hooray! No `fixture.detectChanges()` needed - expect(h1.textContent).toContain(comp.title); - }); - - it('should still see original title after comp.title change', () => { - const oldTitle = comp.title; - comp.title = 'Test Title'; - // Displayed title is old because Angular didn't hear the change :( - expect(h1.textContent).toContain(oldTitle); - }); - - it('should display updated title after detectChanges', () => { - comp.title = 'Test Title'; - fixture.detectChanges(); // detect changes explicitly - expect(h1.textContent).toContain(comp.title); - }); - // #enddocregion auto-detect-tests -}); diff --git a/aio/content/examples/testing/src/app/banner/banner.component.spec.ts b/aio/content/examples/testing/src/app/banner/banner.component.spec.ts deleted file mode 100755 index 16adc528e6d..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner.component.spec.ts +++ /dev/null @@ -1,52 +0,0 @@ -// #docplaster -// #docregion -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { BannerComponent } from './banner.component'; - -describe('BannerComponent (inline template)', () => { - // #docregion setup - let component: BannerComponent; - let fixture: ComponentFixture; - let h1: HTMLElement; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [BannerComponent], - }); - fixture = TestBed.createComponent(BannerComponent); - component = fixture.componentInstance; // BannerComponent test instance - h1 = fixture.nativeElement.querySelector('h1'); - }); - // #enddocregion setup - - // #docregion test-w-o-detect-changes - it('no title in the DOM after createComponent()', () => { - expect(h1.textContent).toEqual(''); - }); - // #enddocregion test-w-o-detect-changes - - // #docregion expect-h1-default-v1 - it('should display original title', () => { - // #enddocregion expect-h1-default-v1 - fixture.detectChanges(); - // #docregion expect-h1-default-v1 - expect(h1.textContent).toContain(component.title); - }); - // #enddocregion expect-h1-default-v1 - - // #docregion expect-h1-default - it('should display original title after detectChanges()', () => { - fixture.detectChanges(); - expect(h1.textContent).toContain(component.title); - }); - // #enddocregion expect-h1-default - - // #docregion after-change - it('should display a different test title', () => { - component.title = 'Test Title'; - fixture.detectChanges(); - expect(h1.textContent).toContain('Test Title'); - }); - // #enddocregion after-change -}); diff --git a/aio/content/examples/testing/src/app/banner/banner.component.ts b/aio/content/examples/testing/src/app/banner/banner.component.ts deleted file mode 100755 index eac78bbd7a8..00000000000 --- a/aio/content/examples/testing/src/app/banner/banner.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; - -// #docregion component -@Component({ - standalone: true, - selector: 'app-banner', - template: '

    {{title}}

    ', - styles: ['h1 { color: green; font-size: 350%}'], -}) -export class BannerComponent { - title = 'Test Tour of Heroes'; -} -// #enddocregion component diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.css b/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.css deleted file mode 100644 index 0ad175414b3..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.css +++ /dev/null @@ -1,30 +0,0 @@ -.hero { - padding: 20px; - position: relative; - text-align: center; - color: #eee; - max-height: 120px; - width: 100%; - min-width: 120px; - background-color: #607d8b; - border-radius: 2px; -} - -.hero:hover { - background-color: #eee; - cursor: pointer; - color: #607d8b; -} - -@media (max-width: 600px) { - .hero { - font-size: 10px; - max-height: 75px; - } -} - -@media (max-width: 1024px) { - .hero { - min-width: 60px; - } -} diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.spec.ts b/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.spec.ts deleted file mode 100755 index 67b99bf657d..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.spec.ts +++ /dev/null @@ -1,172 +0,0 @@ -// #docplaster -import { DebugElement } from '@angular/core'; -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { first } from 'rxjs/operators'; - -import { addMatchers, click } from '../../testing'; -import { appProviders } from '../app.config'; -import { Hero } from '../model/hero'; - -import { DashboardHeroComponent } from './dashboard-hero.component'; - -beforeEach(addMatchers); - -describe('DashboardHeroComponent class only', () => { - // #docregion class-only - it('raises the selected event when clicked', () => { - const comp = new DashboardHeroComponent(); - const hero: Hero = { id: 42, name: 'Test' }; - comp.hero = hero; - - comp.selected.pipe(first()).subscribe((selectedHero: Hero) => expect(selectedHero).toBe(hero)); - comp.click(); - }); - // #enddocregion class-only -}); - -describe('DashboardHeroComponent when tested directly', () => { - let comp: DashboardHeroComponent; - let expectedHero: Hero; - let fixture: ComponentFixture; - let heroDe: DebugElement; - let heroEl: HTMLElement; - - beforeEach(waitForAsync(() => { - // #docregion setup, config-testbed - TestBed.configureTestingModule({ - providers: appProviders, - imports: [DashboardHeroComponent], - }) - // #enddocregion setup, config-testbed - .compileComponents(); - })); - - beforeEach(() => { - // #docregion setup - fixture = TestBed.createComponent(DashboardHeroComponent); - comp = fixture.componentInstance; - - // find the hero's DebugElement and element - heroDe = fixture.debugElement.query(By.css('.hero')); - heroEl = heroDe.nativeElement; - - // mock the hero supplied by the parent component - expectedHero = { id: 42, name: 'Test Name' }; - - // simulate the parent setting the input property with that hero - comp.hero = expectedHero; - - // trigger initial data binding - fixture.detectChanges(); - // #enddocregion setup - }); - - // #docregion name-test - it('should display hero name in uppercase', () => { - const expectedPipedName = expectedHero.name.toUpperCase(); - expect(heroEl.textContent).toContain(expectedPipedName); - }); - // #enddocregion name-test - - // #docregion click-test - it('should raise selected event when clicked (triggerEventHandler)', () => { - let selectedHero: Hero | undefined; - comp.selected.pipe(first()).subscribe((hero: Hero) => (selectedHero = hero)); - - // #docregion trigger-event-handler - heroDe.triggerEventHandler('click'); - // #enddocregion trigger-event-handler - expect(selectedHero).toBe(expectedHero); - }); - // #enddocregion click-test - - // #docregion click-test-2 - it('should raise selected event when clicked (element.click)', () => { - let selectedHero: Hero | undefined; - comp.selected.pipe(first()).subscribe((hero: Hero) => (selectedHero = hero)); - - heroEl.click(); - expect(selectedHero).toBe(expectedHero); - }); - // #enddocregion click-test-2 - - // #docregion click-test-3 - it('should raise selected event when clicked (click helper with DebugElement)', () => { - let selectedHero: Hero | undefined; - comp.selected.pipe(first()).subscribe((hero: Hero) => (selectedHero = hero)); - - click(heroDe); // click helper with DebugElement - - expect(selectedHero).toBe(expectedHero); - }); - // #enddocregion click-test-3 - - it('should raise selected event when clicked (click helper with native element)', () => { - let selectedHero: Hero | undefined; - comp.selected.pipe(first()).subscribe((hero: Hero) => (selectedHero = hero)); - - click(heroEl); // click helper with native element - - expect(selectedHero).toBe(expectedHero); - }); -}); - -////////////////// - -describe('DashboardHeroComponent when inside a test host', () => { - let testHost: TestHostComponent; - let fixture: ComponentFixture; - let heroEl: HTMLElement; - - beforeEach(waitForAsync(() => { - // #docregion test-host-setup - TestBed.configureTestingModule({ - providers: appProviders, - imports: [DashboardHeroComponent, TestHostComponent], - }) - // #enddocregion test-host-setup - .compileComponents(); - })); - - beforeEach(() => { - // #docregion test-host-setup - // create TestHostComponent instead of DashboardHeroComponent - fixture = TestBed.createComponent(TestHostComponent); - testHost = fixture.componentInstance; - heroEl = fixture.nativeElement.querySelector('.hero'); - fixture.detectChanges(); // trigger initial data binding - // #enddocregion test-host-setup - }); - - // #docregion test-host-tests - it('should display hero name', () => { - const expectedPipedName = testHost.hero.name.toUpperCase(); - expect(heroEl.textContent).toContain(expectedPipedName); - }); - - it('should raise selected event when clicked', () => { - click(heroEl); - // selected hero should be the same data bound hero - expect(testHost.selectedHero).toBe(testHost.hero); - }); - // #enddocregion test-host-tests -}); - -////// Test Host Component ////// -import { Component } from '@angular/core'; - -// #docregion test-host -@Component({ - standalone: true, - imports: [DashboardHeroComponent], - template: ` `, -}) -class TestHostComponent { - hero: Hero = { id: 42, name: 'Test Name' }; - selectedHero: Hero | undefined; - onSelected(hero: Hero) { - this.selectedHero = hero; - } -} -// #enddocregion test-host diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.ts b/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.ts deleted file mode 100755 index 128e8a5e911..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard-hero.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { UpperCasePipe } from '@angular/common'; - -import { Hero } from '../model/hero'; - -// #docregion component -@Component({ - standalone: true, - selector: 'dashboard-hero', - template: ` - - `, - styleUrls: ['./dashboard-hero.component.css'], - imports: [UpperCasePipe], -}) -// #docregion class -export class DashboardHeroComponent { - @Input() hero!: Hero; - @Output() selected = new EventEmitter(); - click() { - this.selected.emit(this.hero); - } -} -// #enddocregion component, class diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard.component.css b/aio/content/examples/testing/src/app/dashboard/dashboard.component.css deleted file mode 100644 index 74a3be5966d..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard.component.css +++ /dev/null @@ -1,36 +0,0 @@ -[class*='col-'] { - float: left; -} -*, -*::after, -*::before { - box-sizing: border-box; -} -h3 { - text-align: center; - margin-bottom: 0; -} -[class*='col-'] { - padding-right: 20px; - padding-bottom: 20px; -} -[class*='col-']:last-of-type { - padding-right: 0; -} -.grid { - margin: 0; -} -.col-1-4 { - width: 25%; -} -.grid-pad { - padding: 10px 0; -} -.grid-pad > [class*='col-']:last-of-type { - padding-right: 20px; -} -@media (max-width: 1024px) { - .grid { - margin: 0; - } -} diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard.component.html b/aio/content/examples/testing/src/app/dashboard/dashboard.component.html deleted file mode 100644 index 88f7bbcbc95..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    {{ title }}

    - -
    - - - - -
    diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard.component.no-testbed.spec.ts b/aio/content/examples/testing/src/app/dashboard/dashboard.component.no-testbed.spec.ts deleted file mode 100644 index a3745c41585..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard.component.no-testbed.spec.ts +++ /dev/null @@ -1,62 +0,0 @@ -import { Router } from '@angular/router'; - -import { DashboardComponent } from './dashboard.component'; -import { Hero } from '../model/hero'; - -import { addMatchers } from '../../testing'; -import { TestHeroService } from '../model/testing/test-hero.service'; - -class FakeRouter { - navigateByUrl(url: string) { - return url; - } -} - -describe('DashboardComponent class only', () => { - let comp: DashboardComponent; - let heroService: TestHeroService; - let router: Router; - - beforeEach(() => { - addMatchers(); - router = new FakeRouter() as any as Router; - heroService = new TestHeroService(); - comp = new DashboardComponent(router, heroService); - }); - - it('should NOT have heroes before calling OnInit', () => { - expect(comp.heroes.length).withContext('should not have heroes before OnInit').toBe(0); - }); - - it('should NOT have heroes immediately after OnInit', () => { - comp.ngOnInit(); // ngOnInit -> getHeroes - expect(comp.heroes.length) - .withContext('should not have heroes until service promise resolves') - .toBe(0); - }); - - it('should HAVE heroes after HeroService gets them', (done: DoneFn) => { - comp.ngOnInit(); // ngOnInit -> getHeroes - heroService.lastResult // the one from getHeroes - .subscribe({ - next: () => { - // throw new Error('deliberate error'); // see it fail gracefully - expect(comp.heroes.length) - .withContext('should have heroes after service promise resolves') - .toBeGreaterThan(0); - done(); - }, - error: done.fail, - }); - }); - - it('should tell ROUTER to navigate by hero id', () => { - const hero: Hero = { id: 42, name: 'Abbracadabra' }; - const spy = spyOn(router, 'navigateByUrl'); - - comp.gotoDetail(hero); - - const navArgs = spy.calls.mostRecent().args[0]; - expect(navArgs).withContext('should nav to HeroDetail for Hero 42').toBe('/heroes/42'); - }); -}); diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard.component.spec.ts b/aio/content/examples/testing/src/app/dashboard/dashboard.component.spec.ts deleted file mode 100755 index c150ac0c5d5..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard.component.spec.ts +++ /dev/null @@ -1,130 +0,0 @@ -import { provideHttpClient } from '@angular/common/http'; -import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing'; -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { TestBed, waitForAsync } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; -import { NavigationEnd, provideRouter, Router } from '@angular/router'; -import { RouterTestingHarness } from '@angular/router/testing'; -import { firstValueFrom } from 'rxjs'; -import { filter } from 'rxjs/operators'; - -import { addMatchers, click } from '../../testing'; -import { HeroService } from '../model/hero.service'; -import { getTestHeroes } from '../model/testing/test-heroes'; - -import { DashboardComponent } from './dashboard.component'; -import { appConfig } from '../app.config'; -import { HeroDetailComponent } from '../hero/hero-detail.component'; - -beforeEach(addMatchers); - -let comp: DashboardComponent; -let harness: RouterTestingHarness; - -//////// Deep //////////////// - -describe('DashboardComponent (deep)', () => { - compileAndCreate(); - - tests(clickForDeep); - - function clickForDeep() { - // get first
    - const heroEl: HTMLElement = harness.routeNativeElement!.querySelector('.hero')!; - click(heroEl); - return firstValueFrom( - TestBed.inject(Router).events.pipe(filter((e) => e instanceof NavigationEnd)), - ); - } -}); - -//////// Shallow //////////////// - -describe('DashboardComponent (shallow)', () => { - beforeEach(() => { - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [DashboardComponent, HeroDetailComponent], - providers: [provideRouter([{ path: 'heroes/:id', component: HeroDetailComponent }])], - schemas: [NO_ERRORS_SCHEMA], - }), - ); - }); - - compileAndCreate(); - - tests(clickForShallow); - - function clickForShallow() { - // get first DebugElement - const heroDe = harness.routeDebugElement!.query(By.css('dashboard-hero')); - heroDe.triggerEventHandler('selected', comp.heroes[0]); - return Promise.resolve(); - } -}); - -/** Add TestBed providers, compile, and create DashboardComponent */ -function compileAndCreate() { - beforeEach(waitForAsync(() => { - // #docregion router-harness - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [DashboardComponent], - providers: [ - provideRouter([{ path: '**', component: DashboardComponent }]), - provideHttpClient(), - provideHttpClientTesting(), - HeroService, - ], - }), - ) - .compileComponents() - .then(async () => { - harness = await RouterTestingHarness.create(); - comp = await harness.navigateByUrl('/', DashboardComponent); - TestBed.inject(HttpTestingController).expectOne('api/heroes').flush(getTestHeroes()); - }); - // #enddocregion router-harness - })); -} - -/** - * The (almost) same tests for both. - * Only change: the way that the first hero is clicked - */ -function tests(heroClick: () => Promise) { - describe('after get dashboard heroes', () => { - let router: Router; - - // Trigger component so it gets heroes and binds to them - beforeEach(waitForAsync(() => { - router = TestBed.inject(Router); - harness.detectChanges(); // runs ngOnInit -> getHeroes - })); - - it('should HAVE heroes', () => { - expect(comp.heroes.length) - .withContext('should have heroes after service promise resolves') - .toBeGreaterThan(0); - }); - - it('should DISPLAY heroes', () => { - // Find and examine the displayed heroes - // Look for them in the DOM by css class - const heroes = harness.routeNativeElement!.querySelectorAll('dashboard-hero'); - expect(heroes.length).withContext('should display 4 heroes').toBe(4); - }); - - // #docregion navigate-test - it('should tell navigate when hero clicked', async () => { - await heroClick(); // trigger click on first inner
    - - // expecting to navigate to id of the component's first hero - const id = comp.heroes[0].id; - expect(TestBed.inject(Router).url) - .withContext('should nav to HeroDetail for first hero') - .toEqual(`/heroes/${id}`); - }); - // #enddocregion navigate-test - }); -} diff --git a/aio/content/examples/testing/src/app/dashboard/dashboard.component.ts b/aio/content/examples/testing/src/app/dashboard/dashboard.component.ts deleted file mode 100755 index 7bdc4dd6e9d..00000000000 --- a/aio/content/examples/testing/src/app/dashboard/dashboard.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { Router } from '@angular/router'; - -import { Hero } from '../model/hero'; -import { HeroService } from '../model/hero.service'; -import { sharedImports } from '../shared/shared'; - -import { DashboardHeroComponent } from './dashboard-hero.component'; - -@Component({ - standalone: true, - selector: 'app-dashboard', - templateUrl: './dashboard.component.html', - styleUrls: ['./dashboard.component.css'], - imports: [DashboardHeroComponent, sharedImports], -}) -export class DashboardComponent implements OnInit { - heroes: Hero[] = []; - - // #docregion ctor - constructor( - private router: Router, - private heroService: HeroService, - ) {} - // #enddocregion ctor - - ngOnInit() { - this.heroService.getHeroes().subscribe((heroes) => (this.heroes = heroes.slice(1, 5))); - } - - // #docregion goto-detail - gotoDetail(hero: Hero) { - const url = `/heroes/${hero.id}`; - this.router.navigateByUrl(url); - } - // #enddocregion goto-detail - - get title() { - const cnt = this.heroes.length; - return cnt === 0 ? 'No Heroes' : cnt === 1 ? 'Top Hero' : `Top ${cnt} Heroes`; - } -} diff --git a/aio/content/examples/testing/src/app/demo/async-helper.spec.ts b/aio/content/examples/testing/src/app/demo/async-helper.spec.ts deleted file mode 100644 index 121bb6cc044..00000000000 --- a/aio/content/examples/testing/src/app/demo/async-helper.spec.ts +++ /dev/null @@ -1,210 +0,0 @@ -import { fakeAsync, tick, waitForAsync } from '@angular/core/testing'; -import { interval, of } from 'rxjs'; -import { delay, take } from 'rxjs/operators'; - -describe('Angular async helper', () => { - describe('async', () => { - let actuallyDone = false; - - beforeEach(() => { - actuallyDone = false; - }); - - afterEach(() => { - expect(actuallyDone).withContext('actuallyDone should be true').toBe(true); - }); - - it('should run normal test', () => { - actuallyDone = true; - }); - - it('should run normal async test', (done: DoneFn) => { - setTimeout(() => { - actuallyDone = true; - done(); - }, 0); - }); - - it('should run async test with task', waitForAsync(() => { - setTimeout(() => { - actuallyDone = true; - }, 0); - })); - - it('should run async test with task', waitForAsync(() => { - const id = setInterval(() => { - actuallyDone = true; - clearInterval(id); - }, 100); - })); - - it('should run async test with successful promise', waitForAsync(() => { - const p = new Promise((resolve) => { - setTimeout(resolve, 10); - }); - p.then(() => { - actuallyDone = true; - }); - })); - - it('should run async test with failed promise', waitForAsync(() => { - const p = new Promise((resolve, reject) => { - setTimeout(reject, 10); - }); - p.catch(() => { - actuallyDone = true; - }); - })); - - // Use done. Can also use async or fakeAsync. - it('should run async test with successful delayed Observable', (done: DoneFn) => { - const source = of(true).pipe(delay(10)); - source.subscribe({ - next: (val) => (actuallyDone = true), - error: (err) => fail(err), - complete: done, - }); - }); - - it('should run async test with successful delayed Observable', waitForAsync(() => { - const source = of(true).pipe(delay(10)); - source.subscribe({ - next: (val) => (actuallyDone = true), - error: (err) => fail(err), - }); - })); - - it('should run async test with successful delayed Observable', fakeAsync(() => { - const source = of(true).pipe(delay(10)); - source.subscribe({ - next: (val) => (actuallyDone = true), - error: (err) => fail(err), - }); - - tick(10); - })); - }); - - describe('fakeAsync', () => { - // #docregion fake-async-test-tick - it('should run timeout callback with delay after call tick with millis', fakeAsync(() => { - let called = false; - setTimeout(() => { - called = true; - }, 100); - tick(100); - expect(called).toBe(true); - })); - // #enddocregion fake-async-test-tick - - // #docregion fake-async-test-tick-new-macro-task-sync - it('should run new macro task callback with delay after call tick with millis', fakeAsync(() => { - function nestedTimer(cb: () => any): void { - setTimeout(() => setTimeout(() => cb())); - } - const callback = jasmine.createSpy('callback'); - nestedTimer(callback); - expect(callback).not.toHaveBeenCalled(); - tick(0); - // the nested timeout will also be triggered - expect(callback).toHaveBeenCalled(); - })); - // #enddocregion fake-async-test-tick-new-macro-task-sync - - // #docregion fake-async-test-tick-new-macro-task-async - it('should not run new macro task callback with delay after call tick with millis', fakeAsync(() => { - function nestedTimer(cb: () => any): void { - setTimeout(() => setTimeout(() => cb())); - } - const callback = jasmine.createSpy('callback'); - nestedTimer(callback); - expect(callback).not.toHaveBeenCalled(); - tick(0, { processNewMacroTasksSynchronously: false }); - // the nested timeout will not be triggered - expect(callback).not.toHaveBeenCalled(); - tick(0); - expect(callback).toHaveBeenCalled(); - })); - // #enddocregion fake-async-test-tick-new-macro-task-async - - // #docregion fake-async-test-date - it('should get Date diff correctly in fakeAsync', fakeAsync(() => { - const start = Date.now(); - tick(100); - const end = Date.now(); - expect(end - start).toBe(100); - })); - // #enddocregion fake-async-test-date - - // #docregion fake-async-test-rxjs - it('should get Date diff correctly in fakeAsync with rxjs scheduler', fakeAsync(() => { - // need to add `import 'zone.js/plugins/zone-patch-rxjs-fake-async' - // to patch rxjs scheduler - let result = ''; - of('hello') - .pipe(delay(1000)) - .subscribe((v) => { - result = v; - }); - expect(result).toBe(''); - tick(1000); - expect(result).toBe('hello'); - - const start = new Date().getTime(); - let dateDiff = 0; - interval(1000) - .pipe(take(2)) - .subscribe(() => (dateDiff = new Date().getTime() - start)); - - tick(1000); - expect(dateDiff).toBe(1000); - tick(1000); - expect(dateDiff).toBe(2000); - })); - // #enddocregion fake-async-test-rxjs - }); - - // #docregion fake-async-test-clock - describe('use jasmine.clock()', () => { - // need to config __zone_symbol__fakeAsyncPatchLock flag - // before loading zone.js/testing - beforeEach(() => { - jasmine.clock().install(); - }); - afterEach(() => { - jasmine.clock().uninstall(); - }); - it('should auto enter fakeAsync', () => { - // is in fakeAsync now, don't need to call fakeAsync(testFn) - let called = false; - setTimeout(() => { - called = true; - }, 100); - jasmine.clock().tick(100); - expect(called).toBe(true); - }); - }); - // #enddocregion fake-async-test-clock - - describe('test jsonp', () => { - function jsonp(url: string, callback: () => void) { - // do a jsonp call which is not zone aware - } - // need to config __zone_symbol__supportWaitUnResolvedChainedPromise flag - // before loading zone.js/testing - it('should wait until promise.then is called', waitForAsync(() => { - let finished = false; - new Promise((res) => { - jsonp('localhost:8080/jsonp', () => { - // success callback and resolve the promise - finished = true; - res(); - }); - }).then(() => { - // async will wait until promise.then is called - // if __zone_symbol__supportWaitUnResolvedChainedPromise is set - expect(finished).toBe(true); - }); - })); - }); -}); diff --git a/aio/content/examples/testing/src/app/demo/demo-external-template.html b/aio/content/examples/testing/src/app/demo/demo-external-template.html deleted file mode 100644 index 4c2b23755fe..00000000000 --- a/aio/content/examples/testing/src/app/demo/demo-external-template.html +++ /dev/null @@ -1 +0,0 @@ -from external template diff --git a/aio/content/examples/testing/src/app/demo/demo-main.ts b/aio/content/examples/testing/src/app/demo/demo-main.ts deleted file mode 100644 index 9243428b7ab..00000000000 --- a/aio/content/examples/testing/src/app/demo/demo-main.ts +++ /dev/null @@ -1,5 +0,0 @@ -// main app entry point -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { DemoModule } from './demo'; - -platformBrowserDynamic().bootstrapModule(DemoModule); diff --git a/aio/content/examples/testing/src/app/demo/demo.spec.ts b/aio/content/examples/testing/src/app/demo/demo.spec.ts deleted file mode 100644 index 35f3b79f90d..00000000000 --- a/aio/content/examples/testing/src/app/demo/demo.spec.ts +++ /dev/null @@ -1,142 +0,0 @@ -// #docplaster -import { LightswitchComponent, MasterService, ValueService, ReversePipe } from './demo'; - -///////// Fakes ///////// -export class FakeValueService extends ValueService { - override value = 'faked service value'; -} -//////////////////////// -describe('demo (no TestBed):', () => { - // #docregion ValueService - // Straight Jasmine testing without Angular's testing support - describe('ValueService', () => { - let service: ValueService; - beforeEach(() => { - service = new ValueService(); - }); - - it('#getValue should return real value', () => { - expect(service.getValue()).toBe('real value'); - }); - - it('#getObservableValue should return value from observable', (done: DoneFn) => { - service.getObservableValue().subscribe((value) => { - expect(value).toBe('observable value'); - done(); - }); - }); - - it('#getPromiseValue should return value from a promise', (done: DoneFn) => { - service.getPromiseValue().then((value) => { - expect(value).toBe('promise value'); - done(); - }); - }); - }); - // #enddocregion ValueService - - // MasterService requires injection of a ValueService - // #docregion MasterService - describe('MasterService without Angular testing support', () => { - let masterService: MasterService; - - it('#getValue should return real value from the real service', () => { - masterService = new MasterService(new ValueService()); - expect(masterService.getValue()).toBe('real value'); - }); - - it('#getValue should return faked value from a fakeService', () => { - masterService = new MasterService(new FakeValueService()); - expect(masterService.getValue()).toBe('faked service value'); - }); - - it('#getValue should return faked value from a fake object', () => { - const fake = { getValue: () => 'fake value' }; - masterService = new MasterService(fake as ValueService); - expect(masterService.getValue()).toBe('fake value'); - }); - - it('#getValue should return stubbed value from a spy', () => { - // create `getValue` spy on an object representing the ValueService - const valueServiceSpy = jasmine.createSpyObj('ValueService', ['getValue']); - - // set the value to return when the `getValue` spy is called. - const stubValue = 'stub value'; - valueServiceSpy.getValue.and.returnValue(stubValue); - - masterService = new MasterService(valueServiceSpy); - - expect(masterService.getValue()).withContext('service returned stub value').toBe(stubValue); - expect(valueServiceSpy.getValue.calls.count()) - .withContext('spy method was called once') - .toBe(1); - expect(valueServiceSpy.getValue.calls.mostRecent().returnValue).toBe(stubValue); - }); - }); - // #enddocregion MasterService - - describe('MasterService (no beforeEach)', () => { - // #docregion no-before-each-test - it('#getValue should return stubbed value from a spy', () => { - // #docregion no-before-each-setup-call - const { masterService, stubValue, valueServiceSpy } = setup(); - // #enddocregion no-before-each-setup-call - expect(masterService.getValue()).withContext('service returned stub value').toBe(stubValue); - expect(valueServiceSpy.getValue.calls.count()) - .withContext('spy method was called once') - .toBe(1); - expect(valueServiceSpy.getValue.calls.mostRecent().returnValue).toBe(stubValue); - }); - // #enddocregion no-before-each-test - - // #docregion no-before-each-setup - function setup() { - const valueServiceSpy = jasmine.createSpyObj('ValueService', ['getValue']); - const stubValue = 'stub value'; - const masterService = new MasterService(valueServiceSpy); - - valueServiceSpy.getValue.and.returnValue(stubValue); - return { masterService, stubValue, valueServiceSpy }; - } - // #enddocregion no-before-each-setup - }); - - describe('ReversePipe', () => { - let pipe: ReversePipe; - - beforeEach(() => { - pipe = new ReversePipe(); - }); - - it('transforms "abc" to "cba"', () => { - expect(pipe.transform('abc')).toBe('cba'); - }); - - it('no change to palindrome: "able was I ere I saw elba"', () => { - const palindrome = 'able was I ere I saw elba'; - expect(pipe.transform(palindrome)).toBe(palindrome); - }); - }); - - // #docregion Lightswitch - describe('LightswitchComp', () => { - it('#clicked() should toggle #isOn', () => { - const comp = new LightswitchComponent(); - expect(comp.isOn).withContext('off at first').toBe(false); - comp.clicked(); - expect(comp.isOn).withContext('on after click').toBe(true); - comp.clicked(); - expect(comp.isOn).withContext('off after second click').toBe(false); - }); - - it('#clicked() should set #message to "is on"', () => { - const comp = new LightswitchComponent(); - expect(comp.message) - .withContext('off at first') - .toMatch(/is off/i); - comp.clicked(); - expect(comp.message).withContext('on after clicked').toMatch(/is on/i); - }); - }); - // #enddocregion Lightswitch -}); diff --git a/aio/content/examples/testing/src/app/demo/demo.testbed.spec.ts b/aio/content/examples/testing/src/app/demo/demo.testbed.spec.ts deleted file mode 100755 index 980468b24ea..00000000000 --- a/aio/content/examples/testing/src/app/demo/demo.testbed.spec.ts +++ /dev/null @@ -1,731 +0,0 @@ -// #docplaster -import { Component, DebugElement, Injectable } from '@angular/core'; -import { - ComponentFixture, - fakeAsync, - inject, - TestBed, - tick, - waitForAsync, -} from '@angular/core/testing'; -import { FormsModule, NgControl, NgModel } from '@angular/forms'; -import { By } from '@angular/platform-browser'; - -import { addMatchers, click } from '../../testing'; - -import { - BankAccountComponent, - BankAccountParentComponent, - Child1Component, - Child2Component, - Child3Component, - ExternalTemplateComponent, - InputComponent, - IoComponent, - IoParentComponent, - LightswitchComponent, - MasterService, - MyIfChildComponent, - MyIfComponent, - MyIfParentComponent, - NeedsContentComponent, - ParentComponent, - ReversePipeComponent, - ShellComponent, - TestProvidersComponent, - TestViewProvidersComponent, - ValueService, -} from './demo'; - -export class NotProvided extends ValueService { - /* example below */ -} -beforeEach(addMatchers); - -describe('demo (with TestBed):', () => { - //////// Service Tests ///////////// - - describe('ValueService', () => { - // #docregion value-service-before-each - let service: ValueService; - - // #docregion value-service-inject-before-each - beforeEach(() => { - TestBed.configureTestingModule({ providers: [ValueService] }); - // #enddocregion value-service-before-each - service = TestBed.inject(ValueService); - // #docregion value-service-before-each - }); - // #enddocregion value-service-before-each, value-service-inject-before-each - - // #docregion value-service-inject-it - it('should use ValueService', () => { - service = TestBed.inject(ValueService); - expect(service.getValue()).toBe('real value'); - }); - // #enddocregion value-service-inject-it - - it('can inject a default value when service is not provided', () => { - // #docregion testbed-get-w-null - expect(TestBed.inject(NotProvided, null)).toBeNull(); - // #enddocregion testbed-get-w-null - }); - - it('test should wait for ValueService.getPromiseValue', waitForAsync(() => { - service.getPromiseValue().then((value) => expect(value).toBe('promise value')); - })); - - it('test should wait for ValueService.getObservableValue', waitForAsync(() => { - service.getObservableValue().subscribe((value) => expect(value).toBe('observable value')); - })); - - // Must use done. See https://github.com/angular/angular/issues/10127 - it('test should wait for ValueService.getObservableDelayValue', (done: DoneFn) => { - service.getObservableDelayValue().subscribe((value) => { - expect(value).toBe('observable delay value'); - done(); - }); - }); - - it('should allow the use of fakeAsync', fakeAsync(() => { - let value: any; - service.getPromiseValue().then((val: any) => (value = val)); - tick(); // Trigger JS engine cycle until all promises resolve. - expect(value).toBe('promise value'); - })); - }); - - describe('MasterService', () => { - // #docregion master-service-before-each - let masterService: MasterService; - let valueServiceSpy: jasmine.SpyObj; - - beforeEach(() => { - const spy = jasmine.createSpyObj('ValueService', ['getValue']); - - TestBed.configureTestingModule({ - // Provide both the service-to-test and its (spy) dependency - providers: [MasterService, { provide: ValueService, useValue: spy }], - }); - // Inject both the service-to-test and its (spy) dependency - masterService = TestBed.inject(MasterService); - valueServiceSpy = TestBed.inject(ValueService) as jasmine.SpyObj; - }); - // #enddocregion master-service-before-each - - // #docregion master-service-it - it('#getValue should return stubbed value from a spy', () => { - const stubValue = 'stub value'; - valueServiceSpy.getValue.and.returnValue(stubValue); - - expect(masterService.getValue()).withContext('service returned stub value').toBe(stubValue); - expect(valueServiceSpy.getValue.calls.count()) - .withContext('spy method was called once') - .toBe(1); - expect(valueServiceSpy.getValue.calls.mostRecent().returnValue).toBe(stubValue); - }); - // #enddocregion master-service-it - }); - - describe('use inject within `it`', () => { - beforeEach(() => { - TestBed.configureTestingModule({ providers: [ValueService] }); - }); - - it('should use modified providers', inject([ValueService], (service: ValueService) => { - service.setValue('value modified in beforeEach'); - expect(service.getValue()).toBe('value modified in beforeEach'); - })); - }); - - describe('using waitForAsync(inject) within beforeEach', () => { - let serviceValue: string; - - beforeEach(() => { - TestBed.configureTestingModule({ providers: [ValueService] }); - }); - - beforeEach(waitForAsync( - inject([ValueService], (service: ValueService) => { - service.getPromiseValue().then((value) => (serviceValue = value)); - }), - )); - - it('should use asynchronously modified value ... in synchronous test', () => { - expect(serviceValue).toBe('promise value'); - }); - }); - - /////////// Component Tests ////////////////// - - describe('TestBed component tests', () => { - // beforeEach(waitForAsync(() => { - // TestBed.configureTestingModule() - // // Compile everything in DemoModule - // .compileComponents(); - // })); - - it('should create a component with inline template', () => { - const fixture = TestBed.createComponent(Child1Component); - fixture.detectChanges(); - - expect(fixture).toHaveText('Child'); - }); - - it('should create a component with external template', () => { - const fixture = TestBed.createComponent(ExternalTemplateComponent); - fixture.detectChanges(); - - expect(fixture).toHaveText('from external template'); - }); - - it('should allow changing members of the component', () => { - const fixture = TestBed.createComponent(MyIfComponent); - - fixture.detectChanges(); - expect(fixture).toHaveText('MyIf()'); - - fixture.componentInstance.showMore = true; - fixture.detectChanges(); - expect(fixture).toHaveText('MyIf(More)'); - }); - - it('should create a nested component bound to inputs/outputs', () => { - const fixture = TestBed.createComponent(IoParentComponent); - - fixture.detectChanges(); - const heroes = fixture.debugElement.queryAll(By.css('.hero')); - expect(heroes.length).withContext('has heroes').toBeGreaterThan(0); - - const comp = fixture.componentInstance; - const hero = comp.heroes[0]; - - click(heroes[0]); - fixture.detectChanges(); - - const selected = fixture.debugElement.query(By.css('p')); - expect(selected).toHaveText(hero.name); - }); - - it('can access the instance variable of an `*ngFor` row component', () => { - const fixture = TestBed.createComponent(IoParentComponent); - const comp = fixture.componentInstance; - const heroName = comp.heroes[0].name; // first hero's name - - fixture.detectChanges(); - const ngForRow = fixture.debugElement.query(By.directive(IoComponent)); // first hero ngForRow - - const hero = ngForRow.context.hero; // the hero object passed into the row - expect(hero.name).withContext('ngRow.context.hero').toBe(heroName); - - const rowComp = ngForRow.componentInstance; - // jasmine.any is an "instance-of-type" test. - expect(rowComp).withContext('component is IoComp').toEqual(jasmine.any(IoComponent)); - expect(rowComp.hero.name).withContext('component.hero').toBe(heroName); - }); - - it('should support clicking a button', () => { - const fixture = TestBed.createComponent(LightswitchComponent); - const btn = fixture.debugElement.query(By.css('button')); - const span = fixture.debugElement.query(By.css('span')).nativeElement; - - fixture.detectChanges(); - expect(span.textContent) - .withContext('before click') - .toMatch(/is off/i); - - click(btn); - fixture.detectChanges(); - expect(span.textContent).withContext('after click').toMatch(/is on/i); - }); - - // ngModel is async so we must wait for it with promise-based `whenStable` - it('should support entering text in input box (ngModel)', waitForAsync(() => { - const expectedOrigName = 'John'; - const expectedNewName = 'Sally'; - - const fixture = TestBed.createComponent(InputComponent); - fixture.detectChanges(); - - const comp = fixture.componentInstance; - const input = fixture.debugElement.query(By.css('input')).nativeElement as HTMLInputElement; - - expect(comp.name) - .withContext(`At start name should be ${expectedOrigName} `) - .toBe(expectedOrigName); - - // wait until ngModel binds comp.name to input box - fixture - .whenStable() - .then(() => { - expect(input.value) - .withContext( - `After ngModel updates input box, input.value should be ${expectedOrigName} `, - ) - .toBe(expectedOrigName); - - // simulate user entering new name in input - input.value = expectedNewName; - - // that change doesn't flow to the component immediately - expect(comp.name) - .withContext( - `comp.name should still be ${expectedOrigName} after value change, before binding happens`, - ) - .toBe(expectedOrigName); - - // Dispatch a DOM event so that Angular learns of input value change. - // then wait while ngModel pushes input.box value to comp.name - input.dispatchEvent(new Event('input')); - return fixture.whenStable(); - }) - .then(() => { - expect(comp.name) - .withContext(`After ngModel updates the model, comp.name should be ${expectedNewName} `) - .toBe(expectedNewName); - }); - })); - - // fakeAsync version of ngModel input test enables sync test style - // synchronous `tick` replaces asynchronous promise-base `whenStable` - it('should support entering text in input box (ngModel) - fakeAsync', fakeAsync(() => { - const expectedOrigName = 'John'; - const expectedNewName = 'Sally'; - - const fixture = TestBed.createComponent(InputComponent); - fixture.detectChanges(); - - const comp = fixture.componentInstance; - const input = fixture.debugElement.query(By.css('input')).nativeElement as HTMLInputElement; - - expect(comp.name) - .withContext(`At start name should be ${expectedOrigName} `) - .toBe(expectedOrigName); - - // wait until ngModel binds comp.name to input box - tick(); - expect(input.value) - .withContext(`After ngModel updates input box, input.value should be ${expectedOrigName} `) - .toBe(expectedOrigName); - - // simulate user entering new name in input - input.value = expectedNewName; - - // that change doesn't flow to the component immediately - expect(comp.name) - .withContext( - `comp.name should still be ${expectedOrigName} after value change, before binding happens`, - ) - .toBe(expectedOrigName); - - // Dispatch a DOM event so that Angular learns of input value change. - // then wait a tick while ngModel pushes input.box value to comp.name - input.dispatchEvent(new Event('input')); - tick(); - expect(comp.name) - .withContext(`After ngModel updates the model, comp.name should be ${expectedNewName} `) - .toBe(expectedNewName); - })); - - it('ReversePipeComp should reverse the input text', fakeAsync(() => { - const inputText = 'the quick brown fox.'; - const expectedText = '.xof nworb kciuq eht'; - - const fixture = TestBed.createComponent(ReversePipeComponent); - fixture.detectChanges(); - - const comp = fixture.componentInstance; - const input = fixture.debugElement.query(By.css('input')).nativeElement as HTMLInputElement; - const span = fixture.debugElement.query(By.css('span')).nativeElement as HTMLElement; - - // simulate user entering new name in input - input.value = inputText; - - // Dispatch a DOM event so that Angular learns of input value change. - // then wait a tick while ngModel pushes input.box value to comp.text - // and Angular updates the output span - input.dispatchEvent(new Event('input')); - tick(); - fixture.detectChanges(); - expect(span.textContent).withContext('output span').toBe(expectedText); - expect(comp.text).withContext('component.text').toBe(inputText); - })); - - // Use this technique to find attached directives of any kind - it('can examine attached directives and listeners', () => { - const fixture = TestBed.createComponent(InputComponent); - fixture.detectChanges(); - - const inputEl = fixture.debugElement.query(By.css('input')); - - expect(inputEl.providerTokens).withContext('NgModel directive').toContain(NgModel); - - const ngControl = inputEl.injector.get(NgControl); - expect(ngControl).withContext('NgControl directive').toEqual(jasmine.any(NgControl)); - - expect(inputEl.listeners.length).withContext('several listeners attached').toBeGreaterThan(2); - }); - - it('BankAccountComponent should set attributes, styles, classes, and properties', () => { - const fixture = TestBed.createComponent(BankAccountParentComponent); - fixture.detectChanges(); - const comp = fixture.componentInstance; - - // the only child is debugElement of the BankAccount component - const el = fixture.debugElement.children[0]; - const childComp = el.componentInstance as BankAccountComponent; - expect(childComp).toEqual(jasmine.any(BankAccountComponent)); - - expect(el.context).withContext('context is the child component').toBe(childComp); - - expect(el.attributes['account']).withContext('account attribute').toBe(childComp.id); - expect(el.attributes['bank']).withContext('bank attribute').toBe(childComp.bank); - - expect(el.classes['closed']).withContext('closed class').toBe(true); - expect(el.classes['open']).withContext('open class').toBeFalsy(); - - expect(el.styles['color']).withContext('color style').toBe(comp.color); - expect(el.styles['width']) - .withContext('width style') - .toBe(comp.width + 'px'); - - // Removed on 12/02/2016 when ceased public discussion of the `Renderer`. Revive in future? - // expect(el.properties['customProperty']).toBe(true, 'customProperty'); - }); - }); - - describe('TestBed component overrides:', () => { - it("should override ChildComp's template", () => { - const fixture = TestBed.configureTestingModule({ - imports: [Child1Component], - }) - .overrideComponent(Child1Component, { - set: { template: 'Fake' }, - }) - .createComponent(Child1Component); - - fixture.detectChanges(); - expect(fixture).toHaveText('Fake'); - }); - - it("should override TestProvidersComp's ValueService provider", () => { - const fixture = TestBed.configureTestingModule({ - imports: [TestProvidersComponent], - }) - .overrideComponent(TestProvidersComponent, { - remove: { providers: [ValueService] }, - add: { providers: [{ provide: ValueService, useClass: FakeValueService }] }, - - // Or replace them all (this component has only one provider) - // set: { providers: [{ provide: ValueService, useClass: FakeValueService }] }, - }) - .createComponent(TestProvidersComponent); - - fixture.detectChanges(); - expect(fixture).toHaveText('injected value: faked value', 'text'); - - // Explore the providerTokens - const tokens = fixture.debugElement.providerTokens; - expect(tokens).withContext('component ctor').toContain(fixture.componentInstance.constructor); - expect(tokens).withContext('TestProvidersComp').toContain(TestProvidersComponent); - expect(tokens).withContext('ValueService').toContain(ValueService); - }); - - it("should override TestViewProvidersComp's ValueService viewProvider", () => { - const fixture = TestBed.configureTestingModule({ - imports: [TestViewProvidersComponent], - }) - .overrideComponent(TestViewProvidersComponent, { - // remove: { viewProviders: [ValueService]}, - // add: { viewProviders: [{ provide: ValueService, useClass: FakeValueService }] - // }, - - // Or replace them all (this component has only one viewProvider) - set: { viewProviders: [{ provide: ValueService, useClass: FakeValueService }] }, - }) - .createComponent(TestViewProvidersComponent); - - fixture.detectChanges(); - expect(fixture).toHaveText('injected value: faked value'); - }); - - it("injected provider should not be same as component's provider", () => { - // TestComponent is parent of TestProvidersComponent - @Component({ - standalone: true, - template: '', - imports: [TestProvidersComponent], - }) - class TestComponent {} - - // 3 levels of ValueService provider: module, TestComponent, TestProvidersComponent - const fixture = TestBed.configureTestingModule({ - imports: [TestComponent, TestProvidersComponent], - providers: [ValueService], - }) - .overrideComponent(TestComponent, { - set: { providers: [{ provide: ValueService, useValue: {} }] }, - }) - .overrideComponent(TestProvidersComponent, { - set: { providers: [{ provide: ValueService, useClass: FakeValueService }] }, - }) - .createComponent(TestComponent); - - let testBedProvider!: ValueService; - - // `inject` uses TestBed's injector - inject([ValueService], (s: ValueService) => (testBedProvider = s))(); - const tcProvider = fixture.debugElement.injector.get(ValueService) as ValueService; - const tpcProvider = fixture.debugElement.children[0].injector.get( - ValueService, - ) as FakeValueService; - - expect(testBedProvider).withContext('testBed/tc not same providers').not.toBe(tcProvider); - expect(testBedProvider).withContext('testBed/tpc not same providers').not.toBe(tpcProvider); - - expect(testBedProvider instanceof ValueService) - .withContext('testBedProvider is ValueService') - .toBe(true); - expect(tcProvider) - .withContext('tcProvider is {}') - .toEqual({} as ValueService); - expect(tpcProvider instanceof FakeValueService) - .withContext('tpcProvider is FakeValueService') - .toBe(true); - }); - - it('can access template local variables as references', () => { - const fixture = TestBed.configureTestingModule({ - imports: [ - ShellComponent, - NeedsContentComponent, - Child1Component, - Child2Component, - Child3Component, - ], - }) - .overrideComponent(ShellComponent, { - set: { - selector: 'test-shell', - imports: [NeedsContentComponent, Child1Component, Child2Component, Child3Component], - template: ` - - - - - -
    !
    -
    - `, - }, - }) - .createComponent(ShellComponent); - - fixture.detectChanges(); - - // NeedsContentComp is the child of ShellComp - const el = fixture.debugElement.children[0]; - const comp = el.componentInstance; - - expect(comp.children.toArray().length) - .withContext('three different child components and an ElementRef with #content') - .toBe(4); - - expect(el.references['nc']).withContext('#nc reference to component').toBe(comp); - - // #docregion custom-predicate - // Filter for DebugElements with a #content reference - const contentRefs = el.queryAll((de) => de.references['content']); - // #enddocregion custom-predicate - expect(contentRefs.length).withContext('elements w/ a #content reference').toBe(4); - }); - }); - - describe('nested (one-deep) component override', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ParentComponent, FakeChildComponent], - }).overrideComponent(ParentComponent, { - set: { imports: [FakeChildComponent] }, - }); - }); - - it('ParentComp should use Fake Child component', () => { - const fixture = TestBed.createComponent(ParentComponent); - fixture.detectChanges(); - expect(fixture).toHaveText('Parent(Fake Child)'); - }); - }); - - describe('nested (two-deep) component override', () => { - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ParentComponent, FakeChildWithGrandchildComponent, FakeGrandchildComponent], - }).overrideComponent(ParentComponent, { - set: { imports: [FakeChildWithGrandchildComponent, FakeGrandchildComponent] }, - }); - }); - - it('should use Fake Grandchild component', () => { - const fixture = TestBed.createComponent(ParentComponent); - fixture.detectChanges(); - expect(fixture).toHaveText('Parent(Fake Child(Fake Grandchild))'); - }); - }); - - describe('lifecycle hooks w/ MyIfParentComp', () => { - let fixture: ComponentFixture; - let parent: MyIfParentComponent; - let child: MyIfChildComponent; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [FormsModule, MyIfChildComponent, MyIfParentComponent], - }); - - fixture = TestBed.createComponent(MyIfParentComponent); - parent = fixture.componentInstance; - }); - - it('should instantiate parent component', () => { - expect(parent).withContext('parent component should exist').not.toBeNull(); - }); - - it('parent component OnInit should NOT be called before first detectChanges()', () => { - expect(parent.ngOnInitCalled).toBe(false); - }); - - it('parent component OnInit should be called after first detectChanges()', () => { - fixture.detectChanges(); - expect(parent.ngOnInitCalled).toBe(true); - }); - - it('child component should exist after OnInit', () => { - fixture.detectChanges(); - getChild(); - expect(child instanceof MyIfChildComponent) - .withContext('should create child') - .toBe(true); - }); - - it("should have called child component's OnInit ", () => { - fixture.detectChanges(); - getChild(); - expect(child.ngOnInitCalled).toBe(true); - }); - - it('child component called OnChanges once', () => { - fixture.detectChanges(); - getChild(); - expect(child.ngOnChangesCounter).toBe(1); - }); - - it('changed parent value flows to child', () => { - fixture.detectChanges(); - getChild(); - - parent.parentValue = 'foo'; - fixture.detectChanges(); - - expect(child.ngOnChangesCounter) - .withContext('expected 2 changes: initial value and changed value') - .toBe(2); - expect(child.childValue).withContext('childValue should eq changed parent value').toBe('foo'); - }); - - // must be async test to see child flow to parent - it('changed child value flows to parent', waitForAsync(() => { - fixture.detectChanges(); - getChild(); - - child.childValue = 'bar'; - - return new Promise((resolve) => { - // Wait one JS engine turn! - setTimeout(() => resolve(), 0); - }).then(() => { - fixture.detectChanges(); - - expect(child.ngOnChangesCounter) - .withContext('expected 2 changes: initial value and changed value') - .toBe(2); - expect(parent.parentValue) - .withContext('parentValue should eq changed parent value') - .toBe('bar'); - }); - })); - - it('clicking "Close Child" triggers child OnDestroy', () => { - fixture.detectChanges(); - getChild(); - - const btn = fixture.debugElement.query(By.css('button')); - click(btn); - - fixture.detectChanges(); - expect(child.ngOnDestroyCalled).toBe(true); - }); - - ////// helpers /// - /** - * Get the MyIfChildComp from parent; fail w/ good message if cannot. - */ - function getChild() { - let childDe: DebugElement; // DebugElement that should hold the MyIfChildComp - - // The Hard Way: requires detailed knowledge of the parent template - try { - childDe = fixture.debugElement.children[4].children[0]; - } catch (err) { - /* we'll report the error */ - } - - // DebugElement.queryAll: if we wanted all of many instances: - childDe = fixture.debugElement.queryAll( - (de) => de.componentInstance instanceof MyIfChildComponent, - )[0]; - - // WE'LL USE THIS APPROACH ! - // DebugElement.query: find first instance (if any) - childDe = fixture.debugElement.query( - (de) => de.componentInstance instanceof MyIfChildComponent, - ); - - if (childDe && childDe.componentInstance) { - child = childDe.componentInstance; - } else { - fail('Unable to find MyIfChildComp within MyIfParentComp'); - } - - return child; - } - }); -}); -////////// Fakes /////////// - -@Component({ - standalone: true, - selector: 'child-1', - template: 'Fake Child', -}) -class FakeChildComponent {} - -@Component({ - standalone: true, - selector: 'grandchild-1', - template: 'Fake Grandchild', -}) -class FakeGrandchildComponent {} - -@Component({ - standalone: true, - selector: 'child-1', - imports: [FakeGrandchildComponent], - template: 'Fake Child()', -}) -class FakeChildWithGrandchildComponent {} - -@Injectable() -class FakeValueService extends ValueService { - override value = 'faked value'; -} diff --git a/aio/content/examples/testing/src/app/demo/demo.ts b/aio/content/examples/testing/src/app/demo/demo.ts deleted file mode 100755 index 480aee12418..00000000000 --- a/aio/content/examples/testing/src/app/demo/demo.ts +++ /dev/null @@ -1,477 +0,0 @@ -/* eslint-disable @angular-eslint/directive-selector, guard-for-in, @angular-eslint/no-input-rename - */ -import { - Component, - ContentChildren, - Directive, - EventEmitter, - HostBinding, - HostListener, - Injectable, - Input, - OnChanges, - OnDestroy, - OnInit, - Optional, - Output, - Pipe, - PipeTransform, - SimpleChanges, -} from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { of } from 'rxjs'; -import { delay } from 'rxjs/operators'; - -import { sharedImports } from '../shared/shared'; - -////////// The App: Services and Components for the tests. ////////////// - -export interface Hero { - name: string; -} - -////////// Services /////////////// -@Injectable() -export class ValueService { - value = 'real value'; - - getValue() { - return this.value; - } - setValue(value: string) { - this.value = value; - } - - getObservableValue() { - return of('observable value'); - } - - getPromiseValue() { - return Promise.resolve('promise value'); - } - - getObservableDelayValue() { - return of('observable delay value').pipe(delay(10)); - } -} - -// #docregion MasterService -@Injectable() -export class MasterService { - constructor(private valueService: ValueService) {} - getValue() { - return this.valueService.getValue(); - } -} -// #enddocregion MasterService - -/////////// Pipe //////////////// -/* - * Reverse the input string. - */ -@Pipe({ name: 'reverse', standalone: true }) -export class ReversePipe implements PipeTransform { - transform(s: string) { - let r = ''; - for (let i = s.length; i; ) { - r += s[--i]; - } - return r; - } -} - -//////////// Components ///////////// -@Component({ - standalone: true, - selector: 'bank-account', - template: ` Bank Name: {{ bank }} Account Id: {{ id }} `, -}) -export class BankAccountComponent { - @Input() bank = ''; - @Input('account') id = ''; - - // Removed on 12/02/2016 when ceased public discussion of the `Renderer`. Revive in future? - // constructor(private renderer: Renderer, private el: ElementRef ) { - // renderer.setElementProperty(el.nativeElement, 'customProperty', true); - // } -} - -/** A component with attributes, styles, classes, and property setting */ -@Component({ - standalone: true, - selector: 'bank-account-parent', - template: ` - - - `, - imports: [BankAccountComponent], -}) -export class BankAccountParentComponent { - width = 200; - color = 'red'; - isClosed = true; -} - -// #docregion LightswitchComp -@Component({ - standalone: true, - selector: 'lightswitch-comp', - template: ` - {{ message }}`, -}) -export class LightswitchComponent { - isOn = false; - clicked() { - this.isOn = !this.isOn; - } - get message() { - return `The light is ${this.isOn ? 'On' : 'Off'}`; - } -} -// #enddocregion LightswitchComp - -@Component({ - standalone: true, - selector: 'child-1', - template: 'Child-1({{text}})', -}) -export class Child1Component { - @Input() text = 'Original'; -} - -@Component({ - standalone: true, - selector: 'child-2', - template: '
    Child-2({{text}})
    ', -}) -export class Child2Component { - @Input() text = ''; -} - -@Component({ - standalone: true, - selector: 'child-3', - template: '
    Child-3({{text}})
    ', -}) -export class Child3Component { - @Input() text = ''; -} - -@Component({ - standalone: true, - selector: 'input-comp', - template: '', - imports: [FormsModule], -}) -export class InputComponent { - name = 'John'; -} - -/* Prefer this metadata syntax */ -// @Directive({ -// selector: 'input[value]', -// host: { -// '[value]': 'value', -// '(input)': 'valueChange.emit($event.target.value)' -// }, -// inputs: ['value'], -// outputs: ['valueChange'] -// }) -// export class InputValueBinderDirective { -// value: any; -// valueChange: EventEmitter = new EventEmitter(); -// } - -// As the styleguide recommends -@Directive({ standalone: true, selector: 'input[value]' }) -export class InputValueBinderDirective { - @HostBinding() @Input() value: any; - - @Output() valueChange: EventEmitter = new EventEmitter(); - - @HostListener('input', ['$event.target.value']) - onInput(value: any) { - this.valueChange.emit(value); - } -} - -@Component({ - standalone: true, - selector: 'input-value-comp', - template: ` Name: {{ name }} `, -}) -export class InputValueBinderComponent { - name = 'Sally'; // initial value -} - -@Component({ - standalone: true, - selector: 'parent-comp', - imports: [Child1Component], - template: 'Parent()', -}) -export class ParentComponent {} - -@Component({ - standalone: true, - selector: 'io-comp', - template: '', -}) -export class IoComponent { - @Input() hero!: Hero; - @Output() selected = new EventEmitter(); - click() { - this.selected.emit(this.hero); - } -} - -@Component({ - standalone: true, - selector: 'io-parent-comp', - template: ` -

    Click to select a hero

    -

    The selected hero is {{ selectedHero.name }}

    - - `, - imports: [IoComponent, sharedImports], -}) -export class IoParentComponent { - heroes: Hero[] = [{ name: 'Bob' }, { name: 'Carol' }, { name: 'Ted' }, { name: 'Alice' }]; - selectedHero!: Hero; - onSelect(hero: Hero) { - this.selectedHero = hero; - } -} - -@Component({ - standalone: true, - selector: 'my-if-comp', - template: 'MyIf(More)', - imports: [sharedImports], -}) -export class MyIfComponent { - showMore = false; -} - -@Component({ - standalone: true, - selector: 'my-service-comp', - template: 'injected value: {{valueService.value}}', - providers: [ValueService], -}) -export class TestProvidersComponent { - constructor(public valueService: ValueService) {} -} - -@Component({ - standalone: true, - selector: 'my-service-comp', - template: 'injected value: {{valueService.value}}', - viewProviders: [ValueService], -}) -export class TestViewProvidersComponent { - constructor(public valueService: ValueService) {} -} - -@Component({ - standalone: true, - selector: 'external-template-comp', - templateUrl: './demo-external-template.html', -}) -export class ExternalTemplateComponent implements OnInit { - serviceValue = ''; - - constructor(@Optional() private service?: ValueService) {} - - ngOnInit() { - if (this.service) { - this.serviceValue = this.service.getValue(); - } - } -} - -@Component({ - standalone: true, - selector: 'comp-w-ext-comp', - template: ` -

    comp-w-ext-comp

    - - `, -}) -export class InnerCompWithExternalTemplateComponent {} - -@Component({ standalone: true, selector: 'needs-content', template: '' }) -export class NeedsContentComponent { - // children with #content local variable - @ContentChildren('content') children: any; -} - -///////// MyIfChildComp //////// -@Component({ - standalone: true, - selector: 'my-if-child-1', - template: `

    MyIfChildComp

    -
    - -
    -

    Change log:

    -
    {{ i + 1 }} - {{ log }}
    `, - imports: [FormsModule, sharedImports], -}) -export class MyIfChildComponent implements OnInit, OnChanges, OnDestroy { - @Input() value = ''; - @Output() valueChange = new EventEmitter(); - - get childValue() { - return this.value; - } - set childValue(v: string) { - if (this.value === v) { - return; - } - this.value = v; - this.valueChange.emit(v); - } - - changeLog: string[] = []; - - ngOnInitCalled = false; - ngOnChangesCounter = 0; - ngOnDestroyCalled = false; - - ngOnInit() { - this.ngOnInitCalled = true; - this.changeLog.push('ngOnInit called'); - } - - ngOnDestroy() { - this.ngOnDestroyCalled = true; - this.changeLog.push('ngOnDestroy called'); - } - - ngOnChanges(changes: SimpleChanges) { - for (const propName in changes) { - this.ngOnChangesCounter += 1; - const prop = changes[propName]; - const cur = JSON.stringify(prop.currentValue); - const prev = JSON.stringify(prop.previousValue); - this.changeLog.push(`${propName}: currentValue = ${cur}, previousValue = ${prev}`); - } - } -} - -///////// MyIfParentComp //////// - -@Component({ - standalone: true, - selector: 'my-if-parent-comp', - template: ` -

    MyIfParentComp

    - -
    -
    - -
    - `, - imports: [FormsModule, MyIfChildComponent, sharedImports], -}) -export class MyIfParentComponent implements OnInit { - ngOnInitCalled = false; - parentValue = 'Hello, World'; - showChild = false; - toggleLabel = 'Unknown'; - - ngOnInit() { - this.ngOnInitCalled = true; - this.clicked(); - } - - clicked() { - this.showChild = !this.showChild; - this.toggleLabel = this.showChild ? 'Close' : 'Show'; - } -} - -@Component({ - standalone: true, - selector: 'reverse-pipe-comp', - template: ` - - {{ text | reverse }} - `, - imports: [ReversePipe, FormsModule], -}) -export class ReversePipeComponent { - text = 'my dog has fleas.'; -} - -@Component({ - standalone: true, - imports: [NeedsContentComponent], - template: '
    Replace Me
    ', -}) -export class ShellComponent {} - -@Component({ - standalone: true, - selector: 'demo-comp', - template: ` -

    Specs Demo

    - -
    -

    Input/Output Component

    - -
    -

    External Template Component

    - -
    -

    Component With External Template Component

    - -
    -

    Reverse Pipe

    - -
    -

    InputValueBinder Directive

    - -
    -

    Button Component

    - -
    -

    Needs Content

    - - - - - -
    !
    -
    - `, - imports: [ - Child1Component, - Child2Component, - Child3Component, - ExternalTemplateComponent, - InnerCompWithExternalTemplateComponent, - InputValueBinderComponent, - IoParentComponent, - LightswitchComponent, - NeedsContentComponent, - ReversePipeComponent, - ], -}) -export class DemoComponent {} -//////// Aggregations //////////// - -export const demoProviders = [MasterService, ValueService]; diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.component.css b/aio/content/examples/testing/src/app/hero/hero-detail.component.css deleted file mode 100644 index 29c084dbe5c..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-detail.component.css +++ /dev/null @@ -1,29 +0,0 @@ -label { - display: inline-block; - width: 3em; - margin: 0.5em 0; - color: #607d8b; - font-weight: bold; -} -input { - height: 2em; - font-size: 1em; - padding-left: 0.4em; -} -button { - margin-top: 20px; - font-family: Arial, sans-serif; - background-color: #eee; - border: none; - padding: 5px 10px; - border-radius: 4px; - cursor: pointer; -} -button:hover { - background-color: #cfd8dc; -} -button:disabled { - background-color: #eee; - color: #ccc; - cursor: auto; -} diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.component.html b/aio/content/examples/testing/src/app/hero/hero-detail.component.html deleted file mode 100644 index ea5d09733fb..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-detail.component.html +++ /dev/null @@ -1,13 +0,0 @@ - -
    -

    - {{ hero.name | titlecase }} Details -

    -
    id: {{ hero.id }}
    -
    - - -
    - - -
    diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts b/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts deleted file mode 100755 index fb1410660ad..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-detail.component.spec.ts +++ /dev/null @@ -1,309 +0,0 @@ -// #docplaster -import { HttpClient, HttpHandler, provideHttpClient } from '@angular/common/http'; -import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing'; -import { fakeAsync, TestBed, tick } from '@angular/core/testing'; -import { provideRouter, Router } from '@angular/router'; -import { RouterTestingHarness } from '@angular/router/testing'; - -import { asyncData, click } from '../../testing'; -import { Hero } from '../model/hero'; -import { sharedImports } from '../shared/shared'; - -import { HeroDetailComponent } from './hero-detail.component'; -import { HeroDetailService } from './hero-detail.service'; -import { HeroListComponent } from './hero-list.component'; - -////// Testing Vars ////// -let component: HeroDetailComponent; -let harness: RouterTestingHarness; -let page: Page; - -////// Tests ////// -describe('HeroDetailComponent', () => { - describe('with HeroModule setup', heroModuleSetup); - describe('when override its provided HeroDetailService', overrideSetup); - describe('with FormsModule setup', formsModuleSetup); - describe('with SharedModule setup', sharedModuleSetup); -}); - -/////////////////// - -const testHero = getTestHeroes()[0]; -function overrideSetup() { - // #docregion hds-spy - class HeroDetailServiceSpy { - testHero: Hero = { ...testHero }; - - /* emit cloned test hero */ - getHero = jasmine - .createSpy('getHero') - .and.callFake(() => asyncData(Object.assign({}, this.testHero))); - - /* emit clone of test hero, with changes merged in */ - saveHero = jasmine - .createSpy('saveHero') - .and.callFake((hero: Hero) => asyncData(Object.assign(this.testHero, hero))); - } - - // #enddocregion hds-spy - - // #docregion setup-override - beforeEach(async () => { - await TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [HeroDetailComponent, HeroListComponent], - providers: [ - provideRouter([ - { path: 'heroes', component: HeroListComponent }, - { path: 'heroes/:id', component: HeroDetailComponent }, - ]), - HttpClient, - HttpHandler, - // HeroDetailService at this level is IRRELEVANT! - { provide: HeroDetailService, useValue: {} }, - ], - }), - ) - // #docregion override-component-method - .overrideComponent(HeroDetailComponent, { - set: { providers: [{ provide: HeroDetailService, useClass: HeroDetailServiceSpy }] }, - }) - // #enddocregion override-component-method - .compileComponents(); - }); - // #enddocregion setup-override - - // #docregion override-tests - let hdsSpy: HeroDetailServiceSpy; - - beforeEach(async () => { - harness = await RouterTestingHarness.create(); - component = await harness.navigateByUrl(`/heroes/${testHero.id}`, HeroDetailComponent); - page = new Page(); - // get the component's injected HeroDetailServiceSpy - hdsSpy = harness.routeDebugElement!.injector.get(HeroDetailService) as any; - - harness.detectChanges(); - }); - - it('should have called `getHero`', () => { - expect(hdsSpy.getHero.calls.count()) - .withContext('getHero called once') - .toBe(1, 'getHero called once'); - }); - - it("should display stub hero's name", () => { - expect(page.nameDisplay.textContent).toBe(hdsSpy.testHero.name); - }); - - it('should save stub hero change', fakeAsync(() => { - const origName = hdsSpy.testHero.name; - const newName = 'New Name'; - - page.nameInput.value = newName; - - page.nameInput.dispatchEvent(new Event('input')); // tell Angular - - expect(component.hero.name).withContext('component hero has new name').toBe(newName); - expect(hdsSpy.testHero.name).withContext('service hero unchanged before save').toBe(origName); - - click(page.saveBtn); - expect(hdsSpy.saveHero.calls.count()).withContext('saveHero called once').toBe(1); - - tick(); // wait for async save to complete - expect(hdsSpy.testHero.name).withContext('service hero has new name after save').toBe(newName); - expect(TestBed.inject(Router).url).toEqual('/heroes'); - })); -} - -//////////////////// -import { getTestHeroes } from '../model/testing/test-hero.service'; - -const firstHero = getTestHeroes()[0]; - -function heroModuleSetup() { - // #docregion setup-hero-module - beforeEach(async () => { - await TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [HeroDetailComponent, HeroListComponent], - providers: [ - provideRouter([ - { path: 'heroes/:id', component: HeroDetailComponent }, - { path: 'heroes', component: HeroListComponent }, - ]), - provideHttpClient(), - provideHttpClientTesting(), - ], - }), - ).compileComponents(); - }); - // #enddocregion setup-hero-module - - // #docregion route-good-id - describe('when navigate to existing hero', () => { - let expectedHero: Hero; - - beforeEach(async () => { - expectedHero = firstHero; - await createComponent(expectedHero.id); - }); - // #docregion selected-tests - it("should display that hero's name", () => { - expect(page.nameDisplay.textContent).toBe(expectedHero.name); - }); - // #enddocregion route-good-id - - it('should navigate when click cancel', () => { - click(page.cancelBtn); - expect(TestBed.inject(Router).url).toEqual(`/heroes/${expectedHero.id}`); - }); - - it('should save when click save but not navigate immediately', () => { - click(page.saveBtn); - expect(TestBed.inject(HttpTestingController).expectOne({ method: 'PUT', url: 'api/heroes' })); - expect(TestBed.inject(Router).url).toEqual('/heroes/41'); - }); - - it('should navigate when click save and save resolves', fakeAsync(() => { - click(page.saveBtn); - tick(); // wait for async save to complete - expect(TestBed.inject(Router).url).toEqual('/heroes/41'); - })); - - // #docregion title-case-pipe - it('should convert hero name to Title Case', () => { - // get the name's input and display elements from the DOM - const hostElement: HTMLElement = harness.routeNativeElement!; - const nameInput: HTMLInputElement = hostElement.querySelector('input')!; - const nameDisplay: HTMLElement = hostElement.querySelector('span')!; - - // simulate user entering a new name into the input box - nameInput.value = 'quick BROWN fOx'; - - // Dispatch a DOM event so that Angular learns of input value change. - nameInput.dispatchEvent(new Event('input')); - - // Tell Angular to update the display binding through the title pipe - harness.detectChanges(); - - expect(nameDisplay.textContent).toBe('Quick Brown Fox'); - }); - // #enddocregion selected-tests - - // #enddocregion title-case-pipe - }); - - // #docregion route-bad-id - describe('when navigate to non-existent hero id', () => { - beforeEach(async () => { - await createComponent(999); - }); - - it('should try to navigate back to hero list', () => { - expect(TestBed.inject(Router).url).toEqual('/heroes'); - }); - }); - // #enddocregion route-bad-id -} - -///////////////////// -import { FormsModule } from '@angular/forms'; -import { TitleCasePipe } from '../shared/title-case.pipe'; -import { appConfig } from '../app.config'; - -function formsModuleSetup() { - // #docregion setup-forms-module - beforeEach(async () => { - await TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [FormsModule, HeroDetailComponent, TitleCasePipe], - providers: [ - provideHttpClient(), - provideHttpClientTesting(), - provideRouter([{ path: 'heroes/:id', component: HeroDetailComponent }]), - ], - }), - ).compileComponents(); - }); - // #enddocregion setup-forms-module - - it("should display 1st hero's name", async () => { - const expectedHero = firstHero; - await createComponent(expectedHero.id).then(() => { - expect(page.nameDisplay.textContent).toBe(expectedHero.name); - }); - }); -} - -/////////////////////// - -function sharedModuleSetup() { - // #docregion setup-shared-module - beforeEach(async () => { - await TestBed.configureTestingModule( - Object.assign({}, appConfig, { - imports: [HeroDetailComponent, sharedImports], - providers: [ - provideRouter([{ path: 'heroes/:id', component: HeroDetailComponent }]), - provideHttpClient(), - provideHttpClientTesting(), - ], - }), - ).compileComponents(); - }); - // #enddocregion setup-shared-module - - it("should display 1st hero's name", async () => { - const expectedHero = firstHero; - await createComponent(expectedHero.id).then(() => { - expect(page.nameDisplay.textContent).toBe(expectedHero.name); - }); - }); -} - -/////////// Helpers ///// - -/** Create the HeroDetailComponent, initialize it, set test variables */ -// #docregion create-component -async function createComponent(id: number) { - harness = await RouterTestingHarness.create(); - component = await harness.navigateByUrl(`/heroes/${id}`, HeroDetailComponent); - page = new Page(); - - const request = TestBed.inject(HttpTestingController).expectOne(`api/heroes/?id=${id}`); - const hero = getTestHeroes().find((h) => h.id === Number(id)); - request.flush(hero ? [hero] : []); - harness.detectChanges(); -} -// #enddocregion create-component - -// #docregion page -class Page { - // getter properties wait to query the DOM until called. - get buttons() { - return this.queryAll('button'); - } - get saveBtn() { - return this.buttons[0]; - } - get cancelBtn() { - return this.buttons[1]; - } - get nameDisplay() { - return this.query('span'); - } - get nameInput() { - return this.query('input'); - } - - //// query helpers //// - private query(selector: string): T { - return harness.routeNativeElement!.querySelector(selector)! as T; - } - - private queryAll(selector: string): T[] { - return harness.routeNativeElement!.querySelectorAll(selector) as any as T[]; - } -} -// #enddocregion page diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.component.ts b/aio/content/examples/testing/src/app/hero/hero-detail.component.ts deleted file mode 100755 index 4d593eb0e08..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-detail.component.ts +++ /dev/null @@ -1,67 +0,0 @@ -// #docplaster -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute, Router, RouterLink } from '@angular/router'; - -import { Hero } from '../model/hero'; -import { sharedImports } from '../shared/shared'; - -import { HeroDetailService } from './hero-detail.service'; - -// #docregion prototype -@Component({ - standalone: true, - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'], - providers: [HeroDetailService], - imports: [sharedImports, RouterLink], -}) -export class HeroDetailComponent implements OnInit { - // #docregion ctor - constructor( - private heroDetailService: HeroDetailService, - private route: ActivatedRoute, - private router: Router, - ) {} - // #enddocregion ctor - // #enddocregion prototype - - hero!: Hero; - - // #docregion ng-on-init - ngOnInit(): void { - // get hero when `id` param changes - this.route.paramMap.subscribe((pmap) => this.getHero(pmap.get('id'))); - } - // #enddocregion ng-on-init - - private getHero(id: string | null): void { - // when no id or id===0, create new blank hero - if (!id) { - this.hero = { id: 0, name: '' } as Hero; - return; - } - - this.heroDetailService.getHero(id).subscribe((hero) => { - if (hero) { - this.hero = hero; - } else { - this.gotoList(); // id not found; navigate to list - } - }); - } - - save(): void { - this.heroDetailService.saveHero(this.hero).subscribe(() => this.gotoList()); - } - - cancel() { - this.gotoList(); - } - - gotoList() { - this.router.navigate(['../'], { relativeTo: this.route }); - } - // #docregion prototype -} -// #enddocregion prototype diff --git a/aio/content/examples/testing/src/app/hero/hero-detail.service.ts b/aio/content/examples/testing/src/app/hero/hero-detail.service.ts deleted file mode 100755 index e2167eb32d5..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-detail.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { Hero } from '../model/hero'; -import { HeroService } from '../model/hero.service'; - -// #docregion prototype -@Injectable({ providedIn: 'root' }) -export class HeroDetailService { - constructor(private heroService: HeroService) {} - // #enddocregion prototype - - // Returns a clone which caller may modify safely - getHero(id: number | string): Observable { - if (typeof id === 'string') { - id = parseInt(id, 10); - } - return this.heroService.getHero(id).pipe( - map((hero) => (hero ? Object.assign({}, hero) : null)), // clone or null - ); - } - - saveHero(hero: Hero) { - return this.heroService.updateHero(hero); - } - // #docregion prototype -} -// #enddocregion prototype diff --git a/aio/content/examples/testing/src/app/hero/hero-list.component.css b/aio/content/examples/testing/src/app/hero/hero-list.component.css deleted file mode 100644 index 5e450c54613..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-list.component.css +++ /dev/null @@ -1,70 +0,0 @@ -.selected { - background-color: #cfd8dc !important; - color: white; -} - -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -.heroes li { - display: flex; -} - -.heroes button { - flex: 1; - cursor: pointer; - position: relative; - left: 0; - background-color: #eee; - margin: 0.5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; - height: 1.8em; -} - -.heroes button:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: 0.1em; -} - -.heroes button:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.selected { - background-color: black; - color: white; -} - -.heroes button.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: 0.8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - align-self: center; -} diff --git a/aio/content/examples/testing/src/app/hero/hero-list.component.html b/aio/content/examples/testing/src/app/hero/hero-list.component.html deleted file mode 100644 index c13be811fd6..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-list.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    My Heroes

    -
      -
    • - -
    • -
    diff --git a/aio/content/examples/testing/src/app/hero/hero-list.component.spec.ts b/aio/content/examples/testing/src/app/hero/hero-list.component.spec.ts deleted file mode 100755 index a069089c629..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-list.component.spec.ts +++ /dev/null @@ -1,144 +0,0 @@ -import { ComponentFixture, fakeAsync, TestBed, tick, waitForAsync } from '@angular/core/testing'; - -import { By } from '@angular/platform-browser'; -import { DebugElement } from '@angular/core'; - -import { Router } from '@angular/router'; - -import { addMatchers } from '../../testing'; -import { HeroService } from '../model/hero.service'; -import { getTestHeroes, TestHeroService } from '../model/testing/test-hero.service'; - -import { HeroListComponent } from './hero-list.component'; -import { HighlightDirective } from '../shared/highlight.directive'; -import { appConfig } from '../app.config'; - -const HEROES = getTestHeroes(); - -let comp: HeroListComponent; -let fixture: ComponentFixture; -let page: Page; - -/////// Tests ////// - -describe('HeroListComponent', () => { - beforeEach(waitForAsync(() => { - addMatchers(); - const routerSpy = jasmine.createSpyObj('Router', ['navigate']); - - TestBed.configureTestingModule( - Object.assign({}, appConfig, { - providers: [ - { provide: HeroService, useClass: TestHeroService }, - { provide: Router, useValue: routerSpy }, - ], - }), - ) - .compileComponents() - .then(createComponent); - })); - - it('should display heroes', () => { - expect(page.heroRows.length).toBeGreaterThan(0); - }); - - it('1st hero should match 1st test hero', () => { - const expectedHero = HEROES[0]; - const actualHero = page.heroRows[0].textContent; - expect(actualHero).withContext('hero.id').toContain(expectedHero.id.toString()); - expect(actualHero).withContext('hero.name').toContain(expectedHero.name); - }); - - it('should select hero on click', fakeAsync(() => { - const expectedHero = HEROES[1]; - const btn = page.heroRows[1].querySelector('button'); - - btn!.dispatchEvent(new Event('click')); - tick(); - // `.toEqual` because selectedHero is clone of expectedHero; see FakeHeroService - expect(comp.selectedHero).toEqual(expectedHero); - })); - - it('should navigate to selected hero detail on click', fakeAsync(() => { - const expectedHero = HEROES[1]; - const btn = page.heroRows[1].querySelector('button'); - - btn!.dispatchEvent(new Event('click')); - tick(); - - // should have navigated - expect(page.navSpy.calls.any()).withContext('navigate called').toBe(true); - - // composed hero detail will be URL like 'heroes/42' - // expect link array with the route path and hero id - // first argument to router.navigate is link array - const navArgs = page.navSpy.calls.first().args[0]; - expect(navArgs[0]).withContext('nav to heroes detail URL').toContain('heroes'); - expect(navArgs[1]).withContext('expected hero.id').toBe(expectedHero.id); - })); - - it('should find `HighlightDirective` with `By.directive', () => { - // #docregion by - // Can find DebugElement either by css selector or by directive - const h2 = fixture.debugElement.query(By.css('h2')); - const directive = fixture.debugElement.query(By.directive(HighlightDirective)); - // #enddocregion by - expect(h2).toBe(directive); - }); - - it('should color header with `HighlightDirective`', () => { - const h2 = page.highlightDe.nativeElement as HTMLElement; - const bgColor = h2.style.backgroundColor; - - // different browsers report color values differently - const isExpectedColor = bgColor === 'gold' || bgColor === 'rgb(255, 215, 0)'; - expect(isExpectedColor).withContext('backgroundColor').toBe(true); - }); - - it("the `HighlightDirective` is among the element's providers", () => { - expect(page.highlightDe.providerTokens) - .withContext('HighlightDirective') - .toContain(HighlightDirective); - }); -}); - -/////////// Helpers ///// - -/** Create the component and set the `page` test variables */ -function createComponent() { - fixture = TestBed.createComponent(HeroListComponent); - comp = fixture.componentInstance; - - // change detection triggers ngOnInit which gets a hero - fixture.detectChanges(); - - return fixture.whenStable().then(() => { - // got the heroes and updated component - // change detection updates the view - fixture.detectChanges(); - page = new Page(); - }); -} - -class Page { - /** Hero line elements */ - heroRows: HTMLLIElement[]; - - /** Highlighted DebugElement */ - highlightDe: DebugElement; - - /** Spy on router navigate method */ - navSpy: jasmine.Spy; - - constructor() { - const heroRowNodes = fixture.nativeElement.querySelectorAll('li'); - this.heroRows = Array.from(heroRowNodes); - - // Find the first element with an attached HighlightDirective - this.highlightDe = fixture.debugElement.query(By.directive(HighlightDirective)); - - // Get the component's injected router navigation spy - const routerSpy = fixture.debugElement.injector.get(Router); - this.navSpy = routerSpy.navigate as jasmine.Spy; - } -} diff --git a/aio/content/examples/testing/src/app/hero/hero-list.component.ts b/aio/content/examples/testing/src/app/hero/hero-list.component.ts deleted file mode 100755 index 8fd38574aa3..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero-list.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Component } from '@angular/core'; -import { AsyncPipe } from '@angular/common'; -import { Router } from '@angular/router'; - -import { Observable } from 'rxjs'; - -import { Hero } from '../model/hero'; -import { HeroService } from '../model/hero.service'; -import { sharedImports } from '../shared/shared'; - -@Component({ - standalone: true, - selector: 'app-heroes', - templateUrl: './hero-list.component.html', - styleUrls: ['./hero-list.component.css'], - imports: [AsyncPipe, sharedImports], -}) -export class HeroListComponent { - heroes: Observable; - selectedHero!: Hero; - - constructor( - private router: Router, - private heroService: HeroService, - ) { - this.heroes = this.heroService.getHeroes(); - } - - onSelect(hero: Hero) { - this.selectedHero = hero; - this.router.navigate(['../heroes', this.selectedHero.id]); - } -} diff --git a/aio/content/examples/testing/src/app/hero/hero.routes.ts b/aio/content/examples/testing/src/app/hero/hero.routes.ts deleted file mode 100755 index 4db95eaa34c..00000000000 --- a/aio/content/examples/testing/src/app/hero/hero.routes.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { HeroListComponent } from './hero-list.component'; -import { HeroDetailComponent } from './hero-detail.component'; -import { Routes } from '@angular/router'; - -export default [ - { path: '', component: HeroListComponent }, - { path: ':id', component: HeroDetailComponent }, -] as Routes; diff --git a/aio/content/examples/testing/src/app/in-memory-data.service.ts b/aio/content/examples/testing/src/app/in-memory-data.service.ts deleted file mode 100644 index b8122a4729c..00000000000 --- a/aio/content/examples/testing/src/app/in-memory-data.service.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { InMemoryDbService } from 'angular-in-memory-web-api'; -import { QUOTES } from './twain/twain.data'; - -// Adjust to reduce number of quotes -const maxQuotes = Infinity; // 0; - -/** Create in-memory database of heroes and quotes */ -export class InMemoryDataService implements InMemoryDbService { - createDb() { - const heroes = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' }, - ]; - - return { heroes, quotes: QUOTES.slice(0, maxQuotes) }; - } -} diff --git a/aio/content/examples/testing/src/app/model/hero.service.spec.ts b/aio/content/examples/testing/src/app/model/hero.service.spec.ts deleted file mode 100644 index 447d7af3389..00000000000 --- a/aio/content/examples/testing/src/app/model/hero.service.spec.ts +++ /dev/null @@ -1,218 +0,0 @@ -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -// Other imports -import { TestBed } from '@angular/core/testing'; -import { HttpClient, HttpResponse, HttpErrorResponse } from '@angular/common/http'; - -import { asyncData, asyncError } from '../../testing/async-observable-helpers'; - -import { Hero } from './hero'; -import { HeroService } from './hero.service'; - -describe('HeroesService (with spies)', () => { - // #docregion test-with-spies - let httpClientSpy: jasmine.SpyObj; - let heroService: HeroService; - - beforeEach(() => { - // TODO: spy on other methods too - httpClientSpy = jasmine.createSpyObj('HttpClient', ['get']); - heroService = new HeroService(httpClientSpy); - }); - - it('should return expected heroes (HttpClient called once)', (done: DoneFn) => { - const expectedHeroes: Hero[] = [ - { id: 1, name: 'A' }, - { id: 2, name: 'B' }, - ]; - - httpClientSpy.get.and.returnValue(asyncData(expectedHeroes)); - - heroService.getHeroes().subscribe({ - next: (heroes) => { - expect(heroes).withContext('expected heroes').toEqual(expectedHeroes); - done(); - }, - error: done.fail, - }); - expect(httpClientSpy.get.calls.count()).withContext('one call').toBe(1); - }); - - it('should return an error when the server returns a 404', (done: DoneFn) => { - const errorResponse = new HttpErrorResponse({ - error: 'test 404 error', - status: 404, - statusText: 'Not Found', - }); - - httpClientSpy.get.and.returnValue(asyncError(errorResponse)); - - heroService.getHeroes().subscribe({ - next: (heroes) => done.fail('expected an error, not heroes'), - error: (error) => { - expect(error.message).toContain('test 404 error'); - done(); - }, - }); - }); - // #enddocregion test-with-spies -}); - -describe('HeroesService (with mocks)', () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - let heroService: HeroService; - - beforeEach(() => { - TestBed.configureTestingModule({ - // Import the HttpClient mocking services - imports: [HttpClientTestingModule], - // Provide the service-under-test - providers: [HeroService], - }); - - // Inject the http, test controller, and service-under-test - // as they will be referenced by each test. - httpClient = TestBed.inject(HttpClient); - httpTestingController = TestBed.inject(HttpTestingController); - heroService = TestBed.inject(HeroService); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - /// HeroService method tests begin /// - describe('#getHeroes', () => { - let expectedHeroes: Hero[]; - - beforeEach(() => { - heroService = TestBed.inject(HeroService); - expectedHeroes = [ - { id: 1, name: 'A' }, - { id: 2, name: 'B' }, - ] as Hero[]; - }); - - it('should return expected heroes (called once)', () => { - heroService.getHeroes().subscribe({ - next: (heroes) => - expect(heroes).withContext('should return expected heroes').toEqual(expectedHeroes), - error: fail, - }); - - // HeroService should have made one request to GET heroes from expected URL - const req = httpTestingController.expectOne(heroService.heroesUrl); - expect(req.request.method).toEqual('GET'); - - // Respond with the mock heroes - req.flush(expectedHeroes); - }); - - it('should be OK returning no heroes', () => { - heroService.getHeroes().subscribe({ - next: (heroes) => - expect(heroes.length).withContext('should have empty heroes array').toEqual(0), - error: fail, - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - req.flush([]); // Respond with no heroes - }); - - it('should turn 404 into a user-friendly error', () => { - const msg = 'Deliberate 404'; - heroService.getHeroes().subscribe({ - next: (heroes) => fail('expected to fail'), - error: (error) => expect(error.message).toContain(msg), - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - - // respond with a 404 and the error message in the body - req.flush(msg, { status: 404, statusText: 'Not Found' }); - }); - - it('should return expected heroes (called multiple times)', () => { - heroService.getHeroes().subscribe(); - heroService.getHeroes().subscribe(); - heroService.getHeroes().subscribe({ - next: (heroes) => - expect(heroes).withContext('should return expected heroes').toEqual(expectedHeroes), - error: fail, - }); - - const requests = httpTestingController.match(heroService.heroesUrl); - expect(requests.length).withContext('calls to getHeroes()').toEqual(3); - - // Respond to each request with different mock hero results - requests[0].flush([]); - requests[1].flush([{ id: 1, name: 'bob' }]); - requests[2].flush(expectedHeroes); - }); - }); - - describe('#updateHero', () => { - // Expecting the query form of URL so should not 404 when id not found - const makeUrl = (id: number) => `${heroService.heroesUrl}/?id=${id}`; - - it('should update a hero and return it', () => { - const updateHero: Hero = { id: 1, name: 'A' }; - - heroService.updateHero(updateHero).subscribe({ - next: (data) => expect(data).withContext('should return the hero').toEqual(updateHero), - error: fail, - }); - - // HeroService should have made one request to PUT hero - const req = httpTestingController.expectOne(heroService.heroesUrl); - expect(req.request.method).toEqual('PUT'); - expect(req.request.body).toEqual(updateHero); - - // Expect server to return the hero after PUT - const expectedResponse = new HttpResponse({ - status: 200, - statusText: 'OK', - body: updateHero, - }); - req.event(expectedResponse); - }); - - it('should turn 404 error into user-facing error', () => { - const msg = 'Deliberate 404'; - const updateHero: Hero = { id: 1, name: 'A' }; - heroService.updateHero(updateHero).subscribe({ - next: (heroes) => fail('expected to fail'), - error: (error) => expect(error.message).toContain(msg), - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - - // respond with a 404 and the error message in the body - req.flush(msg, { status: 404, statusText: 'Not Found' }); - }); - - it('should turn network error into user-facing error', (done) => { - // Create mock ProgressEvent with type `error`, raised when something goes wrong at - // the network level. Connection timeout, DNS error, offline, etc. - const errorEvent = new ProgressEvent('error'); - - const updateHero: Hero = { id: 1, name: 'A' }; - heroService.updateHero(updateHero).subscribe({ - next: (heroes) => fail('expected to fail'), - error: (error) => { - expect(error).toBe(errorEvent); - done(); - }, - }); - - const req = httpTestingController.expectOne(heroService.heroesUrl); - - // Respond with mock error - req.error(errorEvent); - }); - }); - - // TODO: test other HeroService methods -}); diff --git a/aio/content/examples/testing/src/app/model/hero.service.ts b/aio/content/examples/testing/src/app/model/hero.service.ts deleted file mode 100644 index 0c238f686e5..00000000000 --- a/aio/content/examples/testing/src/app/model/hero.service.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { HttpClient, HttpErrorResponse, HttpHeaders } from '@angular/common/http'; -import { Injectable } from '@angular/core'; -import { Observable } from 'rxjs'; -import { catchError, map, tap } from 'rxjs/operators'; - -import { Hero } from './hero'; - -const httpOptions = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }), -}; - -@Injectable({ providedIn: 'root' }) -export class HeroService { - readonly heroesUrl = 'api/heroes'; // URL to web api - - constructor(private http: HttpClient) {} - - /** GET heroes from the server */ - getHeroes(): Observable { - return this.http.get(this.heroesUrl).pipe( - tap((heroes) => this.log('fetched heroes')), - catchError(this.handleError('getHeroes')), - ) as Observable; - } - - /** GET hero by id. Return `undefined` when id not found */ - getHero(id: number | string): Observable { - if (typeof id === 'string') { - id = parseInt(id, 10); - } - const url = `${this.heroesUrl}/?id=${id}`; - return this.http.get(url).pipe( - map((heroes) => heroes[0]), // returns a {0|1} element array - tap((h) => { - const outcome = h ? 'fetched' : 'did not find'; - this.log(`${outcome} hero id=${id}`); - }), - catchError(this.handleError(`getHero id=${id}`)), - ); - } - - //////// Save methods ////////// - - /** POST: add a new hero to the server */ - addHero(hero: Hero): Observable { - return this.http.post(this.heroesUrl, hero, httpOptions).pipe( - tap((addedHero) => this.log(`added hero w/ id=${addedHero.id}`)), - catchError(this.handleError('addHero')), - ); - } - /** DELETE: delete the hero from the server */ - deleteHero(hero: Hero | number): Observable { - const id = typeof hero === 'number' ? hero : hero.id; - const url = `${this.heroesUrl}/${id}`; - - return this.http.delete(url, httpOptions).pipe( - tap((_) => this.log(`deleted hero id=${id}`)), - catchError(this.handleError('deleteHero')), - ); - } - - /** PUT: update the hero on the server */ - updateHero(hero: Hero): Observable { - return this.http.put(this.heroesUrl, hero, httpOptions).pipe( - tap((_) => this.log(`updated hero id=${hero.id}`)), - catchError(this.handleError('updateHero')), - ); - } - /** - * Returns a function that handles Http operation failures. - * This error handler lets the app continue to run as if no error occurred. - * - * @param operation - name of the operation that failed - */ - private handleError(operation = 'operation') { - return (error: HttpErrorResponse): Observable => { - // TODO: send the error to remote logging infrastructure - console.error(error); // log to console instead - - // If a native error is caught, do not transform it. We only want to - // transform response errors that are not wrapped in an `Error`. - if (error.error instanceof Event) { - throw error.error; - } - - const message = `server returned code ${error.status} with body "${error.error}"`; - // TODO: better job of transforming error for user consumption - throw new Error(`${operation} failed: ${message}`); - }; - } - - private log(message: string) { - console.log('HeroService: ' + message); - } -} diff --git a/aio/content/examples/testing/src/app/model/hero.ts b/aio/content/examples/testing/src/app/model/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/testing/src/app/model/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/testing/src/app/model/index.ts b/aio/content/examples/testing/src/app/model/index.ts deleted file mode 100644 index 694c333a879..00000000000 --- a/aio/content/examples/testing/src/app/model/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './hero'; -export * from './hero.service'; -export * from './user.service'; diff --git a/aio/content/examples/testing/src/app/model/testing/http-client.spec.ts b/aio/content/examples/testing/src/app/model/testing/http-client.spec.ts deleted file mode 100644 index c2277021d89..00000000000 --- a/aio/content/examples/testing/src/app/model/testing/http-client.spec.ts +++ /dev/null @@ -1,167 +0,0 @@ -// Http testing module and mocking controller -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; - -// Other imports -import { TestBed } from '@angular/core/testing'; -import { HttpClient, HttpErrorResponse } from '@angular/common/http'; - -import { HttpHeaders } from '@angular/common/http'; - -interface Data { - name: string; -} - -const testUrl = '/data'; - -describe('HttpClient testing', () => { - let httpClient: HttpClient; - let httpTestingController: HttpTestingController; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - }); - - // Inject the http service and test controller for each test - httpClient = TestBed.inject(HttpClient); - httpTestingController = TestBed.inject(HttpTestingController); - }); - - afterEach(() => { - // After every test, assert that there are no more pending requests. - httpTestingController.verify(); - }); - - /// Tests begin /// - it('can test HttpClient.get', () => { - const testData: Data = { name: 'Test Data' }; - - // Make an HTTP GET request - httpClient.get(testUrl).subscribe((data) => - // When observable resolves, result should match test data - expect(data).toEqual(testData), - ); - - // The following `expectOne()` will match the request's URL. - // If no requests or multiple requests matched that URL - // `expectOne()` would throw. - const req = httpTestingController.expectOne('/data'); - - // Assert that the request is a GET. - expect(req.request.method).toEqual('GET'); - - // Respond with mock data, causing Observable to resolve. - // Subscribe callback asserts that correct data was returned. - req.flush(testData); - - // Finally, assert that there are no outstanding requests. - httpTestingController.verify(); - }); - - it('can test HttpClient.get with matching header', () => { - const testData: Data = { name: 'Test Data' }; - - // Make an HTTP GET request with specific header - httpClient - .get(testUrl, { - headers: new HttpHeaders({ Authorization: 'my-auth-token' }), - }) - .subscribe((data) => expect(data).toEqual(testData)); - - // Find request with a predicate function. - // Expect one request with an authorization header - const req = httpTestingController.expectOne((request) => request.headers.has('Authorization')); - req.flush(testData); - }); - - it('can test multiple requests', () => { - const testData: Data[] = [ - { name: 'bob' }, - { name: 'carol' }, - { name: 'ted' }, - { name: 'alice' }, - ]; - - // Make three requests in a row - httpClient - .get(testUrl) - .subscribe((d) => expect(d.length).withContext('should have no data').toEqual(0)); - - httpClient - .get(testUrl) - .subscribe((d) => - expect(d).withContext('should be one element array').toEqual([testData[0]]), - ); - - httpClient - .get(testUrl) - .subscribe((d) => expect(d).withContext('should be expected data').toEqual(testData)); - - // get all pending requests that match the given URL - const requests = httpTestingController.match(testUrl); - expect(requests.length).toEqual(3); - - // Respond to each request with different results - requests[0].flush([]); - requests[1].flush([testData[0]]); - requests[2].flush(testData); - }); - - it('can test for 404 error', () => { - const emsg = 'deliberate 404 error'; - - httpClient.get(testUrl).subscribe({ - next: (data) => fail('should have failed with the 404 error'), - error: (error: HttpErrorResponse) => { - expect(error.status).withContext('status').toEqual(404); - expect(error.error).withContext('message').toEqual(emsg); - }, - }); - - const req = httpTestingController.expectOne(testUrl); - - // Respond with mock error - req.flush(emsg, { status: 404, statusText: 'Not Found' }); - }); - - it('can test for network error', (done) => { - // Create mock ProgressEvent with type `error`, raised when something goes wrong at - // the network level. Connection timeout, DNS error, offline, etc. - const errorEvent = new ProgressEvent('error'); - - httpClient.get(testUrl).subscribe({ - next: (data) => fail('should have failed with the network error'), - error: (error: HttpErrorResponse) => { - expect(error.error).toBe(errorEvent); - done(); - }, - }); - - const req = httpTestingController.expectOne(testUrl); - - // Respond with mock error - req.error(errorEvent); - }); - - it('httpTestingController.verify should fail if HTTP response not simulated', () => { - // Sends request - httpClient.get('some/api').subscribe(); - - // verify() should fail because haven't handled the pending request. - expect(() => httpTestingController.verify()).toThrow(); - - // Now get and flush the request so that afterEach() doesn't fail - const req = httpTestingController.expectOne('some/api'); - req.flush(null); - }); - - // Proves that verify in afterEach() really would catch error - // if test doesn't simulate the HTTP response. - // - // Must disable this test because can't catch an error in an afterEach(). - // Uncomment if you want to confirm that afterEach() does the job. - // it('afterEach() should fail when HTTP response not simulated',() => { - // // Sends request which is never handled by this test - // httpClient.get('some/api').subscribe(); - // }); -}); diff --git a/aio/content/examples/testing/src/app/model/testing/index.ts b/aio/content/examples/testing/src/app/model/testing/index.ts deleted file mode 100644 index 898f64c2783..00000000000 --- a/aio/content/examples/testing/src/app/model/testing/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './test-hero.service'; diff --git a/aio/content/examples/testing/src/app/model/testing/test-hero.service.ts b/aio/content/examples/testing/src/app/model/testing/test-hero.service.ts deleted file mode 100644 index f4fc9efa251..00000000000 --- a/aio/content/examples/testing/src/app/model/testing/test-hero.service.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { Observable } from 'rxjs'; -import { asyncData } from '../../../testing'; - -import { map } from 'rxjs/operators'; - -// re-export for tester convenience -export { Hero } from '../hero'; -export { HeroService } from '../hero.service'; -export { getTestHeroes } from './test-heroes'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; -import { getTestHeroes } from './test-heroes'; - -@Injectable() -/** - * FakeHeroService pretends to make real http requests. - * implements only as much of HeroService as is actually consumed by the app - */ -export class TestHeroService extends HeroService { - constructor() { - // This is a fake testing service that won't be making HTTP - // requests so we can pass in `null` as the HTTP client. - super(null!); - } - - heroes = getTestHeroes(); - lastResult!: Observable; // result from last method call - - override addHero(hero: Hero): Observable { - throw new Error('Method not implemented.'); - } - - override deleteHero(hero: number | Hero): Observable { - throw new Error('Method not implemented.'); - } - - override getHeroes(): Observable { - return (this.lastResult = asyncData(this.heroes)); - } - - override getHero(id: number | string): Observable { - if (typeof id === 'string') { - id = parseInt(id, 10); - } - const hero = this.heroes.find((h) => h.id === id); - this.lastResult = asyncData(hero); - return this.lastResult; - } - - override updateHero(hero: Hero): Observable { - return (this.lastResult = this.getHero(hero.id).pipe( - map((h) => { - if (h) { - return Object.assign(h, hero); - } - throw new Error(`Hero ${hero.id} not found`); - }), - )); - } -} diff --git a/aio/content/examples/testing/src/app/model/testing/test-heroes.ts b/aio/content/examples/testing/src/app/model/testing/test-heroes.ts deleted file mode 100644 index 4cd45d15b56..00000000000 --- a/aio/content/examples/testing/src/app/model/testing/test-heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Hero } from '../hero'; - -/** return fresh array of test heroes */ -export function getTestHeroes(): Hero[] { - return [ - { id: 41, name: 'Bob' }, - { id: 42, name: 'Carol' }, - { id: 43, name: 'Ted' }, - { id: 44, name: 'Alice' }, - { id: 45, name: 'Speedy' }, - { id: 46, name: 'Stealthy' }, - ]; -} diff --git a/aio/content/examples/testing/src/app/model/user.service.ts b/aio/content/examples/testing/src/app/model/user.service.ts deleted file mode 100644 index 3989e0b95bc..00000000000 --- a/aio/content/examples/testing/src/app/model/user.service.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable() -export class UserService { - isLoggedIn = true; - user = { name: 'Sam Spade' }; -} diff --git a/aio/content/examples/testing/src/app/shared/canvas.component.spec.ts b/aio/content/examples/testing/src/app/shared/canvas.component.spec.ts deleted file mode 100755 index f49344bd87a..00000000000 --- a/aio/content/examples/testing/src/app/shared/canvas.component.spec.ts +++ /dev/null @@ -1,37 +0,0 @@ -// #docplaster -// #docregion without-toBlob-macrotask -import { fakeAsync, TestBed, tick } from '@angular/core/testing'; - -import { CanvasComponent } from './canvas.component'; - -describe('CanvasComponent', () => { - // #enddocregion without-toBlob-macrotask - // #docregion enable-toBlob-macrotask - beforeEach(() => { - (window as any).__zone_symbol__FakeAsyncTestMacroTask = [ - { - source: 'HTMLCanvasElement.toBlob', - callbackArgs: [{ size: 200 }], - }, - ]; - }); - // #enddocregion enable-toBlob-macrotask - // #docregion without-toBlob-macrotask - beforeEach(async () => { - await TestBed.configureTestingModule({ - imports: [CanvasComponent], - }).compileComponents(); - }); - - it('should be able to generate blob data from canvas', fakeAsync(() => { - const fixture = TestBed.createComponent(CanvasComponent); - const canvasComp = fixture.componentInstance; - - fixture.detectChanges(); - expect(canvasComp.blobSize).toBe(0); - - tick(); - expect(canvasComp.blobSize).toBeGreaterThan(0); - })); -}); -// #enddocregion without-toBlob-macrotask diff --git a/aio/content/examples/testing/src/app/shared/canvas.component.ts b/aio/content/examples/testing/src/app/shared/canvas.component.ts deleted file mode 100755 index 63a93f73502..00000000000 --- a/aio/content/examples/testing/src/app/shared/canvas.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -// #docplaster -// #docregion import-canvas-patch -// Import patch to make async `HTMLCanvasElement` methods (such as `.toBlob()`) Zone.js-aware. -// Either import in `polyfills.ts` (if used in more than one places in the app) or in the component -// file using `HTMLCanvasElement` (if it is only used in a single file). -import 'zone.js/plugins/zone-patch-canvas'; -// #enddocregion import-canvas-patch -// #docregion main -import { Component, AfterViewInit, ViewChild, ElementRef } from '@angular/core'; - -@Component({ - standalone: true, - selector: 'sample-canvas', - template: '', -}) -export class CanvasComponent implements AfterViewInit { - blobSize = 0; - @ViewChild('sampleCanvas') sampleCanvas!: ElementRef; - - ngAfterViewInit() { - const canvas: HTMLCanvasElement = this.sampleCanvas.nativeElement; - const context = canvas.getContext('2d')!; - - context.clearRect(0, 0, 200, 200); - context.fillStyle = '#FF1122'; - context.fillRect(0, 0, 200, 200); - - canvas.toBlob((blob) => { - this.blobSize = blob?.size ?? 0; - }); - } -} -// #enddocregion main diff --git a/aio/content/examples/testing/src/app/shared/highlight.directive.spec.ts b/aio/content/examples/testing/src/app/shared/highlight.directive.spec.ts deleted file mode 100755 index da83ba3559e..00000000000 --- a/aio/content/examples/testing/src/app/shared/highlight.directive.spec.ts +++ /dev/null @@ -1,102 +0,0 @@ -import { Component, DebugElement } from '@angular/core'; -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { By } from '@angular/platform-browser'; - -import { HighlightDirective } from './highlight.directive'; - -// #docregion test-component -@Component({ - standalone: true, - template: `

    Something Yellow

    -

    The Default (Gray)

    -

    No Highlight

    - `, - imports: [HighlightDirective], -}) -class TestComponent {} -// #enddocregion test-component - -describe('HighlightDirective', () => { - let fixture: ComponentFixture; - let des: DebugElement[]; // the three elements w/ the directive - let bareH2: DebugElement; // the

    w/o the directive - - // #docregion selected-tests - beforeEach(() => { - fixture = TestBed.configureTestingModule({ - imports: [HighlightDirective, TestComponent], - }).createComponent(TestComponent); - - fixture.detectChanges(); // initial binding - - // all elements with an attached HighlightDirective - des = fixture.debugElement.queryAll(By.directive(HighlightDirective)); - - // the h2 without the HighlightDirective - bareH2 = fixture.debugElement.query(By.css('h2:not([highlight])')); - }); - - // color tests - it('should have three highlighted elements', () => { - expect(des.length).toBe(3); - }); - - it('should color 1st

    background "yellow"', () => { - const bgColor = des[0].nativeElement.style.backgroundColor; - expect(bgColor).toBe('yellow'); - }); - - it('should color 2nd

    background w/ default color', () => { - const dir = des[1].injector.get(HighlightDirective) as HighlightDirective; - const bgColor = des[1].nativeElement.style.backgroundColor; - expect(bgColor).toBe(dir.defaultColor); - }); - - it('should bind background to value color', () => { - // easier to work with nativeElement - const input = des[2].nativeElement as HTMLInputElement; - expect(input.style.backgroundColor).withContext('initial backgroundColor').toBe('cyan'); - - input.value = 'green'; - - // Dispatch a DOM event so that Angular responds to the input value change. - input.dispatchEvent(new Event('input')); - fixture.detectChanges(); - - expect(input.style.backgroundColor).withContext('changed backgroundColor').toBe('green'); - }); - - it('bare

    should not have a customProperty', () => { - expect(bareH2.properties['customProperty']).toBeUndefined(); - }); - // #enddocregion selected-tests - - // Removed on 12/02/2016 when ceased public discussion of the `Renderer`. Revive in future? - // // customProperty tests - // it('all highlighted elements should have a true customProperty', () => { - // const allTrue = des.map(de => !!de.properties['customProperty']).every(v => v === true); - // expect(allTrue).toBe(true); - // }); - - // injected directive - // attached HighlightDirective can be injected - it('can inject `HighlightDirective` in 1st

    ', () => { - const dir = des[0].injector.get(HighlightDirective); - expect(dir).toBeTruthy(); - }); - - it('cannot inject `HighlightDirective` in 3rd

    ', () => { - const dir = bareH2.injector.get(HighlightDirective, null); - expect(dir).toBe(null); - }); - - // DebugElement.providerTokens - // attached HighlightDirective should be listed in the providerTokens - it('should have `HighlightDirective` in 1st

    providerTokens', () => { - expect(des[0].providerTokens).toContain(HighlightDirective); - }); - - it('should not have `HighlightDirective` in 3rd

    providerTokens', () => { - expect(bareH2.providerTokens).not.toContain(HighlightDirective); - }); -}); diff --git a/aio/content/examples/testing/src/app/shared/highlight.directive.ts b/aio/content/examples/testing/src/app/shared/highlight.directive.ts deleted file mode 100755 index 7a8566236a5..00000000000 --- a/aio/content/examples/testing/src/app/shared/highlight.directive.ts +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable @angular-eslint/directive-selector */ -// #docregion -import { Directive, ElementRef, Input, OnChanges } from '@angular/core'; - -@Directive({ standalone: true, selector: '[highlight]' }) -/** - * Set backgroundColor for the attached element to highlight color - * and set the element's customProperty to true - */ -export class HighlightDirective implements OnChanges { - defaultColor = 'rgb(211, 211, 211)'; // lightgray - - @Input('highlight') bgColor = ''; - - constructor(private el: ElementRef) { - el.nativeElement.style.customProperty = true; - } - - ngOnChanges() { - this.el.nativeElement.style.backgroundColor = this.bgColor || this.defaultColor; - } -} diff --git a/aio/content/examples/testing/src/app/shared/shared.ts b/aio/content/examples/testing/src/app/shared/shared.ts deleted file mode 100755 index 1dce3040881..00000000000 --- a/aio/content/examples/testing/src/app/shared/shared.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { FormsModule } from '@angular/forms'; - -import { HighlightDirective } from './highlight.directive'; -import { TitleCasePipe } from './title-case.pipe'; -import { NgFor, NgIf } from '@angular/common'; - -export const sharedImports = [FormsModule, HighlightDirective, TitleCasePipe, NgIf, NgFor]; diff --git a/aio/content/examples/testing/src/app/shared/title-case.pipe.spec.ts b/aio/content/examples/testing/src/app/shared/title-case.pipe.spec.ts deleted file mode 100644 index add14971456..00000000000 --- a/aio/content/examples/testing/src/app/shared/title-case.pipe.spec.ts +++ /dev/null @@ -1,33 +0,0 @@ -// #docplaster -// #docregion -import { TitleCasePipe } from './title-case.pipe'; - -// #docregion excerpt -describe('TitleCasePipe', () => { - // This pipe is a pure, stateless function so no need for BeforeEach - const pipe = new TitleCasePipe(); - - it('transforms "abc" to "Abc"', () => { - expect(pipe.transform('abc')).toBe('Abc'); - }); - - it('transforms "abc def" to "Abc Def"', () => { - expect(pipe.transform('abc def')).toBe('Abc Def'); - }); - - // ... more tests ... - // #enddocregion excerpt - it('leaves "Abc Def" unchanged', () => { - expect(pipe.transform('Abc Def')).toBe('Abc Def'); - }); - - it('transforms "abc-def" to "Abc-def"', () => { - expect(pipe.transform('abc-def')).toBe('Abc-def'); - }); - - it('transforms " abc def" to " Abc Def" (preserves spaces) ', () => { - expect(pipe.transform(' abc def')).toBe(' Abc Def'); - }); - // #docregion excerpt -}); -// #enddocregion excerpt diff --git a/aio/content/examples/testing/src/app/shared/title-case.pipe.ts b/aio/content/examples/testing/src/app/shared/title-case.pipe.ts deleted file mode 100755 index 62369098594..00000000000 --- a/aio/content/examples/testing/src/app/shared/title-case.pipe.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({ name: 'titlecase', standalone: true, pure: true }) -/** Transform to Title Case: uppercase the first letter of the words in a string. */ -export class TitleCasePipe implements PipeTransform { - transform(input: string): string { - return input.length === 0 - ? '' - : input.replace(/\w\S*/g, (txt) => txt[0].toUpperCase() + txt.slice(1).toLowerCase()); - } -} diff --git a/aio/content/examples/testing/src/app/twain/quote.ts b/aio/content/examples/testing/src/app/twain/quote.ts deleted file mode 100644 index 293b1348801..00000000000 --- a/aio/content/examples/testing/src/app/twain/quote.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Quote { - id: number; - quote: string; -} diff --git a/aio/content/examples/testing/src/app/twain/twain.component.marbles.spec.ts b/aio/content/examples/testing/src/app/twain/twain.component.marbles.spec.ts deleted file mode 100755 index 892945c592c..00000000000 --- a/aio/content/examples/testing/src/app/twain/twain.component.marbles.spec.ts +++ /dev/null @@ -1,86 +0,0 @@ -// #docplaster -import { fakeAsync, ComponentFixture, TestBed, tick } from '@angular/core/testing'; - -// #docregion import-marbles -import { cold, getTestScheduler } from 'jasmine-marbles'; -// #enddocregion import-marbles - -import { TwainService } from './twain.service'; -import { TwainComponent } from './twain.component'; - -describe('TwainComponent (marbles)', () => { - let component: TwainComponent; - let fixture: ComponentFixture; - let getQuoteSpy: jasmine.Spy; - let quoteEl: HTMLElement; - let testQuote: string; - - // Helper function to get the error message element value - // An *ngIf keeps it out of the DOM until there is an error - const errorMessage = () => { - const el = fixture.nativeElement.querySelector('.error'); - return el ? el.textContent : null; - }; - - beforeEach(() => { - // Create a fake TwainService object with a `getQuote()` spy - const twainService = jasmine.createSpyObj('TwainService', ['getQuote']); - getQuoteSpy = twainService.getQuote; - - TestBed.configureTestingModule({ - imports: [TwainComponent], - providers: [{ provide: TwainService, useValue: twainService }], - }); - - fixture = TestBed.createComponent(TwainComponent); - component = fixture.componentInstance; - quoteEl = fixture.nativeElement.querySelector('.twain'); - testQuote = 'Test Quote'; - }); - - // A synchronous test that simulates async behavior - // #docregion get-quote-test - it('should show quote after getQuote (marbles)', () => { - // observable test quote value and complete(), after delay - // #docregion test-quote-marbles - const q$ = cold('---x|', { x: testQuote }); - // #enddocregion test-quote-marbles - getQuoteSpy.and.returnValue(q$); - - fixture.detectChanges(); // ngOnInit() - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - - // #docregion test-scheduler-flush - getTestScheduler().flush(); // flush the observables - // #enddocregion test-scheduler-flush - - fixture.detectChanges(); // update view - - expect(quoteEl.textContent).withContext('should show quote').toBe(testQuote); - expect(errorMessage()).withContext('should not show error').toBeNull(); - }); - // #enddocregion get-quote-test - - // Still need fakeAsync() because of component's setTimeout() - // #docregion error-test - it('should display error when TwainService fails', fakeAsync(() => { - // observable error after delay - // #docregion error-marbles - const q$ = cold('---#|', null, new Error('TwainService test failure')); - // #enddocregion error-marbles - getQuoteSpy.and.returnValue(q$); - - fixture.detectChanges(); // ngOnInit() - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - - getTestScheduler().flush(); // flush the observables - tick(); // component shows error after a setTimeout() - fixture.detectChanges(); // update error message - - expect(errorMessage()) - .withContext('should display error') - .toMatch(/test failure/); - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - })); - // #enddocregion error-test -}); diff --git a/aio/content/examples/testing/src/app/twain/twain.component.spec.ts b/aio/content/examples/testing/src/app/twain/twain.component.spec.ts deleted file mode 100755 index eee64b7f828..00000000000 --- a/aio/content/examples/testing/src/app/twain/twain.component.spec.ts +++ /dev/null @@ -1,178 +0,0 @@ -// #docplaster -import { fakeAsync, ComponentFixture, TestBed, tick, waitForAsync } from '@angular/core/testing'; - -import { asyncData, asyncError } from '../../testing'; - -import { of, throwError } from 'rxjs'; -import { last } from 'rxjs/operators'; - -import { TwainComponent } from './twain.component'; -import { TwainService } from './twain.service'; - -describe('TwainComponent', () => { - let component: TwainComponent; - let fixture: ComponentFixture; - let getQuoteSpy: jasmine.Spy; - let quoteEl: HTMLElement; - let testQuote: string; - - // Helper function to get the error message element value - // An *ngIf keeps it out of the DOM until there is an error - const errorMessage = () => { - const el = fixture.nativeElement.querySelector('.error'); - return el ? el.textContent : null; - }; - - // #docregion setup - beforeEach(() => { - testQuote = 'Test Quote'; - - // #docregion spy - // Create a fake TwainService object with a `getQuote()` spy - const twainService = jasmine.createSpyObj('TwainService', ['getQuote']); - // Make the spy return a synchronous Observable with the test data - getQuoteSpy = twainService.getQuote.and.returnValue(of(testQuote)); - // #enddocregion spy - - TestBed.configureTestingModule({ - imports: [TwainComponent], - providers: [{ provide: TwainService, useValue: twainService }], - }); - - fixture = TestBed.createComponent(TwainComponent); - component = fixture.componentInstance; - quoteEl = fixture.nativeElement.querySelector('.twain'); - }); - // #enddocregion setup - - describe('when test with synchronous observable', () => { - it('should not show quote before OnInit', () => { - expect(quoteEl.textContent).withContext('nothing displayed').toBe(''); - expect(errorMessage()).withContext('should not show error element').toBeNull(); - expect(getQuoteSpy.calls.any()).withContext('getQuote not yet called').toBe(false); - }); - - // The quote would not be immediately available if the service were truly async. - // #docregion sync-test - it('should show quote after component initialized', () => { - fixture.detectChanges(); // onInit() - - // sync spy result shows testQuote immediately after init - expect(quoteEl.textContent).toBe(testQuote); - expect(getQuoteSpy.calls.any()).withContext('getQuote called').toBe(true); - }); - // #enddocregion sync-test - - // The error would not be immediately available if the service were truly async. - // Use `fakeAsync` because the component error calls `setTimeout` - // #docregion error-test - it('should display error when TwainService fails', fakeAsync(() => { - // tell spy to return an error observable - getQuoteSpy.and.returnValue(throwError(() => new Error('TwainService test failure'))); - fixture.detectChanges(); // onInit() - // sync spy errors immediately after init - - tick(); // flush the component's setTimeout() - - fixture.detectChanges(); // update errorMessage within setTimeout() - - expect(errorMessage()) - .withContext('should display error') - .toMatch(/test failure/); - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - })); - // #enddocregion error-test - }); - - describe('when test with asynchronous observable', () => { - beforeEach(() => { - // #docregion async-setup - // Simulate delayed observable values with the `asyncData()` helper - getQuoteSpy.and.returnValue(asyncData(testQuote)); - // #enddocregion async-setup - }); - - it('should not show quote before OnInit', () => { - expect(quoteEl.textContent).withContext('nothing displayed').toBe(''); - expect(errorMessage()).withContext('should not show error element').toBeNull(); - expect(getQuoteSpy.calls.any()).withContext('getQuote not yet called').toBe(false); - }); - - it('should still not show quote after component initialized', () => { - fixture.detectChanges(); - // getQuote service is async => still has not returned with quote - // so should show the start value, '...' - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - expect(errorMessage()).withContext('should not show error').toBeNull(); - expect(getQuoteSpy.calls.any()).withContext('getQuote called').toBe(true); - }); - - // #docregion fake-async-test - it('should show quote after getQuote (fakeAsync)', fakeAsync(() => { - fixture.detectChanges(); // ngOnInit() - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - - tick(); // flush the observable to get the quote - fixture.detectChanges(); // update view - - expect(quoteEl.textContent).withContext('should show quote').toBe(testQuote); - expect(errorMessage()).withContext('should not show error').toBeNull(); - })); - // #enddocregion fake-async-test - - // #docregion waitForAsync-test - it('should show quote after getQuote (waitForAsync)', waitForAsync(() => { - fixture.detectChanges(); // ngOnInit() - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - - fixture.whenStable().then(() => { - // wait for async getQuote - fixture.detectChanges(); // update view with quote - expect(quoteEl.textContent).toBe(testQuote); - expect(errorMessage()).withContext('should not show error').toBeNull(); - }); - })); - // #enddocregion waitForAsync-test - - // #docregion quote-done-test - it('should show last quote (quote done)', (done: DoneFn) => { - fixture.detectChanges(); - - component.quote.pipe(last()).subscribe(() => { - fixture.detectChanges(); // update view with quote - expect(quoteEl.textContent).toBe(testQuote); - expect(errorMessage()).withContext('should not show error').toBeNull(); - done(); - }); - }); - // #enddocregion quote-done-test - - // #docregion spy-done-test - it('should show quote after getQuote (spy done)', (done: DoneFn) => { - fixture.detectChanges(); - - // the spy's most recent call returns the observable with the test quote - getQuoteSpy.calls.mostRecent().returnValue.subscribe(() => { - fixture.detectChanges(); // update view with quote - expect(quoteEl.textContent).toBe(testQuote); - expect(errorMessage()).withContext('should not show error').toBeNull(); - done(); - }); - }); - // #enddocregion spy-done-test - - it('should display error when TwainService fails', fakeAsync(() => { - // tell spy to return an async error observable - getQuoteSpy.and.returnValue(asyncError('TwainService test failure')); - - fixture.detectChanges(); - tick(); // component shows error after a setTimeout() - fixture.detectChanges(); // update error message - - expect(errorMessage()) - .withContext('should display error') - .toMatch(/test failure/); - expect(quoteEl.textContent).withContext('should show placeholder').toBe('...'); - })); - }); -}); diff --git a/aio/content/examples/testing/src/app/twain/twain.component.ts b/aio/content/examples/testing/src/app/twain/twain.component.ts deleted file mode 100755 index 8bfc10cba1d..00000000000 --- a/aio/content/examples/testing/src/app/twain/twain.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { AsyncPipe } from '@angular/common'; -import { sharedImports } from '../shared/shared'; - -import { Observable, of } from 'rxjs'; -import { catchError, startWith } from 'rxjs/operators'; - -import { TwainService } from './twain.service'; - -@Component({ - standalone: true, - selector: 'twain-quote', - // #docregion template - template: `

    - {{ quote | async }} -

    - -

    {{ errorMessage }}

    `, - // #enddocregion template - styles: ['.twain { font-style: italic; } .error { color: red; }'], - imports: [AsyncPipe, sharedImports], -}) -export class TwainComponent implements OnInit { - errorMessage!: string; - quote!: Observable; - - constructor(private twainService: TwainService) {} - - ngOnInit(): void { - this.getQuote(); - } - - // #docregion get-quote - getQuote() { - this.errorMessage = ''; - this.quote = this.twainService.getQuote().pipe( - startWith('...'), - catchError((err: any) => { - // Wait a turn because errorMessage already set once this turn - setTimeout(() => (this.errorMessage = err.message || err.toString())); - return of('...'); // reset message to placeholder - }), - ); - // #enddocregion get-quote - } -} diff --git a/aio/content/examples/testing/src/app/twain/twain.data.ts b/aio/content/examples/testing/src/app/twain/twain.data.ts deleted file mode 100644 index 0fca2d530a3..00000000000 --- a/aio/content/examples/testing/src/app/twain/twain.data.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Quote } from './quote'; - -export const QUOTES: Quote[] = [ - 'Always do right. This will gratify some people and astonish the rest.', - 'I have never let my schooling interfere with my education.', - "Don't go around saying the world owes you a living. The world owes you nothing. It was here first.", - 'Whenever you find yourself on the side of the majority, it is time to pause and reflect.', - "If you tell the truth, you don't have to remember anything.", - 'Clothes make the man. Naked people have little or no influence on society.', - "It's not the size of the dog in the fight, it's the size of the fight in the dog.", - "Truth is stranger than fiction, but it is because Fiction is obliged to stick to possibilities; Truth isn't.", - 'The man who does not read good books has no advantage over the man who cannot read them.', - 'Get your facts first, and then you can distort them as much as you please.', -].map((q, i) => ({ id: i + 1, quote: q })); diff --git a/aio/content/examples/testing/src/app/twain/twain.service.ts b/aio/content/examples/testing/src/app/twain/twain.service.ts deleted file mode 100644 index af32a0fea8d..00000000000 --- a/aio/content/examples/testing/src/app/twain/twain.service.ts +++ /dev/null @@ -1,45 +0,0 @@ -// Mark Twain Quote service gets quotes from server -import { Injectable } from '@angular/core'; -import { HttpClient, HttpErrorResponse } from '@angular/common/http'; - -import { Observable, of, throwError, Observer } from 'rxjs'; -import { concat, map, retryWhen, switchMap, take, tap } from 'rxjs/operators'; - -import { Quote } from './quote'; - -@Injectable() -export class TwainService { - constructor(private http: HttpClient) {} - - private nextId = 1; - - getQuote(): Observable { - return Observable.create((observer: Observer) => observer.next(this.nextId++)).pipe( - // tap((id: number) => console.log(id)), - // tap((id: number) => { throw new Error('Simulated server error'); }), - - switchMap((id: number) => this.http.get(`api/quotes/${id}`)), - // tap((q : Quote) => console.log(q)), - map((q: Quote) => q.quote), - - // `errors` is observable of http.get errors - retryWhen((errors) => - errors.pipe( - switchMap((error: HttpErrorResponse) => { - if (error.status === 404) { - // Queried for quote that doesn't exist. - this.nextId = 1; // retry with quote id:1 - return of(null); // signal OK to retry - } - // Some other HTTP error. - console.error(error); - return throwError('Cannot get Twain quotes from the server'); - }), - take(2), - // If a second retry value, then didn't find id:1 and triggers the following error - concat(throwError('There are no Twain quotes')), // didn't find id:1 - ), - ), - ); - } -} diff --git a/aio/content/examples/testing/src/app/welcome/welcome.component.spec.ts b/aio/content/examples/testing/src/app/welcome/welcome.component.spec.ts deleted file mode 100755 index 5ed6f612386..00000000000 --- a/aio/content/examples/testing/src/app/welcome/welcome.component.spec.ts +++ /dev/null @@ -1,135 +0,0 @@ -// #docplaster -import { ComponentFixture, inject, TestBed } from '@angular/core/testing'; - -import { UserService } from '../model/user.service'; -import { WelcomeComponent } from './welcome.component'; - -// #docregion mock-user-service -class MockUserService { - isLoggedIn = true; - user = { name: 'Test User' }; -} -// #enddocregion mock-user-service - -describe('WelcomeComponent (class only)', () => { - let comp: WelcomeComponent; - let userService: UserService; - - // #docregion class-only-before-each - beforeEach(() => { - TestBed.configureTestingModule({ - // provide the component-under-test and dependent service - providers: [WelcomeComponent, { provide: UserService, useClass: MockUserService }], - }); - // inject both the component and the dependent service. - comp = TestBed.inject(WelcomeComponent); - userService = TestBed.inject(UserService); - }); - // #enddocregion class-only-before-each - - // #docregion class-only-tests - it('should not have welcome message after construction', () => { - expect(comp.welcome).toBe(''); - }); - - it('should welcome logged in user after Angular calls ngOnInit', () => { - comp.ngOnInit(); - expect(comp.welcome).toContain(userService.user.name); - }); - - it('should ask user to log in if not logged in after ngOnInit', () => { - userService.isLoggedIn = false; - comp.ngOnInit(); - expect(comp.welcome).not.toContain(userService.user.name); - expect(comp.welcome).toContain('log in'); - }); - // #enddocregion class-only-tests -}); - -describe('WelcomeComponent', () => { - let comp: WelcomeComponent; - let fixture: ComponentFixture; - let componentUserService: UserService; // the actually injected service - let userService: UserService; // the TestBed injected service - let el: HTMLElement; // the DOM element with the welcome message - - // #docregion setup, user-service-stub - let userServiceStub: Partial; - - // #enddocregion user-service-stub - beforeEach(() => { - // stub UserService for test purposes - // #docregion user-service-stub - userServiceStub = { - isLoggedIn: true, - user: { name: 'Test User' }, - }; - // #enddocregion user-service-stub - - // #docregion config-test-module - TestBed.configureTestingModule({ - imports: [WelcomeComponent], - // #enddocregion setup - // providers: [ UserService ], // NO! Don't provide the real service! - // Provide a test-double instead - // #docregion setup - providers: [{ provide: UserService, useValue: userServiceStub }], - }); - // #enddocregion config-test-module - - fixture = TestBed.createComponent(WelcomeComponent); - comp = fixture.componentInstance; - - // #enddocregion setup - // #docregion injected-service - // UserService actually injected into the component - userService = fixture.debugElement.injector.get(UserService); - // #enddocregion injected-service - componentUserService = userService; - // #docregion setup - // #docregion inject-from-testbed - // UserService from the root injector - userService = TestBed.inject(UserService); - // #enddocregion inject-from-testbed - - // get the "welcome" element by CSS selector (e.g., by class name) - el = fixture.nativeElement.querySelector('.welcome'); - }); - // #enddocregion setup - - // #docregion tests - it('should welcome the user', () => { - fixture.detectChanges(); - const content = el.textContent; - expect(content).withContext('"Welcome ..."').toContain('Welcome'); - expect(content).withContext('expected name').toContain('Test User'); - }); - - it('should welcome "Bubba"', () => { - userService.user.name = 'Bubba'; // welcome message hasn't been shown yet - fixture.detectChanges(); - expect(el.textContent).toContain('Bubba'); - }); - - it('should request login if not logged in', () => { - userService.isLoggedIn = false; // welcome message hasn't been shown yet - fixture.detectChanges(); - const content = el.textContent; - expect(content).withContext('not welcomed').not.toContain('Welcome'); - expect(content) - .withContext('"log in"') - .toMatch(/log in/i); - }); - // #enddocregion tests - - it("should inject the component's UserService instance", inject( - [UserService], - (service: UserService) => { - expect(service).toBe(componentUserService); - }, - )); - - it('TestBed and Component UserService should be the same', () => { - expect(userService).toBe(componentUserService); - }); -}); diff --git a/aio/content/examples/testing/src/app/welcome/welcome.component.ts b/aio/content/examples/testing/src/app/welcome/welcome.component.ts deleted file mode 100755 index 4a928193551..00000000000 --- a/aio/content/examples/testing/src/app/welcome/welcome.component.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { UserService } from '../model/user.service'; - -@Component({ - standalone: true, - selector: 'app-welcome', - template: '

    {{welcome}}

    ', -}) -// #docregion class -export class WelcomeComponent implements OnInit { - welcome = ''; - constructor(private userService: UserService) {} - - ngOnInit(): void { - this.welcome = this.userService.isLoggedIn - ? 'Welcome, ' + this.userService.user.name - : 'Please log in.'; - } -} -// #enddocregion class diff --git a/aio/content/examples/testing/src/expected.ts b/aio/content/examples/testing/src/expected.ts deleted file mode 100644 index 5339fa97259..00000000000 --- a/aio/content/examples/testing/src/expected.ts +++ /dev/null @@ -1 +0,0 @@ -/* Ignore. Satisfies static analysis of router config in app.component.router.spec.ts */ diff --git a/aio/content/examples/testing/src/index-specs.html b/aio/content/examples/testing/src/index-specs.html deleted file mode 100644 index ca132f6cd05..00000000000 --- a/aio/content/examples/testing/src/index-specs.html +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/aio/content/examples/testing/src/index.html b/aio/content/examples/testing/src/index.html deleted file mode 100644 index 8c6b39bc96a..00000000000 --- a/aio/content/examples/testing/src/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - App Under Test - - - - - - - - diff --git a/aio/content/examples/testing/src/main.ts b/aio/content/examples/testing/src/main.ts deleted file mode 100755 index eebe28c15c2..00000000000 --- a/aio/content/examples/testing/src/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// main app entry point -import { bootstrapApplication } from '@angular/platform-browser'; -import { AppComponent } from './app/app.component'; -import { appConfig } from './app/app.config'; - -bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err)); diff --git a/aio/content/examples/testing/src/testing/async-observable-helpers.ts b/aio/content/examples/testing/src/testing/async-observable-helpers.ts deleted file mode 100644 index 4e0035709f3..00000000000 --- a/aio/content/examples/testing/src/testing/async-observable-helpers.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Mock async observables that return asynchronously. - * The observable either emits once and completes or errors. - * - * Must call `tick()` when test with `fakeAsync()`. - * - * THE FOLLOWING DON'T WORK - * Using `of().delay()` triggers TestBed errors; - * see https://github.com/angular/angular/issues/10127 . - * - * Using `asap` scheduler - as in `of(value, asap)` - doesn't work either. - */ -import { defer } from 'rxjs'; - -// #docregion async-data -/** - * Create async observable that emits-once and completes - * after a JS engine turn - */ -export function asyncData(data: T) { - return defer(() => Promise.resolve(data)); -} -// #enddocregion async-data - -// #docregion async-error -/** - * Create async observable error that errors - * after a JS engine turn - */ -export function asyncError(errorObject: any) { - return defer(() => Promise.reject(errorObject)); -} -// #enddocregion async-error diff --git a/aio/content/examples/testing/src/testing/index.ts b/aio/content/examples/testing/src/testing/index.ts deleted file mode 100644 index ca856e71a4e..00000000000 --- a/aio/content/examples/testing/src/testing/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { DebugElement } from '@angular/core'; -import { ComponentFixture, tick } from '@angular/core/testing'; - -export * from './async-observable-helpers'; -export * from './jasmine-matchers'; - -///// Short utilities ///// - -/** Wait a tick, then detect changes */ -export function advance(f: ComponentFixture): void { - tick(); - f.detectChanges(); -} - -// See https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/button -// #docregion click-event -/** Button events to pass to `DebugElement.triggerEventHandler` for RouterLink event handler */ -export const ButtonClickEvents = { - left: { button: 0 }, - right: { button: 2 }, -}; - -/** Simulate element click. Defaults to mouse left-button click event. */ -export function click( - el: DebugElement | HTMLElement, - eventObj: any = ButtonClickEvents.left, -): void { - if (el instanceof HTMLElement) { - el.click(); - } else { - el.triggerEventHandler('click', eventObj); - } -} -// #enddocregion click-event diff --git a/aio/content/examples/testing/src/testing/jasmine-matchers.d.ts b/aio/content/examples/testing/src/testing/jasmine-matchers.d.ts deleted file mode 100644 index cafce642f9a..00000000000 --- a/aio/content/examples/testing/src/testing/jasmine-matchers.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -declare namespace jasmine { - interface Matchers { - toHaveText(actual: any, expectationFailOutput?: any): jasmine.CustomMatcher; - } -} diff --git a/aio/content/examples/testing/src/testing/jasmine-matchers.ts b/aio/content/examples/testing/src/testing/jasmine-matchers.ts deleted file mode 100644 index 65c6ee284a0..00000000000 --- a/aio/content/examples/testing/src/testing/jasmine-matchers.ts +++ /dev/null @@ -1,51 +0,0 @@ -/// - -//// Jasmine Custom Matchers //// -// Be sure to extend jasmine-matchers.d.ts when adding matchers - -export function addMatchers(): void { - jasmine.addMatchers({ - toHaveText, - }); -} - -function toHaveText(): jasmine.CustomMatcher { - return { - compare: ( - actual: any, - expectedText: string, - expectationFailOutput?: any, - ): jasmine.CustomMatcherResult => { - const actualText = elementText(actual); - const pass = actualText.indexOf(expectedText) > -1; - const message = pass ? '' : composeMessage(); - return { pass, message }; - - function composeMessage() { - const a = actualText.length < 100 ? actualText : actualText.slice(0, 100) + '...'; - const efo = expectationFailOutput ? ` '${expectationFailOutput}'` : ''; - return `Expected element to have text content '${expectedText}' instead of '${a}'${efo}`; - } - }, - }; -} - -function elementText(n: any): string { - if (n instanceof Array) { - return n.map(elementText).join(''); - } - - if (n.nodeType === Node.COMMENT_NODE) { - return ''; - } - - if (n.nodeType === Node.ELEMENT_NODE && n.hasChildNodes()) { - return elementText(Array.prototype.slice.call(n.childNodes)); - } - - if (n.nativeElement) { - n = n.nativeElement; - } - - return n.textContent; -} diff --git a/aio/content/examples/testing/stackblitz.json b/aio/content/examples/testing/stackblitz.json deleted file mode 100644 index c8d925daaa2..00000000000 --- a/aio/content/examples/testing/stackblitz.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "description": "Heroes Test App", - "files": [ - "src/index.html", - "src/main.ts", - "src/test.ts", - "src/styles.css", - "src/test.css", - "e2e/src/**/*.ts", - "src/app/**/*.css", - "src/app/**/*.html", - "src/app/**/*.ts", - "src/app/**/*.spec.ts", - "src/testing/**/*.ts", - "src/expected.ts", - "karma.conf.js" - ], - "tags": [ - "testing" - ], - "devDependencies": [ - "jasmine-core", - "jasmine-marbles" - ] -} diff --git a/aio/content/examples/toh-pt0/BUILD.bazel b/aio/content/examples/toh-pt0/BUILD.bazel deleted file mode 100644 index a857c9ca038..00000000000 --- a/aio/content/examples/toh-pt0/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt0", -) diff --git a/aio/content/examples/toh-pt0/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt0/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 4dccb587639..00000000000 --- a/aio/content/examples/toh-pt0/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Tour of Heroes', () => { - beforeEach(() => browser.get('/')); - - it('should display "Tour of Heroes"', async () => { - const title = await element(by.css('app-root h1')).getText(); - expect(title).toEqual('Tour of Heroes'); - }); -}); diff --git a/aio/content/examples/toh-pt0/example-config.json b/aio/content/examples/toh-pt0/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt0/src/app/app.component.css b/aio/content/examples/toh-pt0/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt0/src/app/app.component.html b/aio/content/examples/toh-pt0/src/app/app.component.html deleted file mode 100644 index 6213adcb47f..00000000000 --- a/aio/content/examples/toh-pt0/src/app/app.component.html +++ /dev/null @@ -1 +0,0 @@ -

    {{title}}

    diff --git a/aio/content/examples/toh-pt0/src/app/app.component.ts b/aio/content/examples/toh-pt0/src/app/app.component.ts deleted file mode 100644 index 23f7b99a6c0..00000000000 --- a/aio/content/examples/toh-pt0/src/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], -}) -export class AppComponent { - // #docregion set-title - title = 'Tour of Heroes'; - // #enddocregion set-title -} diff --git a/aio/content/examples/toh-pt0/src/index.html b/aio/content/examples/toh-pt0/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt0/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt0/src/main.ts b/aio/content/examples/toh-pt0/src/main.ts deleted file mode 100644 index 46d4cf88707..00000000000 --- a/aio/content/examples/toh-pt0/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); diff --git a/aio/content/examples/toh-pt0/src/styles.1.css b/aio/content/examples/toh-pt0/src/styles.1.css deleted file mode 100644 index c1f208a27a7..00000000000 --- a/aio/content/examples/toh-pt0/src/styles.1.css +++ /dev/null @@ -1,44 +0,0 @@ -/* Application-wide Styles */ -h1 { - color: #369; - font-family: Arial, Helvetica, sans-serif; - font-size: 250%; -} -h2, h3 { - color: #444; - font-family: Arial, Helvetica, sans-serif; - font-weight: lighter; -} -body { - margin: 2em; -} -body, input[type="text"], button { - color: #333; - font-family: Cambria, Georgia, serif; -} -button { - background-color: #eee; - border: none; - border-radius: 4px; - cursor: pointer; - color: black; - font-size: 1.2rem; - padding: 1rem; - margin-right: 1rem; - margin-bottom: 1rem; - margin-top: 1rem; -} -button:hover { - background-color: black; - color: white; -} -button:disabled { - background-color: #eee; - color: #aaa; - cursor: auto; -} - -/* everywhere else */ -* { - font-family: Arial, Helvetica, sans-serif; -} diff --git a/aio/content/examples/toh-pt0/stackblitz.json b/aio/content/examples/toh-pt0/stackblitz.json deleted file mode 100644 index 28c0fc22ad7..00000000000 --- a/aio/content/examples/toh-pt0/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 0", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/app.component.ts", - "tags": ["tutorial", "tour", "heroes"] -} diff --git a/aio/content/examples/toh-pt1/BUILD.bazel b/aio/content/examples/toh-pt1/BUILD.bazel deleted file mode 100644 index 140a40cc8f5..00000000000 --- a/aio/content/examples/toh-pt1/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt1", -) diff --git a/aio/content/examples/toh-pt1/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt1/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 5d431e0563f..00000000000 --- a/aio/content/examples/toh-pt1/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,66 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory method - // Get hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return new Hero( - +id.slice(id.indexOf(' ') + 1), - name.substring(0, name.lastIndexOf(' ')) - ); - } -} - -const nameSuffix = 'X'; -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -describe('Tutorial part 1', () => { - - const expectedHero = { id: 1, name: 'Windstorm' }; - - beforeAll(() => browser.get('')); - - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - const hText = await element(by.css('h1')).getText(); - expect(hText).toEqual(expectedH1, 'h1'); - }); - - it(`shows initial hero details`, async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(expectedHero.id); - expect(hero.name).toEqual(expectedHero.name.toUpperCase()); - }); - - it(`shows updated hero name`, async () => { - await addToHeroName(nameSuffix); - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - const newName = expectedHero.name + nameSuffix; - expect(hero.id).toEqual(expectedHero.id); - expect(hero.name).toEqual(newName.toUpperCase()); - }); - -}); - -function getPageElts() { - return { - heroDetail: element(by.css('app-root')) - }; -} diff --git a/aio/content/examples/toh-pt1/example-config.json b/aio/content/examples/toh-pt1/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt1/src/app/app.component.css b/aio/content/examples/toh-pt1/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt1/src/app/app.component.html b/aio/content/examples/toh-pt1/src/app/app.component.html deleted file mode 100644 index ee3d478e16e..00000000000 --- a/aio/content/examples/toh-pt1/src/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    {{title}}

    - diff --git a/aio/content/examples/toh-pt1/src/app/app.component.ts b/aio/content/examples/toh-pt1/src/app/app.component.ts deleted file mode 100644 index c41599e92ae..00000000000 --- a/aio/content/examples/toh-pt1/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt1/src/app/app.module.ts b/aio/content/examples/toh-pt1/src/app/app.module.ts deleted file mode 100644 index 1c9d0ac4d36..00000000000 --- a/aio/content/examples/toh-pt1/src/app/app.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docplaster -// #docregion -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -// #docregion formsmodule-js-import -import { FormsModule } from '@angular/forms'; // <-- NgModel lives here -// #enddocregion formsmodule-js-import - -import { AppComponent } from './app.component'; -// #docregion heroes-import -import { HeroesComponent } from './heroes/heroes.component'; -// #enddocregion heroes-import - -@NgModule({ - // #docregion declarations - declarations: [ - AppComponent, - HeroesComponent - ], - // #enddocregion declarations - // #docregion ng-imports - imports: [ - BrowserModule, - FormsModule - ], - // #enddocregion ng-imports - providers: [], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/toh-pt1/src/app/hero.ts b/aio/content/examples/toh-pt1/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/toh-pt1/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.1.html b/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.1.html deleted file mode 100644 index 23be7116cce..00000000000 --- a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.1.html +++ /dev/null @@ -1,16 +0,0 @@ - -

    {{hero}}

    - - - -

    {{hero.name}} Details

    -
    id: {{hero.id}}
    -
    name: {{hero.name}}
    - - - -
    - - -
    - diff --git a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.css deleted file mode 100644 index 73592eb3a61..00000000000 --- a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,3 +0,0 @@ -input { - padding: .5rem; -} diff --git a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.html b/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.html deleted file mode 100644 index 9779ee4f183..00000000000 --- a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,9 +0,0 @@ - - -

    {{hero.name | uppercase}} Details

    - -
    id: {{hero.id}}
    -
    - - -
    diff --git a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.ts deleted file mode 100644 index a8f84e6c87c..00000000000 --- a/aio/content/examples/toh-pt1/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -// #docregion, v1 -import { Component } from '@angular/core'; -// #enddocregion v1 -import { Hero } from '../hero'; -// #docregion v1 - -@Component({ - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent { - // #enddocregion, v1 - /* - // #docregion add-hero - hero = 'Windstorm'; - // #enddocregion add-hero - */ - // #docregion - hero: Hero = { - id: 1, - name: 'Windstorm' - }; - // #docregion v1 -} -// #enddocregion, v1 diff --git a/aio/content/examples/toh-pt1/src/index.html b/aio/content/examples/toh-pt1/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt1/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt1/src/main.ts b/aio/content/examples/toh-pt1/src/main.ts deleted file mode 100644 index 785387e54c0..00000000000 --- a/aio/content/examples/toh-pt1/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - -// #enddocregion diff --git a/aio/content/examples/toh-pt1/stackblitz.json b/aio/content/examples/toh-pt1/stackblitz.json deleted file mode 100644 index 0a0ffe97e52..00000000000 --- a/aio/content/examples/toh-pt1/stackblitz.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "description": "Tour of Heroes: Part 1", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*", - "!**/dummy.module.ts" - ], - "file": "src/app/heroes/heroes.component.html", - "tags": ["tutorial", "tour", "heroes"] -} diff --git a/aio/content/examples/toh-pt2/BUILD.bazel b/aio/content/examples/toh-pt2/BUILD.bazel deleted file mode 100644 index c6fcb2e5fae..00000000000 --- a/aio/content/examples/toh-pt2/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt2", -) diff --git a/aio/content/examples/toh-pt2/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt2/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 57da530bc2a..00000000000 --- a/aio/content/examples/toh-pt2/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; -const expectedH2 = 'My Heroes'; -const targetHero = { id: 16, name: 'RubberMan' }; -const nameSuffix = 'X'; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Get hero from s formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Get hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return new Hero( - +id.slice(id.indexOf(' ') + 1), - name.substring(0, name.lastIndexOf(' ')) - ); - } -} - -describe('Tutorial part 2', () => { - beforeAll(() => browser.get('')); - describe('Initial page', initialPageTests); - describe('Select hero', selectHeroTests); - describe('Update hero', updateHeroTests); -}); - -function initialPageTests() { - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - it(`has h2 '${expectedH2}'`, async () => { - await expectHeading(2, expectedH2); - }); - - it('has the right number of heroes', async () => { - const page = getPageElts(); - expect(await page.heroes.count()).toEqual(9); - }); - - it('has no selected hero and no hero details', async () => { - const page = getPageElts(); - expect(await page.selected.isPresent()).toBeFalsy('selected hero'); - expect(await page.heroDetail.isPresent()).toBeFalsy('no hero detail'); - }); -} - -function selectHeroTests() { - it(`selects ${targetHero.name} from hero list`, async () => { - const hero = element(by.cssContainingText('button span.badge', targetHero.id.toString())); - await hero.click(); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`has selected ${targetHero.name}`, async () => { - const page = getPageElts(); - const expectedText = `${targetHero.id} ${targetHero.name}`; - expect((await page.selected.getText()).replace(/\n/g, ' ')).toBe(expectedText); - }); - - it('shows selected hero details', async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - }); -} - -function updateHeroTests() { - it(`can update hero name`, async () => { - await addToHeroName(nameSuffix); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`shows updated hero name in details`, async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName.toUpperCase()); - }); - - it(`shows updated hero name in list`, async () => { - const page = getPageElts(); - const hero = Hero.fromString((await page.selected.getText()).replace(/\n/g, ' ')); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName); - }); - -} - -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); -} - -function getPageElts() { - return { - heroes: element.all(by.css('app-root li button')), - selected: element(by.css('app-root li button.selected')), - heroDetail: element(by.css('app-root > div, app-root > app-heroes > div')) - }; -} diff --git a/aio/content/examples/toh-pt2/example-config.json b/aio/content/examples/toh-pt2/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt2/src/app/app.component.css b/aio/content/examples/toh-pt2/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt2/src/app/app.component.html b/aio/content/examples/toh-pt2/src/app/app.component.html deleted file mode 100644 index ee3d478e16e..00000000000 --- a/aio/content/examples/toh-pt2/src/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    {{title}}

    - diff --git a/aio/content/examples/toh-pt2/src/app/app.component.ts b/aio/content/examples/toh-pt2/src/app/app.component.ts deleted file mode 100644 index 9e8ced32a9c..00000000000 --- a/aio/content/examples/toh-pt2/src/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component} from '@angular/core'; -import {HeroesComponent} from './heroes/heroes.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [HeroesComponent], -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt2/src/app/hero.ts b/aio/content/examples/toh-pt2/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/toh-pt2/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.1.html b/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.1.html deleted file mode 100644 index 208c920f97f..00000000000 --- a/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.1.html +++ /dev/null @@ -1,25 +0,0 @@ - -

    My Heroes

    -
      -
    • - -
    • -
    - - - -
  • - - - -
  • - -
  • - - - - -
    -

    {{selectedHero.name | uppercase}} Details

    -
    id: {{selectedHero.id}}
    -
    - - -
    -
    - diff --git a/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.ts deleted file mode 100644 index 8c2e6ff59bc..00000000000 --- a/aio/content/examples/toh-pt2/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,57 +0,0 @@ -import {Component} from '@angular/core'; -// #docregion import-ngfor -import { - // #enddocregion import-ngfor - NgIf, - // #docregion import-ngfor - NgFor, - // #enddocregion import-ngfor - UpperCasePipe, - // #docregion import-ngfor -} from '@angular/common'; -// #enddocregion import-ngfor -import {FormsModule} from '@angular/forms'; - -import {Hero} from '../hero'; -// #docregion import-heroes -import {HEROES} from '../mock-heroes'; -// #enddocregion import-heroes - -// #docplaster -// #docregion metadata, import-ngfor -@Component({ - standalone: true, - // #enddocregion import-ngfor - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'], - // #docregion import-ngfor - imports: [ - // #enddocregion import-ngfor - FormsModule, - NgIf, - // #docregion import-ngfor - NgFor, - // #enddocregion import-ngfor - UpperCasePipe, - // #docregion import-ngfor - ], -}) -// #enddocregion metadata, import-ngfor - -// #docregion component -export class HeroesComponent { - heroes = HEROES; - // #enddocregion component - // #docregion on-select - selectedHero?: Hero; - // #enddocregion on-select - - // #docregion on-select - onSelect(hero: Hero): void { - this.selectedHero = hero; - } - // #enddocregion on-select - // #docregion component -} -// #enddocregion component diff --git a/aio/content/examples/toh-pt2/src/app/mock-heroes.ts b/aio/content/examples/toh-pt2/src/app/mock-heroes.ts deleted file mode 100644 index 33729c43e37..00000000000 --- a/aio/content/examples/toh-pt2/src/app/mock-heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/toh-pt2/src/index.html b/aio/content/examples/toh-pt2/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt2/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt2/src/main.ts b/aio/content/examples/toh-pt2/src/main.ts deleted file mode 100644 index 825e56350b6..00000000000 --- a/aio/content/examples/toh-pt2/src/main.ts +++ /dev/null @@ -1,10 +0,0 @@ -// #docregion -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); - -// #enddocregion diff --git a/aio/content/examples/toh-pt2/stackblitz.json b/aio/content/examples/toh-pt2/stackblitz.json deleted file mode 100644 index 5dfe10d293e..00000000000 --- a/aio/content/examples/toh-pt2/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 2", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/heroes/heroes.component.html", - "tags": ["tutorial", "tour", "heroes"] -} diff --git a/aio/content/examples/toh-pt3/BUILD.bazel b/aio/content/examples/toh-pt3/BUILD.bazel deleted file mode 100644 index 801be3c9da9..00000000000 --- a/aio/content/examples/toh-pt3/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt3", -) diff --git a/aio/content/examples/toh-pt3/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt3/e2e/src/app.e2e-spec.ts deleted file mode 100644 index f7f2db0cf52..00000000000 --- a/aio/content/examples/toh-pt3/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; -const expectedH2 = 'My Heroes'; -const targetHero = { id: 16, name: 'RubberMan' }; -const nameSuffix = 'X'; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Get hero from s formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Get hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return new Hero( - +id.slice(id.indexOf(' ') + 1), - name.substring(0, name.lastIndexOf(' ')) - ); - } -} - -describe('Tutorial part 3', () => { - beforeAll(() => browser.get('')); - describe('Initial page', initialPageTests); - describe('Select hero', selectHeroTests); - describe('Update hero', updateHeroTests); -}); - -function initialPageTests() { - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - it(`has h2 '${expectedH2}'`, async () => { - await expectHeading(2, expectedH2); - }); - - it('has the right number of heroes', async () => { - const page = getPageElts(); - expect(await page.heroes.count()).toEqual(9); - }); - - it('has no selected hero and no hero details', async () => { - const page = getPageElts(); - expect(await page.selected.isPresent()).toBeFalsy('selected hero'); - expect(await page.heroDetail.isPresent()).toBeFalsy('no hero detail'); - }); -} - -function selectHeroTests() { - it(`selects ${targetHero.name} from hero list`, async () => { - const hero = element(by.cssContainingText('li button', targetHero.id.toString() + targetHero.name.toString())); - await hero.click(); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`has selected ${targetHero.name}`, async () => { - const page = getPageElts(); - const expectedText = `${targetHero.id} ${targetHero.name}`; - expect((await page.selected.getText()).replace(/\n/g, ' ')).toBe(expectedText); - }); - - it('shows selected hero details', async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - }); -} - -function updateHeroTests() { - it(`can update hero name`, async () => { - await addToHeroName(nameSuffix); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`shows updated hero name in details`, async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName.toUpperCase()); - }); - - it(`shows updated hero name in list`, async () => { - const page = getPageElts(); - const hero = Hero.fromString(await (await page.selected.getText()).replace(/\n/g, ' ')); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName); - }); - -} - -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); -} - -function getPageElts() { - return { - heroes: element.all(by.css('app-root li button')), - selected: element(by.css('app-root li button.selected')), - heroDetail: element(by.css('app-root > div, app-root > app-heroes > app-hero-detail > div')) - }; -} diff --git a/aio/content/examples/toh-pt3/example-config.json b/aio/content/examples/toh-pt3/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt3/src/app/app.component.css b/aio/content/examples/toh-pt3/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt3/src/app/app.component.html b/aio/content/examples/toh-pt3/src/app/app.component.html deleted file mode 100644 index ee3d478e16e..00000000000 --- a/aio/content/examples/toh-pt3/src/app/app.component.html +++ /dev/null @@ -1,2 +0,0 @@ -

    {{title}}

    - diff --git a/aio/content/examples/toh-pt3/src/app/app.component.ts b/aio/content/examples/toh-pt3/src/app/app.component.ts deleted file mode 100644 index 9e8ced32a9c..00000000000 --- a/aio/content/examples/toh-pt3/src/app/app.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import {Component} from '@angular/core'; -import {HeroesComponent} from './heroes/heroes.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [HeroesComponent], -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.css deleted file mode 100644 index 73592eb3a61..00000000000 --- a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,3 +0,0 @@ -input { - padding: .5rem; -} diff --git a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.html deleted file mode 100644 index 86403ce04ed..00000000000 --- a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,10 +0,0 @@ -
    - -

    {{hero.name | uppercase}} Details

    -
    id: {{hero.id}}
    -
    - - -
    - -
    diff --git a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts deleted file mode 100644 index ced73276a1a..00000000000 --- a/aio/content/examples/toh-pt3/src/app/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -// #docregion import-input -import {Component, Input} from '@angular/core'; -// #enddocregion import-input -import {NgIf, UpperCasePipe} from '@angular/common'; -import {FormsModule} from '@angular/forms'; -// #docregion import-hero -import {Hero} from '../hero'; -// #enddocregion import-hero - -@Component({ - standalone: true, - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'], - imports: [FormsModule, NgIf, UpperCasePipe], -}) -export class HeroDetailComponent { - // #docregion input-hero - @Input() hero?: Hero; - // #enddocregion input-hero -} diff --git a/aio/content/examples/toh-pt3/src/app/hero.ts b/aio/content/examples/toh-pt3/src/app/hero.ts deleted file mode 100644 index 2b89781da5d..00000000000 --- a/aio/content/examples/toh-pt3/src/app/hero.ts +++ /dev/null @@ -1,5 +0,0 @@ -// #docregion -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.css deleted file mode 100644 index 13e0d737163..00000000000 --- a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,65 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} -.heroes li { - display: flex; -} - -.heroes button { - flex: 1; - cursor: pointer; - position: relative; - left: 0; - background-color: #EEE; - margin: .5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; - height: 1.8em; -} - -.heroes button:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: .1em; -} - -.heroes button:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.selected { - background-color: black; - color: white; -} - -.heroes button.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - align-self: center; -} diff --git a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.html b/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.html deleted file mode 100644 index 87afddac004..00000000000 --- a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,14 +0,0 @@ -

    My Heroes

    - -
      -
    • - -
    • -
    - - - - diff --git a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.ts deleted file mode 100644 index 39687c635fb..00000000000 --- a/aio/content/examples/toh-pt3/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import {Component} from '@angular/core'; -import {NgFor} from '@angular/common'; -import {HeroDetailComponent} from '../hero-detail/hero-detail.component'; -import {Hero} from '../hero'; -import {HEROES} from '../mock-heroes'; - -@Component({ - standalone: true, - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'], - imports: [HeroDetailComponent, NgFor], -}) -export class HeroesComponent { - heroes = HEROES; - - selectedHero!: Hero; - - onSelect(hero: Hero): void { - this.selectedHero = hero; - } -} diff --git a/aio/content/examples/toh-pt3/src/app/mock-heroes.ts b/aio/content/examples/toh-pt3/src/app/mock-heroes.ts deleted file mode 100644 index 33729c43e37..00000000000 --- a/aio/content/examples/toh-pt3/src/app/mock-heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/toh-pt3/src/index.html b/aio/content/examples/toh-pt3/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt3/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt3/src/main.ts b/aio/content/examples/toh-pt3/src/main.ts deleted file mode 100644 index 1b858824bf8..00000000000 --- a/aio/content/examples/toh-pt3/src/main.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); -// #enddocregion diff --git a/aio/content/examples/toh-pt3/stackblitz.json b/aio/content/examples/toh-pt3/stackblitz.json deleted file mode 100644 index cdc9087616e..00000000000 --- a/aio/content/examples/toh-pt3/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 3", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1].*" - ], - "file": "src/app/heroes/heroes.component.html", - "tags": ["tutorial", "tour", "heroes"] -} diff --git a/aio/content/examples/toh-pt4/BUILD.bazel b/aio/content/examples/toh-pt4/BUILD.bazel deleted file mode 100644 index 3ea67c6b71f..00000000000 --- a/aio/content/examples/toh-pt4/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt4", -) diff --git a/aio/content/examples/toh-pt4/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt4/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 977fdc2ffdd..00000000000 --- a/aio/content/examples/toh-pt4/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,134 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; -const expectedH2 = 'My Heroes'; -const targetHero = { id: 16, name: 'RubberMan' }; -const nameSuffix = 'X'; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Get hero from s formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Get hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return new Hero( - +id.slice(id.indexOf(' ') + 1), - name.substring(0, name.lastIndexOf(' ')) - ); - } -} - -describe('Tutorial part 4', () => { - beforeAll(() => browser.get('')); - describe('Initial page', initialPageTests); - describe('Select hero', selectHeroTests); - describe('Update hero', updateHeroTests); -}); - -function initialPageTests() { - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - it(`has h2 '${expectedH2}'`, async () => { - await expectHeading(2, expectedH2); - }); - - it('has the right number of heroes', async () => { - const page = getPageElts(); - expect(await page.heroes.count()).toEqual(9); - }); - - it('has no selected hero and no hero details', async () => { - const page = getPageElts(); - expect(await page.selected.isPresent()).toBeFalsy('selected hero'); - expect(await page.heroDetail.isPresent()).toBeFalsy('no hero detail'); - }); -} - -function selectHeroTests() { - it(`selects ${targetHero.name} from hero list`, async () => { - const hero = element(by.cssContainingText('li span.badge', targetHero.id.toString())); - await hero.click(); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`has selected ${targetHero.name}`, async () => { - const page = getPageElts(); - const expectedText = `${targetHero.id} ${targetHero.name}`; - expect((await page.selected.getText()).replace(/\n/g, ' ')).toBe(expectedText); - }); - - it('shows selected hero details', async () => { - const page = getPageElts(); - const heroElement = element(by.cssContainingText('li span.badge', targetHero.id.toString())); - await heroElement.click(); - const message = element.all(by.css('app-root > app-messages > div > div')).get(1); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - // Message text contain id number matches the hero.id number - expect(await message.getText()).toContain(await heroElement.getAttribute('id')); - }); -} - -function updateHeroTests() { - it(`can update hero name`, async () => { - await addToHeroName(nameSuffix); - // Nothing specific to expect other than lack of exceptions. - }); - - it(`shows updated hero name in details`, async () => { - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName.toUpperCase()); - }); - - it(`shows updated hero name in list`, async () => { - const page = getPageElts(); - const hero = Hero.fromString((await page.selected.getText()).replace(/\n/g, ' ')); - const newName = targetHero.name + nameSuffix; - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newName); - }); - -} - -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); -} - -function getPageElts() { - return { - heroes: element.all(by.css('app-root li button')), - selected: element(by.css('app-root li button.selected')), - heroDetail: element(by.css('app-root > div, app-root > app-heroes > app-hero-detail > div')) - }; -} diff --git a/aio/content/examples/toh-pt4/example-config.json b/aio/content/examples/toh-pt4/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt4/src/app/app.component.css b/aio/content/examples/toh-pt4/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt4/src/app/app.component.html b/aio/content/examples/toh-pt4/src/app/app.component.html deleted file mode 100644 index cb45ac499a4..00000000000 --- a/aio/content/examples/toh-pt4/src/app/app.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    {{title}}

    - - diff --git a/aio/content/examples/toh-pt4/src/app/app.component.ts b/aio/content/examples/toh-pt4/src/app/app.component.ts deleted file mode 100644 index c41599e92ae..00000000000 --- a/aio/content/examples/toh-pt4/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt4/src/app/app.module.ts b/aio/content/examples/toh-pt4/src/app/app.module.ts deleted file mode 100644 index 6b5c794f5b6..00000000000 --- a/aio/content/examples/toh-pt4/src/app/app.module.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; -import { FormsModule } from '@angular/forms'; -import { AppComponent } from './app.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; -import { MessagesComponent } from './messages/messages.component'; - -@NgModule({ - declarations: [ - AppComponent, - HeroesComponent, - HeroDetailComponent, - MessagesComponent - ], - imports: [ - BrowserModule, - FormsModule - ], - providers: [ - // no need to place any providers due to the `providedIn` flag... - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.css deleted file mode 100644 index 73592eb3a61..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,3 +0,0 @@ -input { - padding: .5rem; -} diff --git a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.html deleted file mode 100644 index 9b7315cae8c..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
    -

    {{hero.name | uppercase}} Details

    -
    id: {{hero.id}}
    -
    - - -
    -
    diff --git a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.ts deleted file mode 100644 index 9bc782caa76..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component, Input } from '@angular/core'; -import { Hero } from '../hero'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: ['./hero-detail.component.css'] -}) -export class HeroDetailComponent { - - @Input() hero: Hero | undefined; - -} diff --git a/aio/content/examples/toh-pt4/src/app/hero.service.1.ts b/aio/content/examples/toh-pt4/src/app/hero.service.1.ts deleted file mode 100644 index 1e017b379fb..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero.service.1.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* Newly generated and synchronous versions */ -// #docplaster -// #docregion, new -import { Injectable } from '@angular/core'; - -// #enddocregion new -import { Hero } from './hero'; -import { HEROES } from './mock-heroes'; - -// #docregion new -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - - constructor() { } - - // #enddocregion new - // #docregion getHeroes - getHeroes(): Hero[] { - return HEROES; - } - // #enddocregion getHeroes - // #docregion new -} -// #enddocregion, new diff --git a/aio/content/examples/toh-pt4/src/app/hero.service.ts b/aio/content/examples/toh-pt4/src/app/hero.service.ts deleted file mode 100644 index 01b9ba11168..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero.service.ts +++ /dev/null @@ -1,36 +0,0 @@ -// #docplaster -// #docregion -import { Injectable } from '@angular/core'; - -// #docregion import-observable -import { Observable, of } from 'rxjs'; -// #enddocregion import-observable - -// #docregion import-heroes -import { Hero } from './hero'; -import { HEROES } from './mock-heroes'; -// #enddocregion import-heroes -// #docregion import-message-service -import { MessageService } from './message.service'; -// #enddocregion import-message-service - -@Injectable({ - providedIn: 'root', -}) -export class HeroService { - - // #docregion ctor - constructor(private messageService: MessageService) { } - // #enddocregion ctor - - // #docregion getHeroes, getHeroes-1 - getHeroes(): Observable { - const heroes = of(HEROES); - // #enddocregion getHeroes-1 - this.messageService.add('HeroService: fetched heroes'); - // #docregion getHeroes-1 - return heroes; - } - // #enddocregion getHeroes, getHeroes-1 -} -// #enddocregion diff --git a/aio/content/examples/toh-pt4/src/app/hero.ts b/aio/content/examples/toh-pt4/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/toh-pt4/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.1.ts b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.1.ts deleted file mode 100644 index cf775d09522..00000000000 --- a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.1.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; -import { Observable } from 'rxjs'; - -class DummyHeroesComponent { - - heroes: Observable; - // #docregion ctor - constructor(private heroService: HeroService) {} - // #enddocregion ctor - // #docregion getHeroes - getHeroes(): void { - // #docregion get-heroes - this.heroes = this.heroService.getHeroes(); - // #enddocregion get-heroes - } - // #enddocregion getHeroes -} - diff --git a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.css deleted file mode 100644 index 0a3bfded2aa..00000000000 --- a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,66 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -.heroes li { - display: flex; -} - -.heroes button { - flex: 1; - cursor: pointer; - position: relative; - left: 0; - background-color: #EEE; - margin: .5em; - padding: 0; - border-radius: 4px; - display: flex; - align-items: stretch; - height: 1.8em; -} - -.heroes button:hover { - color: #2c3a41; - background-color: #e6e6e6; - left: .1em; -} - -.heroes button:active { - background-color: #525252; - color: #fafafa; -} - -.heroes button.selected { - background-color: black; - color: white; -} - -.heroes button.selected:hover { - background-color: #505050; - color: white; -} - -.heroes button.selected:active { - background-color: black; - color: white; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.heroes .name { - align-self: center; -} diff --git a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.html b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.html deleted file mode 100644 index ed9be7776ee..00000000000 --- a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    My Heroes

    - -
      -
    • - -
    • -
    - - - diff --git a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts deleted file mode 100644 index 21dbff4f2af..00000000000 --- a/aio/content/examples/toh-pt4/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; - -import { Hero } from '../hero'; -// #docregion hero-service-import -import { HeroService } from '../hero.service'; -// #enddocregion hero-service-import -import { MessageService } from '../message.service'; - -@Component({ - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent implements OnInit { - - selectedHero?: Hero; - - // #docregion heroes - heroes: Hero[] = []; - // #enddocregion heroes - - constructor(private heroService: HeroService, private messageService: MessageService) { } - - // #docregion ng-on-init - ngOnInit(): void { - this.getHeroes(); - } - // #enddocregion ng-on-init - - onSelect(hero: Hero): void { - this.selectedHero = hero; - this.messageService.add(`HeroesComponent: Selected hero id=${hero.id}`); - } - - // #docregion getHeroes - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes); - } - // #enddocregion getHeroes -} diff --git a/aio/content/examples/toh-pt4/src/app/message.service.ts b/aio/content/examples/toh-pt4/src/app/message.service.ts deleted file mode 100644 index d72412e115e..00000000000 --- a/aio/content/examples/toh-pt4/src/app/message.service.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ - providedIn: 'root', -}) -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/toh-pt4/src/app/messages/messages.component.css b/aio/content/examples/toh-pt4/src/app/messages/messages.component.css deleted file mode 100644 index 74a85e82b68..00000000000 --- a/aio/content/examples/toh-pt4/src/app/messages/messages.component.css +++ /dev/null @@ -1,19 +0,0 @@ -/* MessagesComponent's private CSS styles */ -h2 { - color: #A80000; - font-family: Arial, Helvetica, sans-serif; - font-weight: lighter; -} - -.clear { - color: #333; - background-color: #eee; - margin-bottom: 12px; - padding: 1rem; - border-radius: 4px; - font-size: 1rem; -} -.clear:hover { - color: white; - background-color: #42545C; -} diff --git a/aio/content/examples/toh-pt4/src/app/messages/messages.component.html b/aio/content/examples/toh-pt4/src/app/messages/messages.component.html deleted file mode 100644 index a93e05f35de..00000000000 --- a/aio/content/examples/toh-pt4/src/app/messages/messages.component.html +++ /dev/null @@ -1,8 +0,0 @@ -
    - -

    Messages

    - -
    {{message}}
    - -
    diff --git a/aio/content/examples/toh-pt4/src/app/messages/messages.component.ts b/aio/content/examples/toh-pt4/src/app/messages/messages.component.ts deleted file mode 100644 index e588224b02b..00000000000 --- a/aio/content/examples/toh-pt4/src/app/messages/messages.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -// #docregion import-message-service -import { MessageService } from '../message.service'; -// #enddocregion import-message-service - -@Component({ - selector: 'app-messages', - templateUrl: './messages.component.html', - styleUrls: ['./messages.component.css'] -}) -export class MessagesComponent { - - // #docregion ctor - constructor(public messageService: MessageService) {} - // #enddocregion ctor - -} diff --git a/aio/content/examples/toh-pt4/src/app/mock-heroes.ts b/aio/content/examples/toh-pt4/src/app/mock-heroes.ts deleted file mode 100644 index 6ffcaa980e8..00000000000 --- a/aio/content/examples/toh-pt4/src/app/mock-heroes.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/toh-pt4/src/index.html b/aio/content/examples/toh-pt4/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt4/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt4/src/main.ts b/aio/content/examples/toh-pt4/src/main.ts deleted file mode 100644 index 1e3bab6e5eb..00000000000 --- a/aio/content/examples/toh-pt4/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - diff --git a/aio/content/examples/toh-pt4/stackblitz.json b/aio/content/examples/toh-pt4/stackblitz.json deleted file mode 100644 index d026bfdb93f..00000000000 --- a/aio/content/examples/toh-pt4/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 4", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/hero.service.ts", - "tags": ["tutorial", "tour", "heroes"] -} diff --git a/aio/content/examples/toh-pt5/BUILD.bazel b/aio/content/examples/toh-pt5/BUILD.bazel deleted file mode 100644 index d9b9a3b1585..00000000000 --- a/aio/content/examples/toh-pt5/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt5", -) diff --git a/aio/content/examples/toh-pt5/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt5/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 069d710c11a..00000000000 --- a/aio/content/examples/toh-pt5/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,170 +0,0 @@ -import { browser, element, by, ElementFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; -const targetHero = { id: 16, name: 'RubberMan' }; -const targetHeroDashboardIndex = 3; -const nameSuffix = 'X'; -const newHeroName = targetHero.name + nameSuffix; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Get hero from s formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Get hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return { - id: +id.slice(id.indexOf(' ') + 1), - name: name.substring(0, name.lastIndexOf(' ')) - }; - } -} - -describe('Tutorial part 5', () => { - - beforeAll(() => browser.get('')); - - function getPageElts() { - const navElts = element.all(by.css('app-root nav a')); - - return { - navElts, - - appDashboardHref: navElts.get(0), - appDashboard: element(by.css('app-root app-dashboard')), - topHeroes: element.all(by.css('app-root app-dashboard > div a')), - - appHeroesHref: navElts.get(1), - appHeroes: element(by.css('app-root app-heroes')), - allHeroes: element.all(by.css('app-root app-heroes li')), - heroDetail: element(by.css('app-root app-hero-detail > div')) - }; - } - - describe('Initial page', () => { - - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - const expectedViewNames = ['Dashboard', 'Heroes']; - it(`has views ${expectedViewNames}`, async () => { - const viewNames = await getPageElts().navElts.map(el => el!.getText()); - expect(viewNames).toEqual(expectedViewNames); - }); - - it('has dashboard as the active view', async () => { - const page = getPageElts(); - expect(await page.appDashboard.isPresent()).toBeTruthy(); - }); - - }); - - describe('Dashboard tests', () => { - - beforeAll(() => browser.get('')); - - it('has top heroes', async () => { - const page = getPageElts(); - expect(await page.topHeroes.count()).toEqual(4); - }); - - it(`selects and routes to ${targetHero.name} details`, dashboardSelectTargetHero); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`saves and shows ${newHeroName} in Dashboard`, async () => { - await element(by.buttonText('go back')).click(); - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(newHeroName); - }); - - }); - - describe('Heroes tests', () => { - - beforeAll(() => browser.get('')); - - it('can switch to Heroes view', async () => { - await getPageElts().appHeroesHref.click(); - const page = getPageElts(); - expect(await page.appHeroes.isPresent()).toBeTruthy(); - expect(await page.allHeroes.count()).toEqual(9, 'number of heroes'); - }); - - it('can route to hero details', async () => { - await getHeroLiEltById(targetHero.id).click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - }); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`shows ${newHeroName} in Heroes list`, async () => { - await element(by.buttonText('go back')).click(); - const expectedText = `${targetHero.id} ${newHeroName}`; - expect(await getHeroLiEltById(targetHero.id).getText()).toEqual(expectedText); - }); - - }); - - async function dashboardSelectTargetHero() { - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(targetHero.name); - await targetHeroElt.click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - } - - async function updateHeroNameInDetailView() { - // Assumes that the current view is the hero details view. - await addToHeroName(nameSuffix); - - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newHeroName.toUpperCase()); - } - -}); - -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); -} - -function getHeroLiEltById(id: number) { - const spanForId = element(by.cssContainingText('li span.badge', id.toString())); - return spanForId.element(by.xpath('..')); -} diff --git a/aio/content/examples/toh-pt5/example-config.json b/aio/content/examples/toh-pt5/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/toh-pt5/src/app/app-routing.module.0.ts b/aio/content/examples/toh-pt5/src/app/app-routing.module.0.ts deleted file mode 100644 index c855135b75e..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app-routing.module.0.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from '@angular/core'; -import { CommonModule } from '@angular/common'; - -@NgModule({ - imports: [ - CommonModule - ], - declarations: [] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/toh-pt5/src/app/app-routing.module.1.ts b/aio/content/examples/toh-pt5/src/app/app-routing.module.1.ts deleted file mode 100644 index 69ce7c03e9b..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app-routing.module.1.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; -import { HeroesComponent } from './heroes/heroes.component'; - -const routes: Routes = [ - { path: 'heroes', component: HeroesComponent } -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/toh-pt5/src/app/app-routing.module.ts b/aio/content/examples/toh-pt5/src/app/app-routing.module.ts deleted file mode 100644 index f0e3a754ee3..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app-routing.module.ts +++ /dev/null @@ -1,41 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -// #docregion import-dashboard -import { DashboardComponent } from './dashboard/dashboard.component'; -// #enddocregion import-dashboard -import { HeroesComponent } from './heroes/heroes.component'; -// #docregion import-herodetail -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; -// #enddocregion import-herodetail -// #docregion heroes-route - -// #docregion routes -const routes: Routes = [ - // #enddocregion heroes-route - // #docregion redirect-route - { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, - // #enddocregion redirect-route - // #docregion dashboard-route - { path: 'dashboard', component: DashboardComponent }, - // #enddocregion dashboard-route - // #docregion detail-route - { path: 'detail/:id', component: HeroDetailComponent }, - // #enddocregion detail-route - // #docregion heroes-route - { path: 'heroes', component: HeroesComponent } -]; -// #enddocregion routes, heroes-route - -@NgModule({ -// #docregion ngmodule-imports - imports: [ RouterModule.forRoot(routes) ], -// #enddocregion ngmodule-imports -// #docregion export-routermodule - exports: [ RouterModule ] -// #enddocregion export-routermodule -}) -export class AppRoutingModule {} -// #enddocregion diff --git a/aio/content/examples/toh-pt5/src/app/app.component.css b/aio/content/examples/toh-pt5/src/app/app.component.css deleted file mode 100644 index 25d32c9deb5..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app.component.css +++ /dev/null @@ -1,21 +0,0 @@ -/* AppComponent's private CSS styles */ -h1 { - margin-bottom: 0; -} -nav a { - padding: 1rem; - text-decoration: none; - margin-top: 10px; - display: inline-block; - background-color: #e8e8e8; - color: #3d3d3d; - border-radius: 4px; -} - -nav a:hover { - color: white; - background-color: #42545C; -} -nav a:active { - background-color: black; -} diff --git a/aio/content/examples/toh-pt5/src/app/app.component.html b/aio/content/examples/toh-pt5/src/app/app.component.html deleted file mode 100644 index 12e347256e3..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app.component.html +++ /dev/null @@ -1,14 +0,0 @@ - - -

    {{title}}

    - - - - - - diff --git a/aio/content/examples/toh-pt5/src/app/app.component.ts b/aio/content/examples/toh-pt5/src/app/app.component.ts deleted file mode 100644 index c41599e92ae..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt5/src/app/app.module.ts b/aio/content/examples/toh-pt5/src/app/app.module.ts deleted file mode 100644 index 7808a72da1f..00000000000 --- a/aio/content/examples/toh-pt5/src/app/app.module.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; - -import { AppComponent } from './app.component'; -import { DashboardComponent } from './dashboard/dashboard.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { MessagesComponent } from './messages/messages.component'; - -import { AppRoutingModule } from './app-routing.module'; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - DashboardComponent, - HeroesComponent, - HeroDetailComponent, - MessagesComponent - ], - bootstrap: [ AppComponent ] -}) -export class AppModule { } diff --git a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.1.html b/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.1.html deleted file mode 100644 index b47dd1654bb..00000000000 --- a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.1.html +++ /dev/null @@ -1,6 +0,0 @@ -

    Top Heroes

    - diff --git a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.css b/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.css deleted file mode 100644 index 3eec068c24b..00000000000 --- a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.css +++ /dev/null @@ -1,50 +0,0 @@ -/* DashboardComponent's private CSS styles */ - -h2 { - text-align: center; -} - -.heroes-menu { - padding: 0; - margin: auto; - max-width: 1000px; - - /* flexbox */ - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-around; - align-content: flex-start; - align-items: flex-start; -} - -a { - background-color: #3f525c; - border-radius: 2px; - padding: 1rem; - font-size: 1.2rem; - text-decoration: none; - display: inline-block; - color: #fff; - text-align: center; - width: 100%; - min-width: 70px; - margin: .5rem auto; - box-sizing: border-box; - - /* flexbox */ - order: 0; - flex: 0 1 auto; - align-self: auto; -} - -@media (min-width: 600px) { - a { - width: 18%; - box-sizing: content-box; - } -} - -a:hover { - background-color: #000; -} diff --git a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.html b/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.html deleted file mode 100644 index aa0505dcf57..00000000000 --- a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    Top Heroes

    - diff --git a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.ts b/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.ts deleted file mode 100644 index 243514c6605..00000000000 --- a/aio/content/examples/toh-pt5/src/app/dashboard/dashboard.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-dashboard', - templateUrl: './dashboard.component.html', - styleUrls: [ './dashboard.component.css' ] -}) -export class DashboardComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit(): void { - this.getHeroes(); - } - - // #docregion getHeroes - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes.slice(1, 5)); - } - // #enddocregion getHeroes -} diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css deleted file mode 100644 index a9f3910419c..00000000000 --- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,24 +0,0 @@ -/* HeroDetailComponent's private CSS styles */ -label { - color: #435960; - font-weight: bold; -} -input { - font-size: 1em; - padding: .5rem; -} -button { - margin-top: 20px; - background-color: #eee; - padding: 1rem; - border-radius: 4px; - font-size: 1rem; -} -button:hover { - background-color: #cfd8dc; -} -button:disabled { - background-color: #eee; - color: #ccc; - cursor: auto; -} diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html deleted file mode 100644 index ec69eee4881..00000000000 --- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,11 +0,0 @@ -
    -

    {{hero.name | uppercase}} Details

    -
    id: {{hero.id}}
    -
    - - -
    - - - -
    diff --git a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts deleted file mode 100644 index fca4e6ace65..00000000000 --- a/aio/content/examples/toh-pt5/src/app/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,47 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; -// #docregion added-imports -import { ActivatedRoute } from '@angular/router'; -import { Location } from '@angular/common'; - -// #enddocregion added-imports -import { Hero } from '../hero'; -// #docregion added-imports -import { HeroService } from '../hero.service'; -// #enddocregion added-imports - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: [ './hero-detail.component.css' ] -}) -export class HeroDetailComponent implements OnInit { - hero: Hero | undefined; - - // #docregion ctor - constructor( - private route: ActivatedRoute, - private heroService: HeroService, - private location: Location - ) {} - // #enddocregion ctor - - // #docregion ngOnInit - ngOnInit(): void { - this.getHero(); - } - - getHero(): void { - const id = Number(this.route.snapshot.paramMap.get('id')); - this.heroService.getHero(id) - .subscribe(hero => this.hero = hero); - } - // #enddocregion ngOnInit - - // #docregion goBack - goBack(): void { - this.location.back(); - } -// #enddocregion goBack -} diff --git a/aio/content/examples/toh-pt5/src/app/hero.service.ts b/aio/content/examples/toh-pt5/src/app/hero.service.ts deleted file mode 100644 index 8584f0bdc1c..00000000000 --- a/aio/content/examples/toh-pt5/src/app/hero.service.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Injectable } from '@angular/core'; - -import { Observable, of } from 'rxjs'; - -import { Hero } from './hero'; -import { HEROES } from './mock-heroes'; -import { MessageService } from './message.service'; - -@Injectable({ providedIn: 'root' }) -export class HeroService { - - constructor(private messageService: MessageService) { } - - getHeroes(): Observable { - const heroes = of(HEROES); - this.messageService.add('HeroService: fetched heroes'); - return heroes; - } - - // #docregion getHero - getHero(id: number): Observable { - // For now, assume that a hero with the specified `id` always exists. - // Error handling will be added in the next step of the tutorial. - const hero = HEROES.find(h => h.id === id)!; - this.messageService.add(`HeroService: fetched hero id=${id}`); - return of(hero); - } - // #enddocregion getHero -} diff --git a/aio/content/examples/toh-pt5/src/app/hero.ts b/aio/content/examples/toh-pt5/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/toh-pt5/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css deleted file mode 100644 index 6dbba03504b..00000000000 --- a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,54 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} -.heroes li { - position: relative; - cursor: pointer; -} - -.heroes li:hover { - left: .1em; -} - -.heroes a { - color: #333; - text-decoration: none; - background-color: #EEE; - margin: .5em; - padding: .3em 0; - height: 1.6em; - border-radius: 4px; - display: block; - width: 100%; -} - -.heroes a:hover { - color: #2c3a41; - background-color: #e6e6e6; -} - -.heroes a:active { - background-color: #525252; - color: #fafafa; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - position: relative; - left: -1px; - top: -4px; - height: 1.8em; - min-width: 16px; - text-align: right; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} diff --git a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.html b/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.html deleted file mode 100644 index bd7e454e45e..00000000000 --- a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,10 +0,0 @@ -

    My Heroes

    - - - diff --git a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.ts deleted file mode 100644 index 29a691de096..00000000000 --- a/aio/content/examples/toh-pt5/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'] -}) -// #docregion class -export class HeroesComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit(): void { - this.getHeroes(); - } - - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes); - } -} -// #enddocregion class diff --git a/aio/content/examples/toh-pt5/src/app/message.service.ts b/aio/content/examples/toh-pt5/src/app/message.service.ts deleted file mode 100644 index 30614a8af4f..00000000000 --- a/aio/content/examples/toh-pt5/src/app/message.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ providedIn: 'root' }) -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/toh-pt5/src/app/messages/messages.component.css b/aio/content/examples/toh-pt5/src/app/messages/messages.component.css deleted file mode 100644 index 9a914ecbc2e..00000000000 --- a/aio/content/examples/toh-pt5/src/app/messages/messages.component.css +++ /dev/null @@ -1,19 +0,0 @@ -/* MessagesComponent's private CSS styles */ -h2 { - color: #A80000; - font-family: Arial, Helvetica, sans-serif; - font-weight: lighter; -} - -.clear { - color: #333; - background-color: #eee; - margin-bottom: 12px; - padding: 1rem; - border-radius: 4px; - font-size: 1rem; -} -.clear:hover { - color: #fff; - background-color: #42545C; -} diff --git a/aio/content/examples/toh-pt5/src/app/messages/messages.component.html b/aio/content/examples/toh-pt5/src/app/messages/messages.component.html deleted file mode 100644 index 5cc9bb470ba..00000000000 --- a/aio/content/examples/toh-pt5/src/app/messages/messages.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
    - -

    Messages

    - -
    {{message}}
    - -
    diff --git a/aio/content/examples/toh-pt5/src/app/messages/messages.component.ts b/aio/content/examples/toh-pt5/src/app/messages/messages.component.ts deleted file mode 100644 index 0462f8eb19d..00000000000 --- a/aio/content/examples/toh-pt5/src/app/messages/messages.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; -import { MessageService } from '../message.service'; - -@Component({ - selector: 'app-messages', - templateUrl: './messages.component.html', - styleUrls: ['./messages.component.css'] -}) -export class MessagesComponent { - - constructor(public messageService: MessageService) {} - -} diff --git a/aio/content/examples/toh-pt5/src/app/mock-heroes.ts b/aio/content/examples/toh-pt5/src/app/mock-heroes.ts deleted file mode 100644 index 6ffcaa980e8..00000000000 --- a/aio/content/examples/toh-pt5/src/app/mock-heroes.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/toh-pt5/src/index.html b/aio/content/examples/toh-pt5/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt5/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt5/src/main.ts b/aio/content/examples/toh-pt5/src/main.ts deleted file mode 100644 index 1e3bab6e5eb..00000000000 --- a/aio/content/examples/toh-pt5/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - diff --git a/aio/content/examples/toh-pt5/stackblitz.json b/aio/content/examples/toh-pt5/stackblitz.json deleted file mode 100644 index 337ef44618e..00000000000 --- a/aio/content/examples/toh-pt5/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 5", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[0,1,2,3].*" - ], - "file": "src/app/app-routing.module.ts", - "tags": ["tutorial", "tour", "heroes", "router"] -} diff --git a/aio/content/examples/toh-pt6/BUILD.bazel b/aio/content/examples/toh-pt6/BUILD.bazel deleted file mode 100644 index a05796f1ecb..00000000000 --- a/aio/content/examples/toh-pt6/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "toh-pt6", -) diff --git a/aio/content/examples/toh-pt6/e2e/src/app.e2e-spec.ts b/aio/content/examples/toh-pt6/e2e/src/app.e2e-spec.ts deleted file mode 100644 index fe74d1cd345..00000000000 --- a/aio/content/examples/toh-pt6/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,301 +0,0 @@ -import { browser, element, by, ElementFinder, ElementArrayFinder } from 'protractor'; - -const expectedH1 = 'Tour of Heroes'; -const expectedTitle = `${expectedH1}`; -const targetHero = { id: 15, name: 'Magneta' }; -const targetHeroDashboardIndex = 2; -const nameSuffix = 'X'; -const newHeroName = targetHero.name + nameSuffix; - -class Hero { - constructor(public id: number, public name: string) {} - - // Factory methods - - // Hero from string formatted as ' '. - static fromString(s: string): Hero { - return new Hero( - +s.substring(0, s.indexOf(' ')), - s.slice(s.indexOf(' ') + 1), - ); - } - - // Hero from hero list
  • element. - static async fromLi(li: ElementFinder): Promise { - const stringsFromA = await li.all(by.css('a')).getText(); - const strings = stringsFromA[0].split(' '); - return { id: +strings[0], name: strings[1] }; - } - - // Hero id and name from the given detail element. - static async fromDetail(detail: ElementFinder): Promise { - // Get hero id from the first
    - const id = await detail.all(by.css('div')).first().getText(); - // Get name from the h2 - const name = await detail.element(by.css('h2')).getText(); - return { - id: +id.slice(id.indexOf(' ') + 1), - name: name.substring(0, name.lastIndexOf(' ')) - }; - } -} - -describe('Tutorial part 6', () => { - - beforeAll(() => browser.get('')); - - function getPageElts() { - const navElts = element.all(by.css('app-root nav a')); - - return { - navElts, - - appDashboardHref: navElts.get(0), - appDashboard: element(by.css('app-root app-dashboard')), - topHeroes: element.all(by.css('app-root app-dashboard > div a')), - - appHeroesHref: navElts.get(1), - appHeroes: element(by.css('app-root app-heroes')), - allHeroes: element.all(by.css('app-root app-heroes li')), - selectedHeroSubview: element(by.css('app-root app-heroes > div:last-child')), - - heroDetail: element(by.css('app-root app-hero-detail > div')), - - searchBox: element(by.css('#search-box')), - searchResults: element.all(by.css('.search-result li')) - }; - } - - describe('Initial page', () => { - - it(`has title '${expectedTitle}'`, async () => { - expect(await browser.getTitle()).toEqual(expectedTitle); - }); - - it(`has h1 '${expectedH1}'`, async () => { - await expectHeading(1, expectedH1); - }); - - const expectedViewNames = ['Dashboard', 'Heroes']; - it(`has views ${expectedViewNames}`, async () => { - const viewNames = await getPageElts().navElts.map(el => el!.getText()); - expect(viewNames).toEqual(expectedViewNames); - }); - - it('has dashboard as the active view', async () => { - const page = getPageElts(); - expect(await page.appDashboard.isPresent()).toBeTruthy(); - }); - - }); - - describe('Dashboard tests', () => { - - beforeAll(() => browser.get('')); - - it('has top heroes', async () => { - const page = getPageElts(); - expect(await page.topHeroes.count()).toEqual(4); - }); - - it(`selects and routes to ${targetHero.name} details`, dashboardSelectTargetHero); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`cancels and shows ${targetHero.name} in Dashboard`, async () => { - await element(by.buttonText('go back')).click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(targetHero.name); - }); - - it(`selects and routes to ${targetHero.name} details`, dashboardSelectTargetHero); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`saves and shows ${newHeroName} in Dashboard`, async () => { - await element(by.buttonText('save')).click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(newHeroName); - }); - - }); - - describe('Heroes tests', () => { - - beforeAll(() => browser.get('')); - - it('can switch to Heroes view', async () => { - await getPageElts().appHeroesHref.click(); - const page = getPageElts(); - expect(await page.appHeroes.isPresent()).toBeTruthy(); - expect(await page.allHeroes.count()).toEqual(9, 'number of heroes'); - }); - - it('can route to hero details', async () => { - await getHeroLiEltById(targetHero.id).click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - }); - - it(`updates hero name (${newHeroName}) in details view`, updateHeroNameInDetailView); - - it(`shows ${newHeroName} in Heroes list`, async () => { - await element(by.buttonText('save')).click(); - await browser.waitForAngular(); - const expectedText = `${targetHero.id} ${newHeroName}`; - expect(await getHeroAEltById(targetHero.id).getText()).toEqual(expectedText); - }); - - it(`deletes ${newHeroName} from Heroes list`, async () => { - const heroesBefore = await toHeroArray(getPageElts().allHeroes); - const li = getHeroLiEltById(targetHero.id); - await li.element(by.buttonText('x')).click(); - - const page = getPageElts(); - expect(await page.appHeroes.isPresent()).toBeTruthy(); - expect(await page.allHeroes.count()).toEqual(8, 'number of heroes'); - const heroesAfter = await toHeroArray(page.allHeroes); - // console.log(await Hero.fromLi(page.allHeroes[0])); - const expectedHeroes = heroesBefore.filter(h => h.name !== newHeroName); - expect(heroesAfter).toEqual(expectedHeroes); - // expect(page.selectedHeroSubview.isPresent()).toBeFalsy(); - }); - - it(`adds back ${targetHero.name}`, async () => { - const addedHeroName = 'Alice'; - const heroesBefore = await toHeroArray(getPageElts().allHeroes); - const numHeroes = heroesBefore.length; - - await element(by.css('input')).sendKeys(addedHeroName); - await element(by.buttonText('Add hero')).click(); - - const page = getPageElts(); - const heroesAfter = await toHeroArray(page.allHeroes); - expect(heroesAfter.length).toEqual(numHeroes + 1, 'number of heroes'); - - expect(heroesAfter.slice(0, numHeroes)).toEqual(heroesBefore, 'Old heroes are still there'); - - const maxId = heroesBefore[heroesBefore.length - 1].id; - expect(heroesAfter[numHeroes]).toEqual({id: maxId + 1, name: addedHeroName}); - }); - - it('displays correctly styled buttons', async () => { - const buttons = await element.all(by.buttonText('x')); - - for (const button of buttons) { - // Inherited styles from styles.css - expect(await button.getCssValue('font-family')).toBe('Arial, Helvetica, sans-serif'); - expect(await button.getCssValue('border')).toContain('none'); - expect(await button.getCssValue('padding')).toBe('1px 10px 3px'); - expect(await button.getCssValue('border-radius')).toBe('4px'); - // Styles defined in heroes.component.css - expect(await button.getCssValue('left')).toBe('210px'); - expect(await button.getCssValue('top')).toBe('5px'); - } - - const addButton = element(by.buttonText('Add hero')); - // Inherited styles from styles.css - expect(await addButton.getCssValue('font-family')).toBe('Arial, Helvetica, sans-serif'); - expect(await addButton.getCssValue('border')).toContain('none'); - expect(await addButton.getCssValue('padding')).toBe('8px 24px'); - expect(await addButton.getCssValue('border-radius')).toBe('4px'); - }); - - }); - - describe('Progressive hero search', () => { - - beforeAll(() => browser.get('')); - - it(`searches for 'Ma'`, async () => { - await getPageElts().searchBox.sendKeys('Ma'); - await browser.sleep(1000); - - expect(await getPageElts().searchResults.count()).toBe(4); - }); - - it(`continues search with 'g'`, async () => { - await getPageElts().searchBox.sendKeys('g'); - await browser.sleep(1000); - expect(await getPageElts().searchResults.count()).toBe(2); - }); - - it(`continues search with 'n' and gets ${targetHero.name}`, async () => { - await getPageElts().searchBox.sendKeys('n'); - await browser.sleep(1000); - const page = getPageElts(); - expect(await page.searchResults.count()).toBe(1); - const hero = page.searchResults.get(0); - expect(await hero.getText()).toEqual(targetHero.name); - }); - - it(`navigates to ${targetHero.name} details view`, async () => { - const hero = getPageElts().searchResults.get(0); - expect(await hero.getText()).toEqual(targetHero.name); - await hero.click(); - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero2 = await Hero.fromDetail(page.heroDetail); - expect(hero2.id).toEqual(targetHero.id); - expect(hero2.name).toEqual(targetHero.name.toUpperCase()); - }); - }); - - async function dashboardSelectTargetHero() { - const targetHeroElt = getPageElts().topHeroes.get(targetHeroDashboardIndex); - expect(await targetHeroElt.getText()).toEqual(targetHero.name); - await targetHeroElt.click(); - await browser.waitForAngular(); // seems necessary to gets tests to pass for toh-pt6 - - const page = getPageElts(); - expect(await page.heroDetail.isPresent()).toBeTruthy('shows hero detail'); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(targetHero.name.toUpperCase()); - } - - async function updateHeroNameInDetailView() { - // Assumes that the current view is the hero details view. - await addToHeroName(nameSuffix); - - const page = getPageElts(); - const hero = await Hero.fromDetail(page.heroDetail); - expect(hero.id).toEqual(targetHero.id); - expect(hero.name).toEqual(newHeroName.toUpperCase()); - } - -}); - -async function addToHeroName(text: string): Promise { - const input = element(by.css('input')); - await input.sendKeys(text); -} - -async function expectHeading(hLevel: number, expectedText: string): Promise { - const hTag = `h${hLevel}`; - const hText = await element(by.css(hTag)).getText(); - expect(hText).toEqual(expectedText, hTag); -} - -function getHeroAEltById(id: number): ElementFinder { - const spanForId = element(by.cssContainingText('li span.badge', id.toString())); - return spanForId.element(by.xpath('..')); -} - -function getHeroLiEltById(id: number): ElementFinder { - const spanForId = element(by.cssContainingText('li span.badge', id.toString())); - return spanForId.element(by.xpath('../..')); -} - -async function toHeroArray(allHeroes: ElementArrayFinder): Promise { - return allHeroes.map(hero => Hero.fromLi(hero!)); -} diff --git a/aio/content/examples/toh-pt6/example-config.json b/aio/content/examples/toh-pt6/example-config.json deleted file mode 100644 index ccf472031b4..00000000000 --- a/aio/content/examples/toh-pt6/example-config.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "tests": [ - {"cmd": "yarn", "args": ["test", "--browsers=ChromeHeadlessNoSandbox", "--no-watch"]}, - {"cmd": "yarn", "args": ["e2e", "--configuration=production", "--protractor-config=e2e/protractor-bazel.conf.js", "--no-webdriver-update", "--port=0"]} - ] -} diff --git a/aio/content/examples/toh-pt6/src/app/app-routing.module.ts b/aio/content/examples/toh-pt6/src/app/app-routing.module.ts deleted file mode 100644 index ee43081fc27..00000000000 --- a/aio/content/examples/toh-pt6/src/app/app-routing.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { DashboardComponent } from './dashboard/dashboard.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; - -const routes: Routes = [ - { path: '', redirectTo: '/dashboard', pathMatch: 'full' }, - { path: 'dashboard', component: DashboardComponent }, - { path: 'detail/:id', component: HeroDetailComponent }, - { path: 'heroes', component: HeroesComponent } -]; - -@NgModule({ - imports: [ RouterModule.forRoot(routes) ], - exports: [ RouterModule ] -}) -export class AppRoutingModule {} diff --git a/aio/content/examples/toh-pt6/src/app/app.component.css b/aio/content/examples/toh-pt6/src/app/app.component.css deleted file mode 100644 index 114a0b70dd2..00000000000 --- a/aio/content/examples/toh-pt6/src/app/app.component.css +++ /dev/null @@ -1,20 +0,0 @@ -/* AppComponent's private CSS styles */ -h1 { - margin-bottom: 0; -} -nav a { - padding: 1rem; - text-decoration: none; - margin-top: 10px; - display: inline-block; - background-color: #e8e8e8; - color: #3d3d3d; - border-radius: 4px; -} -nav a:hover { - color: white; - background-color: #42545C; -} -nav a.active { - background-color: black; -} diff --git a/aio/content/examples/toh-pt6/src/app/app.component.html b/aio/content/examples/toh-pt6/src/app/app.component.html deleted file mode 100644 index 49c7d171b69..00000000000 --- a/aio/content/examples/toh-pt6/src/app/app.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    {{title}}

    - - - diff --git a/aio/content/examples/toh-pt6/src/app/app.component.ts b/aio/content/examples/toh-pt6/src/app/app.component.ts deleted file mode 100644 index c41599e92ae..00000000000 --- a/aio/content/examples/toh-pt6/src/app/app.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { - title = 'Tour of Heroes'; -} diff --git a/aio/content/examples/toh-pt6/src/app/app.module.ts b/aio/content/examples/toh-pt6/src/app/app.module.ts deleted file mode 100644 index aa0f35a0d36..00000000000 --- a/aio/content/examples/toh-pt6/src/app/app.module.ts +++ /dev/null @@ -1,57 +0,0 @@ -// #docplaster -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -// #docregion import-http-client -import { HttpClientModule } from '@angular/common/http'; -// #enddocregion import-http-client - -// #docregion import-in-mem-stuff -import { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; -import { InMemoryDataService } from './in-memory-data.service'; -// #enddocregion import-in-mem-stuff - -import { AppRoutingModule } from './app-routing.module'; - -import { AppComponent } from './app.component'; -import { DashboardComponent } from './dashboard/dashboard.component'; -import { HeroDetailComponent } from './hero-detail/hero-detail.component'; -import { HeroesComponent } from './heroes/heroes.component'; -import { HeroSearchComponent } from './hero-search/hero-search.component'; -import { MessagesComponent } from './messages/messages.component'; - - // #docregion import-httpclientmodule -@NgModule({ - imports: [ - // #enddocregion import-httpclientmodule - BrowserModule, - FormsModule, - AppRoutingModule, - // #docregion in-mem-web-api-imports - // #docregion import-httpclientmodule - HttpClientModule, - // #enddocregion import-httpclientmodule - - // The HttpClientInMemoryWebApiModule module intercepts HTTP requests - // and returns simulated server responses. - // Remove it when a real server is ready to receive requests. - HttpClientInMemoryWebApiModule.forRoot( - InMemoryDataService, { dataEncapsulation: false } - ) - // #enddocregion in-mem-web-api-imports - // #docregion import-httpclientmodule - ], - // #enddocregion import-httpclientmodule - declarations: [ - AppComponent, - DashboardComponent, - HeroesComponent, - HeroDetailComponent, - MessagesComponent, - HeroSearchComponent - ], - bootstrap: [ AppComponent ] -// #docregion import-httpclientmodule -}) -// #enddocregion import-httpclientmodule -export class AppModule { } diff --git a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.css b/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.css deleted file mode 100644 index b1e6e6785e8..00000000000 --- a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.css +++ /dev/null @@ -1,54 +0,0 @@ -/* DashboardComponent's private CSS styles */ - -h2 { - text-align: center; -} - -.heroes-menu { - padding: 0; - margin: auto; - max-width: 1000px; - - /* flexbox */ - display: -webkit-box; - display: -moz-box; - display: -ms-flexbox; - display: -webkit-flex; - display: flex; - flex-direction: row; - flex-wrap: wrap; - justify-content: space-around; - align-content: flex-start; - align-items: flex-start; -} - -a { - background-color: #3f525c; - border-radius: 2px; - padding: 1rem; - font-size: 1.2rem; - text-decoration: none; - display: inline-block; - color: #fff; - text-align: center; - width: 100%; - min-width: 70px; - margin: .5rem auto; - box-sizing: border-box; - - /* flexbox */ - order: 0; - flex: 0 1 auto; - align-self: auto; -} - -@media (min-width: 600px) { - a { - width: 18%; - box-sizing: content-box; - } -} - -a:hover { - background-color: black; -} diff --git a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.html b/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.html deleted file mode 100644 index 9a20700f468..00000000000 --- a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.html +++ /dev/null @@ -1,9 +0,0 @@ -

    Top Heroes

    - - - diff --git a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.spec.ts b/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.spec.ts deleted file mode 100644 index eaa34d42890..00000000000 --- a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.spec.ts +++ /dev/null @@ -1,50 +0,0 @@ -import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; -import {RouterModule} from '@angular/router'; -import {of} from 'rxjs'; - -import {HeroSearchComponent} from '../hero-search/hero-search.component'; -import {HeroService} from '../hero.service'; -import {HEROES} from '../mock-heroes'; - -import {DashboardComponent} from './dashboard.component'; - -describe('DashboardComponent', () => { - let component: DashboardComponent; - let fixture: ComponentFixture; - let heroService; - let getHeroesSpy: jasmine.Spy; - - beforeEach(waitForAsync(() => { - heroService = jasmine.createSpyObj('HeroService', ['getHeroes']); - getHeroesSpy = heroService.getHeroes.and.returnValue(of(HEROES)); - TestBed - .configureTestingModule({ - declarations: [DashboardComponent, HeroSearchComponent], - imports: [RouterModule.forRoot([])], - providers: [ - {provide: HeroService, useValue: heroService}, - ] - }) - .compileComponents(); - - fixture = TestBed.createComponent(DashboardComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - })); - - it('should be created', () => { - expect(component).toBeTruthy(); - }); - - it('should display "Top Heroes" as headline', () => { - expect(fixture.nativeElement.querySelector('h2').textContent).toEqual('Top Heroes'); - }); - - it('should call heroService', waitForAsync(() => { - expect(getHeroesSpy.calls.any()).toBe(true); - })); - - it('should display 4 links', waitForAsync(() => { - expect(fixture.nativeElement.querySelectorAll('a').length).toEqual(4); - })); -}); diff --git a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.ts b/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.ts deleted file mode 100644 index c18acd4557b..00000000000 --- a/aio/content/examples/toh-pt6/src/app/dashboard/dashboard.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -import { Component, OnInit } from '@angular/core'; -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-dashboard', - templateUrl: './dashboard.component.html', - styleUrls: [ './dashboard.component.css' ] -}) -export class DashboardComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit(): void { - this.getHeroes(); - } - - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes.slice(1, 5)); - } -} diff --git a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.css b/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.css deleted file mode 100644 index f15f55a4495..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.css +++ /dev/null @@ -1,25 +0,0 @@ -/* HeroDetailComponent's private CSS styles */ -label { - color: #435960; - font-weight: bold; -} -input { - font-size: 1em; - padding: .5rem; -} -button { - margin-top: 20px; - margin-right: .5rem; - background-color: #eee; - padding: 1rem; - border-radius: 4px; - font-size: 1rem; -} -button:hover { - background-color: #cfd8dc; -} -button:disabled { - background-color: #eee; - color: #ccc; - cursor: auto; -} diff --git a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.html b/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.html deleted file mode 100644 index 0ff20b98b5c..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.html +++ /dev/null @@ -1,12 +0,0 @@ -
    -

    {{hero.name | uppercase}} Details

    -
    id: {{hero.id}}
    -
    - - -
    - - - - -
    diff --git a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.ts b/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.ts deleted file mode 100644 index 4d06df16da9..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-detail/hero-detail.component.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Component, OnInit } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; -import { Location } from '@angular/common'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-hero-detail', - templateUrl: './hero-detail.component.html', - styleUrls: [ './hero-detail.component.css' ] -}) -export class HeroDetailComponent implements OnInit { - hero: Hero | undefined; - - constructor( - private route: ActivatedRoute, - private heroService: HeroService, - private location: Location - ) {} - - ngOnInit(): void { - this.getHero(); - } - - getHero(): void { - const id = parseInt(this.route.snapshot.paramMap.get('id')!, 10); - this.heroService.getHero(id) - .subscribe(hero => this.hero = hero); - } - - goBack(): void { - this.location.back(); - } - - // #docregion save - save(): void { - if (this.hero) { - this.heroService.updateHero(this.hero) - .subscribe(() => this.goBack()); - } - } - // #enddocregion save -} diff --git a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.css b/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.css deleted file mode 100644 index ce919d87f46..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.css +++ /dev/null @@ -1,47 +0,0 @@ -/* HeroSearch private styles */ - -label { - display: block; - font-weight: bold; - font-size: 1.2rem; - margin-top: 1rem; - margin-bottom: .5rem; - -} -input { - padding: .5rem; - width: 100%; - max-width: 600px; - box-sizing: border-box; - display: block; -} - -input:focus { - outline: #336699 auto 1px; -} - -li { - list-style-type: none; -} -.search-result li a { - border-bottom: 1px solid gray; - border-left: 1px solid gray; - border-right: 1px solid gray; - display: inline-block; - width: 100%; - max-width: 600px; - padding: .5rem; - box-sizing: border-box; - text-decoration: none; - color: black; -} - -.search-result li a:hover { - background-color: #435A60; - color: white; -} - -ul.search-result { - margin-top: 0; - padding-left: 0; -} diff --git a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.html b/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.html deleted file mode 100644 index 30f649d251e..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.html +++ /dev/null @@ -1,16 +0,0 @@ -
    - - - - - - -
    diff --git a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.ts b/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.ts deleted file mode 100644 index c61309bc4cd..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero-search/hero-search.component.ts +++ /dev/null @@ -1,50 +0,0 @@ -// #docplaster -// #docregion -import { Component, OnInit } from '@angular/core'; - -import { Observable, Subject } from 'rxjs'; - -import { - debounceTime, distinctUntilChanged, switchMap - } from 'rxjs/operators'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-hero-search', - templateUrl: './hero-search.component.html', - styleUrls: [ './hero-search.component.css' ] -}) -export class HeroSearchComponent implements OnInit { - // #docregion heroes-stream - heroes$!: Observable; - // #enddocregion heroes-stream - // #docregion searchTerms - private searchTerms = new Subject(); - // #enddocregion searchTerms - - constructor(private heroService: HeroService) {} - // #docregion searchTerms - - // Push a search term into the observable stream. - search(term: string): void { - this.searchTerms.next(term); - } - // #enddocregion searchTerms - - ngOnInit(): void { - // #docregion search - this.heroes$ = this.searchTerms.pipe( - // wait 300ms after each keystroke before considering the term - debounceTime(300), - - // ignore new term if same as previous term - distinctUntilChanged(), - - // switch to new search observable each time the term changes - switchMap((term: string) => this.heroService.searchHeroes(term)), - ); - // #enddocregion search - } -} diff --git a/aio/content/examples/toh-pt6/src/app/hero.service.ts b/aio/content/examples/toh-pt6/src/app/hero.service.ts deleted file mode 100644 index 1ff9f50e521..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero.service.ts +++ /dev/null @@ -1,156 +0,0 @@ -// #docplaster -// #docregion -import { Injectable } from '@angular/core'; -// #docregion import-httpclient -import { HttpClient, HttpHeaders } from '@angular/common/http'; -// #enddocregion import-httpclient - -import { Observable, of } from 'rxjs'; -// #docregion import-rxjs-operators -import { catchError, map, tap } from 'rxjs/operators'; -// #enddocregion import-rxjs-operators - -import { Hero } from './hero'; -import { MessageService } from './message.service'; - - -@Injectable({ providedIn: 'root' }) -export class HeroService { - - // #docregion heroesUrl - private heroesUrl = 'api/heroes'; // URL to web api - // #enddocregion heroesUrl - - // #docregion http-options - httpOptions = { - headers: new HttpHeaders({ 'Content-Type': 'application/json' }) - }; - // #enddocregion http-options - - // #docregion ctor - constructor( - private http: HttpClient, - private messageService: MessageService) { } - // #enddocregion ctor - - // #docregion getHeroes, getHeroes-1 - /** GET heroes from the server */ - // #docregion getHeroes-2 - getHeroes(): Observable { - return this.http.get(this.heroesUrl) - // #enddocregion getHeroes-1 - .pipe( - // #enddocregion getHeroes-2 - tap(_ => this.log('fetched heroes')), - // #docregion getHeroes-2 - catchError(this.handleError('getHeroes', [])) - ); - // #docregion getHeroes-1 - } - // #enddocregion getHeroes, getHeroes-1, getHeroes-2 - - /** GET hero by id. Return `undefined` when id not found */ - getHeroNo404(id: number): Observable { - const url = `${this.heroesUrl}/?id=${id}`; - return this.http.get(url) - .pipe( - map(heroes => heroes[0]), // returns a {0|1} element array - tap(h => { - const outcome = h ? 'fetched' : 'did not find'; - this.log(`${outcome} hero id=${id}`); - }), - catchError(this.handleError(`getHero id=${id}`)) - ); - } - - // #docregion getHero - /** GET hero by id. Will 404 if id not found */ - getHero(id: number): Observable { - const url = `${this.heroesUrl}/${id}`; - return this.http.get(url).pipe( - tap(_ => this.log(`fetched hero id=${id}`)), - catchError(this.handleError(`getHero id=${id}`)) - ); - } - // #enddocregion getHero - - // #docregion searchHeroes - /* GET heroes whose name contains search term */ - searchHeroes(term: string): Observable { - if (!term.trim()) { - // if not search term, return empty hero array. - return of([]); - } - return this.http.get(`${this.heroesUrl}/?name=${term}`).pipe( - tap(x => x.length ? - this.log(`found heroes matching "${term}"`) : - this.log(`no heroes matching "${term}"`)), - catchError(this.handleError('searchHeroes', [])) - ); - } - // #enddocregion searchHeroes - - //////// Save methods ////////// - - // #docregion addHero - /** POST: add a new hero to the server */ - addHero(hero: Hero): Observable { - return this.http.post(this.heroesUrl, hero, this.httpOptions).pipe( - tap((newHero: Hero) => this.log(`added hero w/ id=${newHero.id}`)), - catchError(this.handleError('addHero')) - ); - } - // #enddocregion addHero - - // #docregion deleteHero - /** DELETE: delete the hero from the server */ - deleteHero(id: number): Observable { - const url = `${this.heroesUrl}/${id}`; - - return this.http.delete(url, this.httpOptions).pipe( - tap(_ => this.log(`deleted hero id=${id}`)), - catchError(this.handleError('deleteHero')) - ); - } - // #enddocregion deleteHero - - // #docregion updateHero - /** PUT: update the hero on the server */ - updateHero(hero: Hero): Observable { - return this.http.put(this.heroesUrl, hero, this.httpOptions).pipe( - tap(_ => this.log(`updated hero id=${hero.id}`)), - catchError(this.handleError('updateHero')) - ); - } - // #enddocregion updateHero - - // #docregion handleError - /** - * Handle Http operation that failed. - * Let the app continue. - * - * @param operation - name of the operation that failed - * @param result - optional value to return as the observable result - */ - private handleError(operation = 'operation', result?: T) { - return (error: any): Observable => { - - // TODO: send the error to remote logging infrastructure - console.error(error); // log to console instead - - // TODO: better job of transforming error for user consumption - this.log(`${operation} failed: ${error.message}`); - - // Let the app keep running by returning an empty result. - return of(result as T); - }; - } - // #enddocregion handleError - - // #docregion log - /** Log a HeroService message with the MessageService */ - private log(message: string) { - this.messageService.add(`HeroService: ${message}`); - } - // #enddocregion log -} diff --git a/aio/content/examples/toh-pt6/src/app/hero.ts b/aio/content/examples/toh-pt6/src/app/hero.ts deleted file mode 100644 index a61b497759b..00000000000 --- a/aio/content/examples/toh-pt6/src/app/hero.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface Hero { - id: number; - name: string; -} diff --git a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.css b/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.css deleted file mode 100644 index 8dfcefb76ef..00000000000 --- a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.css +++ /dev/null @@ -1,90 +0,0 @@ -/* HeroesComponent's private CSS styles */ -.heroes { - margin: 0 0 2em 0; - list-style-type: none; - padding: 0; - width: 15em; -} - -input { - display: block; - width: 100%; - padding: .5rem; - margin: 1rem 0; - box-sizing: border-box; -} - -.heroes li { - position: relative; - cursor: pointer; -} - -.heroes li:hover { - left: .1em; -} - -.heroes a { - color: #333; - text-decoration: none; - background-color: #EEE; - margin: .5em; - padding: .3em 0; - height: 1.6em; - border-radius: 4px; - display: block; - width: 100%; -} - -.heroes a:hover { - color: #2c3a41; - background-color: #e6e6e6; -} - -.heroes a:active { - background-color: #525252; - color: #fafafa; -} - -.heroes .badge { - display: inline-block; - font-size: small; - color: white; - padding: 0.8em 0.7em 0 0.7em; - background-color: #405061; - line-height: 1em; - position: relative; - left: -1px; - top: -4px; - height: 1.8em; - min-width: 16px; - text-align: right; - margin-right: .8em; - border-radius: 4px 0 0 4px; -} - -.add-button { - padding: .5rem 1.5rem; - font-size: 1rem; - margin-bottom: 2rem; -} - -.add-button:hover { - color: white; - background-color: #42545C; -} - -button.delete { - position: absolute; - left: 210px; - top: 5px; - background-color: white; - color: #525252; - font-size: 1.1rem; - margin: 0; - padding: 1px 10px 3px 10px; -} - -button.delete:hover { - background-color: #525252; - color: white; -} diff --git a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.html b/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.html deleted file mode 100644 index 38285c3c0b3..00000000000 --- a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.html +++ /dev/null @@ -1,27 +0,0 @@ -

    My Heroes

    - - -
    - - - - - -
    - - - - - diff --git a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.ts b/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.ts deleted file mode 100644 index 3115f5a48bf..00000000000 --- a/aio/content/examples/toh-pt6/src/app/heroes/heroes.component.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Component, OnInit } from '@angular/core'; - -import { Hero } from '../hero'; -import { HeroService } from '../hero.service'; - -@Component({ - selector: 'app-heroes', - templateUrl: './heroes.component.html', - styleUrls: ['./heroes.component.css'] -}) -export class HeroesComponent implements OnInit { - heroes: Hero[] = []; - - constructor(private heroService: HeroService) { } - - ngOnInit(): void { - this.getHeroes(); - } - - getHeroes(): void { - this.heroService.getHeroes() - .subscribe(heroes => this.heroes = heroes); - } - - // #docregion add - add(name: string): void { - name = name.trim(); - if (!name) { return; } - this.heroService.addHero({ name } as Hero) - .subscribe(hero => { - this.heroes.push(hero); - }); - } - // #enddocregion add - - // #docregion delete - delete(hero: Hero): void { - this.heroes = this.heroes.filter(h => h !== hero); - this.heroService.deleteHero(hero.id).subscribe(); - } - // #enddocregion delete - -} diff --git a/aio/content/examples/toh-pt6/src/app/in-memory-data.service.ts b/aio/content/examples/toh-pt6/src/app/in-memory-data.service.ts deleted file mode 100644 index 9cbda79c079..00000000000 --- a/aio/content/examples/toh-pt6/src/app/in-memory-data.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -// #docregion , init -import { Injectable } from '@angular/core'; -import { InMemoryDbService } from 'angular-in-memory-web-api'; -import { Hero } from './hero'; - -@Injectable({ - providedIn: 'root', -}) -export class InMemoryDataService implements InMemoryDbService { - createDb() { - const heroes = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } - ]; - return {heroes}; - } - - // Overrides the genId method to ensure that a hero always has an id. - // If the heroes array is empty, - // the method below returns the initial number (11). - // if the heroes array is not empty, the method below returns the highest - // hero id + 1. - genId(heroes: Hero[]): number { - return heroes.length > 0 ? Math.max(...heroes.map(hero => hero.id)) + 1 : 11; - } -} diff --git a/aio/content/examples/toh-pt6/src/app/message.service.ts b/aio/content/examples/toh-pt6/src/app/message.service.ts deleted file mode 100644 index 30614a8af4f..00000000000 --- a/aio/content/examples/toh-pt6/src/app/message.service.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({ providedIn: 'root' }) -export class MessageService { - messages: string[] = []; - - add(message: string) { - this.messages.push(message); - } - - clear() { - this.messages = []; - } -} diff --git a/aio/content/examples/toh-pt6/src/app/messages/messages.component.css b/aio/content/examples/toh-pt6/src/app/messages/messages.component.css deleted file mode 100644 index 9a914ecbc2e..00000000000 --- a/aio/content/examples/toh-pt6/src/app/messages/messages.component.css +++ /dev/null @@ -1,19 +0,0 @@ -/* MessagesComponent's private CSS styles */ -h2 { - color: #A80000; - font-family: Arial, Helvetica, sans-serif; - font-weight: lighter; -} - -.clear { - color: #333; - background-color: #eee; - margin-bottom: 12px; - padding: 1rem; - border-radius: 4px; - font-size: 1rem; -} -.clear:hover { - color: #fff; - background-color: #42545C; -} diff --git a/aio/content/examples/toh-pt6/src/app/messages/messages.component.html b/aio/content/examples/toh-pt6/src/app/messages/messages.component.html deleted file mode 100644 index ba38603e78d..00000000000 --- a/aio/content/examples/toh-pt6/src/app/messages/messages.component.html +++ /dev/null @@ -1,9 +0,0 @@ -
    - -

    Messages

    - -
    {{message}}
    - -
    diff --git a/aio/content/examples/toh-pt6/src/app/messages/messages.component.ts b/aio/content/examples/toh-pt6/src/app/messages/messages.component.ts deleted file mode 100644 index 0462f8eb19d..00000000000 --- a/aio/content/examples/toh-pt6/src/app/messages/messages.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Component } from '@angular/core'; -import { MessageService } from '../message.service'; - -@Component({ - selector: 'app-messages', - templateUrl: './messages.component.html', - styleUrls: ['./messages.component.css'] -}) -export class MessagesComponent { - - constructor(public messageService: MessageService) {} - -} diff --git a/aio/content/examples/toh-pt6/src/app/mock-heroes.ts b/aio/content/examples/toh-pt6/src/app/mock-heroes.ts deleted file mode 100644 index 6ffcaa980e8..00000000000 --- a/aio/content/examples/toh-pt6/src/app/mock-heroes.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -import { Hero } from './hero'; - -export const HEROES: Hero[] = [ - { id: 12, name: 'Dr. Nice' }, - { id: 13, name: 'Bombasto' }, - { id: 14, name: 'Celeritas' }, - { id: 15, name: 'Magneta' }, - { id: 16, name: 'RubberMan' }, - { id: 17, name: 'Dynama' }, - { id: 18, name: 'Dr. IQ' }, - { id: 19, name: 'Magma' }, - { id: 20, name: 'Tornado' } -]; diff --git a/aio/content/examples/toh-pt6/src/index.html b/aio/content/examples/toh-pt6/src/index.html deleted file mode 100644 index 5ddce3f5eb3..00000000000 --- a/aio/content/examples/toh-pt6/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Tour of Heroes - - - - - - - - diff --git a/aio/content/examples/toh-pt6/src/main.ts b/aio/content/examples/toh-pt6/src/main.ts deleted file mode 100644 index 20dde0d4f59..00000000000 --- a/aio/content/examples/toh-pt6/src/main.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - diff --git a/aio/content/examples/toh-pt6/stackblitz.json b/aio/content/examples/toh-pt6/stackblitz.json deleted file mode 100644 index 7116807f675..00000000000 --- a/aio/content/examples/toh-pt6/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Tour of Heroes: Part 6", - "files":[ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/hero.service.ts", - "tags": ["tutorial", "tour", "heroes", "http"] -} diff --git a/aio/content/examples/tsconfig.eslint.json b/aio/content/examples/tsconfig.eslint.json deleted file mode 100644 index 4f4c8658c50..00000000000 --- a/aio/content/examples/tsconfig.eslint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../tools/examples/shared/boilerplate/cli/tsconfig.json", - "include": [ - "*/**/*.ts", - ], -} diff --git a/aio/content/examples/two-way-binding/BUILD.bazel b/aio/content/examples/two-way-binding/BUILD.bazel deleted file mode 100644 index 2ee5e485be2..00000000000 --- a/aio/content/examples/two-way-binding/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "two-way-binding", -) diff --git a/aio/content/examples/two-way-binding/e2e/app.po.ts b/aio/content/examples/two-way-binding/e2e/app.po.ts deleted file mode 100644 index 82ea75ba504..00000000000 --- a/aio/content/examples/two-way-binding/e2e/app.po.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { browser, by, element } from 'protractor'; - -export class AppPage { - navigateTo() { - return browser.get('/'); - } - - getParagraphText() { - return element(by.css('app-root h1')).getText(); - } -} diff --git a/aio/content/examples/two-way-binding/e2e/src/app.e2e-spec.ts b/aio/content/examples/two-way-binding/e2e/src/app.e2e-spec.ts deleted file mode 100644 index d24588b6416..00000000000 --- a/aio/content/examples/two-way-binding/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,40 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Two-way binding e2e tests', () => { - - beforeEach(() => browser.get('')); - - const minusButton = element.all(by.css('button')).get(0); - const plusButton = element.all(by.css('button')).get(1); - const minus2Button = element.all(by.css('button')).get(2); - const plus2Button = element.all(by.css('button')).get(3); - - it('should display Two-way Binding', async () => { - expect(await element(by.css('h1')).getText()).toEqual('Two-way Binding'); - }); - - it('should display four buttons', async () => { - expect(await minusButton.getText()).toBe('-'); - expect(await plusButton.getText()).toBe('+'); - expect(await minus2Button.getText()).toBe('-'); - expect(await plus2Button.getText()).toBe('+'); - }); - - it('should change font size texts', async () => { - await minusButton.click(); - expect(await element.all(by.css('span')).get(0).getText()).toEqual('FontSize: 15px'); - expect(await element.all(by.css('input')).get(0).getAttribute('value')).toEqual('15'); - - await plusButton.click(); - expect(await element.all(by.css('span')).get(0).getText()).toEqual('FontSize: 16px'); - expect(await element.all(by.css('input')).get(0).getAttribute('value')).toEqual('16'); - - await minus2Button.click(); - expect(await element.all(by.css('span')).get(1).getText()).toEqual('FontSize: 15px'); - }); - - it('should display De-sugared two-way binding', async () => { - expect(await element(by.css('h2')).getText()).toEqual('De-sugared two-way binding'); - }); - -}); diff --git a/aio/content/examples/two-way-binding/example-config.json b/aio/content/examples/two-way-binding/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/two-way-binding/src/app/app.component.css b/aio/content/examples/two-way-binding/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/two-way-binding/src/app/app.component.html b/aio/content/examples/two-way-binding/src/app/app.component.html deleted file mode 100644 index 53e41b602fd..00000000000 --- a/aio/content/examples/two-way-binding/src/app/app.component.html +++ /dev/null @@ -1,19 +0,0 @@ -

    Two-way Binding

    -
    - - - - -
    Resizable Text
    - - -
    -
    -
    -

    De-sugared two-way binding

    - - - -
    - - diff --git a/aio/content/examples/two-way-binding/src/app/app.component.ts b/aio/content/examples/two-way-binding/src/app/app.component.ts deleted file mode 100644 index 87a8e9310f2..00000000000 --- a/aio/content/examples/two-way-binding/src/app/app.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -import {Component} from '@angular/core'; -import {SizerComponent} from './sizer/sizer.component'; -import {FormsModule} from '@angular/forms'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'], - imports: [FormsModule, SizerComponent], -}) -export class AppComponent { - // #docregion font-size - fontSizePx = 16; - // #enddocregion font-size -} diff --git a/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.css b/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.html b/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.html deleted file mode 100644 index 533ab9f46da..00000000000 --- a/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.html +++ /dev/null @@ -1,5 +0,0 @@ -
    - - - FontSize: {{size}}px -
    diff --git a/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.ts b/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.ts deleted file mode 100644 index 305d45599d5..00000000000 --- a/aio/content/examples/two-way-binding/src/app/sizer/sizer.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -import {Component, Input, Output, EventEmitter} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-sizer', - templateUrl: './sizer.component.html', - styleUrls: ['./sizer.component.css'], -}) -// #docregion sizer-component -export class SizerComponent { - @Input() size!: number | string; - @Output() sizeChange = new EventEmitter(); - - dec() { - this.resize(-1); - } - inc() { - this.resize(+1); - } - - resize(delta: number) { - this.size = Math.min(40, Math.max(8, +this.size + delta)); - this.sizeChange.emit(this.size); - } -} -// #enddocregion sizer-component diff --git a/aio/content/examples/two-way-binding/src/index.html b/aio/content/examples/two-way-binding/src/index.html deleted file mode 100644 index 04db6d5de59..00000000000 --- a/aio/content/examples/two-way-binding/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Two-way Binding - - - - - - - - diff --git a/aio/content/examples/two-way-binding/src/main.ts b/aio/content/examples/two-way-binding/src/main.ts deleted file mode 100644 index 46d4cf88707..00000000000 --- a/aio/content/examples/two-way-binding/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); diff --git a/aio/content/examples/two-way-binding/stackblitz.json b/aio/content/examples/two-way-binding/stackblitz.json deleted file mode 100644 index 91283722390..00000000000 --- a/aio/content/examples/two-way-binding/stackblitz.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "description": "Two-way binding", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "file": "src/app/app.component.ts", - "tags": ["Two-way binding"] -} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/BUILD.bazel b/aio/content/examples/upgrade-lazy-load-ajs/BUILD.bazel deleted file mode 100644 index 26e86d0c630..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/BUILD.bazel +++ /dev/null @@ -1,8 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "upgrade-lazy-load-ajs", - test_tags = ["broken"], # This is currently broken with the Application builder. Looks like it's caused by AngularJS bundle. -) diff --git a/aio/content/examples/upgrade-lazy-load-ajs/e2e/src/app.e2e-spec.ts b/aio/content/examples/upgrade-lazy-load-ajs/e2e/src/app.e2e-spec.ts deleted file mode 100644 index e45e05b424b..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,83 +0,0 @@ -import { browser, element, by, ExpectedConditions } from 'protractor'; - -describe('Lazy Loading AngularJS Tests', () => { - const pageElements = { - homePageHref: element(by.cssContainingText('app-root nav a', 'Home')), - homePageParagraph: element(by.css('app-root app-home p')), - ajsUsersPageHref: element(by.cssContainingText('app-root nav a', 'Users')), - ajsUsersPageParagraph: element(by.css('app-root app-angular-js div p')), - notFoundPageHref: element(by.cssContainingText('app-root nav a', '404 Page')), - notFoundPageParagraph: element(by.css('app-root app-app404 p')), - }; - - beforeAll(async () => { - await browser.get('/'); - }); - - it("should display 'Angular Home' when visiting the home page", async () => { - await pageElements.homePageHref.click(); - - const paragraphText = await pageElements.homePageParagraph.getText(); - - expect(paragraphText).toEqual('Angular Home'); - }); - - it("should display 'Users Page' page when visiting the AngularJS page at /users", async () => { - await pageElements.ajsUsersPageHref.click(); - await loadAngularJS(); - - const paragraphText = await pageElements.ajsUsersPageParagraph.getText(); - - expect(paragraphText).toEqual('Users Page'); - }); - - it("should display 'Angular 404' when visiting an invalid URL", async () => { - await pageElements.notFoundPageHref.click(); - - const paragraphText = await pageElements.notFoundPageParagraph.getText(); - - expect(paragraphText).toEqual('Angular 404'); - }); - - // Workaround for https://github.com/angular/protractor/issues/4724 - async function loadAngularJS() { - // Abort if `resumeBootstrap` has already occurred - if (await browser.executeScript(`return '__TESTABILITY__NG1_APP_ROOT_INJECTOR__' in window;`)) { - return; - } - - // Might have to re-insert the 'NG_DEFER_BOOTSTRAP!' if the name has been changed since protractor loaded the page - if (!await browser.executeScript("window.name.includes('NG_DEFER_BOOTSTRAP!')")) { - await browser.executeScript("window.name = 'NG_DEFER_BOOTSTRAP!' + name"); - } - - // Wait for the AngularJS bundle to download and initialize - await browser.wait( - ExpectedConditions.presenceOf(element(by.css('app-root app-angular-js'))), - 5000, - 'AngularJS app' - ); - - // Run the protractor pre-bootstrap logic and resumeBootstrap - // Based on https://github.com/angular/protractor/blob/5.3.0/lib/browser.ts#L950-L969 - { - const moduleNames = []; - for (const {name, script, args} of browser.mockModules_) { - moduleNames.push(name); - await browser.executeScriptWithDescription(script, 'add mock module ' + name, ...args); - } - - await browser.executeScriptWithDescription( - // TODO: must manually assign __TESTABILITY__NG1_APP_ROOT_INJECTOR__ (https://github.com/angular/angular/issues/22723) - `window.__TESTABILITY__NG1_APP_ROOT_INJECTOR__ = angular.resumeBootstrap(arguments[0]) ` - + `|| angular.element('app-angular-js').injector();`, - 'resume bootstrap', - moduleNames - ); - } - - // Wait for the initial AngularJS page to finish loading - await browser.waitForAngular(); - } -}); - diff --git a/aio/content/examples/upgrade-lazy-load-ajs/example-config.json b/aio/content/examples/upgrade-lazy-load-ajs/example-config.json deleted file mode 100644 index c3afe22ccd3..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/example-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectType": "cli-ajs" -} \ No newline at end of file diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/angular-js/angular-js.component.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/angular-js/angular-js.component.ts deleted file mode 100644 index 63c325d2b97..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/angular-js/angular-js.component.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Component, OnInit, OnDestroy, ElementRef } from '@angular/core'; -import { LazyLoaderService } from '../lazy-loader.service'; - -@Component({ - selector: 'app-angular-js', - template: '
    ' -}) -export class AngularJSComponent implements OnInit, OnDestroy { - constructor( - private lazyLoader: LazyLoaderService, - private elRef: ElementRef - ) {} - - ngOnInit() { - this.lazyLoader.load(this.elRef.nativeElement); - } - - - ngOnDestroy() { - this.lazyLoader.destroy(); - } -} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/angularjs-app/index.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/angularjs-app/index.ts deleted file mode 100644 index 35fa6042439..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/angularjs-app/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -import * as angular from 'angular'; -import 'angular-route'; - -const appModule = angular.module('myApp', [ - 'ngRoute' -]) -.config(['$routeProvider', '$locationProvider', - function config($routeProvider: angular.route.IRouteProvider, - $locationProvider: angular.ILocationProvider) { - $locationProvider.html5Mode(true); - - $routeProvider. - when('/users', { - template: ` -

    - Users Page -

    - ` - }). - otherwise({ - template: '' - }); - }] -); - -export function bootstrap(el: HTMLElement) { - return angular.bootstrap(el, [appModule.name]); -} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app-routing.module.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app-routing.module.ts deleted file mode 100644 index 5cc7055597c..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app-routing.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -// #docplaster -// #docregion -import { NgModule } from '@angular/core'; -import { Routes, RouterModule, UrlSegment } from '@angular/router'; -import { AngularJSComponent } from './angular-js/angular-js.component'; -import { HomeComponent } from './home/home.component'; -import { App404Component } from './app404/app404.component'; - -// Match any URL that starts with `users` -// #docregion matcher -export function isAngularJSUrl(url: UrlSegment[]) { - return url.length > 0 && url[0].path.startsWith('users') ? ({consumed: url}) : null; -} -// #enddocregion matcher - -export const routes: Routes = [ - // Routes rendered by Angular - { path: '', component: HomeComponent }, - - // AngularJS routes - { matcher: isAngularJSUrl, component: AngularJSComponent }, - - // Catch-all route - { path: '**', component: App404Component } -]; - -@NgModule({ - imports: [RouterModule.forRoot(routes)], - exports: [RouterModule] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.css b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.html b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.html deleted file mode 100644 index 51c9edae129..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.html +++ /dev/null @@ -1,9 +0,0 @@ -Lazy Loading AngularJS - - - - diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.ts deleted file mode 100644 index 400d937a2f4..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-root', - templateUrl: './app.component.html', - styleUrls: ['./app.component.css'] -}) -export class AppComponent { } diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.module.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.module.ts deleted file mode 100644 index 817ab8e5d1d..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app.module.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { BrowserModule } from '@angular/platform-browser'; -import { NgModule } from '@angular/core'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { AngularJSComponent } from './angular-js/angular-js.component'; -import { HomeComponent } from './home/home.component'; -import { App404Component } from './app404/app404.component'; - - -@NgModule({ - declarations: [ - AppComponent, - AngularJSComponent, - HomeComponent, - App404Component - ], - imports: [ - BrowserModule, - AppRoutingModule - ], - bootstrap: [AppComponent] -}) -export class AppModule { } diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.css b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.html b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.html deleted file mode 100644 index 27e1f55db9c..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - Angular 404 -

    diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.ts deleted file mode 100644 index 6911f7f3cb5..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/app404/app404.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-app404', - templateUrl: './app404.component.html', - styleUrls: ['./app404.component.css'] -}) -export class App404Component {} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.css b/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.css deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.html b/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.html deleted file mode 100644 index a2bf06c9de0..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.html +++ /dev/null @@ -1,3 +0,0 @@ -

    - Angular Home -

    diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.ts deleted file mode 100644 index 0cb0d0f59cd..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/home/home.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { Component } from '@angular/core'; - -@Component({ - selector: 'app-home', - templateUrl: './home.component.html', - styleUrls: ['./home.component.css'] -}) -export class HomeComponent { - -} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/app/lazy-loader.service.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/app/lazy-loader.service.ts deleted file mode 100644 index b464ef27c54..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/app/lazy-loader.service.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Injectable } from '@angular/core'; -import * as angular from 'angular'; - -@Injectable({ - providedIn: 'root' -}) -export class LazyLoaderService { - private app: angular.auto.IInjectorService | undefined; - - load(el: HTMLElement): void { - import('./angularjs-app').then(app => { - try { - this.app = app.bootstrap(el); - } catch (e) { - console.error(e); - } - }); - } - - destroy() { - if (this.app) { - this.app.get('$rootScope').$destroy(); - } - } -} diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/index.html b/aio/content/examples/upgrade-lazy-load-ajs/src/index.html deleted file mode 100644 index 613deae245e..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - AngularJS Hybrid - - - - - - - - diff --git a/aio/content/examples/upgrade-lazy-load-ajs/src/main.ts b/aio/content/examples/upgrade-lazy-load-ajs/src/main.ts deleted file mode 100644 index 1e3bab6e5eb..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app/app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule) - .catch(err => console.error(err)); - diff --git a/aio/content/examples/upgrade-lazy-load-ajs/zipper.json b/aio/content/examples/upgrade-lazy-load-ajs/zipper.json deleted file mode 100644 index f86b7903a74..00000000000 --- a/aio/content/examples/upgrade-lazy-load-ajs/zipper.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ] -} diff --git a/aio/content/examples/upgrade-module/.gitignore b/aio/content/examples/upgrade-module/.gitignore deleted file mode 100644 index 7f5c313a3e5..00000000000 --- a/aio/content/examples/upgrade-module/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -**/*.js -aot/**/* -!aot/bs-config.json -!aot/index.html -!copy-dist-files.js -!rollup-config.js -!systemjs.config.1.js diff --git a/aio/content/examples/upgrade-module/BUILD.bazel b/aio/content/examples/upgrade-module/BUILD.bazel deleted file mode 100644 index 2bcdbbb98a8..00000000000 --- a/aio/content/examples/upgrade-module/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "upgrade-module", - flaky = True, # TODO: figure out why this is flaky or times out - # This example downloads and inlines resources - test_exec_properties = ENABLE_NETWORK, - test_tags = [ - "requires-network", - # This is currently broken due to usage of ESM2022 which does not work out-of-the-box with system.js. - "broken", - ], -) diff --git a/aio/content/examples/upgrade-module/e2e-spec.ts b/aio/content/examples/upgrade-module/e2e-spec.ts deleted file mode 100644 index c38ad9dcb62..00000000000 --- a/aio/content/examples/upgrade-module/e2e-spec.ts +++ /dev/null @@ -1,135 +0,0 @@ -import { browser, element, by } from 'protractor'; - -describe('Upgrade Tests', () => { - - describe('AngularJS Auto-bootstrap', () => { - - beforeAll(() => browser.get('/index-ng-app.html')); - - it('bootstraps as expected', async () => { - expect(await element(by.css('#message')).getText()).toEqual('Hello world'); - }); - - }); - - describe('AngularJS JavaScript Bootstrap', () => { - - beforeAll(() => browser.get('/index-bootstrap.html')); - - it('bootstraps as expected', async () => { - expect(await element(by.css('#message')).getText()).toEqual('Hello world'); - }); - - }); - - describe('AngularJS-Angular Hybrid Bootstrap', () => { - - beforeAll(() => browser.get('/index-ajs-a-hybrid-bootstrap.html')); - - it('bootstraps as expected', async () => { - expect(await element(by.css('#message')).getText()).toEqual('Hello world'); - }); - - }); - - describe('Upgraded static component', async () => { - - beforeAll(() => browser.get('/index-upgrade-static.html')); - - it('renders', async () => { - expect(await element(by.css('h2')).getText()).toEqual('Windstorm details!'); - }); - - }); - - - describe('Upgraded component with IO', () => { - - beforeAll(() => browser.get('/index-upgrade-io.html')); - - it('has inputs', async () => { - expect(await element(by.css('h2')).getText()).toEqual('Windstorm details!'); - }); - - it('has outputs', async () => { - await element(by.buttonText('Delete')).click(); - expect(await element(by.css('h2')).getText()).toEqual('Ex-Windstorm details!'); - }); - - }); - - - describe('Downgraded static component', () => { - - beforeAll(() => browser.get('/index-downgrade-static.html')); - - it('renders', async () => { - expect(await element(by.css('h2')).getText()).toEqual('Windstorm details!'); - }); - - }); - - describe('Downgraded component with IO', () => { - - beforeAll(() => browser.get('/index-downgrade-io.html')); - - it('has inputs', async () => { - expect(await element.all(by.css('h2')).first().getText()).toEqual('Windstorm details!'); - }); - - it('has outputs', async () => { - await element.all(by.buttonText('Delete')).first().click(); - expect(await element.all(by.css('h2')).first().getText()).toEqual('Ex-Windstorm details!'); - }); - - it('supports ng-repeat', async () => { - expect(await element.all(by.css('hero-detail')).count()).toBe(3); - }); - - }); - - - describe('Downgraded component with content projection', () => { - - beforeAll(() => browser.get('/index-ajs-to-a-projection.html')); - - it('can be transcluded into', async () => { - expect(await element(by.css('hero-detail')).getText()).toContain('Specific powers of controlling winds'); - }); - - }); - - - describe('Upgraded component with transclusion', () => { - - beforeAll(() => browser.get('/index-a-to-ajs-transclusion.html')); - - it('can be projected into', async () => { - expect(await element(by.css('hero-detail')).getText()).toContain('Specific powers of controlling winds'); - }); - - }); - - - describe('Upgrading AngularJS Providers', () => { - - beforeAll(() => browser.get('/index-ajs-to-a-providers.html')); - - it('works', async () => { - expect(await element(by.css('h2')).getText()).toBe('1: Windstorm'); - }); - - }); - - - describe('Downgrading Angular Providers', () => { - - beforeAll(() => browser.get('/index-a-to-ajs-providers.html')); - - it('works', async () => { - expect(await element(by.css('h2')).getText()).toBe('1: Windstorm'); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-module/example-config.json b/aio/content/examples/upgrade-module/example-config.json deleted file mode 100644 index 61227cc07aa..00000000000 --- a/aio/content/examples/upgrade-module/example-config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "projectType": "systemjs" -} diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/app.module.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/app.module.ts deleted file mode 100644 index 6fb8b04991c..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/app.module.ts +++ /dev/null @@ -1,36 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule } from '@angular/upgrade/static'; - -import { heroDetailComponent } from './hero-detail.component'; - -// #docregion ngmodule, register -import { Heroes } from './heroes'; -// #enddocregion register - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - providers: [ Heroes ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} -// #enddocregion ngmodule -// #docregion register -import { downgradeInjectable } from '@angular/upgrade/static'; - -angular.module('heroApp', []) - .factory('heroes', downgradeInjectable(Heroes)) - .component('heroDetail', heroDetailComponent); -// #enddocregion register - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/hero-detail.component.ts deleted file mode 100644 index dd7aa10d797..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/hero-detail.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Heroes } from './heroes'; - -// #docregion -export const heroDetailComponent = { - template: ` -

    {{$ctrl.hero.id}}: {{$ctrl.hero.name}}

    - `, - controller: ['heroes', function(heroes: Heroes) { - this.hero = heroes.get()[0]; - }] -}; diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/heroes.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/heroes.ts deleted file mode 100644 index f5f6d87ed86..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-providers/heroes.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { Hero } from '../hero'; - -@Injectable() -export class Heroes { - get() { - return [ - new Hero(1, 'Windstorm'), - new Hero(2, 'Spiderman') - ]; - } -} diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/app.module.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/app.module.ts deleted file mode 100644 index 0de41e9a5da..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/app.module.ts +++ /dev/null @@ -1,35 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { heroDetail, HeroDetailDirective } from './hero-detail.component'; -import { ContainerComponent } from './container.component'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - ContainerComponent, - HeroDetailDirective - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} - -angular.module('heroApp', []) - .component('heroDetail', heroDetail) - .directive( - 'myContainer', - downgradeComponent({component: ContainerComponent}) as angular.IDirectiveFactory - ); - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/container.component.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/container.component.ts deleted file mode 100644 index 1b740d6554c..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/container.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Hero } from '../hero'; - -@Component({ - selector: 'my-container', - template: ` - - -

    {{hero.description}}

    -
    - ` -}) -export class ContainerComponent { - hero = new Hero(1, 'Windstorm', 'Specific powers of controlling winds'); -} diff --git a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/hero-detail.component.ts deleted file mode 100644 index 94025abd85e..00000000000 --- a/aio/content/examples/upgrade-module/src/app/a-to-ajs-transclusion/hero-detail.component.ts +++ /dev/null @@ -1,30 +0,0 @@ -// #docregion -export const heroDetail = { - bindings: { - hero: '=' - }, - template: ` -

    {{$ctrl.hero.name}}

    -
    - -
    - `, - transclude: true -}; -// #enddocregion - -import { Directive, ElementRef, Injector, Input } from '@angular/core'; -import { UpgradeComponent } from '@angular/upgrade/static'; -import { Hero } from '../hero'; - -@Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: 'hero-detail' -}) -export class HeroDetailDirective extends UpgradeComponent { - @Input() hero!: Hero; - - constructor(elementRef: ElementRef, injector: Injector) { - super('heroDetail', elementRef, injector); - } -} diff --git a/aio/content/examples/upgrade-module/src/app/ajs-a-hybrid-bootstrap/app.module.ts b/aio/content/examples/upgrade-module/src/app/ajs-a-hybrid-bootstrap/app.module.ts deleted file mode 100644 index e904e14072c..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-a-hybrid-bootstrap/app.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -// #docregion ngmodule -import { DoBootstrap, NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule } from '@angular/upgrade/static'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} -// #enddocregion ngmodule -angular.module('heroApp', []) - .controller('MainCtrl', function() { - this.message = 'Hello world'; - }); - -// #docregion bootstrap -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -platformBrowserDynamic().bootstrapModule(AppModule); -// #enddocregion bootstrap diff --git a/aio/content/examples/upgrade-module/src/app/ajs-bootstrap/app.module.ts b/aio/content/examples/upgrade-module/src/app/ajs-bootstrap/app.module.ts deleted file mode 100644 index 3ad843e885d..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-bootstrap/app.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion ng1module -angular.module('heroApp', []) - .controller('MainCtrl', function() { - this.message = 'Hello world'; - }); -// #enddocregion ng1module - -document.addEventListener('DOMContentLoaded', () => { - // #docregion bootstrap - angular.bootstrap(document.body, ['heroApp'], { strictDi: true }); - // #enddocregion bootstrap -}); diff --git a/aio/content/examples/upgrade-module/src/app/ajs-ng-app/app.module.ts b/aio/content/examples/upgrade-module/src/app/ajs-ng-app/app.module.ts deleted file mode 100644 index 904f7578b85..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-ng-app/app.module.ts +++ /dev/null @@ -1,4 +0,0 @@ -angular.module('heroApp', []) - .controller('MainCtrl', function() { - this.message = 'Hello world'; - }); diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/app.module.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/app.module.ts deleted file mode 100644 index 729acf7e317..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/app.module.ts +++ /dev/null @@ -1,34 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { MainController } from './main.controller'; -import { HeroDetailComponent } from './hero-detail.component'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - HeroDetailComponent - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} - -angular.module('heroApp', []) - .controller('MainController', MainController) - .directive('heroDetail', downgradeComponent({ - component: HeroDetailComponent, - inputs: ['hero'] - }) as angular.IDirectiveFactory); - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/hero-detail.component.ts deleted file mode 100644 index 0f517c9105d..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/hero-detail.component.ts +++ /dev/null @@ -1,16 +0,0 @@ -// #docregion -import { Component, Input } from '@angular/core'; -import { Hero } from '../hero'; - -@Component({ - selector: 'hero-detail', - template: ` -

    {{hero.name}}

    -
    - -
    - ` -}) -export class HeroDetailComponent { - @Input() hero!: Hero; -} diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/main.controller.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/main.controller.ts deleted file mode 100644 index c6041ac7888..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-projection/main.controller.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { Hero } from '../hero'; - -export class MainController { - hero = new Hero(1, 'Windstorm', 'Specific powers of controlling winds'); -} diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/ajs-upgraded-providers.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/ajs-upgraded-providers.ts deleted file mode 100644 index 52d4e74a1fc..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/ajs-upgraded-providers.ts +++ /dev/null @@ -1,12 +0,0 @@ -// #docregion -import { HeroesService } from './heroes.service'; - -export function heroesServiceFactory(i: any) { - return i.get('heroes'); -} - -export const heroesServiceProvider = { - provide: HeroesService, - useFactory: heroesServiceFactory, - deps: ['$injector'] -}; diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/app.module.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/app.module.ts deleted file mode 100644 index adfa95abbab..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/app.module.ts +++ /dev/null @@ -1,42 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { HeroDetailComponent } from './hero-detail.component'; -import { HeroesService } from './heroes.service'; -// #docregion register -import { heroesServiceProvider } from './ajs-upgraded-providers'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - providers: [ - heroesServiceProvider - ], - // #enddocregion register - declarations: [ - HeroDetailComponent - ] -// #docregion register -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} -// #enddocregion register - -angular.module('heroApp', []) - .service('heroes', HeroesService) - .directive( - 'heroDetail', - downgradeComponent({component: HeroDetailComponent}) as angular.IDirectiveFactory - ); - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/hero-detail.component.ts deleted file mode 100644 index b02f85b99a5..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/hero-detail.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { HeroesService } from './heroes.service'; -import { Hero } from '../hero'; - -@Component({ - selector: 'hero-detail', - template: ` -

    {{hero.id}}: {{hero.name}}

    - ` -}) -export class HeroDetailComponent { - hero: Hero; - constructor(heroes: HeroesService) { - this.hero = heroes.get()[0]; - } -} diff --git a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/heroes.service.ts b/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/heroes.service.ts deleted file mode 100644 index 4a258e205a6..00000000000 --- a/aio/content/examples/upgrade-module/src/app/ajs-to-a-providers/heroes.service.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Hero } from '../hero'; - -export class HeroesService { - get() { - return [ - new Hero(1, 'Windstorm'), - new Hero(2, 'Spiderman') - ]; - } -} diff --git a/aio/content/examples/upgrade-module/src/app/downgrade-io/app.module.ts b/aio/content/examples/upgrade-module/src/app/downgrade-io/app.module.ts deleted file mode 100644 index 44060428339..00000000000 --- a/aio/content/examples/upgrade-module/src/app/downgrade-io/app.module.ts +++ /dev/null @@ -1,33 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { MainController } from './main.controller'; - -import { HeroDetailComponent } from './hero-detail.component'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - HeroDetailComponent - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} - -angular.module('heroApp', []) - .controller('MainController', MainController) - .directive('heroDetail', downgradeComponent({component: HeroDetailComponent}) as angular.IDirectiveFactory); - - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/downgrade-io/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/downgrade-io/hero-detail.component.ts deleted file mode 100644 index 788f079341e..00000000000 --- a/aio/content/examples/upgrade-module/src/app/downgrade-io/hero-detail.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import { Component, EventEmitter, Input, Output } from '@angular/core'; -import { Hero } from '../hero'; - -@Component({ - selector: 'hero-detail', - template: ` -

    {{hero.name}} details!

    -
    id: {{hero.id}}
    - - ` -}) -export class HeroDetailComponent { - @Input() hero!: Hero; - @Output() deleted = new EventEmitter(); - onDelete() { - this.deleted.emit(this.hero); - } -} diff --git a/aio/content/examples/upgrade-module/src/app/downgrade-io/main.controller.ts b/aio/content/examples/upgrade-module/src/app/downgrade-io/main.controller.ts deleted file mode 100644 index d50272073f2..00000000000 --- a/aio/content/examples/upgrade-module/src/app/downgrade-io/main.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Hero } from '../hero'; - -export class MainController { - hero = new Hero(1, 'Windstorm'); - heroes = [ - new Hero(2, 'Superman'), - new Hero(3, 'Spiderman') - ]; - onDelete(hero: Hero) { - hero.name = 'Ex-' + hero.name; - } -} diff --git a/aio/content/examples/upgrade-module/src/app/downgrade-static/app.module.ts b/aio/content/examples/upgrade-module/src/app/downgrade-static/app.module.ts deleted file mode 100644 index 3a6e4711b6e..00000000000 --- a/aio/content/examples/upgrade-module/src/app/downgrade-static/app.module.ts +++ /dev/null @@ -1,40 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule } from '@angular/upgrade/static'; - -// #docregion downgradecomponent, ngmodule -import { HeroDetailComponent } from './hero-detail.component'; - -// #enddocregion downgradecomponent -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - HeroDetailComponent - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} -// #enddocregion ngmodule -// #docregion downgradecomponent - -import { downgradeComponent } from '@angular/upgrade/static'; - -angular.module('heroApp', []) - .directive( - 'heroDetail', - downgradeComponent({ component: HeroDetailComponent }) as angular.IDirectiveFactory - ); - -// #enddocregion downgradecomponent - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/downgrade-static/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/downgrade-static/hero-detail.component.ts deleted file mode 100644 index fae7b9d5dac..00000000000 --- a/aio/content/examples/upgrade-module/src/app/downgrade-static/hero-detail.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'hero-detail', - template: ` -

    Windstorm details!

    -
    id: 1
    - ` -}) -export class HeroDetailComponent { } diff --git a/aio/content/examples/upgrade-module/src/app/hero-detail.directive.ts b/aio/content/examples/upgrade-module/src/app/hero-detail.directive.ts deleted file mode 100644 index f43da49f231..00000000000 --- a/aio/content/examples/upgrade-module/src/app/hero-detail.directive.ts +++ /dev/null @@ -1,22 +0,0 @@ -// #docregion -export function heroDetailDirective() { - return { - restrict: 'E', - scope: {}, - bindToController: { - hero: '=', - deleted: '&' - }, - template: ` -

    {{$ctrl.hero.name}} details!

    -
    {{$ctrl.hero.id}}
    - - `, - controller: function HeroDetailController() { - this.onDelete = () => { - this.deleted({hero: this.hero}); - }; - }, - controllerAs: '$ctrl' - }; -} diff --git a/aio/content/examples/upgrade-module/src/app/hero.ts b/aio/content/examples/upgrade-module/src/app/hero.ts deleted file mode 100644 index 5dcb5664eb3..00000000000 --- a/aio/content/examples/upgrade-module/src/app/hero.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class Hero { - constructor(public id: number, - public name: string, - public description?: string) { } -} diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-io/app.module.ts b/aio/content/examples/upgrade-module/src/app/upgrade-io/app.module.ts deleted file mode 100644 index 0de41e9a5da..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-io/app.module.ts +++ /dev/null @@ -1,35 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { heroDetail, HeroDetailDirective } from './hero-detail.component'; -import { ContainerComponent } from './container.component'; - -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - ContainerComponent, - HeroDetailDirective - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} - -angular.module('heroApp', []) - .component('heroDetail', heroDetail) - .directive( - 'myContainer', - downgradeComponent({component: ContainerComponent}) as angular.IDirectiveFactory - ); - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-io/container.component.ts b/aio/content/examples/upgrade-module/src/app/upgrade-io/container.component.ts deleted file mode 100644 index 8d76085174d..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-io/container.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; -import { Hero } from '../hero'; - -@Component({ - selector: 'my-container', - template: ` -

    Tour of Heroes

    - - - ` -}) -export class ContainerComponent { - hero = new Hero(1, 'Windstorm'); - heroDeleted(hero: Hero) { - hero.name = 'Ex-' + hero.name; - } -} diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-io/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/upgrade-io/hero-detail.component.ts deleted file mode 100644 index 0d7d1a562c7..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-io/hero-detail.component.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docregion -// #docregion hero-detail-io -export const heroDetail = { - bindings: { - hero: '<', - deleted: '&' - }, - template: ` -

    {{$ctrl.hero.name}} details!

    -
    {{$ctrl.hero.id}}
    - - `, - controller: function HeroDetailController() { - this.onDelete = () => { - this.deleted(this.hero); - }; - } -}; -// #enddocregion hero-detail-io - -// #docregion hero-detail-io-upgrade -import { Directive, ElementRef, Injector, Input, Output, EventEmitter } from '@angular/core'; -import { UpgradeComponent } from '@angular/upgrade/static'; -import { Hero } from '../hero'; - -@Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: 'hero-detail' -}) -export class HeroDetailDirective extends UpgradeComponent { - @Input() hero: Hero; - @Output() deleted: EventEmitter; - - constructor(elementRef: ElementRef, injector: Injector) { - super('heroDetail', elementRef, injector); - } -} -// #enddocregion hero-detail-io-upgrade diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-static/app.module.ts b/aio/content/examples/upgrade-module/src/app/upgrade-static/app.module.ts deleted file mode 100644 index e2e37390a32..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-static/app.module.ts +++ /dev/null @@ -1,39 +0,0 @@ -declare const angular: angular.IAngularStatic; -import '@angular/compiler'; -import { DoBootstrap, NgModule } from '@angular/core'; -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { BrowserModule } from '@angular/platform-browser'; -import { UpgradeModule, downgradeComponent } from '@angular/upgrade/static'; - -import { heroDetail, HeroDetailDirective } from './hero-detail.component'; -import { ContainerComponent } from './container.component'; - -// #docregion hero-detail-upgrade -@NgModule({ - imports: [ - BrowserModule, - UpgradeModule - ], - declarations: [ - HeroDetailDirective, - // #enddocregion hero-detail-upgrade - ContainerComponent - // #docregion hero-detail-upgrade - ] -}) -export class AppModule implements DoBootstrap { - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.body, ['heroApp'], { strictDi: true }); - } -} -// #enddocregion hero-detail-upgrade - -angular.module('heroApp', []) - .component('heroDetail', heroDetail) - .directive( - 'myContainer', - downgradeComponent({component: ContainerComponent}) as angular.IDirectiveFactory - ); - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-static/container.component.ts b/aio/content/examples/upgrade-module/src/app/upgrade-static/container.component.ts deleted file mode 100644 index c28e5ea42df..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-static/container.component.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'my-container', - template: ` -

    Tour of Heroes

    - - ` -}) -export class ContainerComponent { } diff --git a/aio/content/examples/upgrade-module/src/app/upgrade-static/hero-detail.component.ts b/aio/content/examples/upgrade-module/src/app/upgrade-static/hero-detail.component.ts deleted file mode 100644 index 8844bfa576b..00000000000 --- a/aio/content/examples/upgrade-module/src/app/upgrade-static/hero-detail.component.ts +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -// #docregion hero-detail -export const heroDetail = { - template: ` -

    Windstorm details!

    -
    1
    - `, - controller: function HeroDetailController() { - } -}; -// #enddocregion hero-detail - -// #docregion hero-detail-upgrade -import { Directive, ElementRef, Injector, SimpleChanges } from '@angular/core'; -import { UpgradeComponent } from '@angular/upgrade/static'; - -@Directive({ - // eslint-disable-next-line @angular-eslint/directive-selector - selector: 'hero-detail' -}) -export class HeroDetailDirective extends UpgradeComponent { - constructor(elementRef: ElementRef, injector: Injector) { - super('heroDetail', elementRef, injector); - } -} -// #enddocregion hero-detail-upgrade diff --git a/aio/content/examples/upgrade-module/src/app/villain.ts b/aio/content/examples/upgrade-module/src/app/villain.ts deleted file mode 100644 index ef3d014f118..00000000000 --- a/aio/content/examples/upgrade-module/src/app/villain.ts +++ /dev/null @@ -1,5 +0,0 @@ -export class Villain { - constructor(public id: number, - public name: string, - public description?: string) { } -} diff --git a/aio/content/examples/upgrade-module/src/index-a-to-ajs-providers.html b/aio/content/examples/upgrade-module/src/index-a-to-ajs-providers.html deleted file mode 100644 index 4190e90fd48..00000000000 --- a/aio/content/examples/upgrade-module/src/index-a-to-ajs-providers.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/index-a-to-ajs-transclusion.html b/aio/content/examples/upgrade-module/src/index-a-to-ajs-transclusion.html deleted file mode 100644 index e10f16cb71f..00000000000 --- a/aio/content/examples/upgrade-module/src/index-a-to-ajs-transclusion.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/index-ajs-a-hybrid-bootstrap.html b/aio/content/examples/upgrade-module/src/index-ajs-a-hybrid-bootstrap.html deleted file mode 100644 index 9a1f492c0e0..00000000000 --- a/aio/content/examples/upgrade-module/src/index-ajs-a-hybrid-bootstrap.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - -
    {{ mainCtrl.message }}
    - - diff --git a/aio/content/examples/upgrade-module/src/index-ajs-to-a-projection.html b/aio/content/examples/upgrade-module/src/index-ajs-to-a-projection.html deleted file mode 100644 index 407ee09336e..00000000000 --- a/aio/content/examples/upgrade-module/src/index-ajs-to-a-projection.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - -
    - - -

    {{mainCtrl.hero.description}}

    -
    -
    - -
    - - diff --git a/aio/content/examples/upgrade-module/src/index-ajs-to-a-providers.html b/aio/content/examples/upgrade-module/src/index-ajs-to-a-providers.html deleted file mode 100644 index daf9b1557cc..00000000000 --- a/aio/content/examples/upgrade-module/src/index-ajs-to-a-providers.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/index-bootstrap.html b/aio/content/examples/upgrade-module/src/index-bootstrap.html deleted file mode 100644 index bd5c90b3cda..00000000000 --- a/aio/content/examples/upgrade-module/src/index-bootstrap.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - - Index - - - - - - -
    {{ mainCtrl.message }}
    - - diff --git a/aio/content/examples/upgrade-module/src/index-downgrade-io.html b/aio/content/examples/upgrade-module/src/index-downgrade-io.html deleted file mode 100644 index 2404725ccc1..00000000000 --- a/aio/content/examples/upgrade-module/src/index-downgrade-io.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - -
    - - -
    - - -
    - - -
    - -
    - - diff --git a/aio/content/examples/upgrade-module/src/index-downgrade-static.html b/aio/content/examples/upgrade-module/src/index-downgrade-static.html deleted file mode 100644 index 31b8f3b6b71..00000000000 --- a/aio/content/examples/upgrade-module/src/index-downgrade-static.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/index-ng-app.html b/aio/content/examples/upgrade-module/src/index-ng-app.html deleted file mode 100644 index da329d92f38..00000000000 --- a/aio/content/examples/upgrade-module/src/index-ng-app.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - -
    - {{ mainCtrl.message }} -
    - - diff --git a/aio/content/examples/upgrade-module/src/index-upgrade-io.html b/aio/content/examples/upgrade-module/src/index-upgrade-io.html deleted file mode 100644 index 308b9257a70..00000000000 --- a/aio/content/examples/upgrade-module/src/index-upgrade-io.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/index-upgrade-static.html b/aio/content/examples/upgrade-module/src/index-upgrade-static.html deleted file mode 100644 index 80b1772381a..00000000000 --- a/aio/content/examples/upgrade-module/src/index-upgrade-static.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - Angular Upgrade - - - - - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-module/src/systemjs.config.1.js b/aio/content/examples/upgrade-module/src/systemjs.config.1.js deleted file mode 100644 index c08495644cb..00000000000 --- a/aio/content/examples/upgrade-module/src/systemjs.config.1.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * System configuration for Angular samples - * Adjust as necessary for your application needs. - */ -(function (global) { - System.config({ - paths: { - // paths serve as alias - 'npm:': 'node_modules/' - }, - // map tells the System loader where to look for things - map: { - // our app is within the app folder - app: 'app', - // angular bundles - '@angular/core': 'npm:@angular/core/fesm2022/core.mjs', - '@angular/common': 'npm:@angular/common/fesm2022/common.mjs', - '@angular/common/http': 'npm:@angular/common/fesm2022/http.mjs', - '@angular/compiler': 'npm:@angular/compiler/fesm2022/compiler.mjs', - '@angular/platform-browser': 'npm:@angular/platform-browser/fesm2022/platform-browser.mjs', - '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/fesm2022/platform-browser-dynamic.mjs', - '@angular/router': 'npm:@angular/router/fesm2022/router.mjs', - '@angular/forms': 'npm:@angular/forms/fesm2022/forms.mjs', - // #docregion upgrade-static-package - '@angular/upgrade/static': 'npm:@angular/upgrade/fesm2022/static.mjs', - // #enddocregion upgrade-static-package - - // other libraries - 'rxjs': 'npm:rxjs/dist/cjs', - 'rxjs/operators': 'npm:rxjs/dist/cjs/operators', - 'tslib': 'npm:tslib/tslib.js', - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js', - - 'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js', - 'systemjs-babel-build': 'npm:systemjs-plugin-babel/systemjs-babel-browser.js' - }, - transpiler: 'plugin-babel', - // packages tells the System loader how to load when no filename and/or no extension - packages: { - 'app': { main: './main.js', defaultExtension: 'js' }, - 'rxjs': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - 'rxjs/operators': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - 'meta': { - '*.mjs': { - babelOptions: { - es2015: false - } - } - } - } - }); -})(this); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/BUILD.bazel b/aio/content/examples/upgrade-phonecat-1-typescript/BUILD.bazel deleted file mode 100644 index 0a1ad8e1850..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/BUILD.bazel +++ /dev/null @@ -1,11 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "upgrade-phonecat-1-typescript", - # This example downloads and inlines resources - test_exec_properties = ENABLE_NETWORK, - test_tags = ["requires-network"], -) diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/README.md b/aio/content/examples/upgrade-phonecat-1-typescript/README.md deleted file mode 100644 index eec8c19aa77..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/README.md +++ /dev/null @@ -1,44 +0,0 @@ -This is the Angular Phonecat application adjusted to fit our boilerplate project -structure. - -The following changes from vanilla Phonecat are applied: - -* The TypeScript config file shown in the guide is `tsconfig.ajs.json` instead - of the default, because we don't want to enable `noImplicitAny` for migration. -* Karma config for unit tests is in karma.conf.ajs.js because the boilerplate - Karma config is not compatible with the way AngularJS tests need to be run. - The shell script run-unit-tests.sh can be used to run the unit tests. -* Instead of using Bower, AngularJS and its dependencies are fetched from a CDN - in index.html and karma.conf.ajs.js. -* E2E tests have been moved to the parent directory, where `gulp run-e2e-tests` can - discover and run them along with all the other examples. -* Most of the phone JSON and image data removed in the interest of keeping - repo weight down. Keeping enough to retain testability of the app. - -## Running the app - -Start like any example - -```shell -npm run start -``` - -You'll find the app under the /app path: - -```http -http://localhost:3002/app/index.html -``` - -## Running unit tests - -```shell -./run-unit-tests.sh -``` - -## Running E2E tests - -Like for any example \(at the project root\): - -```shell -gulp run-e2e-tests --filter=phonecat-1 -``` diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.css b/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.css deleted file mode 100644 index 175320b509e..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.css +++ /dev/null @@ -1,67 +0,0 @@ -/* Animate `ngRepeat` in `phoneList` component */ -.phone-list-item.ng-enter, -.phone-list-item.ng-leave, -.phone-list-item.ng-move { - overflow: hidden; - transition: 0.5s linear all; -} - -.phone-list-item.ng-enter, -.phone-list-item.ng-leave.ng-leave-active, -.phone-list-item.ng-move { - height: 0; - margin-bottom: 0; - opacity: 0; - padding-bottom: 0; - padding-top: 0; -} - -.phone-list-item.ng-enter.ng-enter-active, -.phone-list-item.ng-leave, -.phone-list-item.ng-move.ng-move-active { - height: 120px; - margin-bottom: 20px; - opacity: 1; - padding-bottom: 4px; - padding-top: 15px; -} - -/* Animate view transitions with `ngView` */ -.view-container { - position: relative; -} - -.view-frame { - margin-top: 20px; -} - -.view-frame.ng-enter, -.view-frame.ng-leave { - background: white; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -.view-frame.ng-enter { - animation: 1s fade-in; - z-index: 100; -} - -.view-frame.ng-leave { - animation: 1s fade-out; - z-index: 99; -} - -@keyframes fade-in { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes fade-out { - from { opacity: 1; } - to { opacity: 0; } -} - -/* Older browsers might need vendor-prefixes for keyframes and animation! */ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.ts deleted file mode 100644 index 61c7f2aced8..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.animations.ts +++ /dev/null @@ -1,41 +0,0 @@ -angular. - module('phonecatApp'). - animation('.phone', function phoneAnimationFactory() { - return { - addClass: animateIn, - removeClass: animateOut - }; - - function animateIn(element: JQuery, className: string, done: () => void) { - if (className !== 'selected') { return; } - - element.css({ - display: 'block', - position: 'absolute', - top: 500, - left: 0 - }).animate({ - top: 0 - }, done); - - return function animateInEnd(wasCanceled: boolean) { - if (wasCanceled) { element.stop(); } - }; - } - - function animateOut(element: JQuery, className: string, done: () => void) { - if (className !== 'selected') { return; } - - element.css({ - position: 'absolute', - top: 0, - left: 0 - }).animate({ - top: -500 - }, done); - - return function animateOutEnd(wasCanceled: boolean) { - if (wasCanceled) { element.stop(); } - }; - } - }); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.config.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/app.config.ts deleted file mode 100644 index 1d16f67fbe0..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.config.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion -angular. - module('phonecatApp'). - config(['$locationProvider', '$routeProvider', - function config($locationProvider: angular.ILocationProvider, - $routeProvider: angular.route.IRouteProvider) { - $locationProvider.hashPrefix('!'); - - $routeProvider. - when('/phones', { - template: '' - }). - when('/phones/:phoneId', { - template: '' - }). - otherwise('/phones'); - } - ]); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.css b/aio/content/examples/upgrade-phonecat-1-typescript/app/app.css deleted file mode 100644 index f4b45b02a5b..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.css +++ /dev/null @@ -1,93 +0,0 @@ -body { - padding: 20px; -} - -h1 { - border-bottom: 1px solid gray; - margin-top: 0; -} - -/* View: Phone list */ -.phones { - list-style: none; -} - -.phones li { - clear: both; - height: 115px; - padding-top: 15px; -} - -.thumb { - float: left; - height: 100px; - margin: -0.5em 1em 1.5em 0; - padding-bottom: 1em; - width: 100px; -} - -/* View: Phone detail */ -.phone { - background-color: white; - display: none; - float: left; - height: 400px; - margin-bottom: 2em; - margin-right: 3em; - padding: 2em; - width: 400px; -} - -.phone:first-child { - display: block; -} - -.phone-images { - background-color: white; - float: left; - height: 450px; - overflow: hidden; - position: relative; - width: 450px; -} - -.phone-thumbs { - list-style: none; - margin: 0; -} - -.phone-thumbs img { - height: 100px; - padding: 1em; - width: 100px; -} - -.phone-thumbs li { - background-color: white; - border: 1px solid black; - cursor: pointer; - display: inline-block; - margin: 1em; -} - -.specs { - clear: both; - list-style: none; - margin: 0; - padding: 0; -} - -.specs dt { - font-weight: bold; -} - -.specs > li { - display: inline-block; - vertical-align: top; - width: 200px; -} - -.specs > li > span { - font-size: 1.2em; - font-weight: bold; -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.module.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/app.module.ts deleted file mode 100644 index ece35279ed2..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/app.module.ts +++ /dev/null @@ -1,8 +0,0 @@ -// Define the `phonecatApp` module -angular.module('phonecatApp', [ - 'ngAnimate', - 'ngRoute', - 'core', - 'phoneDetail', - 'phoneList', -]); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.spec.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.spec.ts deleted file mode 100644 index fa54ea9e1c3..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.spec.ts +++ /dev/null @@ -1,12 +0,0 @@ -describe('checkmark', () => { - - beforeEach(angular.mock.module('core')); - - it('should convert boolean values to unicode checkmark or cross', - inject((checkmarkFilter: (v: boolean) => string) => { - expect(checkmarkFilter(true)).toBe('\u2713'); - expect(checkmarkFilter(false)).toBe('\u2718'); - }) - ); - -}); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.ts deleted file mode 100644 index 3bb3a9cf66e..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/checkmark/checkmark.filter.ts +++ /dev/null @@ -1,4 +0,0 @@ -// #docregion -angular. - module('core'). - filter('checkmark', () => (input: boolean) => input ? '\u2713' : '\u2718'); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/core.module.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/core.module.ts deleted file mode 100644 index 3cf3ab64459..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/core.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `core` module -angular.module('core', ['core.phone']); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.module.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.module.ts deleted file mode 100644 index 71f2e74e26c..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `core.phone` module -angular.module('core.phone', ['ngResource']); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.spec.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.spec.ts deleted file mode 100644 index 1072736f5be..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -describe('Phone', () => { - let $httpBackend: angular.IHttpBackendService; - let Phone: any; - const phonesData = [ - {name: 'Phone X'}, - {name: 'Phone Y'}, - {name: 'Phone Z'} - ]; - - // Add a custom equality tester before each test - beforeEach(() => { - jasmine.addCustomEqualityTester(angular.equals); - }); - - // Load the module that contains the `Phone` service before each test - beforeEach(angular.mock.module('core.phone')); - - // Instantiate the service and "train" `$httpBackend` before each test - beforeEach(inject((_$httpBackend_: angular.IHttpBackendService, _Phone_: any) => { - $httpBackend = _$httpBackend_; - $httpBackend.expectGET('phones/phones.json').respond(phonesData); - - Phone = _Phone_; - })); - - // Verify that there are no outstanding expectations or requests after each test - afterEach(() => { - $httpBackend.verifyNoOutstandingExpectation(); - $httpBackend.verifyNoOutstandingRequest(); - }); - - it('should fetch the phones data from `/phones/phones.json`', () => { - const phones = Phone.query(); - - expect(phones).toEqual([]); - - $httpBackend.flush(); - expect(phones).toEqual(phonesData); - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.ts deleted file mode 100644 index 38b3d86a74c..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/core/phone/phone.service.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -angular. - module('core.phone'). - factory('Phone', ['$resource', - ($resource: angular.resource.IResourceService) => - $resource('phones/:phoneId.json', {}, { - query: { - method: 'GET', - params: {phoneId: 'phones'}, - isArray: true - } - }) - ]); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/.gitkeep b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.0.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.0.jpg deleted file mode 100644 index 7ce0dce4ee9..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.1.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.1.jpg deleted file mode 100644 index ed8cad89fba..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.2.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.2.jpg deleted file mode 100644 index c83529e0f9c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.3.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.3.jpg deleted file mode 100644 index cd2c30280da..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.4.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.4.jpg deleted file mode 100644 index b4d8472da88..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/dell-streak-7.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.0.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.0.jpg deleted file mode 100644 index 2446159e937..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.1.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.1.jpg deleted file mode 100644 index 867f207459f..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.2.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.2.jpg deleted file mode 100644 index 27d78338c4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.3.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.3.jpg deleted file mode 100644 index 29459a68a4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-atrix-4g.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.0.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.0.jpg deleted file mode 100644 index a6c993291ee..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.1.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.1.jpg deleted file mode 100644 index 400b89e2df4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.2.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.2.jpg deleted file mode 100644 index 86b55d28dd4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.3.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.3.jpg deleted file mode 100644 index 85ec293ae54..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.4.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.4.jpg deleted file mode 100644 index 75ef1464cb8..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.5.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.5.jpg deleted file mode 100644 index 4d42db43305..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom-with-wi-fi.5.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.0.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.0.jpg deleted file mode 100644 index bf6954bbd5a..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.1.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.1.jpg deleted file mode 100644 index 659688a47d7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.2.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.2.jpg deleted file mode 100644 index ce0ff1002e4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/motorola-xoom.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.0.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.0.jpg deleted file mode 100644 index 0952bc79c2c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.1.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.1.jpg deleted file mode 100644 index f33004dd7f5..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.2.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.2.jpg deleted file mode 100644 index c5c63621f12..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.3.jpg b/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.3.jpg deleted file mode 100644 index e51f75b0edc..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-1-typescript/app/img/phones/nexus-s.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/index.html b/aio/content/examples/upgrade-phonecat-1-typescript/app/index.html deleted file mode 100644 index 5bc41e05965..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/index.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Google Phone Gallery - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.spec.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.spec.ts deleted file mode 100644 index 7b07ad306b0..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docregion -describe('phoneDetail', () => { - - // Load the module that contains the `phoneDetail` component before each test - beforeEach(angular.mock.module('phoneDetail')); - - // Test the controller - describe('PhoneDetailController', () => { - let $httpBackend: angular.IHttpBackendService; - let ctrl: any; - const xyzPhoneData = { - name: 'phone xyz', - images: ['image/url1.png', 'image/url2.png'] - }; - - beforeEach(inject(($componentController: any, - _$httpBackend_: angular.IHttpBackendService, - $routeParams: angular.route.IRouteParamsService) => { - $httpBackend = _$httpBackend_; - $httpBackend.expectGET('phones/xyz.json').respond(xyzPhoneData); - - $routeParams.phoneId = 'xyz'; - - ctrl = $componentController('phoneDetail'); - })); - - it('should fetch the phone details', () => { - jasmine.addCustomEqualityTester(angular.equals); - - expect(ctrl.phone).toEqual({}); - - $httpBackend.flush(); - expect(ctrl.phone).toEqual(xyzPhoneData); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.ts deleted file mode 100644 index 4fc9634d61c..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -class PhoneDetailController { - phone: any; - mainImageUrl: string; - - static $inject = ['$routeParams', 'Phone']; - constructor($routeParams: angular.route.IRouteParamsService, Phone: any) { - const phoneId = $routeParams.phoneId; - this.phone = Phone.get({phoneId}, (phone: any) => { - this.setImage(phone.images[0]); - }); - } - - setImage(imageUrl: string) { - this.mainImageUrl = imageUrl; - } -} - -angular. - module('phoneDetail'). - component('phoneDetail', { - templateUrl: 'phone-detail/phone-detail.template.html', - controller: PhoneDetailController - }); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.module.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.module.ts deleted file mode 100644 index 73d986f5617..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.module.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Define the `phoneDetail` module -angular.module('phoneDetail', [ - 'ngRoute', - 'core.phone' -]); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.template.html b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.template.html deleted file mode 100644 index 9495a46b366..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-detail/phone-detail.template.html +++ /dev/null @@ -1,117 +0,0 @@ -
    - Phone {{$ctrl.phone.name}} - thumbnail {{$index}} -
    - -

    {{$ctrl.phone.name}}

    - -

    {{$ctrl.phone.description}}

    - -
      -
    • - Phone {{$ctrl.phone.name}} - thumbnail {{$index}} -
    • -
    - -
      -
    • - Availability and Networks -
      -
      Availability
      -
      {{availability}}
      -
      -
    • -
    • - Battery -
      -
      Type
      -
      {{$ctrl.phone.battery.type}}
      -
      Talk Time
      -
      {{$ctrl.phone.battery.talkTime}}
      -
      Standby time (max)
      -
      {{$ctrl.phone.battery.standbyTime}}
      -
      -
    • -
    • - Storage and Memory -
      -
      RAM
      -
      {{$ctrl.phone.storage.ram}}
      -
      Internal Storage
      -
      {{$ctrl.phone.storage.flash}}
      -
      -
    • -
    • - Connectivity -
      -
      Network Support
      -
      {{$ctrl.phone.connectivity.cell}}
      -
      WiFi
      -
      {{$ctrl.phone.connectivity.wifi}}
      -
      Bluetooth
      -
      {{$ctrl.phone.connectivity.bluetooth}}
      -
      Infrared
      -
      {{$ctrl.phone.connectivity.infrared | checkmark}}
      -
      GPS
      -
      {{$ctrl.phone.connectivity.gps | checkmark}}
      -
      -
    • -
    • - Android -
      -
      OS Version
      -
      {{$ctrl.phone.android.os}}
      -
      UI
      -
      {{$ctrl.phone.android.ui}}
      -
      -
    • -
    • - Size and Weight -
      -
      Dimensions
      -
      {{dim}}
      -
      Weight
      -
      {{$ctrl.phone.sizeAndWeight.weight}}
      -
      -
    • -
    • - Display -
      -
      Screen size
      -
      {{$ctrl.phone.display.screenSize}}
      -
      Screen resolution
      -
      {{$ctrl.phone.display.screenResolution}}
      -
      Touch screen
      -
      {{$ctrl.phone.display.touchScreen | checkmark}}
      -
      -
    • -
    • - Hardware -
      -
      CPU
      -
      {{$ctrl.phone.hardware.cpu}}
      -
      USB
      -
      {{$ctrl.phone.hardware.usb}}
      -
      Audio / headphone jack
      -
      {{$ctrl.phone.hardware.audioJack}}
      -
      FM Radio
      -
      {{$ctrl.phone.hardware.fmRadio | checkmark}}
      -
      Accelerometer
      -
      {{$ctrl.phone.hardware.accelerometer | checkmark}}
      -
      -
    • -
    • - Camera -
      -
      Primary
      -
      {{$ctrl.phone.camera.primary}}
      -
      Features
      -
      {{$ctrl.phone.camera.features.join(', ')}}
      -
      -
    • -
    • - Additional Features -
      {{$ctrl.phone.additionalFeatures}}
      -
    • -
    diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.spec.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.spec.ts deleted file mode 100644 index 212992cfa38..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -describe('phoneList', () => { - - // Load the module that contains the `phoneList` component before each test - beforeEach(angular.mock.module('phoneList')); - - // Test the controller - describe('PhoneListController', () => { - let $httpBackend: angular.IHttpBackendService; - let ctrl: any; - - beforeEach(inject(($componentController: any, _$httpBackend_: angular.IHttpBackendService) => { - $httpBackend = _$httpBackend_; - $httpBackend.expectGET('phones/phones.json') - .respond([{name: 'Nexus S'}, {name: 'Motorola DROID'}]); - - ctrl = $componentController('phoneList'); - })); - - it('should create a `phones` property with 2 phones fetched with `$http`', () => { - jasmine.addCustomEqualityTester(angular.equals); - - expect(ctrl.phones).toEqual([]); - - $httpBackend.flush(); - expect(ctrl.phones).toEqual([{name: 'Nexus S'}, {name: 'Motorola DROID'}]); - }); - - it('should set a default value for the `orderProp` property', () => { - expect(ctrl.orderProp).toBe('age'); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.ts deleted file mode 100644 index e2f2855ae68..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.component.ts +++ /dev/null @@ -1,20 +0,0 @@ -// #docregion -class PhoneListController { - phones: any[]; - orderProp: string; - query: string; - - static $inject = ['Phone']; - constructor(Phone: any) { - this.phones = Phone.query(); - this.orderProp = 'age'; - } - -} - -angular. - module('phoneList'). - component('phoneList', { - templateUrl: 'phone-list/phone-list.template.html', - controller: PhoneListController - }); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.module.ts b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.module.ts deleted file mode 100644 index 7fd3a7517e2..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `phoneList` module -angular.module('phoneList', ['core.phone']); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.template.html b/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.template.html deleted file mode 100644 index 90548f9f91b..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phone-list/phone-list.template.html +++ /dev/null @@ -1,36 +0,0 @@ -
    -
    -
    - - -

    - Search: - -

    - -

    - Sort by: - -

    - -
    -
    - - - - -
    -
    -
    diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/dell-streak-7.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/dell-streak-7.json deleted file mode 100644 index a32eb6ff98c..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/dell-streak-7.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "additionalFeatures": "Front Facing 1.3MP Camera", - "android": { - "os": "Android 2.2", - "ui": "Dell Stage" - }, - "availability": [ - "T-Mobile" - ], - "battery": { - "standbyTime": "", - "talkTime": "", - "type": "Lithium Ion (Li-Ion) (2780 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "T-mobile HSPA+ @ 2100/1900/AWS/850 MHz", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g" - }, - "description": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around. Android\u2122 2.2-based tablet with over-the-air upgrade capability for future OS releases. A vibrant 7-inch, multitouch display with full Adobe\u00ae Flash 10.1 pre-installed. Includes a 1.3 MP front-facing camera for face-to-face chats on popular services such as Qik or Skype. 16 GB of internal storage, plus Wi-Fi, Bluetooth and built-in GPS keeps you in touch with the world around you. Connect on your terms. Save with 2-year contract or flexibility with prepaid pay-as-you-go plans", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "7.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "nVidia Tegra T20", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "dell-streak-7", - "images": [ - "img/phones/dell-streak-7.0.jpg", - "img/phones/dell-streak-7.1.jpg", - "img/phones/dell-streak-7.2.jpg", - "img/phones/dell-streak-7.3.jpg", - "img/phones/dell-streak-7.4.jpg" - ], - "name": "Dell Streak 7", - "sizeAndWeight": { - "dimensions": [ - "199.9 mm (w)", - "119.8 mm (h)", - "12.4 mm (d)" - ], - "weight": "450.0 grams" - }, - "storage": { - "flash": "16000MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-atrix-4g.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-atrix-4g.json deleted file mode 100644 index ccca00e3b2d..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-atrix-4g.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "", - "android": { - "os": "Android 2.2", - "ui": "MOTOBLUR" - }, - "availability": [ - "AT&T" - ], - "battery": { - "standbyTime": "400 hours", - "talkTime": "5 hours", - "type": "Lithium Ion (Li-Ion) (1930 mAH)" - }, - "camera": { - "features": [ - "" - ], - "primary": "" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "WCDMA 850/1900/2100, GSM 850/900/1800/1900, HSDPA 14Mbps (Category 10) Edge Class 12, GPRS Class 12, eCompass, AGPS", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA ATRIX 4G gives you dual-core processing power and the revolutionary webtop application. With webtop and a compatible Motorola docking station, sold separately, you can surf the Internet with a full Firefox browser, create and edit docs, or access multimedia on a large screen almost anywhere.", - "display": { - "screenResolution": "QHD (960 x 540)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-atrix-4g", - "images": [ - "img/phones/motorola-atrix-4g.0.jpg", - "img/phones/motorola-atrix-4g.1.jpg", - "img/phones/motorola-atrix-4g.2.jpg", - "img/phones/motorola-atrix-4g.3.jpg" - ], - "name": "MOTOROLA ATRIX\u2122 4G", - "sizeAndWeight": { - "dimensions": [ - "63.5 mm (w)", - "117.75 mm (h)", - "10.95 mm (d)" - ], - "weight": "135.0 grams" - }, - "storage": { - "flash": "", - "ram": "" - } -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom-with-wi-fi.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom-with-wi-fi.json deleted file mode 100644 index 4ba9c8d5b53..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom-with-wi-fi.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "additionalFeatures": "Sensors: proximity, ambient light, barometer, gyroscope", - "android": { - "os": "Android 3.0", - "ui": "Honeycomb" - }, - "availability": [ - "" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other ( mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Motorola XOOM with Wi-Fi has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom-with-wi-fi", - "images": [ - "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "img/phones/motorola-xoom-with-wi-fi.1.jpg", - "img/phones/motorola-xoom-with-wi-fi.2.jpg", - "img/phones/motorola-xoom-with-wi-fi.3.jpg", - "img/phones/motorola-xoom-with-wi-fi.4.jpg", - "img/phones/motorola-xoom-with-wi-fi.5.jpg" - ], - "name": "Motorola XOOM\u2122 with Wi-Fi", - "sizeAndWeight": { - "dimensions": [ - "249.1 mm (w)", - "167.8 mm (h)", - "12.9 mm (d)" - ], - "weight": "708.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom.json deleted file mode 100644 index f0f0c8711d9..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/motorola-xoom.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "Front-facing camera. Sensors: proximity, ambient light, barometer, gyroscope.", - "android": { - "os": "Android 3.0", - "ui": "Android" - }, - "availability": [ - "Verizon" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other (3250 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "CDMA 800 /1900 LTE 700, Rx diversity in all bands", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA XOOM has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom", - "images": [ - "img/phones/motorola-xoom.0.jpg", - "img/phones/motorola-xoom.1.jpg", - "img/phones/motorola-xoom.2.jpg" - ], - "name": "MOTOROLA XOOM\u2122", - "sizeAndWeight": { - "dimensions": [ - "249.0 mm (w)", - "168.0 mm (h)", - "12.7 mm (d)" - ], - "weight": "726.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/nexus-s.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/nexus-s.json deleted file mode 100644 index 5e712e2ff8c..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/nexus-s.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "additionalFeatures": "Contour Display, Near Field Communications (NFC), Three-axis gyroscope, Anti-fingerprint display coating, Internet Calling support (VoIP/SIP)", - "android": { - "os": "Android 2.3", - "ui": "Android" - }, - "availability": [ - "M1,", - "O2,", - "Orange,", - "Singtel,", - "StarHub,", - "T-Mobile,", - "Vodafone" - ], - "battery": { - "standbyTime": "428 hours", - "talkTime": "6 hours", - "type": "Lithium Ion (Li-Ion) (1500 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "Quad-band GSM: 850, 900, 1800, 1900\r\nTri-band HSPA: 900, 2100, 1700\r\nHSPA type: HSDPA (7.2Mbps) HSUPA (5.76Mbps)", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Nexus S is the next generation of Nexus devices, co-developed by Google and Samsung. The latest Android platform (Gingerbread), paired with a 1 GHz Hummingbird processor and 16GB of memory, makes Nexus S one of the fastest phones on the market. It comes pre-installed with the best of Google apps and enabled with new and popular features like true multi-tasking, Wi-Fi hotspot, Internet Calling, NFC support, and full web browsing. With this device, users will also be the first to receive software upgrades and new Google mobile apps as soon as they become available. For more details, visit http://www.google.com/nexus.", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1GHz Cortex A8 (Hummingbird) processor", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "nexus-s", - "images": [ - "img/phones/nexus-s.0.jpg", - "img/phones/nexus-s.1.jpg", - "img/phones/nexus-s.2.jpg", - "img/phones/nexus-s.3.jpg" - ], - "name": "Nexus S", - "sizeAndWeight": { - "dimensions": [ - "63.0 mm (w)", - "123.9 mm (h)", - "10.88 mm (d)" - ], - "weight": "129.0 grams" - }, - "storage": { - "flash": "16384MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/phones.json b/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/phones.json deleted file mode 100644 index 339b94fbb51..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/app/phones/phones.json +++ /dev/null @@ -1,155 +0,0 @@ -[ - { - "age": 0, - "id": "motorola-xoom-with-wi-fi", - "imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "name": "Motorola XOOM\u2122 with Wi-Fi", - "snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 1, - "id": "motorola-xoom", - "imageUrl": "img/phones/motorola-xoom.0.jpg", - "name": "MOTOROLA XOOM\u2122", - "snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 2, - "carrier": "AT&T", - "id": "motorola-atrix-4g", - "imageUrl": "img/phones/motorola-atrix-4g.0.jpg", - "name": "MOTOROLA ATRIX\u2122 4G", - "snippet": "MOTOROLA ATRIX 4G the world's most powerful smartphone." - }, - { - "age": 3, - "id": "dell-streak-7", - "imageUrl": "img/phones/dell-streak-7.0.jpg", - "name": "Dell Streak 7", - "snippet": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around." - }, - { - "age": 4, - "carrier": "Cellular South", - "id": "samsung-gem", - "imageUrl": "img/phones/samsung-gem.0.jpg", - "name": "Samsung Gem\u2122", - "snippet": "The Samsung Gem\u2122 brings you everything that you would expect and more from a touch display smart phone \u2013 more apps, more features and a more affordable price." - }, - { - "age": 5, - "carrier": "Dell", - "id": "dell-venue", - "imageUrl": "img/phones/dell-venue.0.jpg", - "name": "Dell Venue", - "snippet": "The Dell Venue; Your Personal Express Lane to Everything" - }, - { - "age": 6, - "carrier": "Best Buy", - "id": "nexus-s", - "imageUrl": "img/phones/nexus-s.0.jpg", - "name": "Nexus S", - "snippet": "Fast just got faster with Nexus S. A pure Google experience, Nexus S is the first phone to run Gingerbread (Android 2.3), the fastest version of Android yet." - }, - { - "age": 7, - "carrier": "Cellular South", - "id": "lg-axis", - "imageUrl": "img/phones/lg-axis.0.jpg", - "name": "LG Axis", - "snippet": "Android Powered, Google Maps Navigation, 5 Customizable Home Screens" - }, - { - "age": 8, - "id": "samsung-galaxy-tab", - "imageUrl": "img/phones/samsung-galaxy-tab.0.jpg", - "name": "Samsung Galaxy Tab\u2122", - "snippet": "Feel Free to Tab\u2122. The Samsung Galaxy Tab\u2122 brings you an ultra-mobile entertainment experience through its 7\u201d display, high-power processor and Adobe\u00ae Flash\u00ae Player compatibility." - }, - { - "age": 9, - "carrier": "Cellular South", - "id": "samsung-showcase-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg", - "name": "Samsung Showcase\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Showcase\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance, even outdoors" - }, - { - "age": 10, - "carrier": "Verizon", - "id": "droid-2-global-by-motorola", - "imageUrl": "img/phones/droid-2-global-by-motorola.0.jpg", - "name": "DROID\u2122 2 Global by Motorola", - "snippet": "The first smartphone with a 1.2 GHz processor and global capabilities." - }, - { - "age": 11, - "carrier": "Verizon", - "id": "droid-pro-by-motorola", - "imageUrl": "img/phones/droid-pro-by-motorola.0.jpg", - "name": "DROID\u2122 Pro by Motorola", - "snippet": "The next generation of DOES." - }, - { - "age": 12, - "carrier": "AT&T", - "id": "motorola-bravo-with-motoblur", - "imageUrl": "img/phones/motorola-bravo-with-motoblur.0.jpg", - "name": "MOTOROLA BRAVO\u2122 with MOTOBLUR\u2122", - "snippet": "An experience to cheer about." - }, - { - "age": 13, - "carrier": "T-Mobile", - "id": "motorola-defy-with-motoblur", - "imageUrl": "img/phones/motorola-defy-with-motoblur.0.jpg", - "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122", - "snippet": "Are you ready for everything life throws your way?" - }, - { - "age": 14, - "carrier": "T-Mobile", - "id": "t-mobile-mytouch-4g", - "imageUrl": "img/phones/t-mobile-mytouch-4g.0.jpg", - "name": "T-Mobile myTouch 4G", - "snippet": "The T-Mobile myTouch 4G is a premium smartphone designed to deliver blazing fast 4G speeds so that you can video chat from practically anywhere, with or without Wi-Fi." - }, - { - "age": 15, - "carrier": "US Cellular", - "id": "samsung-mesmerize-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg", - "name": "Samsung Mesmerize\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Mesmerize\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance,even outdoors" - }, - { - "age": 16, - "carrier": "Sprint", - "id": "sanyo-zio", - "imageUrl": "img/phones/sanyo-zio.0.jpg", - "name": "SANYO ZIO", - "snippet": "The Sanyo Zio by Kyocera is an Android smartphone with a combination of ultra-sleek styling, strong performance and unprecedented value." - }, - { - "age": 17, - "id": "samsung-transform", - "imageUrl": "img/phones/samsung-transform.0.jpg", - "name": "Samsung Transform\u2122", - "snippet": "The Samsung Transform\u2122 brings you a fun way to customize your Android powered touch screen phone to just the way you like it through your favorite themed \u201cSprint ID Service Pack\u201d." - }, - { - "age": 18, - "id": "t-mobile-g2", - "imageUrl": "img/phones/t-mobile-g2.0.jpg", - "name": "T-Mobile G2", - "snippet": "The T-Mobile G2 with Google is the first smartphone built for 4G speeds on T-Mobile's new network. Get the information you need, faster than you ever thought possible." - }, - { - "age": 19, - "id": "motorola-charm-with-motoblur", - "imageUrl": "img/phones/motorola-charm-with-motoblur.0.jpg", - "name": "Motorola CHARM\u2122 with MOTOBLUR\u2122", - "snippet": "Motorola CHARM fits easily in your pocket or palm. Includes MOTOBLUR service." - } -] diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/e2e-spec.ts b/aio/content/examples/upgrade-phonecat-1-typescript/e2e-spec.ts deleted file mode 100644 index 3bf61605582..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/e2e-spec.ts +++ /dev/null @@ -1,116 +0,0 @@ -import { browser, element, by, ElementArrayFinder, ElementFinder } from 'protractor'; - -// Angular E2E Testing Guide: -// https://docs.angularjs.org/guide/e2e-testing - -describe('PhoneCat Application', () => { - - beforeAll(() => { - browser.baseUrl = `${browser.baseUrl}/app/`; - - // protractor.config.js is set to ng2 mode by default, so we must manually change it - browser.rootEl = 'body'; - }); - - it('should redirect `index.html` to `index.html#!/phones', async () => { - await browser.get('index.html'); - expect(await browser.getLocationAbsUrl()).toBe('/phones'); - }); - - describe('View: Phone list', () => { - - // Helpers - const waitForCount = async (elems: ElementArrayFinder, count: number) => { - // Wait for the list to stabilize, which may take a while (e.g. due to animations). - await browser.wait(async () => await elems.count() === count, 5000); - }; - - beforeEach(() => browser.get('index.html#!/phones')); - - it('should filter the phone list as a user types into the search box', async () => { - const phoneList = element.all(by.repeater('phone in $ctrl.phones')); - const query = element(by.model('$ctrl.query')); - - await waitForCount(phoneList, 20); - expect(await phoneList.count()).toBe(20); - - await query.sendKeys('nexus'); - await waitForCount(phoneList, 1); - expect(await phoneList.count()).toBe(1); - - await query.clear(); - await query.sendKeys('motorola'); - await waitForCount(phoneList, 8); - expect(await phoneList.count()).toBe(8); - }); - - it('should be possible to control phone order via the drop-down menu', async () => { - const queryField = element(by.model('$ctrl.query')); - const orderSelect = element(by.model('$ctrl.orderProp')); - const nameOption = orderSelect.element(by.css('option[value="name"]')); - const phoneNameColumn = element.all(by.repeater('phone in $ctrl.phones').column('phone.name')); - - function getNames() { - return phoneNameColumn.map((elem: ElementFinder) => elem.getText()); - } - - await queryField.sendKeys('tablet'); // Let's narrow the dataset to make the assertions shorter - await waitForCount(phoneNameColumn, 2); - - expect(await getNames()).toEqual([ - 'Motorola XOOM\u2122 with Wi-Fi', - 'MOTOROLA XOOM\u2122' - ]); - - await nameOption.click(); - - expect(await getNames()).toEqual([ - 'MOTOROLA XOOM\u2122', - 'Motorola XOOM\u2122 with Wi-Fi' - ]); - }); - - it('should render phone specific links', async () => { - const phoneList = element.all(by.repeater('phone in $ctrl.phones')); - const query = element(by.model('$ctrl.query')); - - await query.sendKeys('nexus'); - await waitForCount(phoneList, 1); - - const nexusPhone = phoneList.first(); - const detailLink = nexusPhone.all(by.css('a')).first(); - - await detailLink.click(); - expect(await browser.getLocationAbsUrl()).toBe('/phones/nexus-s'); - }); - - }); - - describe('View: Phone detail', () => { - - beforeEach(() => browser.get('index.html#!/phones/nexus-s')); - - it('should display the `nexus-s` page', async () => { - expect(await element(by.binding('$ctrl.phone.name')).getText()).toBe('Nexus S'); - }); - - it('should display the first phone image as the main phone image', async () => { - const mainImage = element(by.css('img.phone.selected')); - - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - it('should swap the main image when clicking on a thumbnail image', async () => { - const mainImage = element(by.css('img.phone.selected')); - const thumbnails = element.all(by.css('.phone-thumbs img')); - - await thumbnails.get(2).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.2.jpg/); - - await thumbnails.get(0).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/example-config.json b/aio/content/examples/upgrade-phonecat-1-typescript/example-config.json deleted file mode 100644 index a76722119ff..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/example-config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "build": "build:upgrade", - "run": "serve:upgrade", - "projectType": "systemjs" -} diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/karma.conf.ajs.js b/aio/content/examples/upgrade-phonecat-1-typescript/karma.conf.ajs.js deleted file mode 100644 index 89d9e7bcd75..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/karma.conf.ajs.js +++ /dev/null @@ -1,41 +0,0 @@ -//jshint strict: false -module.exports = function(config) { - config.set({ - - basePath: './app', - - files: [ - 'https://code.angularjs.org/1.5.5/angular.js', - 'https://code.angularjs.org/1.5.5/angular-animate.js', - 'https://code.angularjs.org/1.5.5/angular-resource.js', - 'https://code.angularjs.org/1.5.5/angular-route.js', - 'https://code.angularjs.org/1.5.5/angular-mocks.js', - '**/*.module.js', - '*!(.module|.spec).js', - '!(bower_components)/**/*!(.module|.spec).js', - '**/*.spec.js' - ], - - // This is needed, because the AngularJS files are loaded from `https://code.angularjs.org/`. - // Without this, latest browsers prevent loading the scripts from localhost with: - // ``` - // Access to script at 'https://code.angularjs.org/1.5.5/angular.js' from origin - // 'http://localhost:9876' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' - // header is present on the requested resource. - // ``` - crossOriginAttribute: false, - - autoWatch: true, - - frameworks: ['jasmine'], - - browsers: ['Chrome', 'Firefox'], - - plugins: [ - 'karma-chrome-launcher', - 'karma-firefox-launcher', - 'karma-jasmine' - ] - - }); -}; diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/run-unit-tests.sh b/aio/content/examples/upgrade-phonecat-1-typescript/run-unit-tests.sh deleted file mode 100755 index 239e5ff7d79..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/run-unit-tests.sh +++ /dev/null @@ -1,7 +0,0 @@ -## The boilerplate Karma configuration won't work with AngularJS tests since -## a specific loading configuration is needed for them. -## We keep one in karma.conf.ajs.js. This scripts runs the AngularJS tests with -## that config. - -PATH=$(npm bin):$PATH -tsc && karma start karma.conf.ajs.js diff --git a/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.ajs.json b/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.ajs.json deleted file mode 100644 index 5dc8794a8a2..00000000000 --- a/aio/content/examples/upgrade-phonecat-1-typescript/tsconfig.ajs.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "commonjs", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "removeComments": false, - "noImplicitAny": false, - "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/BUILD.bazel b/aio/content/examples/upgrade-phonecat-2-hybrid/BUILD.bazel deleted file mode 100644 index 96f33ff2122..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/BUILD.bazel +++ /dev/null @@ -1,16 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") -load("@npm//@angular/build-tooling/bazel/remote-execution:index.bzl", "ENABLE_NETWORK") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "upgrade-phonecat-2-hybrid", - flaky = True, # TODO: figure out why this is flaky or times out - # This example downloads and inlines resources - test_exec_properties = ENABLE_NETWORK, - test_tags = [ - "requires-network", - # This is currently broken due to usage of ESM2022 which does not work out-of-the-box with system.js. - "broken", - ], -) diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/README.md b/aio/content/examples/upgrade-phonecat-2-hybrid/README.md deleted file mode 100644 index 10ecd2fa4b9..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/README.md +++ /dev/null @@ -1,38 +0,0 @@ -This is the Angular Phonecat application adjusted to fit our boilerplate project -structure. - -The following changes from vanilla Phonecat are applied: - -* Karma config for unit tests is in karma.conf.ajs.js because the boilerplate - Karma config is not compatible with the way AngularJS tests need to be run. - The shell script run-unit-tests.sh can be used to run the unit tests. -* Also for the Karma shim, there is a `karma-test-shim.1.js` file which isn't - used but is shown in the test appendix. -* Instead of using Bower, AngularJS and its dependencies are fetched from a CDN - in index.html and karma.conf.ajs.js. -* E2E tests have been moved to the parent directory, where `run-e2e-tests` can - discover and run them along with all the other examples. -* Most of the phone JSON and image data removed in the interest of keeping - repo weight down. Keeping enough to retain testability of the app. - -## Running the app - -Start like any example - -```shell -npm run start -``` - -## Running unit tests - -```shell -./run-unit-tests.sh -``` - -## Running E2E tests - -Like for any example \(at the project root\): - -```shell -gulp run-e2e-tests --filter=phonecat-2 -``` diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/aot/index.html b/aio/content/examples/upgrade-phonecat-2-hybrid/aot/index.html deleted file mode 100644 index bb1b915eeb2..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/aot/index.html +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - Google Phone Gallery - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/ajs-upgraded-providers.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/ajs-upgraded-providers.ts deleted file mode 100644 index f6e1654d74a..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/ajs-upgraded-providers.ts +++ /dev/null @@ -1,14 +0,0 @@ -// #docregion -export abstract class RouteParams { - [key: string]: string; -} - -export function routeParamsFactory(i: any) { - return i.get('$routeParams'); -} - -export const routeParamsProvider = { - provide: RouteParams, - useFactory: routeParamsFactory, - deps: ['$injector'] -}; diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.css b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.css deleted file mode 100644 index 175320b509e..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.css +++ /dev/null @@ -1,67 +0,0 @@ -/* Animate `ngRepeat` in `phoneList` component */ -.phone-list-item.ng-enter, -.phone-list-item.ng-leave, -.phone-list-item.ng-move { - overflow: hidden; - transition: 0.5s linear all; -} - -.phone-list-item.ng-enter, -.phone-list-item.ng-leave.ng-leave-active, -.phone-list-item.ng-move { - height: 0; - margin-bottom: 0; - opacity: 0; - padding-bottom: 0; - padding-top: 0; -} - -.phone-list-item.ng-enter.ng-enter-active, -.phone-list-item.ng-leave, -.phone-list-item.ng-move.ng-move-active { - height: 120px; - margin-bottom: 20px; - opacity: 1; - padding-bottom: 4px; - padding-top: 15px; -} - -/* Animate view transitions with `ngView` */ -.view-container { - position: relative; -} - -.view-frame { - margin-top: 20px; -} - -.view-frame.ng-enter, -.view-frame.ng-leave { - background: white; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -.view-frame.ng-enter { - animation: 1s fade-in; - z-index: 100; -} - -.view-frame.ng-leave { - animation: 1s fade-out; - z-index: 99; -} - -@keyframes fade-in { - from { opacity: 0; } - to { opacity: 1; } -} - -@keyframes fade-out { - from { opacity: 1; } - to { opacity: 0; } -} - -/* Older browsers might need vendor-prefixes for keyframes and animation! */ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.ts deleted file mode 100644 index 61c7f2aced8..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.animations.ts +++ /dev/null @@ -1,41 +0,0 @@ -angular. - module('phonecatApp'). - animation('.phone', function phoneAnimationFactory() { - return { - addClass: animateIn, - removeClass: animateOut - }; - - function animateIn(element: JQuery, className: string, done: () => void) { - if (className !== 'selected') { return; } - - element.css({ - display: 'block', - position: 'absolute', - top: 500, - left: 0 - }).animate({ - top: 0 - }, done); - - return function animateInEnd(wasCanceled: boolean) { - if (wasCanceled) { element.stop(); } - }; - } - - function animateOut(element: JQuery, className: string, done: () => void) { - if (className !== 'selected') { return; } - - element.css({ - position: 'absolute', - top: 0, - left: 0 - }).animate({ - top: -500 - }, done); - - return function animateOutEnd(wasCanceled: boolean) { - if (wasCanceled) { element.stop(); } - }; - } - }); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.config.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.config.ts deleted file mode 100644 index 3546c8b508b..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.config.ts +++ /dev/null @@ -1,17 +0,0 @@ -angular. - module('phonecatApp'). - config(['$locationProvider', '$routeProvider', - function config($locationProvider: angular.ILocationProvider, - $routeProvider: angular.route.IRouteProvider) { - $locationProvider.hashPrefix('!'); - - $routeProvider. - when('/phones', { - template: '' - }). - when('/phones/:phoneId', { - template: '' - }). - otherwise('/phones'); - } - ]); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.css b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.css deleted file mode 100644 index f4b45b02a5b..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.css +++ /dev/null @@ -1,93 +0,0 @@ -body { - padding: 20px; -} - -h1 { - border-bottom: 1px solid gray; - margin-top: 0; -} - -/* View: Phone list */ -.phones { - list-style: none; -} - -.phones li { - clear: both; - height: 115px; - padding-top: 15px; -} - -.thumb { - float: left; - height: 100px; - margin: -0.5em 1em 1.5em 0; - padding-bottom: 1em; - width: 100px; -} - -/* View: Phone detail */ -.phone { - background-color: white; - display: none; - float: left; - height: 400px; - margin-bottom: 2em; - margin-right: 3em; - padding: 2em; - width: 400px; -} - -.phone:first-child { - display: block; -} - -.phone-images { - background-color: white; - float: left; - height: 450px; - overflow: hidden; - position: relative; - width: 450px; -} - -.phone-thumbs { - list-style: none; - margin: 0; -} - -.phone-thumbs img { - height: 100px; - padding: 1em; - width: 100px; -} - -.phone-thumbs li { - background-color: white; - border: 1px solid black; - cursor: pointer; - display: inline-block; - margin: 1em; -} - -.specs { - clear: both; - list-style: none; - margin: 0; - padding: 0; -} - -.specs dt { - font-weight: bold; -} - -.specs > li { - display: inline-block; - vertical-align: top; - width: 200px; -} - -.specs > li > span { - font-size: 1.2em; - font-weight: bold; -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ajs.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ajs.ts deleted file mode 100644 index cd07b1ac276..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ajs.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -// Define the `phonecatApp` AngularJS module -angular.module('phonecatApp', [ - 'ngAnimate', - 'ngRoute', - 'core', - 'phoneDetail', - 'phoneList', -]); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ts deleted file mode 100644 index 487be686d6a..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/app.module.ts +++ /dev/null @@ -1,72 +0,0 @@ -// #docplaster -// #docregion bare -import { DoBootstrap, NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -// #enddocregion bare -// #docregion upgrademodule -import { UpgradeModule } from '@angular/upgrade/static'; -// #enddocregion upgrademodule -// #docregion httpclientmodule -import { HttpClientModule } from '@angular/common/http'; -// #enddocregion httpclientmodule -// #docregion phonelist -import { FormsModule } from '@angular/forms'; -// #enddocregion phonelist -// #docregion phone -import { Phone } from './core/phone/phone.service'; -// #enddocregion phone -// #docregion checkmarkpipe -import { CheckmarkPipe } from './core/checkmark/checkmark.pipe'; -// #enddocregion checkmarkpipe -// #docregion phonelist -import { PhoneListComponent } from './phone-list/phone-list.component'; -// #enddocregion phonelist -// #docregion routeparams -import { routeParamsProvider } from './ajs-upgraded-providers'; -// #enddocregion routeparams -// #docregion phonedetail -import { PhoneDetailComponent } from './phone-detail/phone-detail.component'; -// #enddocregion phonedetail - -// #docregion bare, upgrademodule, httpclientmodule, phone, phonelist, phonedetail, checkmarkpipe - -@NgModule({ - imports: [ - BrowserModule, - // #enddocregion bare - UpgradeModule, - // #enddocregion upgrademodule - HttpClientModule, - // #enddocregion httpclientmodule, phone - FormsModule, - // #docregion bare, upgrademodule, httpclientmodule, phone - ], - // #enddocregion bare, upgrademodule, httpclientmodule, phone - declarations: [ - PhoneListComponent, - // #enddocregion phonelist - PhoneDetailComponent, - // #enddocregion phonedetail - CheckmarkPipe - // #docregion phonelist, phonedetail - ], - // #enddocregion phonelist - // #docregion phone, routeparams - providers: [ - Phone, - // #enddocregion phone - routeParamsProvider - // #docregion phone - ] - // #enddocregion routeparams -// #docregion bare, upgrademodule, httpclientmodule, phonelist -}) -export class AppModule implements DoBootstrap { - // #enddocregion bare - constructor(private upgrade: UpgradeModule) { } - ngDoBootstrap() { - this.upgrade.bootstrap(document.documentElement, ['phonecatApp']); - } - // #docregion bare -} -// #enddocregion bare, upgrademodule, httpclientmodule, phone, phonelist, phonedetail, checkmarkpipe diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.spec.ts deleted file mode 100644 index d83987aadaf..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.spec.ts +++ /dev/null @@ -1,11 +0,0 @@ -// #docregion -import { CheckmarkPipe } from './checkmark.pipe'; - -describe('CheckmarkPipe', () => { - - it('should convert boolean values to unicode checkmark or cross', () => { - const checkmarkPipe = new CheckmarkPipe(); - expect(checkmarkPipe.transform(true)).toBe('\u2713'); - expect(checkmarkPipe.transform(false)).toBe('\u2718'); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.ts deleted file mode 100644 index 888017e15cf..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/checkmark/checkmark.pipe.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({name: 'checkmark'}) -export class CheckmarkPipe implements PipeTransform { - transform(input: boolean) { - return input ? '\u2713' : '\u2718'; - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/core.module.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/core.module.ts deleted file mode 100644 index 3cf3ab64459..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/core.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `core` module -angular.module('core', ['core.phone']); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.module.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.module.ts deleted file mode 100644 index 71f2e74e26c..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `core.phone` module -angular.module('core.phone', ['ngResource']); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.spec.ts deleted file mode 100644 index 720978f20a6..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -// #docregion -import { inject, TestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { Phone, PhoneData } from './phone.service'; - -describe('Phone', () => { - let phone: Phone; - const phonesData: PhoneData[] = [ - {name: 'Phone X', snippet: '', images: []}, - {name: 'Phone Y', snippet: '', images: []}, - {name: 'Phone Z', snippet: '', images: []} - ]; - let httpMock: HttpTestingController; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [ - HttpClientTestingModule - ], - providers: [ - Phone, - ] - }); - }); - - beforeEach(inject([HttpTestingController, Phone], (_httpMock_: HttpTestingController, _phone_: Phone) => { - httpMock = _httpMock_; - phone = _phone_; - })); - - afterEach(() => { - httpMock.verify(); - }); - - it('should fetch the phones data from `/phones/phones.json`', () => { - phone.query().subscribe(result => { - expect(result).toEqual(phonesData); - }); - const req = httpMock.expectOne(`/phones/phones.json`); - req.flush(phonesData); - }); - -}); - diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.ts deleted file mode 100644 index 119d2f1d33b..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/core/phone/phone.service.ts +++ /dev/null @@ -1,38 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -// #docregion downgrade-injectable -declare const angular: angular.IAngularStatic; -import { downgradeInjectable } from '@angular/upgrade/static'; -// #enddocregion downgrade-injectable - -// #docregion phonedata-interface -export interface PhoneData { - name: string; - snippet: string; - images: string[]; -} -// #enddocregion phonedata-interface - -// #docregion fullclass -// #docregion classdef, downgrade-injectable -@Injectable() -export class Phone { -// #enddocregion classdef, downgrade-injectable - constructor(private http: HttpClient) { } - query(): Observable { - return this.http.get(`phones/phones.json`); - } - get(id: string): Observable { - return this.http.get(`phones/${id}.json`); - } -// #docregion classdef, downgrade-injectable -} -// #enddocregion classdef -// #enddocregion fullclass - -angular.module('core.phone') - .factory('phone', downgradeInjectable(Phone)); -// #enddocregion downgrade-injectable diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/.gitkeep b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.0.jpg deleted file mode 100644 index 7ce0dce4ee9..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.1.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.1.jpg deleted file mode 100644 index ed8cad89fba..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.2.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.2.jpg deleted file mode 100644 index c83529e0f9c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.3.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.3.jpg deleted file mode 100644 index cd2c30280da..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.4.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.4.jpg deleted file mode 100644 index b4d8472da88..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-streak-7.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-venue.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-venue.0.jpg deleted file mode 100644 index b4cb4eb25fe..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/dell-venue.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-2-global-by-motorola.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-2-global-by-motorola.0.jpg deleted file mode 100644 index 60700a2ab38..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-2-global-by-motorola.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-pro-by-motorola.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-pro-by-motorola.0.jpg deleted file mode 100644 index c7710de986f..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/droid-pro-by-motorola.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/lg-axis.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/lg-axis.0.jpg deleted file mode 100644 index 55e5a23bb20..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/lg-axis.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.0.jpg deleted file mode 100644 index 2446159e937..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.1.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.1.jpg deleted file mode 100644 index 867f207459f..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.2.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.2.jpg deleted file mode 100644 index 27d78338c4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.3.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.3.jpg deleted file mode 100644 index 29459a68a4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-atrix-4g.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-bravo-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-bravo-with-motoblur.0.jpg deleted file mode 100644 index e452ae7e7ce..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-bravo-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-charm-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-charm-with-motoblur.0.jpg deleted file mode 100644 index 21e4b8d741d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-charm-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-defy-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-defy-with-motoblur.0.jpg deleted file mode 100644 index c7c5e3ba0c5..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-defy-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.0.jpg deleted file mode 100644 index a6c993291ee..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.1.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.1.jpg deleted file mode 100644 index 400b89e2df4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.2.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.2.jpg deleted file mode 100644 index 86b55d28dd4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.3.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.3.jpg deleted file mode 100644 index 85ec293ae54..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.4.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.4.jpg deleted file mode 100644 index 75ef1464cb8..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.5.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.5.jpg deleted file mode 100644 index 4d42db43305..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom-with-wi-fi.5.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.0.jpg deleted file mode 100644 index bf6954bbd5a..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.1.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.1.jpg deleted file mode 100644 index 659688a47d7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.2.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.2.jpg deleted file mode 100644 index ce0ff1002e4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/motorola-xoom.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.0.jpg deleted file mode 100644 index 0952bc79c2c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.1.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.1.jpg deleted file mode 100644 index f33004dd7f5..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.2.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.2.jpg deleted file mode 100644 index c5c63621f12..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.3.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.3.jpg deleted file mode 100644 index e51f75b0edc..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/nexus-s.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-galaxy-tab.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-galaxy-tab.0.jpg deleted file mode 100644 index 3750377ad97..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-galaxy-tab.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-gem.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-gem.0.jpg deleted file mode 100644 index 0d5024a0268..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-gem.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg deleted file mode 100644 index 11b8f860cb7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg deleted file mode 100644 index 11b8f860cb7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-transform.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-transform.0.jpg deleted file mode 100644 index 0e3107caf57..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/samsung-transform.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/sanyo-zio.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/sanyo-zio.0.jpg deleted file mode 100644 index 9eeb9b96ed3..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/sanyo-zio.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-g2.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-g2.0.jpg deleted file mode 100644 index 6b6c09e0588..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-g2.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-mytouch-4g.0.jpg b/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-mytouch-4g.0.jpg deleted file mode 100644 index beba1f68271..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-2-hybrid/app/img/phones/t-mobile-mytouch-4g.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main-aot.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/main-aot.ts deleted file mode 100644 index d1302116cf3..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main-aot.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion -import { platformBrowser } from '@angular/platform-browser'; - -import { AppModule } from './app.module'; - -platformBrowser().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts deleted file mode 100644 index 2b978d046cc..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts +++ /dev/null @@ -1,6 +0,0 @@ -// #docregion bootstrap -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { AppModule } from './app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule); -// #enddocregion bootstrap diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ajs.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ajs.ts deleted file mode 100644 index e8c5aae1d85..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ajs.ts +++ /dev/null @@ -1,28 +0,0 @@ -// #docregion -declare const angular: angular.IAngularStatic; -import { Phone, PhoneData } from '../core/phone/phone.service'; - -class PhoneDetailController { - phone: PhoneData; - mainImageUrl: string; - - static $inject = ['$routeParams', 'phone']; - constructor($routeParams: angular.route.IRouteParamsService, phone: Phone) { - const phoneId = $routeParams.phoneId; - phone.get(phoneId).subscribe(data => { - this.phone = data; - this.setImage(data.images[0]); - }); - } - - setImage(imageUrl: string) { - this.mainImageUrl = imageUrl; - } -} - -angular. - module('phoneDetail'). - component('phoneDetail', { - templateUrl: 'phone-detail/phone-detail.template.html', - controller: PhoneDetailController - }); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.spec.ts deleted file mode 100644 index 976d1ecd30a..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { TestBed, waitForAsync } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -import { Observable, of } from 'rxjs'; - -import { PhoneDetailComponent } from './phone-detail.component'; -import { Phone, PhoneData } from '../core/phone/phone.service'; -import { CheckmarkPipe } from '../core/checkmark/checkmark.pipe'; - -function xyzPhoneData(): PhoneData { - return {name: 'phone xyz', snippet: '', images: ['image/url1.png', 'image/url2.png']}; -} - -class MockPhone { - get(id: string): Observable { - return of(xyzPhoneData()); - } -} - - -class ActivatedRouteMock { - constructor(public snapshot: any) {} -} - - -describe('PhoneDetailComponent', () => { - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ CheckmarkPipe, PhoneDetailComponent ], - providers: [ - { provide: Phone, useClass: MockPhone }, - { provide: ActivatedRoute, useValue: new ActivatedRouteMock({ params: { phoneId: 1 } }) } - ] - }) - .compileComponents(); - })); - - it('should fetch phone detail', () => { - const fixture = TestBed.createComponent(PhoneDetailComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain(xyzPhoneData().name); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ts deleted file mode 100644 index c6a8f7eda11..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.component.ts +++ /dev/null @@ -1,33 +0,0 @@ -declare const angular: angular.IAngularStatic; -import { downgradeComponent } from '@angular/upgrade/static'; - -import { Component } from '@angular/core'; - -import { Phone, PhoneData } from '../core/phone/phone.service'; -import { RouteParams } from '../ajs-upgraded-providers'; - -@Component({ - selector: 'phone-detail', - templateUrl: './phone-detail.template.html', -}) -export class PhoneDetailComponent { - phone: PhoneData; - mainImageUrl: string; - - constructor(routeParams: RouteParams, phone: Phone) { - phone.get(routeParams.phoneId).subscribe(data => { - this.phone = data; - this.setImage(data.images[0]); - }); - } - - setImage(imageUrl: string) { - this.mainImageUrl = imageUrl; - } -} - -angular.module('phoneDetail') - .directive( - 'phoneDetail', - downgradeComponent({component: PhoneDetailComponent}) as angular.IDirectiveFactory - ); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.module.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.module.ts deleted file mode 100644 index 73d986f5617..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.module.ts +++ /dev/null @@ -1,5 +0,0 @@ -// Define the `phoneDetail` module -angular.module('phoneDetail', [ - 'ngRoute', - 'core.phone' -]); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.template.html b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.template.html deleted file mode 100644 index 1c2a8740655..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-detail/phone-detail.template.html +++ /dev/null @@ -1,121 +0,0 @@ - -
    -
    - Phone {{ phone.name }} - thumbnail {{ index }} -
    - -

    {{phone.name}}

    - -

    {{phone.description}}

    - -
      -
    • - - Phone {{ phone.name }} - thumbnail {{ index }} -
    • -
    - -
      -
    • - Availability and Networks -
      -
      Availability
      -
      {{availability}}
      -
      -
    • -
    • - Battery -
      -
      Type
      -
      {{phone.battery?.type}}
      -
      Talk Time
      -
      {{phone.battery?.talkTime}}
      -
      Standby time (max)
      -
      {{phone.battery?.standbyTime}}
      -
      -
    • -
    • - Storage and Memory -
      -
      RAM
      -
      {{phone.storage?.ram}}
      -
      Internal Storage
      -
      {{phone.storage?.flash}}
      -
      -
    • -
    • - Connectivity -
      -
      Network Support
      -
      {{phone.connectivity?.cell}}
      -
      WiFi
      -
      {{phone.connectivity?.wifi}}
      -
      Bluetooth
      -
      {{phone.connectivity?.bluetooth}}
      -
      Infrared
      -
      {{phone.connectivity?.infrared | checkmark}}
      -
      GPS
      -
      {{phone.connectivity?.gps | checkmark}}
      -
      -
    • -
    • - Android -
      -
      OS Version
      -
      {{phone.android?.os}}
      -
      UI
      -
      {{phone.android?.ui}}
      -
      -
    • -
    • - Size and Weight -
      -
      Dimensions
      -
      {{dim}}
      -
      Weight
      -
      {{phone.sizeAndWeight?.weight}}
      -
      -
    • -
    • - Display -
      -
      Screen size
      -
      {{phone.display?.screenSize}}
      -
      Screen resolution
      -
      {{phone.display?.screenResolution}}
      -
      Touch screen
      -
      {{phone.display?.touchScreen | checkmark}}
      -
      -
    • -
    • - Hardware -
      -
      CPU
      -
      {{phone.hardware?.cpu}}
      -
      USB
      -
      {{phone.hardware?.usb}}
      -
      Audio / headphone jack
      -
      {{phone.hardware?.audioJack}}
      -
      FM Radio
      -
      {{phone.hardware?.fmRadio | checkmark}}
      -
      Accelerometer
      -
      {{phone.hardware?.accelerometer | checkmark}}
      -
      -
    • -
    • - Camera -
      -
      Primary
      -
      {{phone.camera?.primary}}
      -
      Features
      -
      {{phone.camera?.features?.join(', ')}}
      -
      -
    • -
    • - Additional Features -
      {{phone.additionalFeatures}}
      -
    • -
    -
    diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ajs.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ajs.ts deleted file mode 100644 index c0843c77267..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ajs.ts +++ /dev/null @@ -1,24 +0,0 @@ -// #docregion -declare const angular: angular.IAngularStatic; -import { Phone, PhoneData } from '../core/phone/phone.service'; - -class PhoneListController { - phones: PhoneData[]; - orderProp: string; - - static $inject = ['phone']; - constructor(phone: Phone) { - phone.query().subscribe(phones => { - this.phones = phones; - }); - this.orderProp = 'age'; - } - -} - -angular. - module('phoneList'). - component('phoneList', { - templateUrl: 'app/phone-list/phone-list.template.html', - controller: PhoneListController - }); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.spec.ts deleted file mode 100644 index 2f73c288b83..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.spec.ts +++ /dev/null @@ -1,60 +0,0 @@ -// #docregion -import {SpyLocation} from '@angular/common/testing'; -import {NO_ERRORS_SCHEMA} from '@angular/core'; -import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; -import {ActivatedRoute} from '@angular/router'; -import {Observable, of} from 'rxjs'; - -import {Phone, PhoneData} from '../core/phone/phone.service'; - -import {PhoneListComponent} from './phone-list.component'; - -class ActivatedRouteMock { - constructor(public snapshot: any) {} -} - -class MockPhone { - query(): Observable { - return of([ - {name: 'Nexus S', snippet: '', images: []}, {name: 'Motorola DROID', snippet: '', images: []} - ]); - } -} - -let fixture: ComponentFixture; - -describe('PhoneList', () => { - beforeEach(waitForAsync(() => { - TestBed - .configureTestingModule({ - declarations: [PhoneListComponent], - providers: [ - {provide: ActivatedRoute, useValue: new ActivatedRouteMock({params: {phoneId: 1}})}, - {provide: Location, useClass: SpyLocation}, - {provide: Phone, useClass: MockPhone}, - ], - schemas: [NO_ERRORS_SCHEMA] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PhoneListComponent); - }); - - it('should create "phones" model with 2 phones fetched from xhr', () => { - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelectorAll('.phone-list-item').length).toBe(2); - expect(compiled.querySelector('.phone-list-item:nth-child(1)').textContent) - .toContain('Motorola DROID'); - expect(compiled.querySelector('.phone-list-item:nth-child(2)').textContent) - .toContain('Nexus S'); - }); - - xit('should set the default value of orderProp model', () => { - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('select option:last-child').selected).toBe(true); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ts deleted file mode 100644 index 7950d94dc5b..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.component.ts +++ /dev/null @@ -1,72 +0,0 @@ -// #docregion downgrade-component -declare const angular: angular.IAngularStatic; -import { downgradeComponent } from '@angular/upgrade/static'; - -// #enddocregion downgrade-component - -// #docregion initialclass -import { Component } from '@angular/core'; -import { Phone, PhoneData } from '../core/phone/phone.service'; - -// #docregion downgrade-component -@Component({ - selector: 'phone-list', - templateUrl: './phone-list.template.html' -}) -export class PhoneListComponent { - // #enddocregion downgrade-component - phones: PhoneData[]; - query: string; - orderProp: string; - - constructor(phone: Phone) { - phone.query().subscribe(phones => { - this.phones = phones; - }); - this.orderProp = 'age'; - } - // #enddocregion initialclass - - // #docregion getphones - getPhones(): PhoneData[] { - return this.sortPhones(this.filterPhones(this.phones)); - } - - private filterPhones(phones: PhoneData[]) { - if (phones && this.query) { - return phones.filter(phone => { - const name = phone.name.toLowerCase(); - const snippet = phone.snippet.toLowerCase(); - return name.indexOf(this.query) >= 0 || snippet.indexOf(this.query) >= 0; - }); - } - return phones; - } - - private sortPhones(phones: PhoneData[]) { - if (phones && this.orderProp) { - return phones - .slice(0) // Make a copy - .sort((a, b) => { - if (a[this.orderProp] < b[this.orderProp]) { - return -1; - } else if ([b[this.orderProp] < a[this.orderProp]]) { - return 1; - } else { - return 0; - } - }); - } - return phones; - } - // #enddocregion getphones - // #docregion initialclass, downgrade-component -} -// #enddocregion initialclass - -angular.module('phoneList') - .directive( - 'phoneList', - downgradeComponent({component: PhoneListComponent}) as angular.IDirectiveFactory - ); -// #enddocregion downgrade-component diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.module.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.module.ts deleted file mode 100644 index 7fd3a7517e2..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.module.ts +++ /dev/null @@ -1,2 +0,0 @@ -// Define the `phoneList` module -angular.module('phoneList', ['core.phone']); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.template.html b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.template.html deleted file mode 100644 index 8f02113985d..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phone-list/phone-list.template.html +++ /dev/null @@ -1,40 +0,0 @@ -
    -
    -
    - - - -

    - Search: - -

    - -

    - Sort by: - -

    - - -
    -
    - - - - - - -
    -
    -
    diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/dell-streak-7.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/dell-streak-7.json deleted file mode 100644 index a32eb6ff98c..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/dell-streak-7.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "additionalFeatures": "Front Facing 1.3MP Camera", - "android": { - "os": "Android 2.2", - "ui": "Dell Stage" - }, - "availability": [ - "T-Mobile" - ], - "battery": { - "standbyTime": "", - "talkTime": "", - "type": "Lithium Ion (Li-Ion) (2780 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "T-mobile HSPA+ @ 2100/1900/AWS/850 MHz", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g" - }, - "description": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around. Android\u2122 2.2-based tablet with over-the-air upgrade capability for future OS releases. A vibrant 7-inch, multitouch display with full Adobe\u00ae Flash 10.1 pre-installed. Includes a 1.3 MP front-facing camera for face-to-face chats on popular services such as Qik or Skype. 16 GB of internal storage, plus Wi-Fi, Bluetooth and built-in GPS keeps you in touch with the world around you. Connect on your terms. Save with 2-year contract or flexibility with prepaid pay-as-you-go plans", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "7.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "nVidia Tegra T20", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "dell-streak-7", - "images": [ - "img/phones/dell-streak-7.0.jpg", - "img/phones/dell-streak-7.1.jpg", - "img/phones/dell-streak-7.2.jpg", - "img/phones/dell-streak-7.3.jpg", - "img/phones/dell-streak-7.4.jpg" - ], - "name": "Dell Streak 7", - "sizeAndWeight": { - "dimensions": [ - "199.9 mm (w)", - "119.8 mm (h)", - "12.4 mm (d)" - ], - "weight": "450.0 grams" - }, - "storage": { - "flash": "16000MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-atrix-4g.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-atrix-4g.json deleted file mode 100644 index ccca00e3b2d..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-atrix-4g.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "", - "android": { - "os": "Android 2.2", - "ui": "MOTOBLUR" - }, - "availability": [ - "AT&T" - ], - "battery": { - "standbyTime": "400 hours", - "talkTime": "5 hours", - "type": "Lithium Ion (Li-Ion) (1930 mAH)" - }, - "camera": { - "features": [ - "" - ], - "primary": "" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "WCDMA 850/1900/2100, GSM 850/900/1800/1900, HSDPA 14Mbps (Category 10) Edge Class 12, GPRS Class 12, eCompass, AGPS", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA ATRIX 4G gives you dual-core processing power and the revolutionary webtop application. With webtop and a compatible Motorola docking station, sold separately, you can surf the Internet with a full Firefox browser, create and edit docs, or access multimedia on a large screen almost anywhere.", - "display": { - "screenResolution": "QHD (960 x 540)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-atrix-4g", - "images": [ - "img/phones/motorola-atrix-4g.0.jpg", - "img/phones/motorola-atrix-4g.1.jpg", - "img/phones/motorola-atrix-4g.2.jpg", - "img/phones/motorola-atrix-4g.3.jpg" - ], - "name": "MOTOROLA ATRIX\u2122 4G", - "sizeAndWeight": { - "dimensions": [ - "63.5 mm (w)", - "117.75 mm (h)", - "10.95 mm (d)" - ], - "weight": "135.0 grams" - }, - "storage": { - "flash": "", - "ram": "" - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom-with-wi-fi.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom-with-wi-fi.json deleted file mode 100644 index 4ba9c8d5b53..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom-with-wi-fi.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "additionalFeatures": "Sensors: proximity, ambient light, barometer, gyroscope", - "android": { - "os": "Android 3.0", - "ui": "Honeycomb" - }, - "availability": [ - "" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other ( mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Motorola XOOM with Wi-Fi has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom-with-wi-fi", - "images": [ - "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "img/phones/motorola-xoom-with-wi-fi.1.jpg", - "img/phones/motorola-xoom-with-wi-fi.2.jpg", - "img/phones/motorola-xoom-with-wi-fi.3.jpg", - "img/phones/motorola-xoom-with-wi-fi.4.jpg", - "img/phones/motorola-xoom-with-wi-fi.5.jpg" - ], - "name": "Motorola XOOM\u2122 with Wi-Fi", - "sizeAndWeight": { - "dimensions": [ - "249.1 mm (w)", - "167.8 mm (h)", - "12.9 mm (d)" - ], - "weight": "708.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom.json deleted file mode 100644 index f0f0c8711d9..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/motorola-xoom.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "Front-facing camera. Sensors: proximity, ambient light, barometer, gyroscope.", - "android": { - "os": "Android 3.0", - "ui": "Android" - }, - "availability": [ - "Verizon" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other (3250 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "CDMA 800 /1900 LTE 700, Rx diversity in all bands", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA XOOM has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom", - "images": [ - "img/phones/motorola-xoom.0.jpg", - "img/phones/motorola-xoom.1.jpg", - "img/phones/motorola-xoom.2.jpg" - ], - "name": "MOTOROLA XOOM\u2122", - "sizeAndWeight": { - "dimensions": [ - "249.0 mm (w)", - "168.0 mm (h)", - "12.7 mm (d)" - ], - "weight": "726.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/nexus-s.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/nexus-s.json deleted file mode 100644 index 5e712e2ff8c..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/nexus-s.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "additionalFeatures": "Contour Display, Near Field Communications (NFC), Three-axis gyroscope, Anti-fingerprint display coating, Internet Calling support (VoIP/SIP)", - "android": { - "os": "Android 2.3", - "ui": "Android" - }, - "availability": [ - "M1,", - "O2,", - "Orange,", - "Singtel,", - "StarHub,", - "T-Mobile,", - "Vodafone" - ], - "battery": { - "standbyTime": "428 hours", - "talkTime": "6 hours", - "type": "Lithium Ion (Li-Ion) (1500 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "Quad-band GSM: 850, 900, 1800, 1900\r\nTri-band HSPA: 900, 2100, 1700\r\nHSPA type: HSDPA (7.2Mbps) HSUPA (5.76Mbps)", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Nexus S is the next generation of Nexus devices, co-developed by Google and Samsung. The latest Android platform (Gingerbread), paired with a 1 GHz Hummingbird processor and 16GB of memory, makes Nexus S one of the fastest phones on the market. It comes pre-installed with the best of Google apps and enabled with new and popular features like true multi-tasking, Wi-Fi hotspot, Internet Calling, NFC support, and full web browsing. With this device, users will also be the first to receive software upgrades and new Google mobile apps as soon as they become available. For more details, visit http://www.google.com/nexus.", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1GHz Cortex A8 (Hummingbird) processor", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "nexus-s", - "images": [ - "img/phones/nexus-s.0.jpg", - "img/phones/nexus-s.1.jpg", - "img/phones/nexus-s.2.jpg", - "img/phones/nexus-s.3.jpg" - ], - "name": "Nexus S", - "sizeAndWeight": { - "dimensions": [ - "63.0 mm (w)", - "123.9 mm (h)", - "10.88 mm (d)" - ], - "weight": "129.0 grams" - }, - "storage": { - "flash": "16384MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/phones.json b/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/phones.json deleted file mode 100644 index 339b94fbb51..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/phones/phones.json +++ /dev/null @@ -1,155 +0,0 @@ -[ - { - "age": 0, - "id": "motorola-xoom-with-wi-fi", - "imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "name": "Motorola XOOM\u2122 with Wi-Fi", - "snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 1, - "id": "motorola-xoom", - "imageUrl": "img/phones/motorola-xoom.0.jpg", - "name": "MOTOROLA XOOM\u2122", - "snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 2, - "carrier": "AT&T", - "id": "motorola-atrix-4g", - "imageUrl": "img/phones/motorola-atrix-4g.0.jpg", - "name": "MOTOROLA ATRIX\u2122 4G", - "snippet": "MOTOROLA ATRIX 4G the world's most powerful smartphone." - }, - { - "age": 3, - "id": "dell-streak-7", - "imageUrl": "img/phones/dell-streak-7.0.jpg", - "name": "Dell Streak 7", - "snippet": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around." - }, - { - "age": 4, - "carrier": "Cellular South", - "id": "samsung-gem", - "imageUrl": "img/phones/samsung-gem.0.jpg", - "name": "Samsung Gem\u2122", - "snippet": "The Samsung Gem\u2122 brings you everything that you would expect and more from a touch display smart phone \u2013 more apps, more features and a more affordable price." - }, - { - "age": 5, - "carrier": "Dell", - "id": "dell-venue", - "imageUrl": "img/phones/dell-venue.0.jpg", - "name": "Dell Venue", - "snippet": "The Dell Venue; Your Personal Express Lane to Everything" - }, - { - "age": 6, - "carrier": "Best Buy", - "id": "nexus-s", - "imageUrl": "img/phones/nexus-s.0.jpg", - "name": "Nexus S", - "snippet": "Fast just got faster with Nexus S. A pure Google experience, Nexus S is the first phone to run Gingerbread (Android 2.3), the fastest version of Android yet." - }, - { - "age": 7, - "carrier": "Cellular South", - "id": "lg-axis", - "imageUrl": "img/phones/lg-axis.0.jpg", - "name": "LG Axis", - "snippet": "Android Powered, Google Maps Navigation, 5 Customizable Home Screens" - }, - { - "age": 8, - "id": "samsung-galaxy-tab", - "imageUrl": "img/phones/samsung-galaxy-tab.0.jpg", - "name": "Samsung Galaxy Tab\u2122", - "snippet": "Feel Free to Tab\u2122. The Samsung Galaxy Tab\u2122 brings you an ultra-mobile entertainment experience through its 7\u201d display, high-power processor and Adobe\u00ae Flash\u00ae Player compatibility." - }, - { - "age": 9, - "carrier": "Cellular South", - "id": "samsung-showcase-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg", - "name": "Samsung Showcase\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Showcase\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance, even outdoors" - }, - { - "age": 10, - "carrier": "Verizon", - "id": "droid-2-global-by-motorola", - "imageUrl": "img/phones/droid-2-global-by-motorola.0.jpg", - "name": "DROID\u2122 2 Global by Motorola", - "snippet": "The first smartphone with a 1.2 GHz processor and global capabilities." - }, - { - "age": 11, - "carrier": "Verizon", - "id": "droid-pro-by-motorola", - "imageUrl": "img/phones/droid-pro-by-motorola.0.jpg", - "name": "DROID\u2122 Pro by Motorola", - "snippet": "The next generation of DOES." - }, - { - "age": 12, - "carrier": "AT&T", - "id": "motorola-bravo-with-motoblur", - "imageUrl": "img/phones/motorola-bravo-with-motoblur.0.jpg", - "name": "MOTOROLA BRAVO\u2122 with MOTOBLUR\u2122", - "snippet": "An experience to cheer about." - }, - { - "age": 13, - "carrier": "T-Mobile", - "id": "motorola-defy-with-motoblur", - "imageUrl": "img/phones/motorola-defy-with-motoblur.0.jpg", - "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122", - "snippet": "Are you ready for everything life throws your way?" - }, - { - "age": 14, - "carrier": "T-Mobile", - "id": "t-mobile-mytouch-4g", - "imageUrl": "img/phones/t-mobile-mytouch-4g.0.jpg", - "name": "T-Mobile myTouch 4G", - "snippet": "The T-Mobile myTouch 4G is a premium smartphone designed to deliver blazing fast 4G speeds so that you can video chat from practically anywhere, with or without Wi-Fi." - }, - { - "age": 15, - "carrier": "US Cellular", - "id": "samsung-mesmerize-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg", - "name": "Samsung Mesmerize\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Mesmerize\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance,even outdoors" - }, - { - "age": 16, - "carrier": "Sprint", - "id": "sanyo-zio", - "imageUrl": "img/phones/sanyo-zio.0.jpg", - "name": "SANYO ZIO", - "snippet": "The Sanyo Zio by Kyocera is an Android smartphone with a combination of ultra-sleek styling, strong performance and unprecedented value." - }, - { - "age": 17, - "id": "samsung-transform", - "imageUrl": "img/phones/samsung-transform.0.jpg", - "name": "Samsung Transform\u2122", - "snippet": "The Samsung Transform\u2122 brings you a fun way to customize your Android powered touch screen phone to just the way you like it through your favorite themed \u201cSprint ID Service Pack\u201d." - }, - { - "age": 18, - "id": "t-mobile-g2", - "imageUrl": "img/phones/t-mobile-g2.0.jpg", - "name": "T-Mobile G2", - "snippet": "The T-Mobile G2 with Google is the first smartphone built for 4G speeds on T-Mobile's new network. Get the information you need, faster than you ever thought possible." - }, - { - "age": 19, - "id": "motorola-charm-with-motoblur", - "imageUrl": "img/phones/motorola-charm-with-motoblur.0.jpg", - "name": "Motorola CHARM\u2122 with MOTOBLUR\u2122", - "snippet": "Motorola CHARM fits easily in your pocket or palm. Includes MOTOBLUR service." - } -] diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/bs-config.aot.json b/aio/content/examples/upgrade-phonecat-2-hybrid/bs-config.aot.json deleted file mode 100644 index e59a7403a00..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/bs-config.aot.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "open": false, - "logLevel": "silent", - "port": 8080, - "server": { - "baseDir": "aot", - "routes": { - "/node_modules": "node_modules" - }, - "middleware": { - "0": null - } - } -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/copy-dist-files.js b/aio/content/examples/upgrade-phonecat-2-hybrid/copy-dist-files.js deleted file mode 100644 index 50088e69ea0..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/copy-dist-files.js +++ /dev/null @@ -1,26 +0,0 @@ -// #docregion -var fsExtra = require('fs-extra'); -var resources = [ - // polyfills - 'node_modules/core-js/client/shim.min.js', - 'node_modules/zone.js/bundles/zone.umd.min.js', - // css - 'app/app.css', - 'app/app.animations.css', - // images and json files - 'app/img/', - 'app/phones/', - // app files - 'app/app.module.ajs.js', - 'app/app.config.js', - 'app/app.animations.js', - 'app/core/core.module.js', - 'app/core/phone/phone.module.js', - 'app/phone-list/phone-list.module.js', - 'app/phone-detail/phone-detail.module.js' -]; -resources.map(function(sourcePath) { - // Need to rename zone.umd.min.js to zone.min.js - var destPath = `aot/${sourcePath}`.replace('.umd.min.js', '.min.js'); - fsExtra.copySync(sourcePath, destPath); -}); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts deleted file mode 100644 index 424f91ca4a1..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -import { browser, element, by } from 'protractor'; - -// Angular E2E Testing Guide: -// https://docs.angularjs.org/guide/e2e-testing - -describe('PhoneCat Application', () => { - - it('should redirect `index.html` to `index.html#!/phones', async () => { - await browser.get('index.html'); - await browser.sleep(1000); // Not sure why this is needed but it is. The route change works fine. - expect(await browser.getCurrentUrl()).toMatch(/\/phones$/); - }); - - describe('View: Phone list', () => { - - beforeEach(() => browser.get('index.html#!/phones')); - - it('should filter the phone list as a user types into the search box', async () => { - const phoneList = element.all(by.css('.phones li')); - const query = element(by.css('input')); - - expect(await phoneList.count()).toBe(20); - - await query.sendKeys('nexus'); - expect(await phoneList.count()).toBe(1); - - await query.clear(); - await query.sendKeys('motorola'); - expect(await phoneList.count()).toBe(8); - }); - - it('should be possible to control phone order via the drop-down menu', async () => { - const queryField = element(by.css('input')); - const orderSelect = element(by.css('select')); - const nameOption = orderSelect.element(by.css('option[value="name"]')); - const phoneNameColumn = element.all(by.css('.phones .name')); - - function getNames() { - return phoneNameColumn.map((elem) => elem.getText()); - } - - await queryField.sendKeys('tablet'); // Let's narrow the dataset to make the assertions shorter - - expect(await getNames()).toEqual([ - 'Motorola XOOM\u2122 with Wi-Fi', - 'MOTOROLA XOOM\u2122' - ]); - - await nameOption.click(); - - expect(await getNames()).toEqual([ - 'MOTOROLA XOOM\u2122', - 'Motorola XOOM\u2122 with Wi-Fi' - ]); - }); - - it('should render phone specific links', async () => { - const query = element(by.css('input')); - await query.sendKeys('nexus'); - - await element.all(by.css('.phones li a')).first().click(); - await browser.sleep(1000); // Not sure why this is needed but it is. The route change works fine. - expect(await browser.getCurrentUrl()).toMatch(/\/phones\/nexus-s$/); - }); - - }); - - describe('View: Phone detail', () => { - - beforeEach(() => browser.get('index.html#!/phones/nexus-s')); - - it('should display the `nexus-s` page', async () => { - expect(await element(by.css('h1')).getText()).toBe('Nexus S'); - }); - - it('should display the first phone image as the main phone image', async () => { - const mainImage = element(by.css('img.phone.selected')); - - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - it('should swap the main image when clicking on a thumbnail image', async () => { - const mainImage = element(by.css('img.phone.selected')); - const thumbnails = element.all(by.css('.phone-thumbs img')); - - await thumbnails.get(2).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.2.jpg/); - - await thumbnails.get(0).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/example-config.json b/aio/content/examples/upgrade-phonecat-2-hybrid/example-config.json deleted file mode 100644 index a76722119ff..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/example-config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "build": "build:upgrade", - "run": "serve:upgrade", - "projectType": "systemjs" -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/index.html b/aio/content/examples/upgrade-phonecat-2-hybrid/index.html deleted file mode 100644 index 490880f7e84..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/index.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - Google Phone Gallery - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.1.js b/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.1.js deleted file mode 100644 index eff6e157b47..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.1.js +++ /dev/null @@ -1,88 +0,0 @@ -// #docregion -// /*global jasmine, __karma__, window*/ -Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. - -// Uncomment to get full stacktrace output. Sometimes helpful, usually not. -// Error.stackTraceLimit = Infinity; // - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; - -var builtPath = '/base/app/'; - -__karma__.loaded = function () { }; - -function isJsFile(path) { - return path.slice(-3) == '.js'; -} - -function isSpecFile(path) { - return /\.spec\.(.*\.)?js$/.test(path); -} - -function isBuiltFile(path) { - return isJsFile(path) && (path.slice(0, builtPath.length) == builtPath); -} - -var allSpecFiles = Object.keys(window.__karma__.files) - .filter(isSpecFile) - .filter(isBuiltFile); - -System.config({ - baseURL: '/base', - // Extend usual application package list with test folder - packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } }, - - // Assume npm: is set in `paths` in systemjs.config - // Map the angular testing bundles - map: { - '@angular/core/testing': 'npm:@angular/core/fesm2022/testing.mjs', - '@angular/common/testing': 'npm:@angular/common/fesm2022/testing.mjs', - '@angular/common/http/testing': 'npm:@angular/common/fesm2022/http/testing.mjs', - '@angular/platform-browser/testing': 'npm:@angular/platform-browser/fesm2022/testing.mjs', - '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/fesm2022/testing.mjs', - '@angular/router/testing': 'npm:@angular/router/fesm2022/testing.mjs', - '@angular/forms/testing': 'npm:@angular/forms/fesm2022/testing.mjs', - }, -}); - -System.import('systemjs.config.js') - .then(importSystemJsExtras) - .then(initTestBed) - .then(initTesting); - -/** Optional SystemJS configuration extras. Keep going w/o it */ -function importSystemJsExtras(){ - return System.import('systemjs.config.extras.js') - .catch(function(reason) { - console.log( - 'Warning: System.import could not load the optional "systemjs.config.extras.js". Did you omit it by accident? Continuing without it.' - ); - console.log(reason); - }); -} - -function initTestBed() { - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]) - - .then(function (providers) { - var coreTesting = providers[0]; - var browserTesting = providers[1]; - - coreTesting.TestBed.initTestEnvironment( - browserTesting.BrowserDynamicTestingModule, - browserTesting.platformBrowserDynamicTesting()); - }) -} - -// Import all spec files and start karma -function initTesting() { - return Promise.all( - allSpecFiles.map(function (moduleName) { - return System.import(moduleName); - }) - ) - .then(__karma__.start, __karma__.error); -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.js b/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.js deleted file mode 100644 index 1e353310591..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/karma-test-shim.js +++ /dev/null @@ -1,95 +0,0 @@ -// #docregion -// /*global jasmine, __karma__, window*/ -Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. - -// Uncomment to get full stacktrace output. Sometimes helpful, usually not. -// Error.stackTraceLimit = Infinity; // - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; - -// builtPaths: root paths for output ("built") files -// get from karma.config.js, then prefix with '/src/' (default is 'app/') -var builtPaths = (__karma__.config.builtPaths || ['src/']) - .map(function(p) { return '/base/'+p;}); - -__karma__.loaded = function () { }; - -function isJsFile(path) { - return path.slice(-3) == '.js'; -} - -function isSpecFile(path) { - return /\.spec\.(.*\.)?js$/.test(path); -} - -// Is a "built" file if is JavaScript file in one of the "built" folders -function isBuiltFile(path) { - return isJsFile(path) && - builtPaths.reduce(function(keep, bp) { - return keep || (path.slice(0, bp.length) === bp); - }, false); -} - -var allSpecFiles = Object.keys(window.__karma__.files) - .filter(isSpecFile) - .filter(isBuiltFile); - -System.config({ - baseURL: 'base/src', - // Extend usual application package list with testing folder - packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } }, - - // Assume npm: is set in `paths` in systemjs.config - // Map the angular testing bundles - map: { - '@angular/core/testing': 'npm:@angular/core/fesm2022/testing.mjs', - '@angular/common/testing': 'npm:@angular/common/fesm2022/testing.mjs', - '@angular/common/http/testing': 'npm:@angular/common/fesm2022/http/testing.mjs', - '@angular/platform-browser/testing': 'npm:@angular/platform-browser/fesm2022/testing.mjs', - '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/fesm2022/testing.mjs', - '@angular/router/testing': 'npm:@angular/router/fesm2022/testing.mjs', - '@angular/forms/testing': 'npm:@angular/forms/fesm2022/testing.mjs', - }, -}); - -System.import('systemjs.config.js') - .then(importSystemJsExtras) - .then(initTestBed) - .then(initTesting); - -/** Optional SystemJS configuration extras. Keep going w/o it */ -function importSystemJsExtras(){ - return System.import('systemjs.config.extras.js') - .catch(function(reason) { - console.log( - 'Warning: System.import could not load the optional "systemjs.config.extras.js". Did you omit it by accident? Continuing without it.' - ); - console.log(reason); - }); -} - -function initTestBed(){ - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]) - - .then(function (providers) { - var coreTesting = providers[0]; - var browserTesting = providers[1]; - - coreTesting.TestBed.initTestEnvironment( - browserTesting.BrowserDynamicTestingModule, - browserTesting.platformBrowserDynamicTesting()); - }) -} - -// Import all spec files and start karma -function initTesting () { - return Promise.all( - allSpecFiles.map(function (moduleName) { - return System.import(moduleName); - }) - ) - .then(__karma__.start, __karma__.error); -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.ajs.js b/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.ajs.js deleted file mode 100644 index 5cde637cc67..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.ajs.js +++ /dev/null @@ -1,80 +0,0 @@ -//jshint strict: false -module.exports = function(config) { - config.set({ - - // #docregion basepath - basePath: './', - // #enddocregion basepath - - files: [ - 'https://code.angularjs.org/1.5.5/angular.js', - 'https://code.angularjs.org/1.5.5/angular-animate.js', - 'https://code.angularjs.org/1.5.5/angular-resource.js', - 'https://code.angularjs.org/1.5.5/angular-route.js', - 'https://code.angularjs.org/1.5.5/angular-mocks.js', - - // #docregion files - // System.js for module loading - 'node_modules/systemjs/dist/system.src.js', - - // Polyfills - 'node_modules/core-js/client/shim.js', - - // zone.js - 'node_modules/zone.js/bundles/zone.umd.js', - 'node_modules/zone.js/bundles/zone-testing.umd.js', - - // RxJs. - { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false }, - { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false }, - - // Angular itself and the testing library - { pattern: 'node_modules/@angular/**/*.mjs', included: false, watched: false }, - { pattern: 'node_modules/@angular/**/*.mjs.map', included: false, watched: false }, - - { pattern: 'node_modules/tslib/tslib.js', included: false, watched: false }, - { pattern: 'node_modules/systemjs-plugin-babel/**/*.js', included: false, watched: false }, - - {pattern: 'systemjs.config.js', included: false, watched: false}, - 'karma-test-shim.js', - - {pattern: 'app/**/*.module.js', included: false, watched: true}, - {pattern: 'app/*!(.module|.spec).js', included: false, watched: true}, - {pattern: 'app/!(bower_components)/**/*!(.module|.spec).js', included: false, watched: true}, - {pattern: 'app/**/*.spec.js', included: false, watched: true}, - - {pattern: '**/*.html', included: false, watched: true}, - // #enddocregion files - ], - - // This is needed, because the AngularJS files are loaded from `https://code.angularjs.org/`. - // Without this, latest browsers prevent loading the scripts from localhost with: - // ``` - // Access to script at 'https://code.angularjs.org/1.5.5/angular.js' from origin - // 'http://localhost:9876' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' - // header is present on the requested resource. - // ``` - crossOriginAttribute: false, - - // #docregion html - // proxied base paths for loading assets - proxies: { - // required for component assets fetched by Angular's compiler - '/phone-detail': '/base/app/phone-detail', - '/phone-list': '/base/app/phone-list' - }, - // #enddocregion html - - autoWatch: true, - - frameworks: ['jasmine'], - - browsers: ['Chrome'], - - plugins: [ - 'karma-chrome-launcher', - 'karma-jasmine' - ] - - }); -}; diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.js b/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.js deleted file mode 100644 index 5504b9de7bb..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/karma.conf.js +++ /dev/null @@ -1,91 +0,0 @@ -// #docregion -module.exports = function(config) { - - var appBase = 'src/'; // transpiled app JS and map files - var appAssets = '/base/app/'; // component assets fetched by Angular's compiler - - // Testing helpers (optional) are conventionally in a folder called `testing` - var testingBase = 'src/testing/'; // transpiled test JS and map files - var testingSrcBase = 'src/testing/'; // test source TS files - - config.set({ - basePath: '', - frameworks: ['jasmine'], - - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter') - ], - - client: { - builtPaths: [appBase, testingBase], // add more spec base paths as needed - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - - files: [ - // System.js for module loading - 'node_modules/systemjs/dist/system.src.js', - - // Polyfills - 'node_modules/core-js/client/shim.js', - - // zone.js - 'node_modules/zone.js/bundles/zone.umd.js', - 'node_modules/zone.js/bundles/zone-testing.umd.js', - - // RxJs - { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false }, - { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false }, - - // tslib (TS helper fns such as `__extends`) - { pattern: 'node_modules/tslib/**/*.js', included: false, watched: false }, - { pattern: 'node_modules/tslib/**/*.js.map', included: false, watched: false }, - - // Paths loaded via module imports: - // Angular itself - { pattern: 'node_modules/@angular/**/*.mjs', included: false, watched: false }, - { pattern: 'node_modules/@angular/**/*.mjs.map', included: false, watched: false }, - - { pattern: 'node_modules/tslib/tslib.js', included: false, watched: false }, - { pattern: 'node_modules/systemjs-plugin-babel/**/*.js', included: false, watched: false }, - - { pattern: appBase + '/systemjs.config.js', included: false, watched: false }, - { pattern: appBase + '/systemjs.config.extras.js', included: false, watched: false }, - 'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels - - // transpiled application & spec code paths loaded via module imports - { pattern: appBase + '**/*.js', included: false, watched: true }, - { pattern: testingBase + '**/*.js', included: false, watched: true }, - - - // Asset (HTML & CSS) paths loaded via Angular's component compiler - // (these paths need to be rewritten, see proxies section) - { pattern: appBase + '**/*.html', included: false, watched: true }, - { pattern: appBase + '**/*.css', included: false, watched: true }, - - // Paths for debugging with source maps in dev tools - { pattern: appBase + '**/*.ts', included: false, watched: false }, - { pattern: appBase + '**/*.js.map', included: false, watched: false }, - { pattern: testingSrcBase + '**/*.ts', included: false, watched: false }, - { pattern: testingBase + '**/*.js.map', included: false, watched: false} - ], - - // Proxied base paths for loading assets - proxies: { - // required for modules fetched by SystemJS - '/base/src/node_modules/': '/base/node_modules/' - }, - - exclude: [], - preprocessors: {}, - reporters: ['progress', 'kjhtml'], - - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }) -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js b/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js deleted file mode 100644 index 0a008f95a9f..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/rollup-config.js +++ /dev/null @@ -1,25 +0,0 @@ -// #docregion -import commonjs from '@rollup/plugin-commonjs'; -import {nodeResolve} from '@rollup/plugin-node-resolve' -import {terser} from 'rollup-plugin-terser' - -//paths are relative to the execution path -export default { - input: 'app/main.js', - output: { - file: 'aot/dist/build.js', // output a single application bundle - format: 'iife', - sourcemap: true, - sourcemapFile: 'aot/dist/build.js.map' - }, - // Rollup treeshaking has issues with https://github.com/angular/angular/blob/addd7f6249d54e258109f139fad1db0d0250352c/packages/core/src/linker/query_list.ts#L192 - // see: https://github.com/rollup/rollup/issues/4895 - treeshake: false, - plugins: [ - nodeResolve(), - commonjs({ - include: ['node_modules/rxjs/**'] - }), - terser() - ] -} diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/run-unit-tests.sh b/aio/content/examples/upgrade-phonecat-2-hybrid/run-unit-tests.sh deleted file mode 100755 index 239e5ff7d79..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/run-unit-tests.sh +++ /dev/null @@ -1,7 +0,0 @@ -## The boilerplate Karma configuration won't work with AngularJS tests since -## a specific loading configuration is needed for them. -## We keep one in karma.conf.ajs.js. This scripts runs the AngularJS tests with -## that config. - -PATH=$(npm bin):$PATH -tsc && karma start karma.conf.ajs.js diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/systemjs.config.1.js b/aio/content/examples/upgrade-phonecat-2-hybrid/systemjs.config.1.js deleted file mode 100644 index 624288dbc21..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/systemjs.config.1.js +++ /dev/null @@ -1,96 +0,0 @@ -/** - * System configuration for Angular samples - * Adjust as necessary for your application needs. - */ -(function (global) { - // #docregion paths, angular-paths, rxjs-paths, tslib-paths, plugin-babel - System.config({ - // #enddocregion angular-paths, rxjs-paths, tslib-paths, plugin-babel - paths: { - // paths serve as alias - 'npm:': '/node_modules/' - }, - // #docregion angular-paths, rxjs-paths, tslib-paths, plugin-babel - map: { - // #enddocregion angular-paths, rxjs-paths, tslib-paths, plugin-babel - 'ng-loader': '../src/systemjs-angular-loader.js', - app: '/app', - // #enddocregion paths - // angular bundles - // #docregion angular-paths - '@angular/core': 'npm:@angular/core/fesm2022/core.mjs', - '@angular/common': 'npm:@angular/common/fesm2022/common.mjs', - '@angular/common/http': 'npm:@angular/common/fesm2022/http.mjs', - '@angular/compiler': 'npm:@angular/compiler/fesm2022/compiler.mjs', - '@angular/platform-browser': 'npm:@angular/platform-browser/fesm2022/platform-browser.mjs', - '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/fesm2022/platform-browser-dynamic.mjs', - '@angular/router': 'npm:@angular/router/fesm2022/router.mjs', - '@angular/router/upgrade': 'npm:@angular/router/fesm2022/upgrade.mjs', - '@angular/forms': 'npm:@angular/forms/fesm2022/forms.mjs', - // #enddocregion angular-paths - // #docregion paths - '@angular/upgrade/static': 'npm:@angular/upgrade/fesm2022/static.mjs', - // #enddocregion paths - - // other libraries - // #docregion rxjs-paths - 'rxjs': 'npm:rxjs/dist/cjs', - 'rxjs/operators': 'npm:rxjs/dist/cjs/operators', - // #enddocregion rxjs-paths - // #docregion tslib-paths - 'tslib': 'npm:tslib/tslib.js', - // #enddocregion tslib-paths - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api', - - // #docregion plugin-babel - 'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js', - 'systemjs-babel-build': 'npm:systemjs-plugin-babel/systemjs-babel-browser.js' - // #docregion paths, angular-paths, rxjs-paths, tslib-paths - }, - // #enddocregion paths, angular-paths, rxjs-paths, tslib-paths - - transpiler: 'plugin-babel', - // #enddocregion plugin-babel - // packages tells the System loader how to load when no filename and/or no extension - // #docregion rxjs-paths, plugin-babel - packages: { - // #enddocregion rxjs-paths, plugin-babel - 'app': { - main: './main.js', - defaultExtension: 'js', - meta: { - './*.js': { - loader: 'ng-loader' - } - } - }, - 'angular-in-memory-web-api': { - main: './index.js', - defaultExtension: 'js' - }, - // #docregion rxjs-paths - 'rxjs': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - 'rxjs/operators': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - // #enddocregion rxjs-paths - // #docregion plugin-babel - 'meta': { - '*.mjs': { - babelOptions: { - es2015: false - } - } - } - // #docregion rxjs-paths - } - // #docregion angular-paths, tslib-paths - }); - // #enddocregion angular-paths, rxjs-paths, tslib-paths, plugin-babel -})(this); diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json b/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json deleted file mode 100644 index b7b05fb86d3..00000000000 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/tsconfig-aot.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "target": "es5", - "module": "es2015", - "moduleResolution": "node", - "sourceMap": true, - "experimentalDecorators": true, - "lib": [ - "es2015", - "dom" - ], - "removeComments": false, - "noImplicitAny": true, - "skipLibCheck": true, - "suppressImplicitAnyIndexErrors": true, - "typeRoots": [ - "node_modules/@types" - ] - }, - "files": [ - "app/app.module.ts", - "app/main.ts" - ], - "angularCompilerOptions": { - "disableTypeScriptVersionCheck": true, - "skipMetadataEmit": true - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/BUILD.bazel b/aio/content/examples/upgrade-phonecat-3-final/BUILD.bazel deleted file mode 100644 index a6d2ecfe030..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/BUILD.bazel +++ /dev/null @@ -1,9 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "upgrade-phonecat-3-final", - flaky = True, # TODO: figure out why this is flaky or times out - test_tags = ["broken"], # This is currently broken due to usage of ESM2022 which does not work out-of-the-box with system.js. -) diff --git a/aio/content/examples/upgrade-phonecat-3-final/README.md b/aio/content/examples/upgrade-phonecat-3-final/README.md deleted file mode 100644 index c6138c138ae..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/README.md +++ /dev/null @@ -1,25 +0,0 @@ -This is the Angular Phonecat application adjusted to fit our boilerplate project -structure. - -The following changes from vanilla Phonecat are applied: - -* E2E tests have been moved to the parent directory, where `run-e2e-tests` can - discover and run them along with all the other examples. -* Most of the phone JSON and image data removed in the interest of keeping - repo weight down. Keeping enough to retain testability of the app. - -## Running the app - -Start like any example - -```shell -npm run start -``` - -## Running E2E tests - -Like for any example \(at the project root\): - -```shell -gulp run-e2e-tests --filter=phonecat-3 -``` diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/app-routing.module.ts b/aio/content/examples/upgrade-phonecat-3-final/app/app-routing.module.ts deleted file mode 100644 index a437291ffd6..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/app-routing.module.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docregion -import { NgModule } from '@angular/core'; -import { Routes, RouterModule } from '@angular/router'; -import { APP_BASE_HREF, HashLocationStrategy, LocationStrategy } from '@angular/common'; - -import { PhoneDetailComponent } from './phone-detail/phone-detail.component'; -import { PhoneListComponent } from './phone-list/phone-list.component'; - -const routes: Routes = [ - { path: '', redirectTo: 'phones', pathMatch: 'full' }, - { path: 'phones', component: PhoneListComponent }, - { path: 'phones/:phoneId', component: PhoneDetailComponent } -]; - -@NgModule({ - imports: [ RouterModule.forRoot(routes) ], - exports: [ RouterModule ], - providers: [ - { provide: APP_BASE_HREF, useValue: '!' }, - { provide: LocationStrategy, useClass: HashLocationStrategy }, - ] -}) -export class AppRoutingModule { } diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/app.component.ts b/aio/content/examples/upgrade-phonecat-3-final/app/app.component.ts deleted file mode 100644 index c476614121c..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/app.component.ts +++ /dev/null @@ -1,8 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -@Component({ - selector: 'phonecat-app', - template: '' -}) -export class AppComponent { } diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/app.css b/aio/content/examples/upgrade-phonecat-3-final/app/app.css deleted file mode 100644 index f4b45b02a5b..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/app.css +++ /dev/null @@ -1,93 +0,0 @@ -body { - padding: 20px; -} - -h1 { - border-bottom: 1px solid gray; - margin-top: 0; -} - -/* View: Phone list */ -.phones { - list-style: none; -} - -.phones li { - clear: both; - height: 115px; - padding-top: 15px; -} - -.thumb { - float: left; - height: 100px; - margin: -0.5em 1em 1.5em 0; - padding-bottom: 1em; - width: 100px; -} - -/* View: Phone detail */ -.phone { - background-color: white; - display: none; - float: left; - height: 400px; - margin-bottom: 2em; - margin-right: 3em; - padding: 2em; - width: 400px; -} - -.phone:first-child { - display: block; -} - -.phone-images { - background-color: white; - float: left; - height: 450px; - overflow: hidden; - position: relative; - width: 450px; -} - -.phone-thumbs { - list-style: none; - margin: 0; -} - -.phone-thumbs img { - height: 100px; - padding: 1em; - width: 100px; -} - -.phone-thumbs li { - background-color: white; - border: 1px solid black; - cursor: pointer; - display: inline-block; - margin: 1em; -} - -.specs { - clear: both; - list-style: none; - margin: 0; - padding: 0; -} - -.specs dt { - font-weight: bold; -} - -.specs > li { - display: inline-block; - vertical-align: top; - width: 200px; -} - -.specs > li > span { - font-size: 1.2em; - font-weight: bold; -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/app.module.ts b/aio/content/examples/upgrade-phonecat-3-final/app/app.module.ts deleted file mode 100644 index b8961beaa66..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/app.module.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { NgModule } from '@angular/core'; -import { BrowserModule } from '@angular/platform-browser'; -import { FormsModule } from '@angular/forms'; -import { HttpClientModule } from '@angular/common/http'; - -import { AppRoutingModule } from './app-routing.module'; -import { AppComponent } from './app.component'; -import { CheckmarkPipe } from './core/checkmark/checkmark.pipe'; -import { Phone } from './core/phone/phone.service'; -import { PhoneDetailComponent } from './phone-detail/phone-detail.component'; -import { PhoneListComponent } from './phone-list/phone-list.component'; - -@NgModule({ - imports: [ - BrowserModule, - FormsModule, - HttpClientModule, - AppRoutingModule - ], - declarations: [ - AppComponent, - PhoneListComponent, - CheckmarkPipe, - PhoneDetailComponent - ], - providers: [ - Phone - ], - bootstrap: [ AppComponent ] -}) -export class AppModule {} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.spec.ts b/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.spec.ts deleted file mode 100644 index 8a33658c8ee..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.spec.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { CheckmarkPipe } from './checkmark.pipe'; - -describe('CheckmarkPipe', () => { - - it('should convert boolean values to unicode checkmark or cross', () => { - const checkmarkPipe = new CheckmarkPipe(); - expect(checkmarkPipe.transform(true)).toBe('\u2713'); - expect(checkmarkPipe.transform(false)).toBe('\u2718'); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.ts b/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.ts deleted file mode 100644 index 888017e15cf..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/core/checkmark/checkmark.pipe.ts +++ /dev/null @@ -1,9 +0,0 @@ -// #docregion -import { Pipe, PipeTransform } from '@angular/core'; - -@Pipe({name: 'checkmark'}) -export class CheckmarkPipe implements PipeTransform { - transform(input: boolean) { - return input ? '\u2713' : '\u2718'; - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.spec.ts b/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.spec.ts deleted file mode 100644 index 8df361bd59c..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.spec.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { inject, TestBed } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; -import { Phone, PhoneData } from './phone.service'; - -describe('Phone', () => { - let phone: Phone; - const phonesData: PhoneData[] = [ - {name: 'Phone X', snippet: '', images: []}, - {name: 'Phone Y', snippet: '', images: []}, - {name: 'Phone Z', snippet: '', images: []} - ]; - let mockHttp: HttpTestingController; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [HttpClientTestingModule], - providers: [Phone] - }); - }); - - beforeEach(inject([HttpTestingController, Phone], (_mockHttp_: HttpTestingController, _phone_: Phone) => { - mockHttp = _mockHttp_; - phone = _phone_; - })); - - it('should fetch the phones data from `/phones/phones.json`', () => { - phone.query().subscribe(result => { - expect(result).toEqual(phonesData); - }); - const req = mockHttp.expectOne(`/phones/phones.json`); - req.flush(phonesData); - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.ts b/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.ts deleted file mode 100644 index 33643a900dc..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/core/phone/phone.service.ts +++ /dev/null @@ -1,21 +0,0 @@ -// #docregion -import { Injectable } from '@angular/core'; -import { HttpClient } from '@angular/common/http'; -import { Observable } from 'rxjs'; - -export interface PhoneData { - name: string; - snippet: string; - images: string[]; -} - -@Injectable() -export class Phone { - constructor(private http: HttpClient) { } - query(): Observable { - return this.http.get(`phones/phones.json`); - } - get(id: string): Observable { - return this.http.get(`phones/${id}.json`); - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/.gitkeep b/aio/content/examples/upgrade-phonecat-3-final/app/img/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.0.jpg deleted file mode 100644 index 7ce0dce4ee9..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.1.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.1.jpg deleted file mode 100644 index ed8cad89fba..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.2.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.2.jpg deleted file mode 100644 index c83529e0f9c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.3.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.3.jpg deleted file mode 100644 index cd2c30280da..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.4.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.4.jpg deleted file mode 100644 index b4d8472da88..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-streak-7.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-venue.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-venue.0.jpg deleted file mode 100644 index b4cb4eb25fe..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/dell-venue.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-2-global-by-motorola.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-2-global-by-motorola.0.jpg deleted file mode 100644 index 60700a2ab38..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-2-global-by-motorola.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-pro-by-motorola.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-pro-by-motorola.0.jpg deleted file mode 100644 index c7710de986f..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/droid-pro-by-motorola.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/lg-axis.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/lg-axis.0.jpg deleted file mode 100644 index 55e5a23bb20..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/lg-axis.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.0.jpg deleted file mode 100644 index 2446159e937..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.1.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.1.jpg deleted file mode 100644 index 867f207459f..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.2.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.2.jpg deleted file mode 100644 index 27d78338c4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.3.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.3.jpg deleted file mode 100644 index 29459a68a4d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-atrix-4g.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-bravo-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-bravo-with-motoblur.0.jpg deleted file mode 100644 index e452ae7e7ce..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-bravo-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-charm-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-charm-with-motoblur.0.jpg deleted file mode 100644 index 21e4b8d741d..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-charm-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-defy-with-motoblur.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-defy-with-motoblur.0.jpg deleted file mode 100644 index c7c5e3ba0c5..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-defy-with-motoblur.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.0.jpg deleted file mode 100644 index a6c993291ee..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.1.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.1.jpg deleted file mode 100644 index 400b89e2df4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.2.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.2.jpg deleted file mode 100644 index 86b55d28dd4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.3.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.3.jpg deleted file mode 100644 index 85ec293ae54..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.4.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.4.jpg deleted file mode 100644 index 75ef1464cb8..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.4.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.5.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.5.jpg deleted file mode 100644 index 4d42db43305..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom-with-wi-fi.5.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.0.jpg deleted file mode 100644 index bf6954bbd5a..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.1.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.1.jpg deleted file mode 100644 index 659688a47d7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.2.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.2.jpg deleted file mode 100644 index ce0ff1002e4..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/motorola-xoom.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.0.jpg deleted file mode 100644 index 0952bc79c2c..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.1.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.1.jpg deleted file mode 100644 index f33004dd7f5..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.1.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.2.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.2.jpg deleted file mode 100644 index c5c63621f12..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.2.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.3.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.3.jpg deleted file mode 100644 index e51f75b0edc..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/nexus-s.3.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-galaxy-tab.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-galaxy-tab.0.jpg deleted file mode 100644 index 3750377ad97..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-galaxy-tab.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-gem.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-gem.0.jpg deleted file mode 100644 index 0d5024a0268..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-gem.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg deleted file mode 100644 index 11b8f860cb7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg deleted file mode 100644 index 11b8f860cb7..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-transform.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-transform.0.jpg deleted file mode 100644 index 0e3107caf57..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/samsung-transform.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/sanyo-zio.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/sanyo-zio.0.jpg deleted file mode 100644 index 9eeb9b96ed3..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/sanyo-zio.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-g2.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-g2.0.jpg deleted file mode 100644 index 6b6c09e0588..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-g2.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-mytouch-4g.0.jpg b/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-mytouch-4g.0.jpg deleted file mode 100644 index beba1f68271..00000000000 Binary files a/aio/content/examples/upgrade-phonecat-3-final/app/img/phones/t-mobile-mytouch-4g.0.jpg and /dev/null differ diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/main.ts b/aio/content/examples/upgrade-phonecat-3-final/app/main.ts deleted file mode 100644 index 6af7a5b2ae8..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/main.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; - -import { AppModule } from './app.module'; - -platformBrowserDynamic().bootstrapModule(AppModule); diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.spec.ts b/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.spec.ts deleted file mode 100644 index 4ebfdd344e5..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.spec.ts +++ /dev/null @@ -1,51 +0,0 @@ -// #docregion -// #docregion activatedroute -import { TestBed, waitForAsync } from '@angular/core/testing'; -import { ActivatedRoute } from '@angular/router'; -// #enddocregion activatedroute -import { Observable, of } from 'rxjs'; - -import { PhoneDetailComponent } from './phone-detail.component'; -import { Phone, PhoneData } from '../core/phone/phone.service'; -import { CheckmarkPipe } from '../core/checkmark/checkmark.pipe'; - -function xyzPhoneData(): PhoneData { - return {name: 'phone xyz', snippet: '', images: ['image/url1.png', 'image/url2.png']}; -} - -class MockPhone { - get(id: string): Observable { - return of(xyzPhoneData()); - } -} - -// #docregion activatedroute - -class ActivatedRouteMock { - constructor(public snapshot: any) {} -} - -// #enddocregion activatedroute - -describe('PhoneDetailComponent', () => { - // #docregion activatedroute - - beforeEach(waitForAsync(() => { - TestBed.configureTestingModule({ - declarations: [ CheckmarkPipe, PhoneDetailComponent ], - providers: [ - { provide: Phone, useClass: MockPhone }, - { provide: ActivatedRoute, useValue: new ActivatedRouteMock({ params: { phoneId: 1 } }) } - ] - }) - .compileComponents(); - })); - // #enddocregion activatedroute - - it('should fetch phone detail', () => { - const fixture = TestBed.createComponent(PhoneDetailComponent); - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('h1').textContent).toContain(xyzPhoneData().name); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.ts b/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.ts deleted file mode 100644 index adff31edda4..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.component.ts +++ /dev/null @@ -1,27 +0,0 @@ -// #docplaster -// #docregion -import { Component } from '@angular/core'; -import { ActivatedRoute } from '@angular/router'; - -import { Phone, PhoneData } from '../core/phone/phone.service'; - -@Component({ - selector: 'phone-detail', - templateUrl: './phone-detail.template.html' -}) -export class PhoneDetailComponent { - phone: PhoneData; - mainImageUrl: string; - - constructor(activatedRoute: ActivatedRoute, phone: Phone) { - phone.get(activatedRoute.snapshot.paramMap.get('phoneId')) - .subscribe((p: PhoneData) => { - this.phone = p; - this.setImage(p.images[0]); - }); - } - - setImage(imageUrl: string) { - this.mainImageUrl = imageUrl; - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.template.html b/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.template.html deleted file mode 100644 index 1396dbc4714..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-detail/phone-detail.template.html +++ /dev/null @@ -1,121 +0,0 @@ - -
    -
    - -
    - -

    {{phone.name}}

    - -

    {{phone.description}}

    - -
      -
    • - - -
    • -
    - -
      -
    • - Availability and Networks -
      -
      Availability
      -
      {{availability}}
      -
      -
    • -
    • - Battery -
      -
      Type
      -
      {{phone.battery?.type}}
      -
      Talk Time
      -
      {{phone.battery?.talkTime}}
      -
      Standby time (max)
      -
      {{phone.battery?.standbyTime}}
      -
      -
    • -
    • - Storage and Memory -
      -
      RAM
      -
      {{phone.storage?.ram}}
      -
      Internal Storage
      -
      {{phone.storage?.flash}}
      -
      -
    • -
    • - Connectivity -
      -
      Network Support
      -
      {{phone.connectivity?.cell}}
      -
      WiFi
      -
      {{phone.connectivity?.wifi}}
      -
      Bluetooth
      -
      {{phone.connectivity?.bluetooth}}
      -
      Infrared
      -
      {{phone.connectivity?.infrared | checkmark}}
      -
      GPS
      -
      {{phone.connectivity?.gps | checkmark}}
      -
      -
    • -
    • - Android -
      -
      OS Version
      -
      {{phone.android?.os}}
      -
      UI
      -
      {{phone.android?.ui}}
      -
      -
    • -
    • - Size and Weight -
      -
      Dimensions
      -
      {{dim}}
      -
      Weight
      -
      {{phone.sizeAndWeight?.weight}}
      -
      -
    • -
    • - Display -
      -
      Screen size
      -
      {{phone.display?.screenSize}}
      -
      Screen resolution
      -
      {{phone.display?.screenResolution}}
      -
      Touch screen
      -
      {{phone.display?.touchScreen | checkmark}}
      -
      -
    • -
    • - Hardware -
      -
      CPU
      -
      {{phone.hardware?.cpu}}
      -
      USB
      -
      {{phone.hardware?.usb}}
      -
      Audio / headphone jack
      -
      {{phone.hardware?.audioJack}}
      -
      FM Radio
      -
      {{phone.hardware?.fmRadio | checkmark}}
      -
      Accelerometer
      -
      {{phone.hardware?.accelerometer | checkmark}}
      -
      -
    • -
    • - Camera -
      -
      Primary
      -
      {{phone.camera?.primary}}
      -
      Features
      -
      {{phone.camera?.features?.join(', ')}}
      -
      -
    • -
    • - Additional Features -
      {{phone.additionalFeatures}}
      -
    • -
    -
    diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.spec.ts b/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.spec.ts deleted file mode 100644 index ca8b7b821f6..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.spec.ts +++ /dev/null @@ -1,65 +0,0 @@ -// #docregion routestuff -import {SpyLocation} from '@angular/common/testing'; -import {NO_ERRORS_SCHEMA} from '@angular/core'; -import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing'; -import {ActivatedRoute} from '@angular/router'; -import {Observable, of} from 'rxjs'; - -import {Phone, PhoneData} from '../core/phone/phone.service'; - -import {PhoneListComponent} from './phone-list.component'; - -// #enddocregion routestuff - -class ActivatedRouteMock { - constructor(public snapshot: any) {} -} - -class MockPhone { - query(): Observable { - return of([ - {name: 'Nexus S', snippet: '', images: []}, {name: 'Motorola DROID', snippet: '', images: []} - ]); - } -} - -let fixture: ComponentFixture; - -describe('PhoneList', () => { - // #docregion routestuff - - beforeEach(waitForAsync(() => { - TestBed - .configureTestingModule({ - declarations: [PhoneListComponent], - providers: [ - {provide: ActivatedRoute, useValue: new ActivatedRouteMock({params: {phoneId: 1}})}, - {provide: Location, useClass: SpyLocation}, - {provide: Phone, useClass: MockPhone}, - ], - schemas: [NO_ERRORS_SCHEMA] - }) - .compileComponents(); - })); - - beforeEach(() => { - fixture = TestBed.createComponent(PhoneListComponent); - }); - // #enddocregion routestuff - - it('should create "phones" model with 2 phones fetched from xhr', () => { - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelectorAll('.phone-list-item').length).toBe(2); - expect(compiled.querySelector('.phone-list-item:nth-child(1)').textContent) - .toContain('Motorola DROID'); - expect(compiled.querySelector('.phone-list-item:nth-child(2)').textContent) - .toContain('Nexus S'); - }); - - xit('should set the default value of orderProp model', () => { - fixture.detectChanges(); - const compiled = fixture.debugElement.nativeElement; - expect(compiled.querySelector('select option:last-child').selected).toBe(true); - }); -}); diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.ts b/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.ts deleted file mode 100644 index a9268269ea1..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.component.ts +++ /dev/null @@ -1,53 +0,0 @@ -// #docregion -import { Component } from '@angular/core'; - -import { Phone, PhoneData } from '../core/phone/phone.service'; - -@Component({ - selector: 'phone-list', - templateUrl: './phone-list.template.html', -}) -export class PhoneListComponent { - phones: PhoneData[]; - query: string; - orderProp: string; - - constructor(phone: Phone) { - phone.query().subscribe(phones => { - this.phones = phones; - }); - this.orderProp = 'age'; - } - - getPhones(): PhoneData[] { - return this.sortPhones(this.filterPhones(this.phones)); - } - - private filterPhones(phones: PhoneData[]) { - if (phones && this.query) { - return phones.filter(phone => { - const name = phone.name.toLowerCase(); - const snippet = phone.snippet.toLowerCase(); - return name.indexOf(this.query) >= 0 || snippet.indexOf(this.query) >= 0; - }); - } - return phones; - } - - private sortPhones(phones: PhoneData[]) { - if (phones && this.orderProp) { - return phones - .slice(0) // Make a copy - .sort((a, b) => { - if (a[this.orderProp] < b[this.orderProp]) { - return -1; - } else if ([b[this.orderProp] < a[this.orderProp]]) { - return 1; - } else { - return 0; - } - }); - } - return phones; - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.template.html b/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.template.html deleted file mode 100644 index 2678d384c2c..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phone-list/phone-list.template.html +++ /dev/null @@ -1,38 +0,0 @@ -
    -
    -
    - - -

    - Search: - -

    - -

    - Sort by: - -

    - -
    -
    - - - - - - -
    -
    -
    diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/dell-streak-7.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/dell-streak-7.json deleted file mode 100644 index a32eb6ff98c..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/dell-streak-7.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "additionalFeatures": "Front Facing 1.3MP Camera", - "android": { - "os": "Android 2.2", - "ui": "Dell Stage" - }, - "availability": [ - "T-Mobile" - ], - "battery": { - "standbyTime": "", - "talkTime": "", - "type": "Lithium Ion (Li-Ion) (2780 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "T-mobile HSPA+ @ 2100/1900/AWS/850 MHz", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g" - }, - "description": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around. Android\u2122 2.2-based tablet with over-the-air upgrade capability for future OS releases. A vibrant 7-inch, multitouch display with full Adobe\u00ae Flash 10.1 pre-installed. Includes a 1.3 MP front-facing camera for face-to-face chats on popular services such as Qik or Skype. 16 GB of internal storage, plus Wi-Fi, Bluetooth and built-in GPS keeps you in touch with the world around you. Connect on your terms. Save with 2-year contract or flexibility with prepaid pay-as-you-go plans", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "7.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "nVidia Tegra T20", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "dell-streak-7", - "images": [ - "img/phones/dell-streak-7.0.jpg", - "img/phones/dell-streak-7.1.jpg", - "img/phones/dell-streak-7.2.jpg", - "img/phones/dell-streak-7.3.jpg", - "img/phones/dell-streak-7.4.jpg" - ], - "name": "Dell Streak 7", - "sizeAndWeight": { - "dimensions": [ - "199.9 mm (w)", - "119.8 mm (h)", - "12.4 mm (d)" - ], - "weight": "450.0 grams" - }, - "storage": { - "flash": "16000MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-atrix-4g.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-atrix-4g.json deleted file mode 100644 index ccca00e3b2d..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-atrix-4g.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "", - "android": { - "os": "Android 2.2", - "ui": "MOTOBLUR" - }, - "availability": [ - "AT&T" - ], - "battery": { - "standbyTime": "400 hours", - "talkTime": "5 hours", - "type": "Lithium Ion (Li-Ion) (1930 mAH)" - }, - "camera": { - "features": [ - "" - ], - "primary": "" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "WCDMA 850/1900/2100, GSM 850/900/1800/1900, HSDPA 14Mbps (Category 10) Edge Class 12, GPRS Class 12, eCompass, AGPS", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA ATRIX 4G gives you dual-core processing power and the revolutionary webtop application. With webtop and a compatible Motorola docking station, sold separately, you can surf the Internet with a full Firefox browser, create and edit docs, or access multimedia on a large screen almost anywhere.", - "display": { - "screenResolution": "QHD (960 x 540)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-atrix-4g", - "images": [ - "img/phones/motorola-atrix-4g.0.jpg", - "img/phones/motorola-atrix-4g.1.jpg", - "img/phones/motorola-atrix-4g.2.jpg", - "img/phones/motorola-atrix-4g.3.jpg" - ], - "name": "MOTOROLA ATRIX\u2122 4G", - "sizeAndWeight": { - "dimensions": [ - "63.5 mm (w)", - "117.75 mm (h)", - "10.95 mm (d)" - ], - "weight": "135.0 grams" - }, - "storage": { - "flash": "", - "ram": "" - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom-with-wi-fi.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom-with-wi-fi.json deleted file mode 100644 index 4ba9c8d5b53..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom-with-wi-fi.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "additionalFeatures": "Sensors: proximity, ambient light, barometer, gyroscope", - "android": { - "os": "Android 3.0", - "ui": "Honeycomb" - }, - "availability": [ - "" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other ( mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Motorola XOOM with Wi-Fi has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom-with-wi-fi", - "images": [ - "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "img/phones/motorola-xoom-with-wi-fi.1.jpg", - "img/phones/motorola-xoom-with-wi-fi.2.jpg", - "img/phones/motorola-xoom-with-wi-fi.3.jpg", - "img/phones/motorola-xoom-with-wi-fi.4.jpg", - "img/phones/motorola-xoom-with-wi-fi.5.jpg" - ], - "name": "Motorola XOOM\u2122 with Wi-Fi", - "sizeAndWeight": { - "dimensions": [ - "249.1 mm (w)", - "167.8 mm (h)", - "12.9 mm (d)" - ], - "weight": "708.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom.json deleted file mode 100644 index f0f0c8711d9..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/motorola-xoom.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "additionalFeatures": "Front-facing camera. Sensors: proximity, ambient light, barometer, gyroscope.", - "android": { - "os": "Android 3.0", - "ui": "Android" - }, - "availability": [ - "Verizon" - ], - "battery": { - "standbyTime": "336 hours", - "talkTime": "24 hours", - "type": "Other (3250 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "CDMA 800 /1900 LTE 700, Rx diversity in all bands", - "gps": true, - "infrared": false, - "wifi": "802.11 a/b/g/n" - }, - "description": "MOTOROLA XOOM has a super-powerful dual-core processor and Android\u2122 3.0 (Honeycomb) \u2014 the Android platform designed specifically for tablets. With its 10.1-inch HD widescreen display, you\u2019ll enjoy HD video in a thin, light, powerful and upgradeable tablet.", - "display": { - "screenResolution": "WXGA (1200 x 800)", - "screenSize": "10.1 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1 GHz Dual Core Tegra 2", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "motorola-xoom", - "images": [ - "img/phones/motorola-xoom.0.jpg", - "img/phones/motorola-xoom.1.jpg", - "img/phones/motorola-xoom.2.jpg" - ], - "name": "MOTOROLA XOOM\u2122", - "sizeAndWeight": { - "dimensions": [ - "249.0 mm (w)", - "168.0 mm (h)", - "12.7 mm (d)" - ], - "weight": "726.0 grams" - }, - "storage": { - "flash": "32000MB", - "ram": "1000MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/nexus-s.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/nexus-s.json deleted file mode 100644 index 5e712e2ff8c..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/nexus-s.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "additionalFeatures": "Contour Display, Near Field Communications (NFC), Three-axis gyroscope, Anti-fingerprint display coating, Internet Calling support (VoIP/SIP)", - "android": { - "os": "Android 2.3", - "ui": "Android" - }, - "availability": [ - "M1,", - "O2,", - "Orange,", - "Singtel,", - "StarHub,", - "T-Mobile,", - "Vodafone" - ], - "battery": { - "standbyTime": "428 hours", - "talkTime": "6 hours", - "type": "Lithium Ion (Li-Ion) (1500 mAH)" - }, - "camera": { - "features": [ - "Flash", - "Video" - ], - "primary": "5.0 megapixels" - }, - "connectivity": { - "bluetooth": "Bluetooth 2.1", - "cell": "Quad-band GSM: 850, 900, 1800, 1900\r\nTri-band HSPA: 900, 2100, 1700\r\nHSPA type: HSDPA (7.2Mbps) HSUPA (5.76Mbps)", - "gps": true, - "infrared": false, - "wifi": "802.11 b/g/n" - }, - "description": "Nexus S is the next generation of Nexus devices, co-developed by Google and Samsung. The latest Android platform (Gingerbread), paired with a 1 GHz Hummingbird processor and 16GB of memory, makes Nexus S one of the fastest phones on the market. It comes pre-installed with the best of Google apps and enabled with new and popular features like true multi-tasking, Wi-Fi hotspot, Internet Calling, NFC support, and full web browsing. With this device, users will also be the first to receive software upgrades and new Google mobile apps as soon as they become available. For more details, visit http://www.google.com/nexus.", - "display": { - "screenResolution": "WVGA (800 x 480)", - "screenSize": "4.0 inches", - "touchScreen": true - }, - "hardware": { - "accelerometer": true, - "audioJack": "3.5mm", - "cpu": "1GHz Cortex A8 (Hummingbird) processor", - "fmRadio": false, - "physicalKeyboard": false, - "usb": "USB 2.0" - }, - "id": "nexus-s", - "images": [ - "img/phones/nexus-s.0.jpg", - "img/phones/nexus-s.1.jpg", - "img/phones/nexus-s.2.jpg", - "img/phones/nexus-s.3.jpg" - ], - "name": "Nexus S", - "sizeAndWeight": { - "dimensions": [ - "63.0 mm (w)", - "123.9 mm (h)", - "10.88 mm (d)" - ], - "weight": "129.0 grams" - }, - "storage": { - "flash": "16384MB", - "ram": "512MB" - } -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/app/phones/phones.json b/aio/content/examples/upgrade-phonecat-3-final/app/phones/phones.json deleted file mode 100644 index 339b94fbb51..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/app/phones/phones.json +++ /dev/null @@ -1,155 +0,0 @@ -[ - { - "age": 0, - "id": "motorola-xoom-with-wi-fi", - "imageUrl": "img/phones/motorola-xoom-with-wi-fi.0.jpg", - "name": "Motorola XOOM\u2122 with Wi-Fi", - "snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 1, - "id": "motorola-xoom", - "imageUrl": "img/phones/motorola-xoom.0.jpg", - "name": "MOTOROLA XOOM\u2122", - "snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by Android 3.0 (Honeycomb)." - }, - { - "age": 2, - "carrier": "AT&T", - "id": "motorola-atrix-4g", - "imageUrl": "img/phones/motorola-atrix-4g.0.jpg", - "name": "MOTOROLA ATRIX\u2122 4G", - "snippet": "MOTOROLA ATRIX 4G the world's most powerful smartphone." - }, - { - "age": 3, - "id": "dell-streak-7", - "imageUrl": "img/phones/dell-streak-7.0.jpg", - "name": "Dell Streak 7", - "snippet": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around." - }, - { - "age": 4, - "carrier": "Cellular South", - "id": "samsung-gem", - "imageUrl": "img/phones/samsung-gem.0.jpg", - "name": "Samsung Gem\u2122", - "snippet": "The Samsung Gem\u2122 brings you everything that you would expect and more from a touch display smart phone \u2013 more apps, more features and a more affordable price." - }, - { - "age": 5, - "carrier": "Dell", - "id": "dell-venue", - "imageUrl": "img/phones/dell-venue.0.jpg", - "name": "Dell Venue", - "snippet": "The Dell Venue; Your Personal Express Lane to Everything" - }, - { - "age": 6, - "carrier": "Best Buy", - "id": "nexus-s", - "imageUrl": "img/phones/nexus-s.0.jpg", - "name": "Nexus S", - "snippet": "Fast just got faster with Nexus S. A pure Google experience, Nexus S is the first phone to run Gingerbread (Android 2.3), the fastest version of Android yet." - }, - { - "age": 7, - "carrier": "Cellular South", - "id": "lg-axis", - "imageUrl": "img/phones/lg-axis.0.jpg", - "name": "LG Axis", - "snippet": "Android Powered, Google Maps Navigation, 5 Customizable Home Screens" - }, - { - "age": 8, - "id": "samsung-galaxy-tab", - "imageUrl": "img/phones/samsung-galaxy-tab.0.jpg", - "name": "Samsung Galaxy Tab\u2122", - "snippet": "Feel Free to Tab\u2122. The Samsung Galaxy Tab\u2122 brings you an ultra-mobile entertainment experience through its 7\u201d display, high-power processor and Adobe\u00ae Flash\u00ae Player compatibility." - }, - { - "age": 9, - "carrier": "Cellular South", - "id": "samsung-showcase-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-showcase-a-galaxy-s-phone.0.jpg", - "name": "Samsung Showcase\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Showcase\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance, even outdoors" - }, - { - "age": 10, - "carrier": "Verizon", - "id": "droid-2-global-by-motorola", - "imageUrl": "img/phones/droid-2-global-by-motorola.0.jpg", - "name": "DROID\u2122 2 Global by Motorola", - "snippet": "The first smartphone with a 1.2 GHz processor and global capabilities." - }, - { - "age": 11, - "carrier": "Verizon", - "id": "droid-pro-by-motorola", - "imageUrl": "img/phones/droid-pro-by-motorola.0.jpg", - "name": "DROID\u2122 Pro by Motorola", - "snippet": "The next generation of DOES." - }, - { - "age": 12, - "carrier": "AT&T", - "id": "motorola-bravo-with-motoblur", - "imageUrl": "img/phones/motorola-bravo-with-motoblur.0.jpg", - "name": "MOTOROLA BRAVO\u2122 with MOTOBLUR\u2122", - "snippet": "An experience to cheer about." - }, - { - "age": 13, - "carrier": "T-Mobile", - "id": "motorola-defy-with-motoblur", - "imageUrl": "img/phones/motorola-defy-with-motoblur.0.jpg", - "name": "Motorola DEFY\u2122 with MOTOBLUR\u2122", - "snippet": "Are you ready for everything life throws your way?" - }, - { - "age": 14, - "carrier": "T-Mobile", - "id": "t-mobile-mytouch-4g", - "imageUrl": "img/phones/t-mobile-mytouch-4g.0.jpg", - "name": "T-Mobile myTouch 4G", - "snippet": "The T-Mobile myTouch 4G is a premium smartphone designed to deliver blazing fast 4G speeds so that you can video chat from practically anywhere, with or without Wi-Fi." - }, - { - "age": 15, - "carrier": "US Cellular", - "id": "samsung-mesmerize-a-galaxy-s-phone", - "imageUrl": "img/phones/samsung-mesmerize-a-galaxy-s-phone.0.jpg", - "name": "Samsung Mesmerize\u2122 a Galaxy S\u2122 phone", - "snippet": "The Samsung Mesmerize\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance,even outdoors" - }, - { - "age": 16, - "carrier": "Sprint", - "id": "sanyo-zio", - "imageUrl": "img/phones/sanyo-zio.0.jpg", - "name": "SANYO ZIO", - "snippet": "The Sanyo Zio by Kyocera is an Android smartphone with a combination of ultra-sleek styling, strong performance and unprecedented value." - }, - { - "age": 17, - "id": "samsung-transform", - "imageUrl": "img/phones/samsung-transform.0.jpg", - "name": "Samsung Transform\u2122", - "snippet": "The Samsung Transform\u2122 brings you a fun way to customize your Android powered touch screen phone to just the way you like it through your favorite themed \u201cSprint ID Service Pack\u201d." - }, - { - "age": 18, - "id": "t-mobile-g2", - "imageUrl": "img/phones/t-mobile-g2.0.jpg", - "name": "T-Mobile G2", - "snippet": "The T-Mobile G2 with Google is the first smartphone built for 4G speeds on T-Mobile's new network. Get the information you need, faster than you ever thought possible." - }, - { - "age": 19, - "id": "motorola-charm-with-motoblur", - "imageUrl": "img/phones/motorola-charm-with-motoblur.0.jpg", - "name": "Motorola CHARM\u2122 with MOTOBLUR\u2122", - "snippet": "Motorola CHARM fits easily in your pocket or palm. Includes MOTOBLUR service." - } -] diff --git a/aio/content/examples/upgrade-phonecat-3-final/e2e-spec.ts b/aio/content/examples/upgrade-phonecat-3-final/e2e-spec.ts deleted file mode 100644 index a9ba63978f9..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/e2e-spec.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { browser, element, by } from 'protractor'; - -// Angular E2E Testing Guide: -// https://docs.angularjs.org/guide/e2e-testing - -describe('PhoneCat Application', () => { - - // #docregion redirect - it('should redirect `index.html` to `index.html#!/phones', async () => { - await browser.get('index.html'); - await browser.waitForAngular(); - const url = await browser.getCurrentUrl(); - expect(url.endsWith('/phones')).toBe(true); - }); - // #enddocregion redirect - - describe('View: Phone list', () => { - - beforeEach(() => browser.get('index.html#!/phones')); - - it('should filter the phone list as a user types into the search box', async () => { - const phoneList = element.all(by.css('.phones li')); - const query = element(by.css('input')); - - expect(await phoneList.count()).toBe(20); - - await query.sendKeys('nexus'); - expect(await phoneList.count()).toBe(1); - - await query.clear(); - await query.sendKeys('motorola'); - expect(await phoneList.count()).toBe(8); - }); - - it('should be possible to control phone order via the drop-down menu', async () => { - const queryField = element(by.css('input')); - const orderSelect = element(by.css('select')); - const nameOption = orderSelect.element(by.css('option[value="name"]')); - const phoneNameColumn = element.all(by.css('.phones .name')); - - function getNames() { - return phoneNameColumn.map((elem) => elem.getText()); - } - - await queryField.sendKeys('tablet'); // Let's narrow the dataset to make the assertions shorter - - expect(await getNames()).toEqual([ - 'Motorola XOOM\u2122 with Wi-Fi', - 'MOTOROLA XOOM\u2122' - ]); - - await nameOption.click(); - - expect(await getNames()).toEqual([ - 'MOTOROLA XOOM\u2122', - 'Motorola XOOM\u2122 with Wi-Fi' - ]); - }); - - // #docregion links - it('should render phone specific links', async () => { - const query = element(by.css('input')); - await query.sendKeys('nexus'); - await element.all(by.css('.phones li a')).first().click(); - const url = await browser.getCurrentUrl(); - expect(url.endsWith('/phones/nexus-s')).toBe(true); - }); - // #enddocregion links - - }); - - describe('View: Phone detail', () => { - - beforeEach(() => browser.get('index.html#!/phones/nexus-s')); - - it('should display the `nexus-s` page', async () => { - expect(await element(by.css('h1')).getText()).toBe('Nexus S'); - }); - - it('should display the first phone image as the main phone image', async () => { - const mainImage = element(by.css('img.phone.selected')); - - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - it('should swap the main image when clicking on a thumbnail image', async () => { - const mainImage = element(by.css('img.phone.selected')); - const thumbnails = element.all(by.css('.phone-thumbs img')); - - await thumbnails.get(2).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.2.jpg/); - - await thumbnails.get(0).click(); - expect(await mainImage.getAttribute('src')).toMatch(/img\/phones\/nexus-s.0.jpg/); - }); - - }); - -}); diff --git a/aio/content/examples/upgrade-phonecat-3-final/example-config.json b/aio/content/examples/upgrade-phonecat-3-final/example-config.json deleted file mode 100644 index a76722119ff..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/example-config.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "build": "build:upgrade", - "run": "serve:upgrade", - "projectType": "systemjs" -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/index.html b/aio/content/examples/upgrade-phonecat-3-final/index.html deleted file mode 100644 index cab6491c407..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/index.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - Google Phone Gallery - - - - - - - - - - - - - - - - - - - diff --git a/aio/content/examples/upgrade-phonecat-3-final/karma-test-shim.js b/aio/content/examples/upgrade-phonecat-3-final/karma-test-shim.js deleted file mode 100644 index 1e353310591..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/karma-test-shim.js +++ /dev/null @@ -1,95 +0,0 @@ -// #docregion -// /*global jasmine, __karma__, window*/ -Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. - -// Uncomment to get full stacktrace output. Sometimes helpful, usually not. -// Error.stackTraceLimit = Infinity; // - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; - -// builtPaths: root paths for output ("built") files -// get from karma.config.js, then prefix with '/src/' (default is 'app/') -var builtPaths = (__karma__.config.builtPaths || ['src/']) - .map(function(p) { return '/base/'+p;}); - -__karma__.loaded = function () { }; - -function isJsFile(path) { - return path.slice(-3) == '.js'; -} - -function isSpecFile(path) { - return /\.spec\.(.*\.)?js$/.test(path); -} - -// Is a "built" file if is JavaScript file in one of the "built" folders -function isBuiltFile(path) { - return isJsFile(path) && - builtPaths.reduce(function(keep, bp) { - return keep || (path.slice(0, bp.length) === bp); - }, false); -} - -var allSpecFiles = Object.keys(window.__karma__.files) - .filter(isSpecFile) - .filter(isBuiltFile); - -System.config({ - baseURL: 'base/src', - // Extend usual application package list with testing folder - packages: { 'testing': { main: 'index.js', defaultExtension: 'js' } }, - - // Assume npm: is set in `paths` in systemjs.config - // Map the angular testing bundles - map: { - '@angular/core/testing': 'npm:@angular/core/fesm2022/testing.mjs', - '@angular/common/testing': 'npm:@angular/common/fesm2022/testing.mjs', - '@angular/common/http/testing': 'npm:@angular/common/fesm2022/http/testing.mjs', - '@angular/platform-browser/testing': 'npm:@angular/platform-browser/fesm2022/testing.mjs', - '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/fesm2022/testing.mjs', - '@angular/router/testing': 'npm:@angular/router/fesm2022/testing.mjs', - '@angular/forms/testing': 'npm:@angular/forms/fesm2022/testing.mjs', - }, -}); - -System.import('systemjs.config.js') - .then(importSystemJsExtras) - .then(initTestBed) - .then(initTesting); - -/** Optional SystemJS configuration extras. Keep going w/o it */ -function importSystemJsExtras(){ - return System.import('systemjs.config.extras.js') - .catch(function(reason) { - console.log( - 'Warning: System.import could not load the optional "systemjs.config.extras.js". Did you omit it by accident? Continuing without it.' - ); - console.log(reason); - }); -} - -function initTestBed(){ - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]) - - .then(function (providers) { - var coreTesting = providers[0]; - var browserTesting = providers[1]; - - coreTesting.TestBed.initTestEnvironment( - browserTesting.BrowserDynamicTestingModule, - browserTesting.platformBrowserDynamicTesting()); - }) -} - -// Import all spec files and start karma -function initTesting () { - return Promise.all( - allSpecFiles.map(function (moduleName) { - return System.import(moduleName); - }) - ) - .then(__karma__.start, __karma__.error); -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/karma.conf.js b/aio/content/examples/upgrade-phonecat-3-final/karma.conf.js deleted file mode 100644 index dbbc0ca1fcd..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/karma.conf.js +++ /dev/null @@ -1,87 +0,0 @@ -// #docregion -module.exports = function(config) { - - var appBase = 'src/'; // transpiled app JS and map files - var appAssets = '/base/app/'; // component assets fetched by Angular's compiler - - // Testing helpers (optional) are conventionally in a folder called `testing` - var testingBase = 'src/testing/'; // transpiled test JS and map files - var testingSrcBase = 'src/testing/'; // test source TS files - - config.set({ - basePath: '', - frameworks: ['jasmine'], - - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter') - ], - - client: { - builtPaths: [appBase, testingBase], // add more spec base paths as needed - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - - files: [ - // System.js for module loading - 'node_modules/systemjs/dist/system.src.js', - - // Polyfills - 'node_modules/core-js/client/shim.js', - - // zone.js - 'node_modules/zone.js/bundles/zone.umd.js', - 'node_modules/zone.js/bundles/zone-testing.umd.js', - - // RxJs - { pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false }, - { pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false }, - - // Paths loaded via module imports: - // Angular itself - { pattern: 'node_modules/@angular/**/*.mjs', included: false, watched: false }, - { pattern: 'node_modules/@angular/**/*.mjs.map', included: false, watched: false }, - - { pattern: 'node_modules/tslib/tslib.js', included: false, watched: false }, - { pattern: 'node_modules/systemjs-plugin-babel/**/*.js', included: false, watched: false }, - - { pattern: appBase + '/systemjs.config.js', included: false, watched: false }, - { pattern: appBase + '/systemjs.config.extras.js', included: false, watched: false }, - 'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels - - // transpiled application & spec code paths loaded via module imports - { pattern: appBase + '**/*.js', included: false, watched: true }, - { pattern: testingBase + '**/*.js', included: false, watched: true }, - - - // Asset (HTML & CSS) paths loaded via Angular's component compiler - // (these paths need to be rewritten, see proxies section) - { pattern: appBase + '**/*.html', included: false, watched: true }, - { pattern: appBase + '**/*.css', included: false, watched: true }, - - // Paths for debugging with source maps in dev tools - { pattern: appBase + '**/*.ts', included: false, watched: false }, - { pattern: appBase + '**/*.js.map', included: false, watched: false }, - { pattern: testingSrcBase + '**/*.ts', included: false, watched: false }, - { pattern: testingBase + '**/*.js.map', included: false, watched: false} - ], - - // Proxied base paths for loading assets - proxies: { - // required for modules fetched by SystemJS - '/base/src/node_modules/': '/base/node_modules/' - }, - - exclude: [], - preprocessors: {}, - reporters: ['progress', 'kjhtml'], - - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }) -} diff --git a/aio/content/examples/upgrade-phonecat-3-final/systemjs.config.1.js b/aio/content/examples/upgrade-phonecat-3-final/systemjs.config.1.js deleted file mode 100644 index b5185f7e182..00000000000 --- a/aio/content/examples/upgrade-phonecat-3-final/systemjs.config.1.js +++ /dev/null @@ -1,71 +0,0 @@ -/** - * System configuration for Angular samples - * Adjust as necessary for your application needs. - */ -(function (global) { - System.config({ - paths: { - // paths serve as alias - 'npm:': '/node_modules/' - }, - map: { - 'ng-loader': '../src/systemjs-angular-loader.js', - app: '/app', - // angular bundles - '@angular/core': 'npm:@angular/core/fesm2022/core.mjs', - '@angular/common': 'npm:@angular/common/fesm2022/common.mjs', - '@angular/common/http': 'npm:@angular/common/fesm2022/http.mjs', - '@angular/compiler': 'npm:@angular/compiler/fesm2022/compiler.mjs', - '@angular/platform-browser': 'npm:@angular/platform-browser/fesm2022/platform-browser.mjs', - '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic/fesm2022/platform-browser-dynamic.mjs', - '@angular/router': 'npm:@angular/router/fesm2022/router.mjs', - '@angular/router/upgrade': 'npm:@angular/router/fesm2022/upgrade.mjs', - '@angular/forms': 'npm:@angular/forms/fesm2022/forms.mjs', - '@angular/upgrade': 'npm:@angular/upgrade/fesm2022/upgrade.mjs', - '@angular/upgrade/static': 'npm:@angular/upgrade/fesm2022/static.mjs', - - // other libraries - 'rxjs': 'npm:rxjs/dist/cjs', - 'rxjs/operators': 'npm:rxjs/dist/cjs/operators', - 'tslib': 'npm:tslib/tslib.js', - 'angular-in-memory-web-api': 'npm:angular-in-memory-web-api', - - 'plugin-babel': 'npm:systemjs-plugin-babel/plugin-babel.js', - 'systemjs-babel-build': 'npm:systemjs-plugin-babel/systemjs-babel-browser.js' - }, - transpiler: 'plugin-babel', - // packages tells the System loader how to load when no filename and/or no extension - packages: { - 'app': { - main: './main.js', - defaultExtension: 'js', - meta: { - './*.js': { - loader: 'ng-loader' - } - } - }, - 'angular-in-memory-web-api': { - main: './index.js', - defaultExtension: 'js' - }, - 'rxjs': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - 'rxjs/operators': { - defaultExtension: 'js', - format: 'cjs', - main: 'index.js' - }, - 'meta': { - '*.mjs': { - babelOptions: { - es2015: false - } - } - } - } - }); -})(this); diff --git a/aio/content/examples/user-input/BUILD.bazel b/aio/content/examples/user-input/BUILD.bazel deleted file mode 100644 index ab7664df066..00000000000 --- a/aio/content/examples/user-input/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "user-input", -) diff --git a/aio/content/examples/user-input/e2e/src/app.e2e-spec.ts b/aio/content/examples/user-input/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 53f4e20c293..00000000000 --- a/aio/content/examples/user-input/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,89 +0,0 @@ -import { browser, element, by, protractor } from 'protractor'; - -describe('User Input Tests', () => { - - beforeAll(() => browser.get('')); - - it('should support the click event', async () => { - const mainEle = element(by.css('app-click-me')); - const buttonEle = element(by.css('app-click-me button')); - expect(await mainEle.getText()).not.toContain('You are my hero!'); - await buttonEle.click(); - expect(await mainEle.getText()).toContain('You are my hero!'); - }); - - it('should support the click event with an event payload', async () => { - const mainEle = element(by.css('app-click-me2')); - const buttonEle = element(by.css('app-click-me2 button')); - expect(await mainEle.getText()).not.toContain('Event target is '); - await buttonEle.click(); - expect(await mainEle.getText()).toContain('Event target is BUTTON'); - }); - - it('should support the keyup event ', async () => { - const mainEle = element(by.css('app-key-up1')); - const inputEle = mainEle.element(by.css('input')); - const outputTextEle = mainEle.element(by.css('p')); - expect(await outputTextEle.getText()).toEqual(''); - await inputEle.sendKeys('abc'); - expect(await outputTextEle.getText()).toEqual('a | ab | abc |'); - }); - - it('should support user input from a local template let (loopback)', async () => { - const mainEle = element(by.css('app-loop-back')); - const inputEle = mainEle.element(by.css('input')); - const outputTextEle = mainEle.element(by.css('p')); - expect(await outputTextEle.getText()).toEqual(''); - await inputEle.sendKeys('abc'); - expect(await outputTextEle.getText()).toEqual('abc'); - }); - - it('should be able to combine click event with a local template var', async () => { - const mainEle = element(by.css('app-key-up2')); - const inputEle = mainEle.element(by.css('input')); - const outputTextEle = mainEle.element(by.css('p')); - expect(await outputTextEle.getText()).toEqual(''); - await inputEle.sendKeys('abc'); - expect(await outputTextEle.getText()).toEqual('a | ab | abc |'); - }); - - it('should be able to filter key events', async () => { - const mainEle = element(by.css('app-key-up3')); - const inputEle = mainEle.element(by.css('input')); - const outputTextEle = mainEle.element(by.css('p')); - expect(await outputTextEle.getText()).toEqual(''); - await inputEle.sendKeys('abc'); - expect(await outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet'); - // broken atm, see https://github.com/angular/angular/issues/9419 - await inputEle.sendKeys(protractor.Key.ENTER); - expect(await outputTextEle.getText()).toEqual('abc'); - }); - - it('should be able to filter blur events', async () => { - const prevInputEle = element(by.css('app-key-up3 input')); - const mainEle = element(by.css('app-key-up4')); - const inputEle = mainEle.element(by.css('input')); - const outputTextEle = mainEle.element(by.css('p')); - expect(await outputTextEle.getText()).toEqual(''); - await inputEle.sendKeys('abc'); - expect(await outputTextEle.getText()).toEqual('', 'should be blank - have not sent enter yet'); - // change the focus - await prevInputEle.click(); - expect(await outputTextEle.getText()).toEqual('abc'); - }); - - it('should be able to compose little tour of heroes', async () => { - const mainEle = element(by.css('app-little-tour')); - const inputEle = mainEle.element(by.css('input')); - const addButtonEle = mainEle.element(by.css('button')); - const heroEles = mainEle.all(by.css('li')); - const numHeroes = await heroEles.count(); - expect(numHeroes).toBeGreaterThan(0); - - await inputEle.sendKeys('abc'); - await addButtonEle.click(); - expect(await heroEles.count()).toEqual(numHeroes + 1, 'should be one more hero added'); - expect(await heroEles.get(numHeroes).getText()).toContain('abc'); - }); -}); - diff --git a/aio/content/examples/user-input/example-config.json b/aio/content/examples/user-input/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/user-input/src/app/app.component.html b/aio/content/examples/user-input/src/app/app.component.html deleted file mode 100644 index 303d7c0a0bf..00000000000 --- a/aio/content/examples/user-input/src/app/app.component.html +++ /dev/null @@ -1,27 +0,0 @@ -

    - -

    - -

    - -

    - -

    Give me some keys!

    -
    - -

    keyup loop-back component

    -
    -

    - -

    Give me some more keys!

    -
    - -

    Type away! Press [enter] when done.

    -
    - -

    Type away! Press [enter] or click elsewhere when done.

    -
    - -

    Little Tour of Heroes

    -

    Add a new hero

    -
    diff --git a/aio/content/examples/user-input/src/app/app.component.ts b/aio/content/examples/user-input/src/app/app.component.ts deleted file mode 100644 index b7c90230c1e..00000000000 --- a/aio/content/examples/user-input/src/app/app.component.ts +++ /dev/null @@ -1,29 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -import {ClickMeComponent} from './click-me.component'; -import {ClickMe2Component} from './click-me2.component'; -import { - KeyUpComponent_v1, - KeyUpComponent_v2, - KeyUpComponent_v3, - KeyUpComponent_v4, -} from './keyup.components'; -import {LittleTourComponent} from './little-tour.component'; -import {LoopbackComponent} from './loop-back.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - ClickMeComponent, - ClickMe2Component, - KeyUpComponent_v1, - KeyUpComponent_v2, - KeyUpComponent_v3, - KeyUpComponent_v4, - LittleTourComponent, - LoopbackComponent, - ], -}) -export class AppComponent {} diff --git a/aio/content/examples/user-input/src/app/click-me.component.ts b/aio/content/examples/user-input/src/app/click-me.component.ts deleted file mode 100644 index c9a2011092d..00000000000 --- a/aio/content/examples/user-input/src/app/click-me.component.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* FOR DOCS ... MUST MATCH ClickMeComponent template -// #docregion click-me-button - -// #enddocregion click-me-button -*/ - -// #docregion -import {Component} from '@angular/core'; - -// #docregion click-me-component -@Component({ - standalone: true, - selector: 'app-click-me', - template: ` - {{ clickMessage }}`, -}) -export class ClickMeComponent { - clickMessage = ''; - - onClickMe() { - this.clickMessage = 'You are my hero!'; - } -} -// #enddocregion click-me-component diff --git a/aio/content/examples/user-input/src/app/click-me2.component.ts b/aio/content/examples/user-input/src/app/click-me2.component.ts deleted file mode 100644 index b8e3c082846..00000000000 --- a/aio/content/examples/user-input/src/app/click-me2.component.ts +++ /dev/null @@ -1,18 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-click-me2', - template: ` - {{ clickMessage }}`, -}) -export class ClickMe2Component { - clickMessage = ''; - clicks = 1; - - onClickMe2(event: any) { - const evtMsg = event ? ' Event target is ' + event.target.tagName : ''; - this.clickMessage = `Click #${this.clicks++}. ${evtMsg}`; - } -} diff --git a/aio/content/examples/user-input/src/app/keyup.components.ts b/aio/content/examples/user-input/src/app/keyup.components.ts deleted file mode 100644 index ac64975ef16..00000000000 --- a/aio/content/examples/user-input/src/app/keyup.components.ts +++ /dev/null @@ -1,94 +0,0 @@ -/* eslint-disable @angular-eslint/component-class-suffix */ -// #docplaster -// #docregion -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'app-key-up1', - // #docregion key-up-component-1-template - template: ` - -

    {{ values }}

    - `, - // #enddocregion key-up-component-1-template -}) -// #docregion key-up-component-1-class, key-up-component-1-class-no-type -export class KeyUpComponent_v1 { - values = ''; - - // #enddocregion key-up-component-1-class, key-up-component-1-class-no-type - /* - // #docregion key-up-component-1-class-no-type - onKey(event: any) { // without type info - this.values += event.target.value + ' | '; - } - // #enddocregion key-up-component-1-class-no-type - */ - // #docregion key-up-component-1-class - - onKey(event: KeyboardEvent) { - // with type info - this.values += (event.target as HTMLInputElement).value + ' | '; - } - // #docregion key-up-component-1-class-no-type -} -// #enddocregion key-up-component-1-class, key-up-component-1-class-no-type - -////////////////////////////////////////// - -// #docregion key-up-component-2 -@Component({ - standalone: true, - selector: 'app-key-up2', - template: ` - -

    {{ values }}

    - `, -}) -export class KeyUpComponent_v2 { - values = ''; - onKey(value: string) { - this.values += value + ' | '; - } -} -// #enddocregion key-up-component-2 - -////////////////////////////////////////// - -// #docregion key-up-component-3 -@Component({ - standalone: true, - selector: 'app-key-up3', - template: ` - -

    {{ value }}

    - `, -}) -export class KeyUpComponent_v3 { - value = ''; - onEnter(value: string) { - this.value = value; - } -} -// #enddocregion key-up-component-3 - -////////////////////////////////////////// - -// #docregion key-up-component-4 -@Component({ - standalone: true, - selector: 'app-key-up4', - template: ` - - -

    {{ value }}

    - `, -}) -export class KeyUpComponent_v4 { - value = ''; - update(value: string) { - this.value = value; - } -} -// #enddocregion key-up-component-4 diff --git a/aio/content/examples/user-input/src/app/little-tour.component.ts b/aio/content/examples/user-input/src/app/little-tour.component.ts deleted file mode 100644 index 89218ecc22f..00000000000 --- a/aio/content/examples/user-input/src/app/little-tour.component.ts +++ /dev/null @@ -1,32 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; - -// #docregion little-tour -@Component({ - standalone: true, - selector: 'app-little-tour', - template: ` - - - - -
      -
    • {{ hero }}
    • -
    - `, - imports: [CommonModule], -}) -export class LittleTourComponent { - heroes = ['Windstorm', 'Bombasto', 'Magneta', 'Tornado']; - addHero(newHero: string) { - if (newHero) { - this.heroes.push(newHero); - } - } -} -// #enddocregion little-tour diff --git a/aio/content/examples/user-input/src/app/loop-back.component.ts b/aio/content/examples/user-input/src/app/loop-back.component.ts deleted file mode 100644 index d23b46012bd..00000000000 --- a/aio/content/examples/user-input/src/app/loop-back.component.ts +++ /dev/null @@ -1,13 +0,0 @@ -// #docregion -import {Component} from '@angular/core'; -// #docregion loop-back-component -@Component({ - standalone: true, - selector: 'app-loop-back', - template: ` - -

    {{ box.value }}

    - `, -}) -export class LoopbackComponent {} -// #enddocregion loop-back-component diff --git a/aio/content/examples/user-input/src/assets/user-input-styles.css b/aio/content/examples/user-input/src/assets/user-input-styles.css deleted file mode 100644 index b2133e5103e..00000000000 --- a/aio/content/examples/user-input/src/assets/user-input-styles.css +++ /dev/null @@ -1,9 +0,0 @@ -fieldset {border-style:none} -img {height: 100px;} -.box {border: 1px solid black; padding:3px} -.child-div {margin-left: 1em; font-weight: normal} -.hidden {display: none} -.parent-div {margin-top: 1em; font-weight: bold} -.special {font-weight:bold;} -.toe {margin-left: 1em; font-style: italic;} -little-hero {color:blue; font-size: smaller; background-color: Turquoise } \ No newline at end of file diff --git a/aio/content/examples/user-input/src/index.html b/aio/content/examples/user-input/src/index.html deleted file mode 100644 index 04e2ed51d77..00000000000 --- a/aio/content/examples/user-input/src/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - User Input - - - - - - - - - - - diff --git a/aio/content/examples/user-input/src/main.ts b/aio/content/examples/user-input/src/main.ts deleted file mode 100644 index 46d4cf88707..00000000000 --- a/aio/content/examples/user-input/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}); diff --git a/aio/content/examples/user-input/stackblitz.json b/aio/content/examples/user-input/stackblitz.json deleted file mode 100644 index d60beb9e7e1..00000000000 --- a/aio/content/examples/user-input/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "User Input", - "files": [ - "!**/*.d.ts", - "!**/*.js" - ], - "tags": ["input"] -} diff --git a/aio/content/examples/view-encapsulation/BUILD.bazel b/aio/content/examples/view-encapsulation/BUILD.bazel deleted file mode 100644 index 8ee58de8ab0..00000000000 --- a/aio/content/examples/view-encapsulation/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "view-encapsulation", -) diff --git a/aio/content/examples/view-encapsulation/e2e/src/app.e2e-spec.ts b/aio/content/examples/view-encapsulation/e2e/src/app.e2e-spec.ts deleted file mode 100644 index 5a7bddf9a66..00000000000 --- a/aio/content/examples/view-encapsulation/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,99 +0,0 @@ -/* eslint-disable max-len */ -import { browser, by, element, logging, WebElement } from 'protractor'; - -describe('View Encapsulation App', () => { - - const RED = 'rgba(255, 0, 0, 1)'; - const GREEN = 'rgba(0, 128, 0, 1)'; - const BLUE = 'rgba(0, 0, 255, 1)'; - - beforeAll(() => browser.get('')); - - it('should color the `NoEncapsulationComponent` heading red, when it is at the top level', async () => { - const noEncapsulationHeading = element(by.css('app-root > app-no-encapsulation > h2')); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(RED); - }); - - it('should color the `NoEncapsulationComponent` message red, when it is at the top level', async () => { - const noEncapsulationMessage = element(by.css('app-root > app-no-encapsulation > .none-message')); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(RED); - }); - - it('should color the `EmulatedEncapsulationComponent` heading green, when it is at the top level', async () => { - const noEncapsulationHeading = element(by.css('app-root > app-emulated-encapsulation > h2')); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(GREEN); - }); - - it('should color the `EmulatedEncapsulationComponent` message green, when it is at the top level', async () => { - const noEncapsulationMessage = element(by.css('app-root > app-emulated-encapsulation > .emulated-message')); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(GREEN); - }); - - it('should color the `NoEncapsulationComponent` heading red, when it is a child of `EmulatedEncapsulationComponent`)', async () => { - const noEncapsulationHeading = element(by.css('app-root > app-emulated-encapsulation > app-no-encapsulation > h2')); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(RED); - }); - - it('should color the `NoEncapsulationComponent` message red, when it is a child of `EmulatedEncapsulationComponent`)', async () => { - const noEncapsulationMessage = element(by.css('app-root > app-emulated-encapsulation > app-no-encapsulation > .none-message')); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(RED); - }); - - it('should color the `ShadowDomEncapsulationComponent` heading blue', async () => { - const noEncapsulationHeading = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'h2'); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(BLUE); - }); - - it('should color the `ShadowDomEncapsulationComponent` message blue', async () => { - const noEncapsulationHMessage = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', '.shadow-message'); - expect(await noEncapsulationHMessage.getCssValue('color')).toEqual(BLUE); - }); - - it('should color the `EmulatedEncapsulationComponent` heading green, when it is a child of `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationHeading = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-emulated-encapsulation > h2'); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(GREEN); - }); - - it('should color the `EmulatedEncapsulationComponent` message green, when it is a child of `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationMessage = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-emulated-encapsulation > .emulated-message'); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(GREEN); - }); - - it('should color the `NoEncapsulationComponent` heading blue (not red!), when it is a child of the `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationHeading = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-no-encapsulation > h2'); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(BLUE); - }); - - it('should color the `NoEncapsulationComponent` message red (not blue!), when it is a child of the `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationMessage = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-no-encapsulation > .none-message'); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(RED); - }); - - it('should color the `NoEncapsulationComponent` heading blue (not red!), when it is a child of the `EmulatedEncapsulationComponent`, which is a child of the `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationHeading = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-emulated-encapsulation > app-no-encapsulation > h2'); - expect(await noEncapsulationHeading.getCssValue('color')).toEqual(BLUE); - }); - - it('should color the `NoEncapsulationComponent` message red (not blue!), when it is a child of the `EmulatedEncapsulationComponent`, which is a child of the `ShadowDomEncapsulationComponent`', async () => { - const noEncapsulationMessage = await findShadowDomElement('app-root > app-shadow-dom-encapsulation', 'app-emulated-encapsulation > app-no-encapsulation > .none-message'); - expect(await noEncapsulationMessage.getCssValue('color')).toEqual(RED); - }); - - afterEach(async () => { - // Assert that there are no errors emitted from the browser - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - expect(logs).not.toContain(jasmine.objectContaining({ - level: logging.Level.SEVERE, - } as logging.Entry)); - }); -}); - - -async function findShadowDomElement(shadowHostSelector: string, shadowElementSelector: string): Promise { - const shadowHost = browser.findElement(by.css(shadowHostSelector)); - const shadowRoot: any = await browser.executeScript('return arguments[0].shadowRoot', shadowHost); - // Using this solution to find the shadow element after Chrome 97: https://stackoverflow.com/a/70611425. - const rootKey = Object.keys(shadowRoot)[0]; - const rootId = shadowRoot[rootKey]; - return new WebElement(browser, rootId).findElement(by.css(shadowElementSelector)); -} diff --git a/aio/content/examples/view-encapsulation/example-config.json b/aio/content/examples/view-encapsulation/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/view-encapsulation/src/app/app.component.ts b/aio/content/examples/view-encapsulation/src/app/app.component.ts deleted file mode 100644 index b1b141511d0..00000000000 --- a/aio/content/examples/view-encapsulation/src/app/app.component.ts +++ /dev/null @@ -1,36 +0,0 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {NoEncapsulationComponent} from './no-encapsulation.component'; -import {ShadowDomEncapsulationComponent} from './shadow-dom-encapsulation.component'; -import {EmulatedEncapsulationComponent} from './emulated-encapsulation.component'; - -@Component({ - standalone: true, - selector: 'app-root', - template: ` - - - - `, - styles: [ - ` - app-no-encapsulation, - app-emulated-encapsulation, - app-shadow-dom-encapsulation { - display: block; - max-width: 500px; - padding: 5px; - margin: 5px 0; - } - `, - 'app-no-encapsulation { border: solid 2px red; }', - 'app-emulated-encapsulation { border: solid 2px green; }', - 'app-shadow-dom-encapsulation { border: solid 2px blue; }', - ], - encapsulation: ViewEncapsulation.None, - imports: [ - NoEncapsulationComponent, - ShadowDomEncapsulationComponent, - EmulatedEncapsulationComponent, - ], -}) -export class AppComponent {} diff --git a/aio/content/examples/view-encapsulation/src/app/emulated-encapsulation.component.ts b/aio/content/examples/view-encapsulation/src/app/emulated-encapsulation.component.ts deleted file mode 100644 index 681d84e225c..00000000000 --- a/aio/content/examples/view-encapsulation/src/app/emulated-encapsulation.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {NoEncapsulationComponent} from './no-encapsulation.component'; - -// #docregion -@Component({ - standalone: true, - selector: 'app-emulated-encapsulation', - template: ` -

    Emulated

    -
    Emulated encapsulation
    - - `, - styles: ['h2, .emulated-message { color: green; }'], - encapsulation: ViewEncapsulation.Emulated, - imports: [NoEncapsulationComponent], -}) -export class EmulatedEncapsulationComponent {} diff --git a/aio/content/examples/view-encapsulation/src/app/no-encapsulation.component.ts b/aio/content/examples/view-encapsulation/src/app/no-encapsulation.component.ts deleted file mode 100644 index 1ceb7d4e761..00000000000 --- a/aio/content/examples/view-encapsulation/src/app/no-encapsulation.component.ts +++ /dev/null @@ -1,14 +0,0 @@ -import {Component, ViewEncapsulation} from '@angular/core'; - -// #docregion -@Component({ - standalone: true, - selector: 'app-no-encapsulation', - template: ` -

    None

    -
    No encapsulation
    - `, - styles: ['h2, .none-message { color: red; }'], - encapsulation: ViewEncapsulation.None, -}) -export class NoEncapsulationComponent {} diff --git a/aio/content/examples/view-encapsulation/src/app/shadow-dom-encapsulation.component.ts b/aio/content/examples/view-encapsulation/src/app/shadow-dom-encapsulation.component.ts deleted file mode 100644 index 43fd4e68ab1..00000000000 --- a/aio/content/examples/view-encapsulation/src/app/shadow-dom-encapsulation.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {Component, ViewEncapsulation} from '@angular/core'; -import {NoEncapsulationComponent} from './no-encapsulation.component'; -import {EmulatedEncapsulationComponent} from './emulated-encapsulation.component'; - -// #docregion -@Component({ - standalone: true, - selector: 'app-shadow-dom-encapsulation', - template: ` -

    ShadowDom

    -
    Shadow DOM encapsulation
    - - - `, - styles: ['h2, .shadow-message { color: blue; }'], - encapsulation: ViewEncapsulation.ShadowDom, - imports: [NoEncapsulationComponent, EmulatedEncapsulationComponent], -}) -export class ShadowDomEncapsulationComponent {} diff --git a/aio/content/examples/view-encapsulation/src/index.html b/aio/content/examples/view-encapsulation/src/index.html deleted file mode 100644 index 9a54a12cd4d..00000000000 --- a/aio/content/examples/view-encapsulation/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Ponyracer - - - - - - - - diff --git a/aio/content/examples/view-encapsulation/src/main.ts b/aio/content/examples/view-encapsulation/src/main.ts deleted file mode 100644 index 6fc5c42c4a3..00000000000 --- a/aio/content/examples/view-encapsulation/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, { - providers: [provideProtractorTestingSupport()], -}).catch((err) => console.error(err)); diff --git a/aio/content/examples/view-encapsulation/stackblitz.json b/aio/content/examples/view-encapsulation/stackblitz.json deleted file mode 100644 index 8109cb8480b..00000000000 --- a/aio/content/examples/view-encapsulation/stackblitz.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "description": "View Encapsulation", - "files": [ - "!**/*.d.ts", - "!**/*.js", - "!**/*.[1,2].*" - ], - "tags": [ - [ - "view encapsulation", - "shadow DOM", - "CSS", - "component styling" - ] - ] -} diff --git a/aio/content/examples/what-is-angular/BUILD.bazel b/aio/content/examples/what-is-angular/BUILD.bazel deleted file mode 100644 index c3a2027a33e..00000000000 --- a/aio/content/examples/what-is-angular/BUILD.bazel +++ /dev/null @@ -1,7 +0,0 @@ -load("//aio/content/examples:examples.bzl", "docs_example") - -package(default_visibility = ["//visibility:public"]) - -docs_example( - name = "what-is-angular", -) diff --git a/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts b/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts deleted file mode 100644 index ba6658c94a4..00000000000 --- a/aio/content/examples/what-is-angular/e2e/src/app.e2e-spec.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { browser, element, by, logging } from 'protractor'; - - -describe('What is Angular', () => { - - const paragraphs = element.all(by.css('p')); - const buttons = element.all(by.css('button')); - const templateButton = buttons.get(1); - const templateText = paragraphs.get(4); - const messageButton = buttons.get(0); - const messageText = paragraphs.get(2); - const ngIfButton = buttons.get(2); - const ngIfText = paragraphs.get(5); - const diButton = buttons.get(3); - - beforeEach(() => browser.get('')); - - // helper function to test what's logged to the console - async function logChecker(contents: string) { - const logs = await browser.manage().logs().get(logging.Type.BROWSER); - const messages = logs.filter(({ message }) => message.indexOf(contents) !== -1 ? true : false); - expect(messages.length).toBeGreaterThan(0); - } - - it('should display Hello World', async () => { - expect(await element(by.css('hello-world h2')).getText()).toEqual('Hello World'); - }); - - // Test for alert - it('should display js alert after button click', async () => { - await messageButton.click(); - const alert = browser.switchTo().alert(); - expect(await alert.getText()).toEqual('Hello, World'); - await alert.accept(); - }); - - it('should display blue a sentence', async () => { - expect(await messageText.getCssValue('color')).toEqual('rgba(0, 0, 255, 1)'); - }); - - // Hello World Template section - it('should add 123 to editable p tag', async () => { - await templateButton.click(); - await templateText.click(); - await templateText.sendKeys('123'); - expect(await templateText.getText()).toEqual('You can edit me!123'); - }); - - // Test for ngIf section - it('should display edit instructions after button click', async () => { - await ngIfButton.click(); - expect(await ngIfText.getText()).toEqual('You can edit the following paragraph.'); - }); - - // Test for DI section - it('should log the count', async () => { - await diButton.click(); - await logChecker('0'); - }); - -}); diff --git a/aio/content/examples/what-is-angular/example-config.json b/aio/content/examples/what-is-angular/example-config.json deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/aio/content/examples/what-is-angular/src/app/app.component.html b/aio/content/examples/what-is-angular/src/app/app.component.html deleted file mode 100644 index 3948551b249..00000000000 --- a/aio/content/examples/what-is-angular/src/app/app.component.html +++ /dev/null @@ -1,7 +0,0 @@ -

    Understanding Angular

    - - - - - - diff --git a/aio/content/examples/what-is-angular/src/app/app.component.ts b/aio/content/examples/what-is-angular/src/app/app.component.ts deleted file mode 100644 index 26e956b4ce1..00000000000 --- a/aio/content/examples/what-is-angular/src/app/app.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -import {Component} from '@angular/core'; - -import {HelloWorldComponent} from './hello-world/hello-world.component'; -import {HelloWorldTemplateComponent} from './hello-world-template.component'; -import {HelloWorldNgIfComponent} from './hello-world-ngif/hello-world-ngif.component'; -import {HelloWorldDependencyInjectionComponent} from './hello-world-di/hello-world-di.component'; -import {HelloWorldInterpolationComponent} from './hello-world-interpolation/hello-world-interpolation.component'; -import {HelloWorldBindingsComponent} from './hello-world-bindings/hello-world-bindings.component'; - -@Component({ - standalone: true, - selector: 'app-root', - templateUrl: './app.component.html', - imports: [ - HelloWorldComponent, - HelloWorldTemplateComponent, - HelloWorldNgIfComponent, - HelloWorldDependencyInjectionComponent, - HelloWorldInterpolationComponent, - HelloWorldBindingsComponent, - ], -}) -export class AppComponent {} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html deleted file mode 100644 index 7528560b518..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.html +++ /dev/null @@ -1,14 +0,0 @@ - - -

    - You can set my color in the component! -

    - -

    My color is {{ fontColor }}

    diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts deleted file mode 100644 index 2ec5973d01c..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-bindings.component.ts +++ /dev/null @@ -1,17 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'hello-world-bindings', - templateUrl: './hello-world-bindings.component.html', -}) -export class HelloWorldBindingsComponent { - fontColor = 'blue'; - sayHelloId = 1; - canClick = true; - message = 'Hello, World'; - - sayMessage() { - alert(this.message); - } -} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html deleted file mode 100644 index 7412d84df74..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.html +++ /dev/null @@ -1,5 +0,0 @@ -

    Hello World: Dependency Injection

    - - - -

    Be sure to open the console to view the output!

    diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts deleted file mode 100644 index c5b7e1c13ae..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-di/hello-world-di.component.ts +++ /dev/null @@ -1,19 +0,0 @@ -import {Component} from '@angular/core'; -import {Logger} from '../logger.service'; - -@Component({ - standalone: true, - selector: 'hello-world-di', - templateUrl: './hello-world-di.component.html', - providers: [Logger], -}) -export class HelloWorldDependencyInjectionComponent { - count = 0; - - constructor(private logger: Logger) {} - - onLogMe() { - this.logger.writeCount(this.count); - this.count++; - } -} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-example.html b/aio/content/examples/what-is-angular/src/app/hello-world-example.html deleted file mode 100644 index 847ae08fa31..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-example.html +++ /dev/null @@ -1,4 +0,0 @@ - -

    Hello World

    -

    This is my first component!

    -
    \ No newline at end of file diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.html deleted file mode 100644 index 810872f7c8d..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.html +++ /dev/null @@ -1 +0,0 @@ -

    {{ message }}

    diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.ts deleted file mode 100644 index 243da0e970c..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-interpolation/hello-world-interpolation.component.ts +++ /dev/null @@ -1,10 +0,0 @@ -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'hello-world-interpolation', - templateUrl: './hello-world-interpolation.component.html', -}) -export class HelloWorldInterpolationComponent { - message = 'Hello, World!'; -} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html deleted file mode 100644 index 6bae58f3023..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.html +++ /dev/null @@ -1,13 +0,0 @@ -

    Hello World: ngIf!

    - - - -
    -

    You can edit the following paragraph.

    -
    - - -

    The following paragraph is read only. Try clicking the button!

    -
    - -

    {{ message }}

    diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts deleted file mode 100644 index 2a34b779304..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-ngif/hello-world-ngif.component.ts +++ /dev/null @@ -1,23 +0,0 @@ -// #docplaster -import {Component} from '@angular/core'; -import {NgIf} from '@angular/common'; - -@Component({ - standalone: true, - selector: 'hello-world-ngif', - templateUrl: './hello-world-ngif.component.html', - imports: [NgIf], -}) -export class HelloWorldNgIfComponent { - message = "I'm read only!"; - canEdit = false; - - onEditClick() { - this.canEdit = !this.canEdit; - if (this.canEdit) { - this.message = 'You can edit me!'; - } else { - this.message = "I'm read only!"; - } - } -} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world-template.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world-template.component.ts deleted file mode 100644 index 319febbfc17..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world-template.component.ts +++ /dev/null @@ -1,25 +0,0 @@ -// #docplaster - -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'hello-world-template', - template: ` -

    Hello World Template

    - -

    {{ message }}

    - `, -}) -export class HelloWorldTemplateComponent { - message = 'I am read only!'; - canEdit = false; - onEditClick() { - this.canEdit = !this.canEdit; - if (this.canEdit) { - this.message = 'You can edit me!'; - } else { - this.message = 'I am read only!'; - } - } -} diff --git a/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts b/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts deleted file mode 100644 index d3723e4b86d..00000000000 --- a/aio/content/examples/what-is-angular/src/app/hello-world/hello-world.component.ts +++ /dev/null @@ -1,15 +0,0 @@ -// #docplaster - -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - selector: 'hello-world', - template: ` -

    Hello World

    -

    This is my first component!

    - `, -}) -export class HelloWorldComponent { - // The code in this class drives the component's behavior. -} diff --git a/aio/content/examples/what-is-angular/src/app/logger.service.ts b/aio/content/examples/what-is-angular/src/app/logger.service.ts deleted file mode 100644 index 57e4b7eb357..00000000000 --- a/aio/content/examples/what-is-angular/src/app/logger.service.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Injectable } from '@angular/core'; - -@Injectable({providedIn: 'root'}) -export class Logger { - writeCount(count: number) { - console.warn(count); - } -} diff --git a/aio/content/examples/what-is-angular/src/index.html b/aio/content/examples/what-is-angular/src/index.html deleted file mode 100644 index 77e13e5febf..00000000000 --- a/aio/content/examples/what-is-angular/src/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - Hello World - - - - - - - - diff --git a/aio/content/examples/what-is-angular/src/main.ts b/aio/content/examples/what-is-angular/src/main.ts deleted file mode 100644 index bba4ddf9ad8..00000000000 --- a/aio/content/examples/what-is-angular/src/main.ts +++ /dev/null @@ -1,7 +0,0 @@ -import {bootstrapApplication, provideProtractorTestingSupport} from '@angular/platform-browser'; - -import {AppComponent} from './app/app.component'; - -bootstrapApplication(AppComponent, {providers: [provideProtractorTestingSupport()]}).catch((err) => - console.error(err), -); diff --git a/aio/content/examples/what-is-angular/stackblitz.json b/aio/content/examples/what-is-angular/stackblitz.json deleted file mode 100644 index 7e420f79063..00000000000 --- a/aio/content/examples/what-is-angular/stackblitz.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "description": "What is Angular?", - "files":[ - "!**/*.d.ts", - "!**/*.js" - ], - "tags":["overview", "angular"] -} diff --git a/aio/content/extended-diagnostics/NG8101.md b/aio/content/extended-diagnostics/NG8101.md deleted file mode 100644 index db8ac09271a..00000000000 --- a/aio/content/extended-diagnostics/NG8101.md +++ /dev/null @@ -1,61 +0,0 @@ -@name Invalid Banana-in-Box - -@description - -This diagnostic detects a backwards "banana-in-box" syntax for [two-way bindings](guide/two-way-binding). - - - -<div ([var])="otherVar"></div> - - - -## What's wrong with that? - -As it stands, `([var])` is actually an [event binding](guide/event-binding) with the name `[var]`. -The author likely intended this as a two-way binding to a variable named `var` but, as written, this binding has no effect. - -## What should I do instead? - -Fix the typo. -As the name suggests, the banana `(` should go *inside* the box `[]`. -In this case: - - - -<div [(var)]="otherVar"></div> - - - -## Configuration requirements - -[`strictTemplates`](guide/template-typecheck#strict-mode) must be enabled for any extended diagnostic to emit. -`invalidBananaInBox` has no additional requirements beyond `strictTemplates`. - -## What if I can't avoid this? - -This diagnostic can be disabled by editing the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - "checks": { - "invalidBananaInBox": "suppress" - } - } - } -} - - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/extended-diagnostics/NG8102.md b/aio/content/extended-diagnostics/NG8102.md deleted file mode 100644 index 7763a174839..00000000000 --- a/aio/content/extended-diagnostics/NG8102.md +++ /dev/null @@ -1,103 +0,0 @@ -@name Nullish coalescing not nullable - -@description - -This diagnostic detects a useless nullish coalescing operator \(`??`\) characters in Angular templates. -Specifically, it looks for operations where the input is not "nullable", meaning its type does not include `null` or `undefined`. -For such values, the right side of the `??` will never be used. - - - -import {Component} from '@angular/core'; - -@Component({ - // Template displays `foo` if present, falls back to 'bar' if it is `null` - // or `undefined`. - template: `
    {{ foo ?? 'bar' }}
    `, - // … -}) -class MyComponent { - // `foo` is declared as a `string` which *cannot* be `null` or `undefined`. - foo: string = 'test'; -} - -
    - -## What's wrong with that? - -Using the nullish coalescing operator with a non-nullable input has no effect and is indicative of a discrepancy between the allowed type of a value and how it is presented in the template. -A developer might reasonably assume that the right side of the nullish coalescing operator is displayed in some case, but it will never actually be displayed. -This can lead to confusion about the expected output of the program. - -## What should I do instead? - -Update the template and declared type to be in sync. -Double-check the type of the input and confirm whether it is actually expected to be nullable. - -If the input should be nullable, add `null` or `undefined` to its type to indicate this. - - - -import {Component} from '@angular/core'; - -@Component({ - template: `
    {{ foo ?? 'bar' }}
    `, - // … -}) -class MyComponent { - // `foo` is now nullable. If it is ever set to `null`, 'bar' will be displayed. - foo: string | null = 'test'; -} - -
    - -If the input should *not* be nullable, delete the `??` operator and its right operand, since the value is guaranteed by TypeScript to always be non-nullable. - - - -import {Component} from '@angular/core'; - -@Component({ - // Template always displays `foo`, which is guaranteed to never be `null` or - // `undefined`. - template: `
    {{ foo }}
    `, - // … -}) -class MyComponent { - foo: string = 'test'; -} - -
    - -## Configuration requirements - -[`strictTemplates`](guide/template-typecheck#strict-mode) must be enabled for any extended diagnostic to emit. -[`strictNullChecks`](guide/template-typecheck#strict-null-checks) must also be enabled to emit any `nullishCoalescingNotNullable` diagnostics. - -## What if I can't avoid this? - -This diagnostic can be disabled by editing the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - "checks": { - "nullishCoalescingNotNullable": "suppress" - } - } - } -} - - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/extended-diagnostics/NG8103.md b/aio/content/extended-diagnostics/NG8103.md deleted file mode 100644 index baca8abcf69..00000000000 --- a/aio/content/extended-diagnostics/NG8103.md +++ /dev/null @@ -1,84 +0,0 @@ -@name Missing control flow directive - -@description - -This diagnostics ensures that a standalone component which uses known control flow directives -(such as `*ngIf`, `*ngFor`, `*ngSwitch`) in a template, also imports those directives either -individually or by importing the `CommonModule`. Alternatively, use Angular's -built-in control flow. - - - -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - // Template uses `*ngIf`, but no corresponding directive imported. - template: `<div *ngIf="visible">Hi</div>`, - // … -}) -class MyComponent {} - - - -## How to fix the problem - -Use Angular's built-in control flow instead. - - - -import {Component} from '@angular/core'; - -@Component({ - standalone: true, - template: `@if (visible) { <div>Hi</div> }`, - // … -}) -class MyComponent {} - - - -Or make sure that a corresponding control flow directive is imported. - -A directive can be imported individually: - - - -import {Component} from '@angular/core'; -import {NgIf} from '@angular/common'; - -@Component({ - standalone: true, - imports: [NgIf], - template: `<div *ngIf="visible">Hi</div>`, - // … -}) -class MyComponent {} - - - -or you could import the entire `CommonModule`, which contains all control flow directives: - - - -import {Component} from '@angular/core'; -import {CommonModule} from '@angular/common'; - -@Component({ - standalone: true, - imports: [CommonModule], - template: `<div *ngIf="visible">Hi</div>`, - // … -}) -class MyComponent {} - - - - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/extended-diagnostics/NG8104.md b/aio/content/extended-diagnostics/NG8104.md deleted file mode 100644 index 55694c44540..00000000000 --- a/aio/content/extended-diagnostics/NG8104.md +++ /dev/null @@ -1,48 +0,0 @@ -@name Text attribute not binding - -@description - -This diagnostic ensures that attributes which have the "special" Angular binding prefix (`attr.`, `style.`, and -`class.`) are interpreted as bindings. For example, `
    ` will not -interpret this as an attribute binding to `id` but rather just a regular attribute and will appear -as-is in the final HTML (`
    `). This is likely not the intent of the developer. -Instead, the intent is likely to have the `id` be set to 'my-id' (`
    `). - -## What should I do instead? - -When binding to `attr.`, `class.`, or `style.`, ensure you use the Angular template binding syntax. - -
    -  <div [attr.id]="my-id"></div>
    -  <div [style.color]="red"></div>
    -  <div [class.blue]="true"></div>
    -
    - - -## What if I can't avoid this? - -This diagnostic can be disabled by editing the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - "checks": { - "textAttributeNotBinding": "suppress" - } - } - } -} - - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2022-11-30 diff --git a/aio/content/extended-diagnostics/NG8105.md b/aio/content/extended-diagnostics/NG8105.md deleted file mode 100644 index 80618f73571..00000000000 --- a/aio/content/extended-diagnostics/NG8105.md +++ /dev/null @@ -1,48 +0,0 @@ -@name Missing `let` keyword in an *ngFor expression - -@description - -This diagnostic is emitted when an expression used in `*ngFor` is missing the `let` keyword. - - - -import {Component} from '@angular/core'; - -@Component({ - // The `let` keyword is missing in the `*ngFor` expression. - template: `<div *ngFor="item of items">{{ item }}</div>`, - // … -}) -class MyComponent { - items = [1, 2, 3]; -} - - - -## How to resolve the problem - -Add the missing `let` keyword. - - - -import {Component} from '@angular/core'; - -@Component({ - // The `let` keyword is now present in the `*ngFor` expression, - // no diagnostic messages are emitted in this case. - template: `<div *ngFor="let item of items">{{ item }}</div>`, - // … -}) -class MyComponent { - items = [1, 2, 3]; -} - - - - - - - - - -@reviewed 2022-12-01 diff --git a/aio/content/extended-diagnostics/NG8106.md b/aio/content/extended-diagnostics/NG8106.md deleted file mode 100644 index a1b77b3ec28..00000000000 --- a/aio/content/extended-diagnostics/NG8106.md +++ /dev/null @@ -1,51 +0,0 @@ -@name Suffix not supported - -@description - -This diagnostic detects when the `.px`, `.%`, and `.em` suffixes are used with an attribute -binding. These suffixes are only available for style bindings. - - - -<div [attr.width.px]="5"></div> - - - -## What should I do instead? - -Rather than using the `.px`, `.%`, or `.em` suffixes that are only supported in style bindings, -move this to the value assignment of the binding. - - - -<div [attr.width]="'5px'"></div> - - - -## What if I can't avoid this? - -This diagnostic can be disabled by editing the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - "checks": { - "suffixNotSupported": "suppress" - } - } - } -} - - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/extended-diagnostics/NG8107.md b/aio/content/extended-diagnostics/NG8107.md deleted file mode 100644 index 5d1f706d8a6..00000000000 --- a/aio/content/extended-diagnostics/NG8107.md +++ /dev/null @@ -1,86 +0,0 @@ -@name Optional chain not nullable - -@description - -This diagnostic detects when the left side of an optional chain operation (`.?`) does not include `null` or `undefined` in its type in Angular templates. - - - -import {Component} from '@angular/core'; - -@Component({ - template: `
    {{ foo?.bar }}
    `, - // … -}) -class MyComponent { - // `foo` is declared as an object which *cannot* be `null` or `undefined`. - foo: { bar: string} = { bar: 'bar'}; -} - -
    - -## What should I do instead? - -Update the template and declared type to be in sync. Double-check the type of the input and confirm whether it is actually expected to be nullable. - -If the input should be nullable, add `null` or `undefined` to its type to indicate this. - - - -import {Component} from '@angular/core'; - -@Component({ - // If `foo` is nullish, `bar` won't be evaluated and the express will return the nullish value (`null` or `undefined`). - template: `
    {{ foo?.bar }}
    `, - // … -}) -class MyComponent { - foo: { bar: string} | null = { bar: 'bar'}; -} - -
    - -If the input should not be nullable, delete the `?` operator. - - - -import {Component} from '@angular/core'; - -@Component({ - // Template always displays `bar` as `foo` is guaranteed to never be `null` or `undefined` - template: `
    {{ foo.bar }}
    `, - // … -}) -class MyComponent { - foo: { bar: string} = { bar: 'bar'}; -} - -
    - -## What if I can't avoid this? - -This diagnostic can be disabled by editing the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - "checks": { - "optionalChainNotNullable": "suppress" - } - } - } -} - - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2023-03-02 diff --git a/aio/content/extended-diagnostics/NG8108.md b/aio/content/extended-diagnostics/NG8108.md deleted file mode 100644 index 122066378d9..00000000000 --- a/aio/content/extended-diagnostics/NG8108.md +++ /dev/null @@ -1,28 +0,0 @@ -@name ngSkipHydration should be a static attribute - -@description - -The `ngSkipHydration` is a special attribute that indicates to Angular that a particular component should be -opted-out of hydration. This diagnostic ensures that this attribute `ngSkipHydration` is set statically and the -value is either set to `"true"` or an empty value. - - -## What should I do instead? - -When using the `ngSkipHydration`, ensure that it's set as a static attribute (i.e. you do not use the Angular template binding syntax). - - -<my-cmp ngSkipHydration /> -<!-- or --> -<my-cmp ngSkipHydration="true" /> - - -See [extended diagnostic configuration](extended-diagnostics#configuration) for more info. - - - - - - - -@reviewed 2023-03-21 diff --git a/aio/content/extended-diagnostics/NG8109.md b/aio/content/extended-diagnostics/NG8109.md deleted file mode 100644 index 6fa3444af14..00000000000 --- a/aio/content/extended-diagnostics/NG8109.md +++ /dev/null @@ -1,34 +0,0 @@ -@name Signals must be invoked in template interpolations. - -@description - -Angular Signals are zero-argument functions (`() => T`). When executed, they return the current value of the signal. -This means they are meant to be invoked when used in template interpolations to render its value. - -## What should I do instead? - -When you use a signal within a template interpolation, you need to invoke it to render its value. - - - -import {Component, signal, Signal} from '@angular/core'; - -@Component({ - // … -}) -class MyComponent { - mySignal: Signal = signal(0) -} - - - - <div>{{ mySignal() }}/div> - - - - - - - - -@reviewed 2023-04-02 diff --git a/aio/content/extended-diagnostics/index.md b/aio/content/extended-diagnostics/index.md deleted file mode 100644 index e0e055c76d3..00000000000 --- a/aio/content/extended-diagnostics/index.md +++ /dev/null @@ -1,94 +0,0 @@ -# Extended Diagnostics - -There are many coding patterns that are technically valid to the compiler or runtime, but which may have complex nuances or caveats. -These patterns may not have the intended effect expected by a developer, which often leads to bugs. -The Angular compiler includes "extended diagnostics" which identify many of these patterns, in order to warn developers about the potential issues and enforce common best practices within a codebase. - -## Diagnostics - -Currently, Angular supports the following extended diagnostics: - -* [NG8101 - `invalidBananaInBox`](extended-diagnostics/NG8101) -* [NG8102 - `nullishCoalescingNotNullable`](extended-diagnostics/NG8102) -* [NG8103 - `missingControlFlowDirective`](extended-diagnostics/NG8103) -* [NG8104 - `textAttributeNotBinding`](extended-diagnostics/NG8104) -* [NG8105 - `missingNgForOfLet`](extended-diagnostics/NG8105) -* [NG8106 - `suffixNotSupported`](extended-diagnostics/NG8106) -* [NG8107 - `optionalChainNotNullable`](extended-diagnostics/NG8107) -* [NG8108 - `skipHydrationNotStatic`](extended-diagnostics/NG8108) -* [NG8109 - `interpolatedSignalNotInvoked`](extended-diagnostics/NG8109) - -## Configuration - -Extended diagnostics are warnings by default and do not block compilation. -Each diagnostic can be configured as either: - -* `warning` \(default\) - The compiler emits the diagnostic as a warning but does not block - compilation. The compiler will still exit with status code 0, even if warnings are emitted. -* `error` - The compiler emits the diagnostic as an error and fails the compilation. - The compiler will exit with a non-zero status code if one or more errors are emitted. -* `suppress` - The compiler does *not* emit the diagnostic at all. - -Check severity can be configured in the project's `tsconfig.json` file: - - - -{ - "angularCompilerOptions": { - "extendedDiagnostics": { - // The categories to use for specific diagnostics. - "checks": { - // Maps check name to its category. - "invalidBananaInBox": "suppress" - }, - - // The category to use for any diagnostics not listed in `checks` above. - "defaultCategory": "error" - } - } -} - - - -The `checks` field maps the name of individual diagnostics to their associated category. -See [Diagnostics](#diagnostics) for a complete list of extended diagnostics and the name to use for configuring them. - -The `defaultCategory` field is used for any diagnostics that are not explicitly listed under `checks`. -If not set, such diagnostics will be treated as `warning`. - -Extended diagnostics will emit when [`strictTemplates`](guide/template-typecheck#strict-mode) is enabled. -This is required to allow the compiler to better understand Angular template types and provide accurate and meaningful diagnostics. - -## Semantic Versioning - -The Angular team intends to add or enable new extended diagnostics in **minor** versions of Angular (see [semver](https://docs.npmjs.com/about-semantic-versioning)). -This means that upgrading Angular may show new warnings in your existing codebase. -This enables the team to deliver features more quickly and to make extended diagnostics more accessible to developers. - -However, setting `"defaultCategory": "error"` will promote such warnings to hard errors. -This can cause a minor version upgrade to introduce compilation errors, which may be seen as a semver non-compliant breaking change. -Any new diagnostics can be suppressed or demoted to warnings via the above [configuration](#configuration), so the impact of a new diagnostic should be minimal to -projects that treat extended diagnostics as errors by default. -Defaulting to error is a very powerful tool; just be aware of this semver caveat when deciding if `error` is the right default for your project. - -## New Diagnostics - -The Angular team is always open to suggestions about new diagnostics that could be added. -Extended diagnostics should generally: - -* Detect a common, non-obvious developer mistake with Angular templates -* Clearly articulate why this pattern can lead to bugs or unintended behavior -* Suggest one or more clear solutions -* Have a low, preferably zero, false-positive rate -* Apply to the vast majority of Angular applications \(not specific to an unofficial library\) -* Improve program correctness or performance \(not style, that responsibility falls to a linter\) - -If you have an idea for a compiler check which fits these criteria, consider filing a [feature request](https://github.com/angular/angular/issues/new?template=2-feature-request.yaml). - - - - - - - -@reviewed 2022-02-28 diff --git a/aio/content/file-not-found.md b/aio/content/file-not-found.md deleted file mode 100644 index 17b9f5e7f9d..00000000000 --- a/aio/content/file-not-found.md +++ /dev/null @@ -1,12 +0,0 @@ -
    -
    - Not found -
    -

    Page Not Found

    -

    We're sorry. The page you are looking for cannot be found.

    -
    -
    - -
    - -@reviewed 2023-08-20 diff --git a/aio/content/images/bios/CaerusKaru.jpg b/aio/content/images/bios/CaerusKaru.jpg deleted file mode 100644 index 0594528ac1f..00000000000 Binary files a/aio/content/images/bios/CaerusKaru.jpg and /dev/null differ diff --git a/aio/content/images/bios/JiaLiPassion.jpg b/aio/content/images/bios/JiaLiPassion.jpg deleted file mode 100644 index 6bba1283f83..00000000000 Binary files a/aio/content/images/bios/JiaLiPassion.jpg and /dev/null differ diff --git a/aio/content/images/bios/MainaWycliffe.jpg b/aio/content/images/bios/MainaWycliffe.jpg deleted file mode 100644 index b389821e087..00000000000 Binary files a/aio/content/images/bios/MainaWycliffe.jpg and /dev/null differ diff --git a/aio/content/images/bios/ahasall.jpg b/aio/content/images/bios/ahasall.jpg deleted file mode 100644 index 6c8d5927e67..00000000000 Binary files a/aio/content/images/bios/ahasall.jpg and /dev/null differ diff --git a/aio/content/images/bios/ahsanayaz.jpg b/aio/content/images/bios/ahsanayaz.jpg deleted file mode 100644 index e2798a1d39b..00000000000 Binary files a/aio/content/images/bios/ahsanayaz.jpg and /dev/null differ diff --git a/aio/content/images/bios/ajitsinghkaler.jpg b/aio/content/images/bios/ajitsinghkaler.jpg deleted file mode 100644 index 745b1c2837d..00000000000 Binary files a/aio/content/images/bios/ajitsinghkaler.jpg and /dev/null differ diff --git a/aio/content/images/bios/alainchautard.png b/aio/content/images/bios/alainchautard.png deleted file mode 100644 index d31c5ffe4a3..00000000000 Binary files a/aio/content/images/bios/alainchautard.png and /dev/null differ diff --git a/aio/content/images/bios/alan-agius4.jpg b/aio/content/images/bios/alan-agius4.jpg deleted file mode 100644 index e3111a6123b..00000000000 Binary files a/aio/content/images/bios/alan-agius4.jpg and /dev/null differ diff --git a/aio/content/images/bios/alejandrocuba.jpg b/aio/content/images/bios/alejandrocuba.jpg deleted file mode 100755 index b8caf31df64..00000000000 Binary files a/aio/content/images/bios/alejandrocuba.jpg and /dev/null differ diff --git a/aio/content/images/bios/alex-rickabaugh.jpg b/aio/content/images/bios/alex-rickabaugh.jpg deleted file mode 100644 index ec22c6aa227..00000000000 Binary files a/aio/content/images/bios/alex-rickabaugh.jpg and /dev/null differ diff --git a/aio/content/images/bios/alisaduncan.jpg b/aio/content/images/bios/alisaduncan.jpg deleted file mode 100644 index daa24402b85..00000000000 Binary files a/aio/content/images/bios/alisaduncan.jpg and /dev/null differ diff --git a/aio/content/images/bios/alvarocamillont.png b/aio/content/images/bios/alvarocamillont.png deleted file mode 100644 index 0ce71cad9ac..00000000000 Binary files a/aio/content/images/bios/alvarocamillont.png and /dev/null differ diff --git a/aio/content/images/bios/alyssa.jpg b/aio/content/images/bios/alyssa.jpg deleted file mode 100644 index a07106314ca..00000000000 Binary files a/aio/content/images/bios/alyssa.jpg and /dev/null differ diff --git a/aio/content/images/bios/andrew-kushnir.jpg b/aio/content/images/bios/andrew-kushnir.jpg deleted file mode 100644 index 202c71f6b76..00000000000 Binary files a/aio/content/images/bios/andrew-kushnir.jpg and /dev/null differ diff --git a/aio/content/images/bios/andrewscott.jpg b/aio/content/images/bios/andrewscott.jpg deleted file mode 100644 index 9beca22f440..00000000000 Binary files a/aio/content/images/bios/andrewscott.jpg and /dev/null differ diff --git a/aio/content/images/bios/andrewseguin.jpg b/aio/content/images/bios/andrewseguin.jpg deleted file mode 100755 index 642a8437ef9..00000000000 Binary files a/aio/content/images/bios/andrewseguin.jpg and /dev/null differ diff --git a/aio/content/images/bios/angom.jpg b/aio/content/images/bios/angom.jpg deleted file mode 100644 index b852daf732f..00000000000 Binary files a/aio/content/images/bios/angom.jpg and /dev/null differ diff --git a/aio/content/images/bios/ankit-sharma.jpg b/aio/content/images/bios/ankit-sharma.jpg deleted file mode 100644 index 0aeeb469d57..00000000000 Binary files a/aio/content/images/bios/ankit-sharma.jpg and /dev/null differ diff --git a/aio/content/images/bios/ankita.jpg b/aio/content/images/bios/ankita.jpg deleted file mode 100644 index eb8c6bc6960..00000000000 Binary files a/aio/content/images/bios/ankita.jpg and /dev/null differ diff --git a/aio/content/images/bios/antonio-cardenas.jpg b/aio/content/images/bios/antonio-cardenas.jpg deleted file mode 100644 index 993610a3d0e..00000000000 Binary files a/aio/content/images/bios/antonio-cardenas.jpg and /dev/null differ diff --git a/aio/content/images/bios/aristeidis.jpg b/aio/content/images/bios/aristeidis.jpg deleted file mode 100644 index 59225e3aaa0..00000000000 Binary files a/aio/content/images/bios/aristeidis.jpg and /dev/null differ diff --git a/aio/content/images/bios/armen-vardanyan.jpg b/aio/content/images/bios/armen-vardanyan.jpg deleted file mode 100644 index d26f0260bc8..00000000000 Binary files a/aio/content/images/bios/armen-vardanyan.jpg and /dev/null differ diff --git a/aio/content/images/bios/artur-androsovych.jpg b/aio/content/images/bios/artur-androsovych.jpg deleted file mode 100644 index d81258d29c2..00000000000 Binary files a/aio/content/images/bios/artur-androsovych.jpg and /dev/null differ diff --git a/aio/content/images/bios/balram_chavan.jpg b/aio/content/images/bios/balram_chavan.jpg deleted file mode 100644 index d10fbe0db8f..00000000000 Binary files a/aio/content/images/bios/balram_chavan.jpg and /dev/null differ diff --git a/aio/content/images/bios/bezael_perez.jpg b/aio/content/images/bios/bezael_perez.jpg deleted file mode 100644 index 3cf8f2fecf4..00000000000 Binary files a/aio/content/images/bios/bezael_perez.jpg and /dev/null differ diff --git a/aio/content/images/bios/bonnie.jpg b/aio/content/images/bios/bonnie.jpg deleted file mode 100644 index fbbc3d1358c..00000000000 Binary files a/aio/content/images/bios/bonnie.jpg and /dev/null differ diff --git a/aio/content/images/bios/bravery_pic.png b/aio/content/images/bios/bravery_pic.png deleted file mode 100644 index 53362ca7ee2..00000000000 Binary files a/aio/content/images/bios/bravery_pic.png and /dev/null differ diff --git a/aio/content/images/bios/brian-love.jpg b/aio/content/images/bios/brian-love.jpg deleted file mode 100644 index c2309090734..00000000000 Binary files a/aio/content/images/bios/brian-love.jpg and /dev/null differ diff --git a/aio/content/images/bios/carloscaballero.jpg b/aio/content/images/bios/carloscaballero.jpg deleted file mode 100644 index f9cbaa0c6c1..00000000000 Binary files a/aio/content/images/bios/carloscaballero.jpg and /dev/null differ diff --git a/aio/content/images/bios/cexbrayat.jpg b/aio/content/images/bios/cexbrayat.jpg deleted file mode 100644 index 2f82d8d51c3..00000000000 Binary files a/aio/content/images/bios/cexbrayat.jpg and /dev/null differ diff --git a/aio/content/images/bios/chrisnoring.jpg b/aio/content/images/bios/chrisnoring.jpg deleted file mode 100755 index 2aa6d12bc14..00000000000 Binary files a/aio/content/images/bios/chrisnoring.jpg and /dev/null differ diff --git a/aio/content/images/bios/christianliebel.jpg b/aio/content/images/bios/christianliebel.jpg deleted file mode 100644 index 5afb9c8fdd9..00000000000 Binary files a/aio/content/images/bios/christianliebel.jpg and /dev/null differ diff --git a/aio/content/images/bios/christianweyer.jpg b/aio/content/images/bios/christianweyer.jpg deleted file mode 100755 index 6800b072731..00000000000 Binary files a/aio/content/images/bios/christianweyer.jpg and /dev/null differ diff --git a/aio/content/images/bios/cironunes.jpg b/aio/content/images/bios/cironunes.jpg deleted file mode 100755 index 90d32280041..00000000000 Binary files a/aio/content/images/bios/cironunes.jpg and /dev/null differ diff --git a/aio/content/images/bios/clydin.jpg b/aio/content/images/bios/clydin.jpg deleted file mode 100644 index c38da1e8843..00000000000 Binary files a/aio/content/images/bios/clydin.jpg and /dev/null differ diff --git a/aio/content/images/bios/connieleung.jpg b/aio/content/images/bios/connieleung.jpg deleted file mode 100644 index 755c24a67e5..00000000000 Binary files a/aio/content/images/bios/connieleung.jpg and /dev/null differ diff --git a/aio/content/images/bios/cory-rylan.jpg b/aio/content/images/bios/cory-rylan.jpg deleted file mode 100644 index c9410f3241b..00000000000 Binary files a/aio/content/images/bios/cory-rylan.jpg and /dev/null differ diff --git a/aio/content/images/bios/craig-spence.jpg b/aio/content/images/bios/craig-spence.jpg deleted file mode 100644 index 25a8d321962..00000000000 Binary files a/aio/content/images/bios/craig-spence.jpg and /dev/null differ diff --git a/aio/content/images/bios/crisbeto.jpg b/aio/content/images/bios/crisbeto.jpg deleted file mode 100644 index 469c794f244..00000000000 Binary files a/aio/content/images/bios/crisbeto.jpg and /dev/null differ diff --git a/aio/content/images/bios/danwahlin.jpg b/aio/content/images/bios/danwahlin.jpg deleted file mode 100755 index ae3d7c23fa4..00000000000 Binary files a/aio/content/images/bios/danwahlin.jpg and /dev/null differ diff --git a/aio/content/images/bios/danyparedes.jpg b/aio/content/images/bios/danyparedes.jpg deleted file mode 100644 index 18d73653303..00000000000 Binary files a/aio/content/images/bios/danyparedes.jpg and /dev/null differ diff --git a/aio/content/images/bios/deborah.jpg b/aio/content/images/bios/deborah.jpg deleted file mode 100755 index f09fa3f8609..00000000000 Binary files a/aio/content/images/bios/deborah.jpg and /dev/null differ diff --git a/aio/content/images/bios/devversion.jpg b/aio/content/images/bios/devversion.jpg deleted file mode 100644 index 0f19a870854..00000000000 Binary files a/aio/content/images/bios/devversion.jpg and /dev/null differ diff --git a/aio/content/images/bios/dgp1130.jpg b/aio/content/images/bios/dgp1130.jpg deleted file mode 100644 index 9e9ce20adc2..00000000000 Binary files a/aio/content/images/bios/dgp1130.jpg and /dev/null differ diff --git a/aio/content/images/bios/dmytro-mezhenskyi.jpg b/aio/content/images/bios/dmytro-mezhenskyi.jpg deleted file mode 100644 index 0e973154c3f..00000000000 Binary files a/aio/content/images/bios/dmytro-mezhenskyi.jpg and /dev/null differ diff --git a/aio/content/images/bios/doguhan.jpg b/aio/content/images/bios/doguhan.jpg deleted file mode 100644 index 574057c6c72..00000000000 Binary files a/aio/content/images/bios/doguhan.jpg and /dev/null differ diff --git a/aio/content/images/bios/dylan-hunn.jpg b/aio/content/images/bios/dylan-hunn.jpg deleted file mode 100644 index fd3fc5ad027..00000000000 Binary files a/aio/content/images/bios/dylan-hunn.jpg and /dev/null differ diff --git a/aio/content/images/bios/eladbezalel.jpg b/aio/content/images/bios/eladbezalel.jpg deleted file mode 100644 index 87eb09fda9b..00000000000 Binary files a/aio/content/images/bios/eladbezalel.jpg and /dev/null differ diff --git a/aio/content/images/bios/eliraneliassy.jpg b/aio/content/images/bios/eliraneliassy.jpg deleted file mode 100644 index 5fbfde25470..00000000000 Binary files a/aio/content/images/bios/eliraneliassy.jpg and /dev/null differ diff --git a/aio/content/images/bios/eneajahollari.jpeg b/aio/content/images/bios/eneajahollari.jpeg deleted file mode 100644 index 090cdc9a2f0..00000000000 Binary files a/aio/content/images/bios/eneajahollari.jpeg and /dev/null differ diff --git a/aio/content/images/bios/fabiangosebrink.jpg b/aio/content/images/bios/fabiangosebrink.jpg deleted file mode 100644 index 288125465f9..00000000000 Binary files a/aio/content/images/bios/fabiangosebrink.jpg and /dev/null differ diff --git a/aio/content/images/bios/famzil.jpg b/aio/content/images/bios/famzil.jpg deleted file mode 100644 index 0b194194ead..00000000000 Binary files a/aio/content/images/bios/famzil.jpg and /dev/null differ diff --git a/aio/content/images/bios/fmalcher.jpg b/aio/content/images/bios/fmalcher.jpg deleted file mode 100755 index 8c12213cdca..00000000000 Binary files a/aio/content/images/bios/fmalcher.jpg and /dev/null differ diff --git a/aio/content/images/bios/gerardsans.jpg b/aio/content/images/bios/gerardsans.jpg deleted file mode 100644 index ae93796f793..00000000000 Binary files a/aio/content/images/bios/gerardsans.jpg and /dev/null differ diff --git a/aio/content/images/bios/gkalpak.jpg b/aio/content/images/bios/gkalpak.jpg deleted file mode 100644 index 5c6465f681d..00000000000 Binary files a/aio/content/images/bios/gkalpak.jpg and /dev/null differ diff --git a/aio/content/images/bios/hafiz.jpg b/aio/content/images/bios/hafiz.jpg deleted file mode 100644 index 8dc44488460..00000000000 Binary files a/aio/content/images/bios/hafiz.jpg and /dev/null differ diff --git a/aio/content/images/bios/jasonwarner.jpg b/aio/content/images/bios/jasonwarner.jpg deleted file mode 100644 index c0eee6989ce..00000000000 Binary files a/aio/content/images/bios/jasonwarner.jpg and /dev/null differ diff --git a/aio/content/images/bios/jaybell.jpg b/aio/content/images/bios/jaybell.jpg deleted file mode 100644 index 9b977b30751..00000000000 Binary files a/aio/content/images/bios/jaybell.jpg and /dev/null differ diff --git a/aio/content/images/bios/jbedard.jpg b/aio/content/images/bios/jbedard.jpg deleted file mode 100644 index d6b83f8aa5e..00000000000 Binary files a/aio/content/images/bios/jbedard.jpg and /dev/null differ diff --git a/aio/content/images/bios/jeanmeche.jpg b/aio/content/images/bios/jeanmeche.jpg deleted file mode 100644 index 2fdd03a5bd0..00000000000 Binary files a/aio/content/images/bios/jeanmeche.jpg and /dev/null differ diff --git a/aio/content/images/bios/jecelynyeen.jpg b/aio/content/images/bios/jecelynyeen.jpg deleted file mode 100755 index 95f8d4158e4..00000000000 Binary files a/aio/content/images/bios/jecelynyeen.jpg and /dev/null differ diff --git a/aio/content/images/bios/jeffwhelpley.jpg b/aio/content/images/bios/jeffwhelpley.jpg deleted file mode 100755 index 44f6f4072e0..00000000000 Binary files a/aio/content/images/bios/jeffwhelpley.jpg and /dev/null differ diff --git a/aio/content/images/bios/jelbourn.jpg b/aio/content/images/bios/jelbourn.jpg deleted file mode 100644 index 0ffdbfe7a2f..00000000000 Binary files a/aio/content/images/bios/jelbourn.jpg and /dev/null differ diff --git a/aio/content/images/bios/jeremywilken.jpg b/aio/content/images/bios/jeremywilken.jpg deleted file mode 100755 index a47082fd1a4..00000000000 Binary files a/aio/content/images/bios/jeremywilken.jpg and /dev/null differ diff --git a/aio/content/images/bios/jessicajaniuk.jpg b/aio/content/images/bios/jessicajaniuk.jpg deleted file mode 100644 index f8600cf28a7..00000000000 Binary files a/aio/content/images/bios/jessicajaniuk.jpg and /dev/null differ diff --git a/aio/content/images/bios/joeeames.jpg b/aio/content/images/bios/joeeames.jpg deleted file mode 100755 index f4758861f31..00000000000 Binary files a/aio/content/images/bios/joeeames.jpg and /dev/null differ diff --git a/aio/content/images/bios/johanneshoppe.jpg b/aio/content/images/bios/johanneshoppe.jpg deleted file mode 100755 index 83ec2461c96..00000000000 Binary files a/aio/content/images/bios/johanneshoppe.jpg and /dev/null differ diff --git a/aio/content/images/bios/joostk.jpg b/aio/content/images/bios/joostk.jpg deleted file mode 100644 index ba9e12b4eed..00000000000 Binary files a/aio/content/images/bios/joostk.jpg and /dev/null differ diff --git a/aio/content/images/bios/jordanpowell.jpg b/aio/content/images/bios/jordanpowell.jpg deleted file mode 100644 index cc830cb4909..00000000000 Binary files a/aio/content/images/bios/jordanpowell.jpg and /dev/null differ diff --git a/aio/content/images/bios/jorgeucano.jpg b/aio/content/images/bios/jorgeucano.jpg deleted file mode 100755 index b9a760b2129..00000000000 Binary files a/aio/content/images/bios/jorgeucano.jpg and /dev/null differ diff --git a/aio/content/images/bios/josephmmartin.jpg b/aio/content/images/bios/josephmmartin.jpg deleted file mode 100644 index 714fa04670a..00000000000 Binary files a/aio/content/images/bios/josephmmartin.jpg and /dev/null differ diff --git a/aio/content/images/bios/josephperrott.jpeg b/aio/content/images/bios/josephperrott.jpeg deleted file mode 100644 index 8113ef631b4..00000000000 Binary files a/aio/content/images/bios/josephperrott.jpeg and /dev/null differ diff --git a/aio/content/images/bios/joshuamorony.jpg b/aio/content/images/bios/joshuamorony.jpg deleted file mode 100644 index 4fa806c3fe7..00000000000 Binary files a/aio/content/images/bios/joshuamorony.jpg and /dev/null differ diff --git a/aio/content/images/bios/josue.jpg b/aio/content/images/bios/josue.jpg deleted file mode 100755 index 99a2f87f389..00000000000 Binary files a/aio/content/images/bios/josue.jpg and /dev/null differ diff --git a/aio/content/images/bios/juristr.jpg b/aio/content/images/bios/juristr.jpg deleted file mode 100644 index 43a6e363a82..00000000000 Binary files a/aio/content/images/bios/juristr.jpg and /dev/null differ diff --git a/aio/content/images/bios/justinschwartzenberger.jpg b/aio/content/images/bios/justinschwartzenberger.jpg deleted file mode 100644 index 1ca71752905..00000000000 Binary files a/aio/content/images/bios/justinschwartzenberger.jpg and /dev/null differ diff --git a/aio/content/images/bios/kamilmysliwiec.jpg b/aio/content/images/bios/kamilmysliwiec.jpg deleted file mode 100644 index 5fcb7890f21..00000000000 Binary files a/aio/content/images/bios/kamilmysliwiec.jpg and /dev/null differ diff --git a/aio/content/images/bios/katerina.jpg b/aio/content/images/bios/katerina.jpg deleted file mode 100644 index 6f8387d6284..00000000000 Binary files a/aio/content/images/bios/katerina.jpg and /dev/null differ diff --git a/aio/content/images/bios/keilla.jpg b/aio/content/images/bios/keilla.jpg deleted file mode 100644 index a12eb641152..00000000000 Binary files a/aio/content/images/bios/keilla.jpg and /dev/null differ diff --git a/aio/content/images/bios/kevin-kreuzer.jpg b/aio/content/images/bios/kevin-kreuzer.jpg deleted file mode 100644 index 8fcc153eef2..00000000000 Binary files a/aio/content/images/bios/kevin-kreuzer.jpg and /dev/null differ diff --git a/aio/content/images/bios/kevindavila.jpg b/aio/content/images/bios/kevindavila.jpg deleted file mode 100644 index 9abb1d45781..00000000000 Binary files a/aio/content/images/bios/kevindavila.jpg and /dev/null differ diff --git a/aio/content/images/bios/kevinyang.jpg b/aio/content/images/bios/kevinyang.jpg deleted file mode 100644 index 905e9b8962f..00000000000 Binary files a/aio/content/images/bios/kevinyang.jpg and /dev/null differ diff --git a/aio/content/images/bios/kimmaida.jpg b/aio/content/images/bios/kimmaida.jpg deleted file mode 100644 index 915fa21cc52..00000000000 Binary files a/aio/content/images/bios/kimmaida.jpg and /dev/null differ diff --git a/aio/content/images/bios/korneeva.jpg b/aio/content/images/bios/korneeva.jpg deleted file mode 100644 index 667b546a950..00000000000 Binary files a/aio/content/images/bios/korneeva.jpg and /dev/null differ diff --git a/aio/content/images/bios/kwintenpisman.jpg b/aio/content/images/bios/kwintenpisman.jpg deleted file mode 100644 index e5e199040ea..00000000000 Binary files a/aio/content/images/bios/kwintenpisman.jpg and /dev/null differ diff --git a/aio/content/images/bios/lacolaco.jpg b/aio/content/images/bios/lacolaco.jpg deleted file mode 100644 index 6312717dea5..00000000000 Binary files a/aio/content/images/bios/lacolaco.jpg and /dev/null differ diff --git a/aio/content/images/bios/laranewsom.jpg b/aio/content/images/bios/laranewsom.jpg deleted file mode 100644 index cdac556deea..00000000000 Binary files a/aio/content/images/bios/laranewsom.jpg and /dev/null differ diff --git a/aio/content/images/bios/leonardo.jpg b/aio/content/images/bios/leonardo.jpg deleted file mode 100644 index 96432dbd912..00000000000 Binary files a/aio/content/images/bios/leonardo.jpg and /dev/null differ diff --git a/aio/content/images/bios/luixaviles.jpg b/aio/content/images/bios/luixaviles.jpg deleted file mode 100644 index 284873cd385..00000000000 Binary files a/aio/content/images/bios/luixaviles.jpg and /dev/null differ diff --git a/aio/content/images/bios/lukas.jpg b/aio/content/images/bios/lukas.jpg deleted file mode 100755 index 4d0ff1abd1c..00000000000 Binary files a/aio/content/images/bios/lukas.jpg and /dev/null differ diff --git a/aio/content/images/bios/madleinas.jpg b/aio/content/images/bios/madleinas.jpg deleted file mode 100644 index 8c0fa46daed..00000000000 Binary files a/aio/content/images/bios/madleinas.jpg and /dev/null differ diff --git a/aio/content/images/bios/marko.jpg b/aio/content/images/bios/marko.jpg deleted file mode 100644 index 5cfe4fc5dcb..00000000000 Binary files a/aio/content/images/bios/marko.jpg and /dev/null differ diff --git a/aio/content/images/bios/martinakraus.jpg b/aio/content/images/bios/martinakraus.jpg deleted file mode 100644 index 34c1339215d..00000000000 Binary files a/aio/content/images/bios/martinakraus.jpg and /dev/null differ diff --git a/aio/content/images/bios/mashhood.jpg b/aio/content/images/bios/mashhood.jpg deleted file mode 100644 index 0ce1a828b4f..00000000000 Binary files a/aio/content/images/bios/mashhood.jpg and /dev/null differ diff --git a/aio/content/images/bios/maximsalnikov.jpg b/aio/content/images/bios/maximsalnikov.jpg deleted file mode 100755 index 8ed64f9cc7d..00000000000 Binary files a/aio/content/images/bios/maximsalnikov.jpg and /dev/null differ diff --git a/aio/content/images/bios/mhartington.png b/aio/content/images/bios/mhartington.png deleted file mode 100644 index 07007b469d9..00000000000 Binary files a/aio/content/images/bios/mhartington.png and /dev/null differ diff --git a/aio/content/images/bios/michael-hladky.jpg b/aio/content/images/bios/michael-hladky.jpg deleted file mode 100644 index 8ff1fb09415..00000000000 Binary files a/aio/content/images/bios/michael-hladky.jpg and /dev/null differ diff --git a/aio/content/images/bios/michaelprentice.jpg b/aio/content/images/bios/michaelprentice.jpg deleted file mode 100755 index 337b33a06c9..00000000000 Binary files a/aio/content/images/bios/michaelprentice.jpg and /dev/null differ diff --git a/aio/content/images/bios/mike-brocchi.jpg b/aio/content/images/bios/mike-brocchi.jpg deleted file mode 100755 index 773fe3ee5aa..00000000000 Binary files a/aio/content/images/bios/mike-brocchi.jpg and /dev/null differ diff --git a/aio/content/images/bios/minko.jpg b/aio/content/images/bios/minko.jpg deleted file mode 100755 index 5997c18af13..00000000000 Binary files a/aio/content/images/bios/minko.jpg and /dev/null differ diff --git a/aio/content/images/bios/mira.jpg b/aio/content/images/bios/mira.jpg deleted file mode 100644 index c4fafe69f29..00000000000 Binary files a/aio/content/images/bios/mira.jpg and /dev/null differ diff --git a/aio/content/images/bios/mmalerba.jpg b/aio/content/images/bios/mmalerba.jpg deleted file mode 100644 index efd1d185ef1..00000000000 Binary files a/aio/content/images/bios/mmalerba.jpg and /dev/null differ diff --git a/aio/content/images/bios/nartc.jpg b/aio/content/images/bios/nartc.jpg deleted file mode 100644 index 58f3998e4d2..00000000000 Binary files a/aio/content/images/bios/nartc.jpg and /dev/null differ diff --git a/aio/content/images/bios/natalia_venditto.jpg b/aio/content/images/bios/natalia_venditto.jpg deleted file mode 100644 index 41250f2ffab..00000000000 Binary files a/aio/content/images/bios/natalia_venditto.jpg and /dev/null differ diff --git a/aio/content/images/bios/nicobytes.jpg b/aio/content/images/bios/nicobytes.jpg deleted file mode 100644 index bcd830f8766..00000000000 Binary files a/aio/content/images/bios/nicobytes.jpg and /dev/null differ diff --git a/aio/content/images/bios/nicolasfrizzarin.jpeg b/aio/content/images/bios/nicolasfrizzarin.jpeg deleted file mode 100644 index 7948b73504d..00000000000 Binary files a/aio/content/images/bios/nicolasfrizzarin.jpeg and /dev/null differ diff --git a/aio/content/images/bios/nirkaufman.jpg b/aio/content/images/bios/nirkaufman.jpg deleted file mode 100644 index d1a0c19ebb8..00000000000 Binary files a/aio/content/images/bios/nirkaufman.jpg and /dev/null differ diff --git a/aio/content/images/bios/nishugoel.jpg b/aio/content/images/bios/nishugoel.jpg deleted file mode 100644 index beaef8da956..00000000000 Binary files a/aio/content/images/bios/nishugoel.jpg and /dev/null differ diff --git a/aio/content/images/bios/pascalprecht.jpg b/aio/content/images/bios/pascalprecht.jpg deleted file mode 100755 index 0db15223aed..00000000000 Binary files a/aio/content/images/bios/pascalprecht.jpg and /dev/null differ diff --git a/aio/content/images/bios/patovargas.png b/aio/content/images/bios/patovargas.png deleted file mode 100644 index 8b74d3821ad..00000000000 Binary files a/aio/content/images/bios/patovargas.png and /dev/null differ diff --git a/aio/content/images/bios/pawel.jpg b/aio/content/images/bios/pawel.jpg deleted file mode 100644 index 70322553c84..00000000000 Binary files a/aio/content/images/bios/pawel.jpg and /dev/null differ diff --git a/aio/content/images/bios/prestonjlamb.png b/aio/content/images/bios/prestonjlamb.png deleted file mode 100644 index 67fac2d95f7..00000000000 Binary files a/aio/content/images/bios/prestonjlamb.png and /dev/null differ diff --git a/aio/content/images/bios/profanis.jpg b/aio/content/images/bios/profanis.jpg deleted file mode 100644 index 1d2746b3a37..00000000000 Binary files a/aio/content/images/bios/profanis.jpg and /dev/null differ diff --git a/aio/content/images/bios/ralph.jpg b/aio/content/images/bios/ralph.jpg deleted file mode 100644 index 911ea5505b0..00000000000 Binary files a/aio/content/images/bios/ralph.jpg and /dev/null differ diff --git a/aio/content/images/bios/raul.jpg b/aio/content/images/bios/raul.jpg deleted file mode 100644 index b1133dfee9c..00000000000 Binary files a/aio/content/images/bios/raul.jpg and /dev/null differ diff --git a/aio/content/images/bios/ricardo-chavarria.jpg b/aio/content/images/bios/ricardo-chavarria.jpg deleted file mode 100644 index 3d04bd40325..00000000000 Binary files a/aio/content/images/bios/ricardo-chavarria.jpg and /dev/null differ diff --git a/aio/content/images/bios/sajee.jpg b/aio/content/images/bios/sajee.jpg deleted file mode 100644 index f2ed15cd239..00000000000 Binary files a/aio/content/images/bios/sajee.jpg and /dev/null differ diff --git a/aio/content/images/bios/samjulien.jpg b/aio/content/images/bios/samjulien.jpg deleted file mode 100644 index 274e4514ae6..00000000000 Binary files a/aio/content/images/bios/samjulien.jpg and /dev/null differ diff --git a/aio/content/images/bios/samvloeberghs.jpg b/aio/content/images/bios/samvloeberghs.jpg deleted file mode 100644 index b88025ebfb5..00000000000 Binary files a/aio/content/images/bios/samvloeberghs.jpg and /dev/null differ diff --git a/aio/content/images/bios/sanderelias.jpg b/aio/content/images/bios/sanderelias.jpg deleted file mode 100755 index a5be9b02a6d..00000000000 Binary files a/aio/content/images/bios/sanderelias.jpg and /dev/null differ diff --git a/aio/content/images/bios/santoshyadav.jpg b/aio/content/images/bios/santoshyadav.jpg deleted file mode 100644 index 0b24bcf7ce9..00000000000 Binary files a/aio/content/images/bios/santoshyadav.jpg and /dev/null differ diff --git a/aio/content/images/bios/sedov.jpg b/aio/content/images/bios/sedov.jpg deleted file mode 100644 index 3827965753d..00000000000 Binary files a/aio/content/images/bios/sedov.jpg and /dev/null differ diff --git a/aio/content/images/bios/selin.jpeg b/aio/content/images/bios/selin.jpeg deleted file mode 100644 index aaead4a6d14..00000000000 Binary files a/aio/content/images/bios/selin.jpeg and /dev/null differ diff --git a/aio/content/images/bios/shaireznik.jpg b/aio/content/images/bios/shaireznik.jpg deleted file mode 100755 index 442a53d0966..00000000000 Binary files a/aio/content/images/bios/shaireznik.jpg and /dev/null differ diff --git a/aio/content/images/bios/sharon.jpg b/aio/content/images/bios/sharon.jpg deleted file mode 100644 index f7ccf577ca2..00000000000 Binary files a/aio/content/images/bios/sharon.jpg and /dev/null differ diff --git a/aio/content/images/bios/sidd-ajmera.jpg b/aio/content/images/bios/sidd-ajmera.jpg deleted file mode 100644 index d9e5ff34c4a..00000000000 Binary files a/aio/content/images/bios/sidd-ajmera.jpg and /dev/null differ diff --git a/aio/content/images/bios/simonacotin.jpg b/aio/content/images/bios/simonacotin.jpg deleted file mode 100644 index 37527113442..00000000000 Binary files a/aio/content/images/bios/simonacotin.jpg and /dev/null differ diff --git a/aio/content/images/bios/sonukapoor.jpg b/aio/content/images/bios/sonukapoor.jpg deleted file mode 100644 index 88f6cca1fcf..00000000000 Binary files a/aio/content/images/bios/sonukapoor.jpg and /dev/null differ diff --git a/aio/content/images/bios/srashti_jain.jpg b/aio/content/images/bios/srashti_jain.jpg deleted file mode 100644 index a3fa9c98e4b..00000000000 Binary files a/aio/content/images/bios/srashti_jain.jpg and /dev/null differ diff --git a/aio/content/images/bios/stevermeister.jpg b/aio/content/images/bios/stevermeister.jpg deleted file mode 100644 index d98599419ef..00000000000 Binary files a/aio/content/images/bios/stevermeister.jpg and /dev/null differ diff --git a/aio/content/images/bios/steyer.jpg b/aio/content/images/bios/steyer.jpg deleted file mode 100755 index 56ede168c2a..00000000000 Binary files a/aio/content/images/bios/steyer.jpg and /dev/null differ diff --git a/aio/content/images/bios/teriglover.png b/aio/content/images/bios/teriglover.png deleted file mode 100644 index bf23858ccab..00000000000 Binary files a/aio/content/images/bios/teriglover.png and /dev/null differ diff --git a/aio/content/images/bios/thekiba.jpg b/aio/content/images/bios/thekiba.jpg deleted file mode 100644 index 0edab3bff9f..00000000000 Binary files a/aio/content/images/bios/thekiba.jpg and /dev/null differ diff --git a/aio/content/images/bios/thesmiler.jpg b/aio/content/images/bios/thesmiler.jpg deleted file mode 100644 index 71b5ebc14a3..00000000000 Binary files a/aio/content/images/bios/thesmiler.jpg and /dev/null differ diff --git a/aio/content/images/bios/thierrychatel.jpg b/aio/content/images/bios/thierrychatel.jpg deleted file mode 100644 index 103f69cb1ff..00000000000 Binary files a/aio/content/images/bios/thierrychatel.jpg and /dev/null differ diff --git a/aio/content/images/bios/thomaslaforge.png b/aio/content/images/bios/thomaslaforge.png deleted file mode 100644 index 8414bc41729..00000000000 Binary files a/aio/content/images/bios/thomaslaforge.png and /dev/null differ diff --git a/aio/content/images/bios/toddmotto.jpg b/aio/content/images/bios/toddmotto.jpg deleted file mode 100755 index 522e24dbbf2..00000000000 Binary files a/aio/content/images/bios/toddmotto.jpg and /dev/null differ diff --git a/aio/content/images/bios/tomastrajan.jpg b/aio/content/images/bios/tomastrajan.jpg deleted file mode 100644 index 3b887431d47..00000000000 Binary files a/aio/content/images/bios/tomastrajan.jpg and /dev/null differ diff --git a/aio/content/images/bios/tracylee.jpg b/aio/content/images/bios/tracylee.jpg deleted file mode 100644 index a2114c4d02e..00000000000 Binary files a/aio/content/images/bios/tracylee.jpg and /dev/null differ diff --git a/aio/content/images/bios/trungvo.jpg b/aio/content/images/bios/trungvo.jpg deleted file mode 100644 index 01f78687746..00000000000 Binary files a/aio/content/images/bios/trungvo.jpg and /dev/null differ diff --git a/aio/content/images/bios/twerske.jpg b/aio/content/images/bios/twerske.jpg deleted file mode 100644 index 01c716bb847..00000000000 Binary files a/aio/content/images/bios/twerske.jpg and /dev/null differ diff --git a/aio/content/images/bios/urish.jpg b/aio/content/images/bios/urish.jpg deleted file mode 100755 index c838e0cecf8..00000000000 Binary files a/aio/content/images/bios/urish.jpg and /dev/null differ diff --git a/aio/content/images/bios/usergalileo.jpg b/aio/content/images/bios/usergalileo.jpg deleted file mode 100755 index 53b0130cb54..00000000000 Binary files a/aio/content/images/bios/usergalileo.jpg and /dev/null differ diff --git a/aio/content/images/bios/wardbell.jpg b/aio/content/images/bios/wardbell.jpg deleted file mode 100644 index e2494eaf41d..00000000000 Binary files a/aio/content/images/bios/wardbell.jpg and /dev/null differ diff --git a/aio/content/images/bios/wassim.jpg b/aio/content/images/bios/wassim.jpg deleted file mode 100755 index f32143f4b89..00000000000 Binary files a/aio/content/images/bios/wassim.jpg and /dev/null differ diff --git a/aio/content/images/bios/waterplea.jpg b/aio/content/images/bios/waterplea.jpg deleted file mode 100644 index 2a526ccbfc2..00000000000 Binary files a/aio/content/images/bios/waterplea.jpg and /dev/null differ diff --git a/aio/content/images/bios/webdave.jpg b/aio/content/images/bios/webdave.jpg deleted file mode 100644 index 3ebb8b3bf83..00000000000 Binary files a/aio/content/images/bios/webdave.jpg and /dev/null differ diff --git a/aio/content/images/bios/wellwind.jpg b/aio/content/images/bios/wellwind.jpg deleted file mode 100644 index d24b0c5338e..00000000000 Binary files a/aio/content/images/bios/wellwind.jpg and /dev/null differ diff --git a/aio/content/images/bios/wesgrimes.jpg b/aio/content/images/bios/wesgrimes.jpg deleted file mode 100644 index f68aaaab2e2..00000000000 Binary files a/aio/content/images/bios/wesgrimes.jpg and /dev/null differ diff --git a/aio/content/images/bios/willmendesneto.jpg b/aio/content/images/bios/willmendesneto.jpg deleted file mode 100644 index 108bb2c2952..00000000000 Binary files a/aio/content/images/bios/willmendesneto.jpg and /dev/null differ diff --git a/aio/content/images/bios/yannickbaron.jpg b/aio/content/images/bios/yannickbaron.jpg deleted file mode 100644 index 282dbe0c193..00000000000 Binary files a/aio/content/images/bios/yannickbaron.jpg and /dev/null differ diff --git a/aio/content/images/bios/younes.jpg b/aio/content/images/bios/younes.jpg deleted file mode 100644 index 8fcf0bf61fb..00000000000 Binary files a/aio/content/images/bios/younes.jpg and /dev/null differ diff --git a/aio/content/images/bios/yurzui.jpg b/aio/content/images/bios/yurzui.jpg deleted file mode 100644 index f5c6aa71eaf..00000000000 Binary files a/aio/content/images/bios/yurzui.jpg and /dev/null differ diff --git a/aio/content/images/bios/zach-arend.jpg b/aio/content/images/bios/zach-arend.jpg deleted file mode 100644 index 2b856a72fcb..00000000000 Binary files a/aio/content/images/bios/zach-arend.jpg and /dev/null differ diff --git a/aio/content/images/bios/zack-derose.jpg b/aio/content/images/bios/zack-derose.jpg deleted file mode 100644 index a463110490a..00000000000 Binary files a/aio/content/images/bios/zack-derose.jpg and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_auto.gif b/aio/content/images/guide/animations/animation_auto.gif deleted file mode 100644 index 6cda09ad698..00000000000 Binary files a/aio/content/images/guide/animations/animation_auto.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_basic_click.gif b/aio/content/images/guide/animations/animation_basic_click.gif deleted file mode 100644 index 2cfc19ab9ef..00000000000 Binary files a/aio/content/images/guide/animations/animation_basic_click.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_enter_leave.gif b/aio/content/images/guide/animations/animation_enter_leave.gif deleted file mode 100644 index 0a72694888c..00000000000 Binary files a/aio/content/images/guide/animations/animation_enter_leave.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_enter_leave_states.gif b/aio/content/images/guide/animations/animation_enter_leave_states.gif deleted file mode 100644 index 5f4ec9c5847..00000000000 Binary files a/aio/content/images/guide/animations/animation_enter_leave_states.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_groups.gif b/aio/content/images/guide/animations/animation_groups.gif deleted file mode 100644 index 85ce40f6f6c..00000000000 Binary files a/aio/content/images/guide/animations/animation_groups.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_multistep.gif b/aio/content/images/guide/animations/animation_multistep.gif deleted file mode 100644 index df569ec358d..00000000000 Binary files a/aio/content/images/guide/animations/animation_multistep.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/animation_timings.gif b/aio/content/images/guide/animations/animation_timings.gif deleted file mode 100644 index 8173b25f6da..00000000000 Binary files a/aio/content/images/guide/animations/animation_timings.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/keyframes-500.png b/aio/content/images/guide/animations/keyframes-500.png deleted file mode 100644 index 7cfdc92461c..00000000000 Binary files a/aio/content/images/guide/animations/keyframes-500.png and /dev/null differ diff --git a/aio/content/images/guide/animations/keyframes-offset-500.png b/aio/content/images/guide/animations/keyframes-offset-500.png deleted file mode 100644 index 89f630d5ed1..00000000000 Binary files a/aio/content/images/guide/animations/keyframes-offset-500.png and /dev/null differ diff --git a/aio/content/images/guide/animations/keyframes-pulsation.png b/aio/content/images/guide/animations/keyframes-pulsation.png deleted file mode 100644 index 577ce32d080..00000000000 Binary files a/aio/content/images/guide/animations/keyframes-pulsation.png and /dev/null differ diff --git a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active.png b/aio/content/images/guide/animations/ng_animate_transitions_inactive_active.png deleted file mode 100644 index a2479e37d89..00000000000 Binary files a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active.png and /dev/null differ diff --git a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_void.png b/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_void.png deleted file mode 100644 index abeecc827ef..00000000000 Binary files a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_void.png and /dev/null differ diff --git a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_wildcards.png b/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_wildcards.png deleted file mode 100644 index 14e9848e75f..00000000000 Binary files a/aio/content/images/guide/animations/ng_animate_transitions_inactive_active_wildcards.png and /dev/null differ diff --git a/aio/content/images/guide/animations/ng_animate_transitions_void_in.png b/aio/content/images/guide/animations/ng_animate_transitions_void_in.png deleted file mode 100644 index b591845e0b9..00000000000 Binary files a/aio/content/images/guide/animations/ng_animate_transitions_void_in.png and /dev/null differ diff --git a/aio/content/images/guide/animations/route-animation.gif b/aio/content/images/guide/animations/route-animation.gif deleted file mode 100644 index 20fa0d65715..00000000000 Binary files a/aio/content/images/guide/animations/route-animation.gif and /dev/null differ diff --git a/aio/content/images/guide/animations/wildcard-3-states.png b/aio/content/images/guide/animations/wildcard-3-states.png deleted file mode 100644 index d00fd24656d..00000000000 Binary files a/aio/content/images/guide/animations/wildcard-3-states.png and /dev/null differ diff --git a/aio/content/images/guide/animations/wildcard-state-500.png b/aio/content/images/guide/animations/wildcard-state-500.png deleted file mode 100644 index 264e5aa6915..00000000000 Binary files a/aio/content/images/guide/animations/wildcard-state-500.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/airplane.png b/aio/content/images/guide/architecture/airplane.png deleted file mode 100644 index d8e43ea29ae..00000000000 Binary files a/aio/content/images/guide/architecture/airplane.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/compilation-context.png b/aio/content/images/guide/architecture/compilation-context.png deleted file mode 100644 index 6fe602d3c67..00000000000 Binary files a/aio/content/images/guide/architecture/compilation-context.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/component-databinding.png b/aio/content/images/guide/architecture/component-databinding.png deleted file mode 100644 index e93a94ae9b4..00000000000 Binary files a/aio/content/images/guide/architecture/component-databinding.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/component-tree.png b/aio/content/images/guide/architecture/component-tree.png deleted file mode 100644 index 6e9de391d86..00000000000 Binary files a/aio/content/images/guide/architecture/component-tree.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/databinding.png b/aio/content/images/guide/architecture/databinding.png deleted file mode 100644 index 85f068adbe1..00000000000 Binary files a/aio/content/images/guide/architecture/databinding.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/dependency-injection.png b/aio/content/images/guide/architecture/dependency-injection.png deleted file mode 100644 index 385d1f976d7..00000000000 Binary files a/aio/content/images/guide/architecture/dependency-injection.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/directive.png b/aio/content/images/guide/architecture/directive.png deleted file mode 100644 index 576c159868c..00000000000 Binary files a/aio/content/images/guide/architecture/directive.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/hero-component.png b/aio/content/images/guide/architecture/hero-component.png deleted file mode 100644 index 26323f4269a..00000000000 Binary files a/aio/content/images/guide/architecture/hero-component.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/injector-injects.png b/aio/content/images/guide/architecture/injector-injects.png deleted file mode 100644 index e3ebfa0f475..00000000000 Binary files a/aio/content/images/guide/architecture/injector-injects.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/library-module.png b/aio/content/images/guide/architecture/library-module.png deleted file mode 100644 index 770771a9929..00000000000 Binary files a/aio/content/images/guide/architecture/library-module.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/metadata.png b/aio/content/images/guide/architecture/metadata.png deleted file mode 100644 index ccace68957c..00000000000 Binary files a/aio/content/images/guide/architecture/metadata.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/module.png b/aio/content/images/guide/architecture/module.png deleted file mode 100644 index 6a0b6bc1877..00000000000 Binary files a/aio/content/images/guide/architecture/module.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/modules.png b/aio/content/images/guide/architecture/modules.png deleted file mode 100644 index 1f0b6fa2a12..00000000000 Binary files a/aio/content/images/guide/architecture/modules.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/overview.png b/aio/content/images/guide/architecture/overview.png deleted file mode 100644 index 700bb128fef..00000000000 Binary files a/aio/content/images/guide/architecture/overview.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/overview2.png b/aio/content/images/guide/architecture/overview2.png deleted file mode 100644 index 44c87d35493..00000000000 Binary files a/aio/content/images/guide/architecture/overview2.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/parent-child-binding.png b/aio/content/images/guide/architecture/parent-child-binding.png deleted file mode 100644 index d55d0a45dd6..00000000000 Binary files a/aio/content/images/guide/architecture/parent-child-binding.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/service.png b/aio/content/images/guide/architecture/service.png deleted file mode 100644 index 7f62f44c36f..00000000000 Binary files a/aio/content/images/guide/architecture/service.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/template-metadata-component.png b/aio/content/images/guide/architecture/template-metadata-component.png deleted file mode 100644 index 585c0c31608..00000000000 Binary files a/aio/content/images/guide/architecture/template-metadata-component.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/template.png b/aio/content/images/guide/architecture/template.png deleted file mode 100644 index 5aa872ec314..00000000000 Binary files a/aio/content/images/guide/architecture/template.png and /dev/null differ diff --git a/aio/content/images/guide/architecture/view-hierarchy.png b/aio/content/images/guide/architecture/view-hierarchy.png deleted file mode 100644 index 0b8360a3d10..00000000000 Binary files a/aio/content/images/guide/architecture/view-hierarchy.png and /dev/null differ diff --git a/aio/content/images/guide/attribute-directives/first-highlight.png b/aio/content/images/guide/attribute-directives/first-highlight.png deleted file mode 100644 index 1117ef04330..00000000000 Binary files a/aio/content/images/guide/attribute-directives/first-highlight.png and /dev/null differ diff --git a/aio/content/images/guide/attribute-directives/highlight-directive-anim.gif b/aio/content/images/guide/attribute-directives/highlight-directive-anim.gif deleted file mode 100644 index 16e2a3befd1..00000000000 Binary files a/aio/content/images/guide/attribute-directives/highlight-directive-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/attribute-directives/highlight-directive-final-anim.gif b/aio/content/images/guide/attribute-directives/highlight-directive-final-anim.gif deleted file mode 100644 index 6c514a447bb..00000000000 Binary files a/aio/content/images/guide/attribute-directives/highlight-directive-final-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/attribute-directives/highlight-directive-v2-anim.gif b/aio/content/images/guide/attribute-directives/highlight-directive-v2-anim.gif deleted file mode 100644 index cd3204587f4..00000000000 Binary files a/aio/content/images/guide/attribute-directives/highlight-directive-v2-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/build/build-config-targets.gif b/aio/content/images/guide/build/build-config-targets.gif deleted file mode 100644 index f8aef5da175..00000000000 Binary files a/aio/content/images/guide/build/build-config-targets.gif and /dev/null differ diff --git a/aio/content/images/guide/built-in-directives/ng-model-anim.gif b/aio/content/images/guide/built-in-directives/ng-model-anim.gif deleted file mode 100644 index 65af12f6cf0..00000000000 Binary files a/aio/content/images/guide/built-in-directives/ng-model-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/built-in-directives/ngfor-trackby.gif b/aio/content/images/guide/built-in-directives/ngfor-trackby.gif deleted file mode 100644 index 4aa5107d630..00000000000 Binary files a/aio/content/images/guide/built-in-directives/ngfor-trackby.gif and /dev/null differ diff --git a/aio/content/images/guide/built-in-directives/ngswitch.gif b/aio/content/images/guide/built-in-directives/ngswitch.gif deleted file mode 100644 index 9405841a200..00000000000 Binary files a/aio/content/images/guide/built-in-directives/ngswitch.gif and /dev/null differ diff --git a/aio/content/images/guide/change-detection/event-trigger.svg b/aio/content/images/guide/change-detection/event-trigger.svg deleted file mode 100644 index 0c3016bd224..00000000000 --- a/aio/content/images/guide/change-detection/event-trigger.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
    AppComponent
    AppComponent
    HeaderComponent
    HeaderComponent
    MainComponent (OnPush)
    MainComponent (OnPus...
    LoginComponent (OnPush)
    LoginComponent (OnPu...
    DetailsComponent
    DetailsComponent
    SearchComponent
    SearchComponent
    ButtonComponent
    ButtonComponent
    Event
    Event
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/aio/content/images/guide/change-detection/leaf-trigger.svg b/aio/content/images/guide/change-detection/leaf-trigger.svg deleted file mode 100644 index 51d9ba4c1d7..00000000000 --- a/aio/content/images/guide/change-detection/leaf-trigger.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
    AppComponent
    AppComponent
    HeaderComponent
    HeaderComponent
    MainComponent (OnPush)
    MainComponent (OnPus...
    LoginComponent (OnPush)
    LoginComponent (OnPu...
    DetailsComponent
    DetailsComponent
    SearchComponent
    SearchComponent
    ButtonComponent
    ButtonComponent
    Event
    Event
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/aio/content/images/guide/change-detection/on-push-input.svg b/aio/content/images/guide/change-detection/on-push-input.svg deleted file mode 100644 index 35e9a226653..00000000000 --- a/aio/content/images/guide/change-detection/on-push-input.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
    AppComponent
    AppComponent
    HeaderComponent
    HeaderComponent
    MainComponent (OnPush)
    MainComponent (OnPus...
    LoginComponent (OnPush)
    LoginComponent (OnPu...
    DetailsComponent
    DetailsComponent
    SearchComponent
    SearchComponent
    ButtonComponent
    ButtonComponent
    Parent passes
    new inputs to
    MainComponent
    Parent passes...
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/aio/content/images/guide/change-detection/on-push-trigger.svg b/aio/content/images/guide/change-detection/on-push-trigger.svg deleted file mode 100644 index 47bc6c66e29..00000000000 --- a/aio/content/images/guide/change-detection/on-push-trigger.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
    AppComponent
    AppComponent
    HeaderComponent
    HeaderComponent
    MainComponent (OnPush)
    MainComponent (OnPus...
    LoginComponent (OnPush)
    LoginComponent (OnPu...
    DetailsComponent
    DetailsComponent
    SearchComponent
    SearchComponent
    ButtonComponent
    ButtonComponent
    Event
    Event
    Text is not SVG - cannot display
    \ No newline at end of file diff --git a/aio/content/images/guide/change-detection/slow-computations.png b/aio/content/images/guide/change-detection/slow-computations.png deleted file mode 100644 index 51b45210de6..00000000000 Binary files a/aio/content/images/guide/change-detection/slow-computations.png and /dev/null differ diff --git a/aio/content/images/guide/change-detection/zone-pollution.png b/aio/content/images/guide/change-detection/zone-pollution.png deleted file mode 100644 index f4e825d3856..00000000000 Binary files a/aio/content/images/guide/change-detection/zone-pollution.png and /dev/null differ diff --git a/aio/content/images/guide/cli/completion.gif b/aio/content/images/guide/cli/completion.gif deleted file mode 100644 index d5f5695deb1..00000000000 Binary files a/aio/content/images/guide/cli/completion.gif and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/bidirectional-service.gif b/aio/content/images/guide/component-interaction/bidirectional-service.gif deleted file mode 100644 index a0d8c07dd12..00000000000 Binary files a/aio/content/images/guide/component-interaction/bidirectional-service.gif and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/child-to-parent.gif b/aio/content/images/guide/component-interaction/child-to-parent.gif deleted file mode 100644 index 9420478bea4..00000000000 Binary files a/aio/content/images/guide/component-interaction/child-to-parent.gif and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/contentchildren.png b/aio/content/images/guide/component-interaction/contentchildren.png deleted file mode 100644 index 5128f2a601f..00000000000 Binary files a/aio/content/images/guide/component-interaction/contentchildren.png and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/countdown-timer-anim.gif b/aio/content/images/guide/component-interaction/countdown-timer-anim.gif deleted file mode 100644 index d225b9df16e..00000000000 Binary files a/aio/content/images/guide/component-interaction/countdown-timer-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/parent-to-child-on-changes.gif b/aio/content/images/guide/component-interaction/parent-to-child-on-changes.gif deleted file mode 100644 index debccd94488..00000000000 Binary files a/aio/content/images/guide/component-interaction/parent-to-child-on-changes.gif and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/parent-to-child.png b/aio/content/images/guide/component-interaction/parent-to-child.png deleted file mode 100644 index 663bc26900f..00000000000 Binary files a/aio/content/images/guide/component-interaction/parent-to-child.png and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/setter.png b/aio/content/images/guide/component-interaction/setter.png deleted file mode 100644 index 85f61ffaae9..00000000000 Binary files a/aio/content/images/guide/component-interaction/setter.png and /dev/null differ diff --git a/aio/content/images/guide/component-interaction/unrelated-service.gif b/aio/content/images/guide/component-interaction/unrelated-service.gif deleted file mode 100644 index cfa92270e2e..00000000000 Binary files a/aio/content/images/guide/component-interaction/unrelated-service.gif and /dev/null differ diff --git a/aio/content/images/guide/contributors-guide/edit-icon.png b/aio/content/images/guide/contributors-guide/edit-icon.png deleted file mode 100644 index 7124a189142..00000000000 Binary files a/aio/content/images/guide/contributors-guide/edit-icon.png and /dev/null differ diff --git a/aio/content/images/guide/contributors-guide/last-reviewed.png b/aio/content/images/guide/contributors-guide/last-reviewed.png deleted file mode 100644 index 302ffabacf2..00000000000 Binary files a/aio/content/images/guide/contributors-guide/last-reviewed.png and /dev/null differ diff --git a/aio/content/images/guide/contributors-guide/topic-edit-icon.png b/aio/content/images/guide/contributors-guide/topic-edit-icon.png deleted file mode 100644 index 984442fa5b0..00000000000 Binary files a/aio/content/images/guide/contributors-guide/topic-edit-icon.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/alex.png b/aio/content/images/guide/dependency-injection-in-action/alex.png deleted file mode 100644 index 2ea0a2d8289..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/alex.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/alice.png b/aio/content/images/guide/dependency-injection-in-action/alice.png deleted file mode 100644 index 219df8d9018..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/alice.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/date-logger-entry.png b/aio/content/images/guide/dependency-injection-in-action/date-logger-entry.png deleted file mode 100644 index 204b7260ce4..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/date-logger-entry.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/hero-bio-and-content.png b/aio/content/images/guide/dependency-injection-in-action/hero-bio-and-content.png deleted file mode 100644 index f06a0f0aecb..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/hero-bio-and-content.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/hero-bio-contact-no-host.png b/aio/content/images/guide/dependency-injection-in-action/hero-bio-contact-no-host.png deleted file mode 100644 index f526892e144..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/hero-bio-contact-no-host.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/hero-bios-and-contacts.png b/aio/content/images/guide/dependency-injection-in-action/hero-bios-and-contacts.png deleted file mode 100644 index ff199d229e3..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/hero-bios-and-contacts.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/hero-bios.png b/aio/content/images/guide/dependency-injection-in-action/hero-bios.png deleted file mode 100644 index 814a500b1f3..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/hero-bios.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/hero-of-month.png b/aio/content/images/guide/dependency-injection-in-action/hero-of-month.png deleted file mode 100644 index 532f5c3ab2e..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/hero-of-month.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/highlight.png b/aio/content/images/guide/dependency-injection-in-action/highlight.png deleted file mode 100644 index ecccb129fe1..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/highlight.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/logged-in-user.png b/aio/content/images/guide/dependency-injection-in-action/logged-in-user.png deleted file mode 100644 index 712fec8436b..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/logged-in-user.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/minimal-logger-intellisense.png b/aio/content/images/guide/dependency-injection-in-action/minimal-logger-intellisense.png deleted file mode 100644 index 95be33dd643..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/minimal-logger-intellisense.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection-in-action/sorted-heroes.png b/aio/content/images/guide/dependency-injection-in-action/sorted-heroes.png deleted file mode 100644 index 8b658d41a4a..00000000000 Binary files a/aio/content/images/guide/dependency-injection-in-action/sorted-heroes.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection/car-components.png b/aio/content/images/guide/dependency-injection/car-components.png deleted file mode 100644 index 9d480c3c7ff..00000000000 Binary files a/aio/content/images/guide/dependency-injection/car-components.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection/component-hierarchy.png b/aio/content/images/guide/dependency-injection/component-hierarchy.png deleted file mode 100644 index 22bf0ee9f27..00000000000 Binary files a/aio/content/images/guide/dependency-injection/component-hierarchy.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection/hid-heroes-anim.gif b/aio/content/images/guide/dependency-injection/hid-heroes-anim.gif deleted file mode 100644 index 7d41a6e088d..00000000000 Binary files a/aio/content/images/guide/dependency-injection/hid-heroes-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection/injector-tree.png b/aio/content/images/guide/dependency-injection/injector-tree.png deleted file mode 100644 index 379b1b4ca4e..00000000000 Binary files a/aio/content/images/guide/dependency-injection/injector-tree.png and /dev/null differ diff --git a/aio/content/images/guide/dependency-injection/injectors.svg b/aio/content/images/guide/dependency-injection/injectors.svg deleted file mode 100644 index b64ad452a08..00000000000 --- a/aio/content/images/guide/dependency-injection/injectors.svg +++ /dev/null @@ -1 +0,0 @@ -
    EnvironmentInjector
    (configured by Angular)
    has special things like DomSanitizer => providedIn 'platform'
    root EnvironmentInjector
    (configured by AppConfig)
    has things for your app => bootstrapApplication(..., AppConfig)
    NullInjector
    always throws an error unless
    you use @Optional()
    diff --git a/aio/content/images/guide/deployment/quickstart-sourcemap-explorer.png b/aio/content/images/guide/deployment/quickstart-sourcemap-explorer.png deleted file mode 100644 index 73716bc6a0a..00000000000 Binary files a/aio/content/images/guide/deployment/quickstart-sourcemap-explorer.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/access-console.png b/aio/content/images/guide/devtools/access-console.png deleted file mode 100644 index 7380835dd92..00000000000 Binary files a/aio/content/images/guide/devtools/access-console.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/component-explorer.png b/aio/content/images/guide/devtools/component-explorer.png deleted file mode 100644 index dae2add465f..00000000000 Binary files a/aio/content/images/guide/devtools/component-explorer.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/debugging-onpush.png b/aio/content/images/guide/devtools/debugging-onpush.png deleted file mode 100644 index 2f3d3c13afb..00000000000 Binary files a/aio/content/images/guide/devtools/debugging-onpush.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/default-profiler-view.png b/aio/content/images/guide/devtools/default-profiler-view.png deleted file mode 100644 index a1a882cbefa..00000000000 Binary files a/aio/content/images/guide/devtools/default-profiler-view.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/devtools-tabs.png b/aio/content/images/guide/devtools/devtools-tabs.png deleted file mode 100644 index 844dc8910f9..00000000000 Binary files a/aio/content/images/guide/devtools/devtools-tabs.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/devtools.png b/aio/content/images/guide/devtools/devtools.png deleted file mode 100644 index cbfddae977b..00000000000 Binary files a/aio/content/images/guide/devtools/devtools.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/di-component-deps.png b/aio/content/images/guide/devtools/di-component-deps.png deleted file mode 100644 index 9d758ea2e6f..00000000000 Binary files a/aio/content/images/guide/devtools/di-component-deps.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/di-injector-tree-providers.png b/aio/content/images/guide/devtools/di-injector-tree-providers.png deleted file mode 100644 index 794d413f391..00000000000 Binary files a/aio/content/images/guide/devtools/di-injector-tree-providers.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/di-injector-tree-selected.png b/aio/content/images/guide/devtools/di-injector-tree-selected.png deleted file mode 100644 index 6da211b5e6d..00000000000 Binary files a/aio/content/images/guide/devtools/di-injector-tree-selected.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/di-injector-tree.png b/aio/content/images/guide/devtools/di-injector-tree.png deleted file mode 100644 index dbcf522ec2d..00000000000 Binary files a/aio/content/images/guide/devtools/di-injector-tree.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/directive-details.png b/aio/content/images/guide/devtools/directive-details.png deleted file mode 100644 index 44437451c55..00000000000 Binary files a/aio/content/images/guide/devtools/directive-details.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/flame-graph-view.png b/aio/content/images/guide/devtools/flame-graph-view.png deleted file mode 100644 index 93c171ba5f0..00000000000 Binary files a/aio/content/images/guide/devtools/flame-graph-view.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/inspect-element.png b/aio/content/images/guide/devtools/inspect-element.png deleted file mode 100644 index bd91e0622fd..00000000000 Binary files a/aio/content/images/guide/devtools/inspect-element.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/navigate-source.png b/aio/content/images/guide/devtools/navigate-source.png deleted file mode 100644 index 7010019ba73..00000000000 Binary files a/aio/content/images/guide/devtools/navigate-source.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/profiler-selected-bar.png b/aio/content/images/guide/devtools/profiler-selected-bar.png deleted file mode 100644 index 2235ed8a7f3..00000000000 Binary files a/aio/content/images/guide/devtools/profiler-selected-bar.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/profiler.png b/aio/content/images/guide/devtools/profiler.png deleted file mode 100644 index a320ff66126..00000000000 Binary files a/aio/content/images/guide/devtools/profiler.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/save-profile.png b/aio/content/images/guide/devtools/save-profile.png deleted file mode 100644 index c4ed1debeaf..00000000000 Binary files a/aio/content/images/guide/devtools/save-profile.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/search.png b/aio/content/images/guide/devtools/search.png deleted file mode 100644 index 3eccdffde68..00000000000 Binary files a/aio/content/images/guide/devtools/search.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/update-property.png b/aio/content/images/guide/devtools/update-property.png deleted file mode 100644 index 82318598d09..00000000000 Binary files a/aio/content/images/guide/devtools/update-property.png and /dev/null differ diff --git a/aio/content/images/guide/devtools/view-properties.png b/aio/content/images/guide/devtools/view-properties.png deleted file mode 100644 index d3e09dc476f..00000000000 Binary files a/aio/content/images/guide/devtools/view-properties.png and /dev/null differ diff --git a/aio/content/images/guide/displaying-data/final.png b/aio/content/images/guide/displaying-data/final.png deleted file mode 100644 index 25146f2988f..00000000000 Binary files a/aio/content/images/guide/displaying-data/final.png and /dev/null differ diff --git a/aio/content/images/guide/displaying-data/hero-names-list.png b/aio/content/images/guide/displaying-data/hero-names-list.png deleted file mode 100644 index 84f4c74b355..00000000000 Binary files a/aio/content/images/guide/displaying-data/hero-names-list.png and /dev/null differ diff --git a/aio/content/images/guide/displaying-data/title-and-hero.png b/aio/content/images/guide/displaying-data/title-and-hero.png deleted file mode 100644 index 0762ff2b0ad..00000000000 Binary files a/aio/content/images/guide/displaying-data/title-and-hero.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/feature-branch-ff.png b/aio/content/images/guide/doc-github-tasks/feature-branch-ff.png deleted file mode 100644 index be62c0cc81a..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/feature-branch-ff.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/feature-branch-w-update.png b/aio/content/images/guide/doc-github-tasks/feature-branch-w-update.png deleted file mode 100644 index 4851c73f7d5..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/feature-branch-w-update.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/feature-with-new-branch.png b/aio/content/images/guide/doc-github-tasks/feature-with-new-branch.png deleted file mode 100644 index 57ac60324fb..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/feature-with-new-branch.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/github-fetch-merge.png b/aio/content/images/guide/doc-github-tasks/github-fetch-merge.png deleted file mode 100644 index ada4469048b..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/github-fetch-merge.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/github-sync-upstream.png b/aio/content/images/guide/doc-github-tasks/github-sync-upstream.png deleted file mode 100644 index ffd876fb6a1..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/github-sync-upstream.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/main-branch.png b/aio/content/images/guide/doc-github-tasks/main-branch.png deleted file mode 100644 index 20fba1338c8..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/main-branch.png and /dev/null differ diff --git a/aio/content/images/guide/doc-github-tasks/pc-directory-config.png b/aio/content/images/guide/doc-github-tasks/pc-directory-config.png deleted file mode 100644 index d2150f65aa7..00000000000 Binary files a/aio/content/images/guide/doc-github-tasks/pc-directory-config.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-open/github-branch-diff.png b/aio/content/images/guide/doc-pr-open/github-branch-diff.png deleted file mode 100644 index e1e311ff8aa..00000000000 Binary files a/aio/content/images/guide/doc-pr-open/github-branch-diff.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-open/github-branch-view.png b/aio/content/images/guide/doc-pr-open/github-branch-view.png deleted file mode 100644 index 7650465c78d..00000000000 Binary files a/aio/content/images/guide/doc-pr-open/github-branch-view.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-open/github-recent-push.png b/aio/content/images/guide/doc-pr-open/github-recent-push.png deleted file mode 100644 index c34618c36db..00000000000 Binary files a/aio/content/images/guide/doc-pr-open/github-recent-push.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-open/pr-checklist.png b/aio/content/images/guide/doc-pr-open/pr-checklist.png deleted file mode 100644 index 4e4b62ee72c..00000000000 Binary files a/aio/content/images/guide/doc-pr-open/pr-checklist.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/feature-branch-merged.png b/aio/content/images/guide/doc-pr-prep/feature-branch-merged.png deleted file mode 100644 index 453d28160f5..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/feature-branch-merged.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/feature-branch-w-merge.png b/aio/content/images/guide/doc-pr-prep/feature-branch-w-merge.png deleted file mode 100644 index eceeeec7155..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/feature-branch-w-merge.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/feature-branch-w-rebase.png b/aio/content/images/guide/doc-pr-prep/feature-branch-w-rebase.png deleted file mode 100644 index fe3be01d53a..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/feature-branch-w-rebase.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/feature-branch-w-update.png b/aio/content/images/guide/doc-pr-prep/feature-branch-w-update.png deleted file mode 100644 index 87cccffb199..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/feature-branch-w-update.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/feature-with-new-branch.png b/aio/content/images/guide/doc-pr-prep/feature-with-new-branch.png deleted file mode 100644 index 77b1906235f..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/feature-with-new-branch.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/github-fetch-merge.png b/aio/content/images/guide/doc-pr-prep/github-fetch-merge.png deleted file mode 100644 index bc343f2d5b7..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/github-fetch-merge.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-prep/github-sync-upstream.png b/aio/content/images/guide/doc-pr-prep/github-sync-upstream.png deleted file mode 100644 index e918aa76965..00000000000 Binary files a/aio/content/images/guide/doc-pr-prep/github-sync-upstream.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/git-log-after-squash-large.png b/aio/content/images/guide/doc-pr-update/git-log-after-squash-large.png deleted file mode 100644 index 8dd0c840c71..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/git-log-after-squash-large.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/git-log-after-squash.png b/aio/content/images/guide/doc-pr-update/git-log-after-squash.png deleted file mode 100644 index cf4db89aa3d..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/git-log-after-squash.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/git-log-output-large.png b/aio/content/images/guide/doc-pr-update/git-log-output-large.png deleted file mode 100644 index c6fd6056994..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/git-log-output-large.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/git-log-output.png b/aio/content/images/guide/doc-pr-update/git-log-output.png deleted file mode 100644 index e298f2beef6..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/git-log-output.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/git-squash-edit.png b/aio/content/images/guide/doc-pr-update/git-squash-edit.png deleted file mode 100644 index f4d8222b9bd..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/git-squash-edit.png and /dev/null differ diff --git a/aio/content/images/guide/doc-pr-update/pull-request-heading.png b/aio/content/images/guide/doc-pr-update/pull-request-heading.png deleted file mode 100644 index aade6d512f0..00000000000 Binary files a/aio/content/images/guide/doc-pr-update/pull-request-heading.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/angular-angular-github.png b/aio/content/images/guide/doc-prepare-to-edit/angular-angular-github.png deleted file mode 100644 index c87c2c329f1..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/angular-angular-github.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/doc-prepare-to-edit.png b/aio/content/images/guide/doc-prepare-to-edit/doc-prepare-to-edit.png deleted file mode 100644 index ae6c77d13e1..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/doc-prepare-to-edit.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/github-angular-cloud.png b/aio/content/images/guide/doc-prepare-to-edit/github-angular-cloud.png deleted file mode 100644 index 8fbf76f1dbb..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/github-angular-cloud.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/github-clone-img.png b/aio/content/images/guide/doc-prepare-to-edit/github-clone-img.png deleted file mode 100644 index 593962e5d25..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/github-clone-img.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/github-personal-cloud.png b/aio/content/images/guide/doc-prepare-to-edit/github-personal-cloud.png deleted file mode 100644 index cb97eb7328f..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/github-personal-cloud.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/pc-directory-config-img.png b/aio/content/images/guide/doc-prepare-to-edit/pc-directory-config-img.png deleted file mode 100644 index 4a67f57b983..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/pc-directory-config-img.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/pc-directory-start-img.png b/aio/content/images/guide/doc-prepare-to-edit/pc-directory-start-img.png deleted file mode 100644 index fcd6627883e..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/pc-directory-start-img.png and /dev/null differ diff --git a/aio/content/images/guide/doc-prepare-to-edit/personal-angular-github.png b/aio/content/images/guide/doc-prepare-to-edit/personal-angular-github.png deleted file mode 100644 index 657306bcc04..00000000000 Binary files a/aio/content/images/guide/doc-prepare-to-edit/personal-angular-github.png and /dev/null differ diff --git a/aio/content/images/guide/doc-update-overview/writing-workflow.png b/aio/content/images/guide/doc-update-overview/writing-workflow.png deleted file mode 100644 index f7a9ec185c0..00000000000 Binary files a/aio/content/images/guide/doc-update-overview/writing-workflow.png and /dev/null differ diff --git a/aio/content/images/guide/doc-update-start/github-fetch-merge.png b/aio/content/images/guide/doc-update-start/github-fetch-merge.png deleted file mode 100644 index bc343f2d5b7..00000000000 Binary files a/aio/content/images/guide/doc-update-start/github-fetch-merge.png and /dev/null differ diff --git a/aio/content/images/guide/doc-update-start/github-sync-upstream.png b/aio/content/images/guide/doc-update-start/github-sync-upstream.png deleted file mode 100644 index e918aa76965..00000000000 Binary files a/aio/content/images/guide/doc-update-start/github-sync-upstream.png and /dev/null differ diff --git a/aio/content/images/guide/doc-update-start/pc-directory-config.png b/aio/content/images/guide/doc-update-start/pc-directory-config.png deleted file mode 100644 index 4a67f57b983..00000000000 Binary files a/aio/content/images/guide/doc-update-start/pc-directory-config.png and /dev/null differ diff --git a/aio/content/images/guide/docs-lint-errors/lint-error-icon.png b/aio/content/images/guide/docs-lint-errors/lint-error-icon.png deleted file mode 100644 index 16370488e65..00000000000 Binary files a/aio/content/images/guide/docs-lint-errors/lint-error-icon.png and /dev/null differ diff --git a/aio/content/images/guide/docs-lint-errors/lint-info-icon.png b/aio/content/images/guide/docs-lint-errors/lint-info-icon.png deleted file mode 100644 index 03bc6f8ca22..00000000000 Binary files a/aio/content/images/guide/docs-lint-errors/lint-info-icon.png and /dev/null differ diff --git a/aio/content/images/guide/docs-lint-errors/lint-warn-icon.png b/aio/content/images/guide/docs-lint-errors/lint-warn-icon.png deleted file mode 100644 index d5c0b13ba13..00000000000 Binary files a/aio/content/images/guide/docs-lint-errors/lint-warn-icon.png and /dev/null differ diff --git a/aio/content/images/guide/docs-lint-errors/sample-lint-error.png b/aio/content/images/guide/docs-lint-errors/sample-lint-error.png deleted file mode 100644 index 7b162241663..00000000000 Binary files a/aio/content/images/guide/docs-lint-errors/sample-lint-error.png and /dev/null differ diff --git a/aio/content/images/guide/docs-style-guide/flying-hero.png b/aio/content/images/guide/docs-style-guide/flying-hero.png deleted file mode 100644 index d8e43ea29ae..00000000000 Binary files a/aio/content/images/guide/docs-style-guide/flying-hero.png and /dev/null differ diff --git a/aio/content/images/guide/docs-style-guide/toh-pt6-bundle-700w.png b/aio/content/images/guide/docs-style-guide/toh-pt6-bundle-700w.png deleted file mode 100644 index d94cd854c0c..00000000000 Binary files a/aio/content/images/guide/docs-style-guide/toh-pt6-bundle-700w.png and /dev/null differ diff --git a/aio/content/images/guide/docs-style-guide/toh-pt6-bundle.png b/aio/content/images/guide/docs-style-guide/toh-pt6-bundle.png deleted file mode 100644 index fa5f4a3e903..00000000000 Binary files a/aio/content/images/guide/docs-style-guide/toh-pt6-bundle.png and /dev/null differ diff --git a/aio/content/images/guide/dynamic-component-loader/ads-example.gif b/aio/content/images/guide/dynamic-component-loader/ads-example.gif deleted file mode 100644 index f7a990fb113..00000000000 Binary files a/aio/content/images/guide/dynamic-component-loader/ads-example.gif and /dev/null differ diff --git a/aio/content/images/guide/dynamic-form/dynamic-form.png b/aio/content/images/guide/dynamic-form/dynamic-form.png deleted file mode 100644 index bd33f9d34e0..00000000000 Binary files a/aio/content/images/guide/dynamic-form/dynamic-form.png and /dev/null differ diff --git a/aio/content/images/guide/elements/createElement.png b/aio/content/images/guide/elements/createElement.png deleted file mode 100644 index 0d979575a51..00000000000 Binary files a/aio/content/images/guide/elements/createElement.png and /dev/null differ diff --git a/aio/content/images/guide/elements/customElement1.png b/aio/content/images/guide/elements/customElement1.png deleted file mode 100644 index dcb1c0ab81f..00000000000 Binary files a/aio/content/images/guide/elements/customElement1.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-landing-page.png b/aio/content/images/guide/faa/homes-app-landing-page.png deleted file mode 100644 index 1bee128f6b0..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-landing-page.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-01-browser.png b/aio/content/images/guide/faa/homes-app-lesson-01-browser.png deleted file mode 100644 index efa4475f9db..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-01-browser.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-02-step-2.png b/aio/content/images/guide/faa/homes-app-lesson-02-step-2.png deleted file mode 100644 index 01c9a7147c4..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-02-step-2.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-02-step-3.png b/aio/content/images/guide/faa/homes-app-lesson-02-step-3.png deleted file mode 100644 index 519a9a88f23..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-02-step-3.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-03-step-2.png b/aio/content/images/guide/faa/homes-app-lesson-03-step-2.png deleted file mode 100644 index 50b7d1be38d..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-03-step-2.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-07-step-2.png b/aio/content/images/guide/faa/homes-app-lesson-07-step-2.png deleted file mode 100644 index 8e477cee1ac..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-07-step-2.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-08-step-2.png b/aio/content/images/guide/faa/homes-app-lesson-08-step-2.png deleted file mode 100644 index 4b224b3a1fa..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-08-step-2.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-11-step-1.png b/aio/content/images/guide/faa/homes-app-lesson-11-step-1.png deleted file mode 100644 index aae9073287d..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-11-step-1.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-11-step-3.png b/aio/content/images/guide/faa/homes-app-lesson-11-step-3.png deleted file mode 100644 index 8ec08d6e69f..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-11-step-3.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-12-step-3.png b/aio/content/images/guide/faa/homes-app-lesson-12-step-3.png deleted file mode 100644 index cff4bbf4b9c..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-12-step-3.png and /dev/null differ diff --git a/aio/content/images/guide/faa/homes-app-lesson-13-step-3.png b/aio/content/images/guide/faa/homes-app-lesson-13-step-3.png deleted file mode 100644 index 72e31c87319..00000000000 Binary files a/aio/content/images/guide/faa/homes-app-lesson-13-step-3.png and /dev/null differ diff --git a/aio/content/images/guide/feature-modules/feature-module.png b/aio/content/images/guide/feature-modules/feature-module.png deleted file mode 100644 index 91d6973d3aa..00000000000 Binary files a/aio/content/images/guide/feature-modules/feature-module.png and /dev/null differ diff --git a/aio/content/images/guide/form-validation/plunker.png b/aio/content/images/guide/form-validation/plunker.png deleted file mode 100644 index c1fd3eed096..00000000000 Binary files a/aio/content/images/guide/form-validation/plunker.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/dataflow-reactive-forms-mtv.png b/aio/content/images/guide/forms-overview/dataflow-reactive-forms-mtv.png deleted file mode 100644 index bb09b2c7d30..00000000000 Binary files a/aio/content/images/guide/forms-overview/dataflow-reactive-forms-mtv.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/dataflow-reactive-forms-vtm.png b/aio/content/images/guide/forms-overview/dataflow-reactive-forms-vtm.png deleted file mode 100644 index 5dbf7a2f926..00000000000 Binary files a/aio/content/images/guide/forms-overview/dataflow-reactive-forms-vtm.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/dataflow-td-forms-mtv.png b/aio/content/images/guide/forms-overview/dataflow-td-forms-mtv.png deleted file mode 100644 index ba4ac790a07..00000000000 Binary files a/aio/content/images/guide/forms-overview/dataflow-td-forms-mtv.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/dataflow-td-forms-vtm.png b/aio/content/images/guide/forms-overview/dataflow-td-forms-vtm.png deleted file mode 100644 index c1765125a78..00000000000 Binary files a/aio/content/images/guide/forms-overview/dataflow-td-forms-vtm.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/key-diff-reactive-forms.png b/aio/content/images/guide/forms-overview/key-diff-reactive-forms.png deleted file mode 100644 index a311eb1057f..00000000000 Binary files a/aio/content/images/guide/forms-overview/key-diff-reactive-forms.png and /dev/null differ diff --git a/aio/content/images/guide/forms-overview/key-diff-td-forms.png b/aio/content/images/guide/forms-overview/key-diff-td-forms.png deleted file mode 100644 index 9aae675a0bd..00000000000 Binary files a/aio/content/images/guide/forms-overview/key-diff-td-forms.png and /dev/null differ diff --git a/aio/content/images/guide/forms/hero-form-1.png b/aio/content/images/guide/forms/hero-form-1.png deleted file mode 100644 index bcb59e20577..00000000000 Binary files a/aio/content/images/guide/forms/hero-form-1.png and /dev/null differ diff --git a/aio/content/images/guide/forms/hero-form-2.png b/aio/content/images/guide/forms/hero-form-2.png deleted file mode 100644 index f0ebeef4fef..00000000000 Binary files a/aio/content/images/guide/forms/hero-form-2.png and /dev/null differ diff --git a/aio/content/images/guide/forms/hero-form-3.png b/aio/content/images/guide/forms/hero-form-3.png deleted file mode 100644 index 449b5899e66..00000000000 Binary files a/aio/content/images/guide/forms/hero-form-3.png and /dev/null differ diff --git a/aio/content/images/guide/forms/hf-4.png b/aio/content/images/guide/forms/hf-4.png deleted file mode 100644 index bcb768fa1b7..00000000000 Binary files a/aio/content/images/guide/forms/hf-4.png and /dev/null differ diff --git a/aio/content/images/guide/forms/hf-5.png b/aio/content/images/guide/forms/hf-5.png deleted file mode 100644 index b52102cbd9c..00000000000 Binary files a/aio/content/images/guide/forms/hf-5.png and /dev/null differ diff --git a/aio/content/images/guide/forms/name-required-error.png b/aio/content/images/guide/forms/name-required-error.png deleted file mode 100644 index 115cbd62ced..00000000000 Binary files a/aio/content/images/guide/forms/name-required-error.png and /dev/null differ diff --git a/aio/content/images/guide/forms/ng-model-in-action-2.png b/aio/content/images/guide/forms/ng-model-in-action-2.png deleted file mode 100644 index 62b21297d65..00000000000 Binary files a/aio/content/images/guide/forms/ng-model-in-action-2.png and /dev/null differ diff --git a/aio/content/images/guide/forms/ng-model-in-action.png b/aio/content/images/guide/forms/ng-model-in-action.png deleted file mode 100644 index 46a19bd24ca..00000000000 Binary files a/aio/content/images/guide/forms/ng-model-in-action.png and /dev/null differ diff --git a/aio/content/images/guide/forms/tdf-1.png b/aio/content/images/guide/forms/tdf-1.png deleted file mode 100644 index 7ea98616aeb..00000000000 Binary files a/aio/content/images/guide/forms/tdf-1.png and /dev/null differ diff --git a/aio/content/images/guide/forms/tdf-2.png b/aio/content/images/guide/forms/tdf-2.png deleted file mode 100644 index 8322d2a4904..00000000000 Binary files a/aio/content/images/guide/forms/tdf-2.png and /dev/null differ diff --git a/aio/content/images/guide/forms/tdf-3.png b/aio/content/images/guide/forms/tdf-3.png deleted file mode 100644 index b4242ef5838..00000000000 Binary files a/aio/content/images/guide/forms/tdf-3.png and /dev/null differ diff --git a/aio/content/images/guide/forms/tdf-4.png b/aio/content/images/guide/forms/tdf-4.png deleted file mode 100644 index d5c1b1920c3..00000000000 Binary files a/aio/content/images/guide/forms/tdf-4.png and /dev/null differ diff --git a/aio/content/images/guide/forms/tdf-5.png b/aio/content/images/guide/forms/tdf-5.png deleted file mode 100644 index 029a82468f4..00000000000 Binary files a/aio/content/images/guide/forms/tdf-5.png and /dev/null differ diff --git a/aio/content/images/guide/forms/validity-required-indicator.png b/aio/content/images/guide/forms/validity-required-indicator.png deleted file mode 100644 index 25f7571e436..00000000000 Binary files a/aio/content/images/guide/forms/validity-required-indicator.png and /dev/null differ diff --git a/aio/content/images/guide/frequent-ngmodules/browser-module-error.gif b/aio/content/images/guide/frequent-ngmodules/browser-module-error.gif deleted file mode 100644 index f84dc081642..00000000000 Binary files a/aio/content/images/guide/frequent-ngmodules/browser-module-error.gif and /dev/null differ diff --git a/aio/content/images/guide/http/hero-list.png b/aio/content/images/guide/http/hero-list.png deleted file mode 100644 index e5aee3cdb33..00000000000 Binary files a/aio/content/images/guide/http/hero-list.png and /dev/null differ diff --git a/aio/content/images/guide/http/http-toh.gif b/aio/content/images/guide/http/http-toh.gif deleted file mode 100644 index f07c364aaf2..00000000000 Binary files a/aio/content/images/guide/http/http-toh.gif and /dev/null differ diff --git a/aio/content/images/guide/http/interceptor-order.svg b/aio/content/images/guide/http/interceptor-order.svg deleted file mode 100644 index e85d2a6f483..00000000000 --- a/aio/content/images/guide/http/interceptor-order.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - HttpClient - - - - AuthInterceptor - - - - LoggingInterceptor - - - - HttpBackend - - - - Server - - - diff --git a/aio/content/images/guide/http/wiki-1.gif b/aio/content/images/guide/http/wiki-1.gif deleted file mode 100644 index 4c32ad1d647..00000000000 Binary files a/aio/content/images/guide/http/wiki-1.gif and /dev/null differ diff --git a/aio/content/images/guide/http/wiki-2.gif b/aio/content/images/guide/http/wiki-2.gif deleted file mode 100644 index 72b32d5aa25..00000000000 Binary files a/aio/content/images/guide/http/wiki-2.gif and /dev/null differ diff --git a/aio/content/images/guide/inputs-outputs/input-diagram-target-source.svg b/aio/content/images/guide/inputs-outputs/input-diagram-target-source.svg deleted file mode 100644 index b33e275f400..00000000000 --- a/aio/content/images/guide/inputs-outputs/input-diagram-target-source.svg +++ /dev/null @@ -1 +0,0 @@ -childselector@Input()property fromchildtargetsourceproperty fromparent<app-item-detail [item]="currentItem"></app-item-detail> \ No newline at end of file diff --git a/aio/content/images/guide/inputs-outputs/input-output-diagram.svg b/aio/content/images/guide/inputs-outputs/input-output-diagram.svg deleted file mode 100644 index 85416f7affb..00000000000 --- a/aio/content/images/guide/inputs-outputs/input-output-diagram.svg +++ /dev/null @@ -1 +0,0 @@ -<app-input-output [item]="currentItem" (deleteRequest)="crossOffItem($event)"></app-input-output>childselectortargetsourcetargetsource@Input()property fromchild@Output()event fromchildhandler fromparentproperty fromparent diff --git a/aio/content/images/guide/inputs-outputs/input.svg b/aio/content/images/guide/inputs-outputs/input.svg deleted file mode 100644 index 4eacafaeae6..00000000000 --- a/aio/content/images/guide/inputs-outputs/input.svg +++ /dev/null @@ -1 +0,0 @@ -@Inputdata flowParentChild \ No newline at end of file diff --git a/aio/content/images/guide/inputs-outputs/output.svg b/aio/content/images/guide/inputs-outputs/output.svg deleted file mode 100644 index e77cd9796f9..00000000000 --- a/aio/content/images/guide/inputs-outputs/output.svg +++ /dev/null @@ -1 +0,0 @@ -@Outputdata flowParentChild \ No newline at end of file diff --git a/aio/content/images/guide/language-service/language-completion.gif b/aio/content/images/guide/language-service/language-completion.gif deleted file mode 100644 index 4c6de8a48d6..00000000000 Binary files a/aio/content/images/guide/language-service/language-completion.gif and /dev/null differ diff --git a/aio/content/images/guide/language-service/language-error.gif b/aio/content/images/guide/language-service/language-error.gif deleted file mode 100644 index e26b25b8de9..00000000000 Binary files a/aio/content/images/guide/language-service/language-error.gif and /dev/null differ diff --git a/aio/content/images/guide/language-service/language-navigation.gif b/aio/content/images/guide/language-service/language-navigation.gif deleted file mode 100644 index 973db203b85..00000000000 Binary files a/aio/content/images/guide/language-service/language-navigation.gif and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/chunk-arrow.png b/aio/content/images/guide/lazy-loading-ngmodules/chunk-arrow.png deleted file mode 100644 index b8d9d8632e7..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/chunk-arrow.png and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/chunk.png b/aio/content/images/guide/lazy-loading-ngmodules/chunk.png deleted file mode 100644 index 558d155f6f5..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/chunk.png and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/clear.gif b/aio/content/images/guide/lazy-loading-ngmodules/clear.gif deleted file mode 100644 index 6aacf02f8cc..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/clear.gif and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/clear.png b/aio/content/images/guide/lazy-loading-ngmodules/clear.png deleted file mode 100644 index df2bc89be51..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/clear.png and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/lazy-load-relationship.jpg b/aio/content/images/guide/lazy-loading-ngmodules/lazy-load-relationship.jpg deleted file mode 100644 index 3aa0004925c..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/lazy-load-relationship.jpg and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/network-tab.png b/aio/content/images/guide/lazy-loading-ngmodules/network-tab.png deleted file mode 100644 index 439161cf931..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/network-tab.png and /dev/null differ diff --git a/aio/content/images/guide/lazy-loading-ngmodules/three-buttons.png b/aio/content/images/guide/lazy-loading-ngmodules/three-buttons.png deleted file mode 100644 index 076ed234bf5..00000000000 Binary files a/aio/content/images/guide/lazy-loading-ngmodules/three-buttons.png and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/after-view-anim.gif b/aio/content/images/guide/lifecycle-hooks/after-view-anim.gif deleted file mode 100644 index 0c1b095f90d..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/after-view-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/do-check-anim.gif b/aio/content/images/guide/lifecycle-hooks/do-check-anim.gif deleted file mode 100644 index 8b3bc392b85..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/do-check-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/on-changes-anim.gif b/aio/content/images/guide/lifecycle-hooks/on-changes-anim.gif deleted file mode 100644 index e13284ab8de..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/on-changes-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/peek-a-boo.gif b/aio/content/images/guide/lifecycle-hooks/peek-a-boo.gif deleted file mode 100644 index 6e21ed74a17..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/peek-a-boo.gif and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/peek-a-boo.png b/aio/content/images/guide/lifecycle-hooks/peek-a-boo.png deleted file mode 100644 index d603d818c22..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/peek-a-boo.png and /dev/null differ diff --git a/aio/content/images/guide/lifecycle-hooks/projected-child-view.png b/aio/content/images/guide/lifecycle-hooks/projected-child-view.png deleted file mode 100644 index bd8068d61ba..00000000000 Binary files a/aio/content/images/guide/lifecycle-hooks/projected-child-view.png and /dev/null differ diff --git a/aio/content/images/guide/pipes/flying-heroes-anim.gif b/aio/content/images/guide/pipes/flying-heroes-anim.gif deleted file mode 100644 index 2c11805cd44..00000000000 Binary files a/aio/content/images/guide/pipes/flying-heroes-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/pipes/hero-list.png b/aio/content/images/guide/pipes/hero-list.png deleted file mode 100644 index 59f0d33fe6c..00000000000 Binary files a/aio/content/images/guide/pipes/hero-list.png and /dev/null differ diff --git a/aio/content/images/guide/pipes/power-boost-calculator.png b/aio/content/images/guide/pipes/power-boost-calculator.png deleted file mode 100644 index 35e1e7c7977..00000000000 Binary files a/aio/content/images/guide/pipes/power-boost-calculator.png and /dev/null differ diff --git a/aio/content/images/guide/providers/any-provider.svg b/aio/content/images/guide/providers/any-provider.svg deleted file mode 100644 index cdc3ee18dce..00000000000 --- a/aio/content/images/guide/providers/any-provider.svg +++ /dev/null @@ -1,3 +0,0 @@ - - -
    Eagerly Loaded Modules
    Eagerly Loaded Modules
    UserService
    UserService
    EmployeeModule
    EmployeeModule
    UserService
    UserService
    AppModule
    AppModule
    ProductModule
    ProductModule
    DepartmentModule
    DepartmentModule
    UserService
    UserService
    Lazy Loaded Modules
    Lazy Loaded Modules
    Viewer does not support full SVG 1.1
    \ No newline at end of file diff --git a/aio/content/images/guide/reactive-forms/name-editor-1.png b/aio/content/images/guide/reactive-forms/name-editor-1.png deleted file mode 100644 index 93148353efb..00000000000 Binary files a/aio/content/images/guide/reactive-forms/name-editor-1.png and /dev/null differ diff --git a/aio/content/images/guide/reactive-forms/name-editor-2.gif b/aio/content/images/guide/reactive-forms/name-editor-2.gif deleted file mode 100644 index 574aa88b546..00000000000 Binary files a/aio/content/images/guide/reactive-forms/name-editor-2.gif and /dev/null differ diff --git a/aio/content/images/guide/reactive-forms/profile-editor-1.gif b/aio/content/images/guide/reactive-forms/profile-editor-1.gif deleted file mode 100644 index cead7243065..00000000000 Binary files a/aio/content/images/guide/reactive-forms/profile-editor-1.gif and /dev/null differ diff --git a/aio/content/images/guide/reactive-forms/profile-editor-2.png b/aio/content/images/guide/reactive-forms/profile-editor-2.png deleted file mode 100644 index fa764f62edc..00000000000 Binary files a/aio/content/images/guide/reactive-forms/profile-editor-2.png and /dev/null differ diff --git a/aio/content/images/guide/reactive-forms/profile-editor-3.png b/aio/content/images/guide/reactive-forms/profile-editor-3.png deleted file mode 100644 index bce861e40e5..00000000000 Binary files a/aio/content/images/guide/reactive-forms/profile-editor-3.png and /dev/null differ diff --git a/aio/content/images/guide/reactive-forms/profile-editor-4.png b/aio/content/images/guide/reactive-forms/profile-editor-4.png deleted file mode 100644 index 4ff04a84ce0..00000000000 Binary files a/aio/content/images/guide/reactive-forms/profile-editor-4.png and /dev/null differ diff --git a/aio/content/images/guide/router/confirm-dialog.png b/aio/content/images/guide/router/confirm-dialog.png deleted file mode 100644 index f0baed37989..00000000000 Binary files a/aio/content/images/guide/router/confirm-dialog.png and /dev/null differ diff --git a/aio/content/images/guide/router/contact-form.png b/aio/content/images/guide/router/contact-form.png deleted file mode 100644 index 1f3b28c4d39..00000000000 Binary files a/aio/content/images/guide/router/contact-form.png and /dev/null differ diff --git a/aio/content/images/guide/router/crisis-center-detail.gif b/aio/content/images/guide/router/crisis-center-detail.gif deleted file mode 100644 index 1329e6ab44c..00000000000 Binary files a/aio/content/images/guide/router/crisis-center-detail.gif and /dev/null differ diff --git a/aio/content/images/guide/router/crisis-center-list.gif b/aio/content/images/guide/router/crisis-center-list.gif deleted file mode 100644 index 2b630557917..00000000000 Binary files a/aio/content/images/guide/router/crisis-center-list.gif and /dev/null differ diff --git a/aio/content/images/guide/router/hero-detail.png b/aio/content/images/guide/router/hero-detail.png deleted file mode 100644 index f6fc6268fbc..00000000000 Binary files a/aio/content/images/guide/router/hero-detail.png and /dev/null differ diff --git a/aio/content/images/guide/router/hero-list.gif b/aio/content/images/guide/router/hero-list.gif deleted file mode 100644 index 9f0ea2843a4..00000000000 Binary files a/aio/content/images/guide/router/hero-list.gif and /dev/null differ diff --git a/aio/content/images/guide/router/router-1-anim.gif b/aio/content/images/guide/router/router-1-anim.gif deleted file mode 100644 index 842f9c24d8c..00000000000 Binary files a/aio/content/images/guide/router/router-1-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/router/selected-hero.png b/aio/content/images/guide/router/selected-hero.png deleted file mode 100644 index ca57b0293fd..00000000000 Binary files a/aio/content/images/guide/router/selected-hero.png and /dev/null differ diff --git a/aio/content/images/guide/router/shell-and-outlet.gif b/aio/content/images/guide/router/shell-and-outlet.gif deleted file mode 100644 index 2e90d868a71..00000000000 Binary files a/aio/content/images/guide/router/shell-and-outlet.gif and /dev/null differ diff --git a/aio/content/images/guide/schematics/collection-files.gif b/aio/content/images/guide/schematics/collection-files.gif deleted file mode 100644 index 125406ed4a8..00000000000 Binary files a/aio/content/images/guide/schematics/collection-files.gif and /dev/null differ diff --git a/aio/content/images/guide/security/binding-inner-html.png b/aio/content/images/guide/security/binding-inner-html.png deleted file mode 100644 index 6457a9fd727..00000000000 Binary files a/aio/content/images/guide/security/binding-inner-html.png and /dev/null differ diff --git a/aio/content/images/guide/security/bypass-security-component.png b/aio/content/images/guide/security/bypass-security-component.png deleted file mode 100644 index 34d076cdfca..00000000000 Binary files a/aio/content/images/guide/security/bypass-security-component.png and /dev/null differ diff --git a/aio/content/images/guide/service-worker/offline-option.png b/aio/content/images/guide/service-worker/offline-option.png deleted file mode 100644 index 6a164627e54..00000000000 Binary files a/aio/content/images/guide/service-worker/offline-option.png and /dev/null differ diff --git a/aio/content/images/guide/service-worker/sw-active.png b/aio/content/images/guide/service-worker/sw-active.png deleted file mode 100644 index 1d45742d1b7..00000000000 Binary files a/aio/content/images/guide/service-worker/sw-active.png and /dev/null differ diff --git a/aio/content/images/guide/service-worker/welcome-msg-en.png b/aio/content/images/guide/service-worker/welcome-msg-en.png deleted file mode 100644 index cc767e933fe..00000000000 Binary files a/aio/content/images/guide/service-worker/welcome-msg-en.png and /dev/null differ diff --git a/aio/content/images/guide/service-worker/welcome-msg-fr.png b/aio/content/images/guide/service-worker/welcome-msg-fr.png deleted file mode 100644 index 7e015417921..00000000000 Binary files a/aio/content/images/guide/service-worker/welcome-msg-fr.png and /dev/null differ diff --git a/aio/content/images/guide/setup-local/app-works.png b/aio/content/images/guide/setup-local/app-works.png deleted file mode 100644 index 43c5b7623e3..00000000000 Binary files a/aio/content/images/guide/setup-local/app-works.png and /dev/null differ diff --git a/aio/content/images/guide/start/app-components.png b/aio/content/images/guide/start/app-components.png deleted file mode 100644 index d30a8fb6fbc..00000000000 Binary files a/aio/content/images/guide/start/app-components.png and /dev/null differ diff --git a/aio/content/images/guide/start/buy-alert.png b/aio/content/images/guide/start/buy-alert.png deleted file mode 100644 index f97bbbc33a3..00000000000 Binary files a/aio/content/images/guide/start/buy-alert.png and /dev/null differ diff --git a/aio/content/images/guide/start/cart-empty-with-shipping-prices.png b/aio/content/images/guide/start/cart-empty-with-shipping-prices.png deleted file mode 100644 index e65332d7b91..00000000000 Binary files a/aio/content/images/guide/start/cart-empty-with-shipping-prices.png and /dev/null differ diff --git a/aio/content/images/guide/start/cart-page-full.png b/aio/content/images/guide/start/cart-page-full.png deleted file mode 100644 index 578124e1b28..00000000000 Binary files a/aio/content/images/guide/start/cart-page-full.png and /dev/null differ diff --git a/aio/content/images/guide/start/cart-with-items-and-form.png b/aio/content/images/guide/start/cart-with-items-and-form.png deleted file mode 100644 index 03ff0b87d40..00000000000 Binary files a/aio/content/images/guide/start/cart-with-items-and-form.png and /dev/null differ diff --git a/aio/content/images/guide/start/cart-works.png b/aio/content/images/guide/start/cart-works.png deleted file mode 100644 index c5ec25a6199..00000000000 Binary files a/aio/content/images/guide/start/cart-works.png and /dev/null differ diff --git a/aio/content/images/guide/start/create-new-terminal.png b/aio/content/images/guide/start/create-new-terminal.png deleted file mode 100644 index d9132b29d3d..00000000000 Binary files a/aio/content/images/guide/start/create-new-terminal.png and /dev/null differ diff --git a/aio/content/images/guide/start/download-project.png b/aio/content/images/guide/start/download-project.png deleted file mode 100644 index b977f40f1fb..00000000000 Binary files a/aio/content/images/guide/start/download-project.png and /dev/null differ diff --git a/aio/content/images/guide/start/fork-the-project.png b/aio/content/images/guide/start/fork-the-project.png deleted file mode 100644 index 83ddc8ca227..00000000000 Binary files a/aio/content/images/guide/start/fork-the-project.png and /dev/null differ diff --git a/aio/content/images/guide/start/generate-component.png b/aio/content/images/guide/start/generate-component.png deleted file mode 100644 index bbb8ec60f61..00000000000 Binary files a/aio/content/images/guide/start/generate-component.png and /dev/null differ diff --git a/aio/content/images/guide/start/new-app-all.gif b/aio/content/images/guide/start/new-app-all.gif deleted file mode 100644 index cfe78dbf477..00000000000 Binary files a/aio/content/images/guide/start/new-app-all.gif and /dev/null differ diff --git a/aio/content/images/guide/start/new-app.png b/aio/content/images/guide/start/new-app.png deleted file mode 100644 index 128ee6fdf97..00000000000 Binary files a/aio/content/images/guide/start/new-app.png and /dev/null differ diff --git a/aio/content/images/guide/start/product-alert-button.png b/aio/content/images/guide/start/product-alert-button.png deleted file mode 100644 index 37a787286f8..00000000000 Binary files a/aio/content/images/guide/start/product-alert-button.png and /dev/null differ diff --git a/aio/content/images/guide/start/product-alert-notification.png b/aio/content/images/guide/start/product-alert-notification.png deleted file mode 100644 index 7cb6a66630f..00000000000 Binary files a/aio/content/images/guide/start/product-alert-notification.png and /dev/null differ diff --git a/aio/content/images/guide/start/product-details-buy.png b/aio/content/images/guide/start/product-details-buy.png deleted file mode 100644 index 4d22c98a272..00000000000 Binary files a/aio/content/images/guide/start/product-details-buy.png and /dev/null differ diff --git a/aio/content/images/guide/start/product-details-routed.png b/aio/content/images/guide/start/product-details-routed.png deleted file mode 100644 index bfd9219c582..00000000000 Binary files a/aio/content/images/guide/start/product-details-routed.png and /dev/null differ diff --git a/aio/content/images/guide/start/product-details-works.png b/aio/content/images/guide/start/product-details-works.png deleted file mode 100644 index 05cf0f9574c..00000000000 Binary files a/aio/content/images/guide/start/product-details-works.png and /dev/null differ diff --git a/aio/content/images/guide/start/shipping-prices.png b/aio/content/images/guide/start/shipping-prices.png deleted file mode 100644 index 0d6f49f04da..00000000000 Binary files a/aio/content/images/guide/start/shipping-prices.png and /dev/null differ diff --git a/aio/content/images/guide/start/template-syntax-product-anchor.png b/aio/content/images/guide/start/template-syntax-product-anchor.png deleted file mode 100644 index 23217253194..00000000000 Binary files a/aio/content/images/guide/start/template-syntax-product-anchor.png and /dev/null differ diff --git a/aio/content/images/guide/start/template-syntax-product-description.png b/aio/content/images/guide/start/template-syntax-product-description.png deleted file mode 100644 index 7fbc7d221a6..00000000000 Binary files a/aio/content/images/guide/start/template-syntax-product-description.png and /dev/null differ diff --git a/aio/content/images/guide/start/template-syntax-product-names.png b/aio/content/images/guide/start/template-syntax-product-names.png deleted file mode 100644 index cca1e49a250..00000000000 Binary files a/aio/content/images/guide/start/template-syntax-product-names.png and /dev/null differ diff --git a/aio/content/images/guide/start/template-syntax-product-share-alert.png b/aio/content/images/guide/start/template-syntax-product-share-alert.png deleted file mode 100644 index 60b344e2a6d..00000000000 Binary files a/aio/content/images/guide/start/template-syntax-product-share-alert.png and /dev/null differ diff --git a/aio/content/images/guide/start/template-syntax-product-share-button.png b/aio/content/images/guide/start/template-syntax-product-share-button.png deleted file mode 100644 index 540f695ebe8..00000000000 Binary files a/aio/content/images/guide/start/template-syntax-product-share-button.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/bad-paragraph.png b/aio/content/images/guide/structural-directives/bad-paragraph.png deleted file mode 100644 index be291c639f5..00000000000 Binary files a/aio/content/images/guide/structural-directives/bad-paragraph.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/bad-select.png b/aio/content/images/guide/structural-directives/bad-select.png deleted file mode 100644 index 12a64514369..00000000000 Binary files a/aio/content/images/guide/structural-directives/bad-select.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/element-display-in-dom.png b/aio/content/images/guide/structural-directives/element-display-in-dom.png deleted file mode 100644 index 3d692e18c60..00000000000 Binary files a/aio/content/images/guide/structural-directives/element-display-in-dom.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/element-not-in-dom.png b/aio/content/images/guide/structural-directives/element-not-in-dom.png deleted file mode 100644 index 5061954ecb4..00000000000 Binary files a/aio/content/images/guide/structural-directives/element-not-in-dom.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/good-paragraph.png b/aio/content/images/guide/structural-directives/good-paragraph.png deleted file mode 100644 index 42286cbf5ff..00000000000 Binary files a/aio/content/images/guide/structural-directives/good-paragraph.png and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/select-ngcontainer-anim.gif b/aio/content/images/guide/structural-directives/select-ngcontainer-anim.gif deleted file mode 100644 index c75db476182..00000000000 Binary files a/aio/content/images/guide/structural-directives/select-ngcontainer-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/structural-directives/unless-anim.gif b/aio/content/images/guide/structural-directives/unless-anim.gif deleted file mode 100644 index 702590d22f9..00000000000 Binary files a/aio/content/images/guide/structural-directives/unless-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/styleguide/use-extension.gif b/aio/content/images/guide/styleguide/use-extension.gif deleted file mode 100644 index 0d9de0e01fe..00000000000 Binary files a/aio/content/images/guide/styleguide/use-extension.gif and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/evil-title.png b/aio/content/images/guide/template-syntax/evil-title.png deleted file mode 100644 index 010d634b6ce..00000000000 Binary files a/aio/content/images/guide/template-syntax/evil-title.png and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/input-output.png b/aio/content/images/guide/template-syntax/input-output.png deleted file mode 100644 index 227fe402fc6..00000000000 Binary files a/aio/content/images/guide/template-syntax/input-output.png and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/ng-for-track-by-anim.gif b/aio/content/images/guide/template-syntax/ng-for-track-by-anim.gif deleted file mode 100644 index 716e6a44bae..00000000000 Binary files a/aio/content/images/guide/template-syntax/ng-for-track-by-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/ng-model-anim.gif b/aio/content/images/guide/template-syntax/ng-model-anim.gif deleted file mode 100644 index ed5da31712e..00000000000 Binary files a/aio/content/images/guide/template-syntax/ng-model-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/switch-anim.gif b/aio/content/images/guide/template-syntax/switch-anim.gif deleted file mode 100644 index 9892df24597..00000000000 Binary files a/aio/content/images/guide/template-syntax/switch-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/template-syntax/syntax-diagram.svg b/aio/content/images/guide/template-syntax/syntax-diagram.svg deleted file mode 100644 index 03a1fbec6d6..00000000000 --- a/aio/content/images/guide/template-syntax/syntax-diagram.svg +++ /dev/null @@ -1 +0,0 @@ -<button(click)="onSave()">Save</button>target event nametemplate statement \ No newline at end of file diff --git a/aio/content/images/guide/testing/app-plunker.png b/aio/content/images/guide/testing/app-plunker.png deleted file mode 100644 index b423b88f7e5..00000000000 Binary files a/aio/content/images/guide/testing/app-plunker.png and /dev/null differ diff --git a/aio/content/images/guide/testing/app-specs-plunker.png b/aio/content/images/guide/testing/app-specs-plunker.png deleted file mode 100644 index 151557eedcc..00000000000 Binary files a/aio/content/images/guide/testing/app-specs-plunker.png and /dev/null differ diff --git a/aio/content/images/guide/testing/hero-detail.component.png b/aio/content/images/guide/testing/hero-detail.component.png deleted file mode 100644 index 3510be66dba..00000000000 Binary files a/aio/content/images/guide/testing/hero-detail.component.png and /dev/null differ diff --git a/aio/content/images/guide/testing/highlight-directive-spec.png b/aio/content/images/guide/testing/highlight-directive-spec.png deleted file mode 100644 index ca12d5139d4..00000000000 Binary files a/aio/content/images/guide/testing/highlight-directive-spec.png and /dev/null differ diff --git a/aio/content/images/guide/testing/initial-jasmine-html-reporter.png b/aio/content/images/guide/testing/initial-jasmine-html-reporter.png deleted file mode 100644 index 196a0ac2885..00000000000 Binary files a/aio/content/images/guide/testing/initial-jasmine-html-reporter.png and /dev/null differ diff --git a/aio/content/images/guide/testing/karma-1st-spec-debug.png b/aio/content/images/guide/testing/karma-1st-spec-debug.png deleted file mode 100644 index d37803ba15b..00000000000 Binary files a/aio/content/images/guide/testing/karma-1st-spec-debug.png and /dev/null differ diff --git a/aio/content/images/guide/testing/karma-1st-spec-output.png b/aio/content/images/guide/testing/karma-1st-spec-output.png deleted file mode 100644 index 04d6c818d4b..00000000000 Binary files a/aio/content/images/guide/testing/karma-1st-spec-output.png and /dev/null differ diff --git a/aio/content/images/guide/testing/karma-browser.png b/aio/content/images/guide/testing/karma-browser.png deleted file mode 100644 index 99d1af8e468..00000000000 Binary files a/aio/content/images/guide/testing/karma-browser.png and /dev/null differ diff --git a/aio/content/images/guide/toh/component-hierarchy.svg b/aio/content/images/guide/toh/component-hierarchy.svg deleted file mode 100644 index 68327c4885a..00000000000 --- a/aio/content/images/guide/toh/component-hierarchy.svg +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - diff --git a/aio/content/images/guide/toh/component-structure.gif b/aio/content/images/guide/toh/component-structure.gif deleted file mode 100644 index 181128e6296..00000000000 Binary files a/aio/content/images/guide/toh/component-structure.gif and /dev/null differ diff --git a/aio/content/images/guide/toh/component-structure.png b/aio/content/images/guide/toh/component-structure.png deleted file mode 100644 index 5e4b79ab1c9..00000000000 Binary files a/aio/content/images/guide/toh/component-structure.png and /dev/null differ diff --git a/aio/content/images/guide/toh/dashboard-top-heroes.png b/aio/content/images/guide/toh/dashboard-top-heroes.png deleted file mode 100644 index f3299a33dce..00000000000 Binary files a/aio/content/images/guide/toh/dashboard-top-heroes.png and /dev/null differ diff --git a/aio/content/images/guide/toh/hero-details-1.png b/aio/content/images/guide/toh/hero-details-1.png deleted file mode 100644 index 3f7acb10dfc..00000000000 Binary files a/aio/content/images/guide/toh/hero-details-1.png and /dev/null differ diff --git a/aio/content/images/guide/toh/hero-details-save-button.png b/aio/content/images/guide/toh/hero-details-save-button.png deleted file mode 100644 index 8f048153b78..00000000000 Binary files a/aio/content/images/guide/toh/hero-details-save-button.png and /dev/null differ diff --git a/aio/content/images/guide/toh/heroes-dashboard-1.png b/aio/content/images/guide/toh/heroes-dashboard-1.png deleted file mode 100644 index e26b9e544d9..00000000000 Binary files a/aio/content/images/guide/toh/heroes-dashboard-1.png and /dev/null differ diff --git a/aio/content/images/guide/toh/heroes-list-1.png b/aio/content/images/guide/toh/heroes-list-1.png deleted file mode 100644 index b8088da199b..00000000000 Binary files a/aio/content/images/guide/toh/heroes-list-1.png and /dev/null differ diff --git a/aio/content/images/guide/toh/heroes-list-2.png b/aio/content/images/guide/toh/heroes-list-2.png deleted file mode 100644 index ea68a3c205b..00000000000 Binary files a/aio/content/images/guide/toh/heroes-list-2.png and /dev/null differ diff --git a/aio/content/images/guide/toh/heroes-list-delete-button.png b/aio/content/images/guide/toh/heroes-list-delete-button.png deleted file mode 100644 index ea487ee3615..00000000000 Binary files a/aio/content/images/guide/toh/heroes-list-delete-button.png and /dev/null differ diff --git a/aio/content/images/guide/toh/heroes-list-selected.png b/aio/content/images/guide/toh/heroes-list-selected.png deleted file mode 100644 index edc3aee8d74..00000000000 Binary files a/aio/content/images/guide/toh/heroes-list-selected.png and /dev/null differ diff --git a/aio/content/images/guide/toh/nav-diagram.png b/aio/content/images/guide/toh/nav-diagram.png deleted file mode 100644 index e1bed1ece5b..00000000000 Binary files a/aio/content/images/guide/toh/nav-diagram.png and /dev/null differ diff --git a/aio/content/images/guide/toh/toh-anim.gif b/aio/content/images/guide/toh/toh-anim.gif deleted file mode 100644 index f37369f3df9..00000000000 Binary files a/aio/content/images/guide/toh/toh-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/toh/toh-hero-search.gif b/aio/content/images/guide/toh/toh-hero-search.gif deleted file mode 100644 index dfd50fc3f98..00000000000 Binary files a/aio/content/images/guide/toh/toh-hero-search.gif and /dev/null differ diff --git a/aio/content/images/guide/toh/toh-hero-search.png b/aio/content/images/guide/toh/toh-hero-search.png deleted file mode 100644 index a86d9a57029..00000000000 Binary files a/aio/content/images/guide/toh/toh-hero-search.png and /dev/null differ diff --git a/aio/content/images/guide/toh/toh-http.anim.gif b/aio/content/images/guide/toh/toh-http.anim.gif deleted file mode 100644 index a11eb3e5a5a..00000000000 Binary files a/aio/content/images/guide/toh/toh-http.anim.gif and /dev/null differ diff --git a/aio/content/images/guide/upgrade/a-to-ajs-with-transclusion.png b/aio/content/images/guide/upgrade/a-to-ajs-with-transclusion.png deleted file mode 100644 index f6bc2991b74..00000000000 Binary files a/aio/content/images/guide/upgrade/a-to-ajs-with-transclusion.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/a-to-ajs.png b/aio/content/images/guide/upgrade/a-to-ajs.png deleted file mode 100644 index c2b9966287f..00000000000 Binary files a/aio/content/images/guide/upgrade/a-to-ajs.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/ajs-to-a-with-projection.png b/aio/content/images/guide/upgrade/ajs-to-a-with-projection.png deleted file mode 100644 index 8e8f3f1a113..00000000000 Binary files a/aio/content/images/guide/upgrade/ajs-to-a-with-projection.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/ajs-to-a.png b/aio/content/images/guide/upgrade/ajs-to-a.png deleted file mode 100644 index 469ea5d48e5..00000000000 Binary files a/aio/content/images/guide/upgrade/ajs-to-a.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/change_detection.png b/aio/content/images/guide/upgrade/change_detection.png deleted file mode 100644 index e432e92ff08..00000000000 Binary files a/aio/content/images/guide/upgrade/change_detection.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/dom.png b/aio/content/images/guide/upgrade/dom.png deleted file mode 100644 index bc4496d3293..00000000000 Binary files a/aio/content/images/guide/upgrade/dom.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/injectors-2.png b/aio/content/images/guide/upgrade/injectors-2.png deleted file mode 100644 index f46d54f9c39..00000000000 Binary files a/aio/content/images/guide/upgrade/injectors-2.png and /dev/null differ diff --git a/aio/content/images/guide/upgrade/injectors.png b/aio/content/images/guide/upgrade/injectors.png deleted file mode 100644 index 8acba21f104..00000000000 Binary files a/aio/content/images/guide/upgrade/injectors.png and /dev/null differ diff --git a/aio/content/images/guide/user-input/keyup-loop-back-anim.gif b/aio/content/images/guide/user-input/keyup-loop-back-anim.gif deleted file mode 100644 index 4291af63648..00000000000 Binary files a/aio/content/images/guide/user-input/keyup-loop-back-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/user-input/keyup1-anim.gif b/aio/content/images/guide/user-input/keyup1-anim.gif deleted file mode 100644 index a7095f1174b..00000000000 Binary files a/aio/content/images/guide/user-input/keyup1-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/user-input/keyup3-anim.gif b/aio/content/images/guide/user-input/keyup3-anim.gif deleted file mode 100644 index 054ef171579..00000000000 Binary files a/aio/content/images/guide/user-input/keyup3-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/user-input/little-tour-anim.gif b/aio/content/images/guide/user-input/little-tour-anim.gif deleted file mode 100644 index 76d320264a4..00000000000 Binary files a/aio/content/images/guide/user-input/little-tour-anim.gif and /dev/null differ diff --git a/aio/content/images/guide/user-input/little-tour.png b/aio/content/images/guide/user-input/little-tour.png deleted file mode 100644 index 9893e21ce69..00000000000 Binary files a/aio/content/images/guide/user-input/little-tour.png and /dev/null differ diff --git a/aio/content/images/guide/view-encapsulation/emulated-encapsulation.png b/aio/content/images/guide/view-encapsulation/emulated-encapsulation.png deleted file mode 100644 index 21725578e78..00000000000 Binary files a/aio/content/images/guide/view-encapsulation/emulated-encapsulation.png and /dev/null differ diff --git a/aio/content/images/guide/view-encapsulation/no-encapsulation.png b/aio/content/images/guide/view-encapsulation/no-encapsulation.png deleted file mode 100644 index 86d9b8e6274..00000000000 Binary files a/aio/content/images/guide/view-encapsulation/no-encapsulation.png and /dev/null differ diff --git a/aio/content/images/guide/view-encapsulation/shadow-dom-encapsulation.png b/aio/content/images/guide/view-encapsulation/shadow-dom-encapsulation.png deleted file mode 100644 index df0b44a22c8..00000000000 Binary files a/aio/content/images/guide/view-encapsulation/shadow-dom-encapsulation.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/animations.png b/aio/content/images/marketing/concept-icons/animations.png deleted file mode 100644 index ba915465c31..00000000000 Binary files a/aio/content/images/marketing/concept-icons/animations.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/animations.svg b/aio/content/images/marketing/concept-icons/animations.svg deleted file mode 100644 index 6e73ef31101..00000000000 --- a/aio/content/images/marketing/concept-icons/animations.svg +++ /dev/null @@ -1 +0,0 @@ -animations \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/cdk.png b/aio/content/images/marketing/concept-icons/cdk.png deleted file mode 100644 index f820997bc9b..00000000000 Binary files a/aio/content/images/marketing/concept-icons/cdk.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/cdk.svg b/aio/content/images/marketing/concept-icons/cdk.svg deleted file mode 100644 index 551cd705bde..00000000000 --- a/aio/content/images/marketing/concept-icons/cdk.svg +++ /dev/null @@ -1 +0,0 @@ -cdk \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/cli.png b/aio/content/images/marketing/concept-icons/cli.png deleted file mode 100644 index 27968717485..00000000000 Binary files a/aio/content/images/marketing/concept-icons/cli.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/cli.svg b/aio/content/images/marketing/concept-icons/cli.svg deleted file mode 100644 index 1d00bd1f08a..00000000000 --- a/aio/content/images/marketing/concept-icons/cli.svg +++ /dev/null @@ -1 +0,0 @@ -cli \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/compiler.png b/aio/content/images/marketing/concept-icons/compiler.png deleted file mode 100644 index a4544e050c7..00000000000 Binary files a/aio/content/images/marketing/concept-icons/compiler.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/compiler.svg b/aio/content/images/marketing/concept-icons/compiler.svg deleted file mode 100644 index b1fdbce869a..00000000000 --- a/aio/content/images/marketing/concept-icons/compiler.svg +++ /dev/null @@ -1 +0,0 @@ -compiler \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/components.png b/aio/content/images/marketing/concept-icons/components.png deleted file mode 100644 index 084ff499d01..00000000000 Binary files a/aio/content/images/marketing/concept-icons/components.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/components.svg b/aio/content/images/marketing/concept-icons/components.svg deleted file mode 100644 index 0c58f21013e..00000000000 --- a/aio/content/images/marketing/concept-icons/components.svg +++ /dev/null @@ -1 +0,0 @@ -components \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/dependency-injection.png b/aio/content/images/marketing/concept-icons/dependency-injection.png deleted file mode 100644 index 9cbbfc4867b..00000000000 Binary files a/aio/content/images/marketing/concept-icons/dependency-injection.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/dependency-injection.svg b/aio/content/images/marketing/concept-icons/dependency-injection.svg deleted file mode 100644 index 82cdf98dce4..00000000000 --- a/aio/content/images/marketing/concept-icons/dependency-injection.svg +++ /dev/null @@ -1 +0,0 @@ -dependency-injection \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/forms.png b/aio/content/images/marketing/concept-icons/forms.png deleted file mode 100644 index 1051ed9ec85..00000000000 Binary files a/aio/content/images/marketing/concept-icons/forms.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/forms.svg b/aio/content/images/marketing/concept-icons/forms.svg deleted file mode 100644 index b0bf02adb12..00000000000 --- a/aio/content/images/marketing/concept-icons/forms.svg +++ /dev/null @@ -1 +0,0 @@ -forms \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/http.png b/aio/content/images/marketing/concept-icons/http.png deleted file mode 100644 index a6597e827a4..00000000000 Binary files a/aio/content/images/marketing/concept-icons/http.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/http.svg b/aio/content/images/marketing/concept-icons/http.svg deleted file mode 100644 index fd099fe52a2..00000000000 --- a/aio/content/images/marketing/concept-icons/http.svg +++ /dev/null @@ -1 +0,0 @@ -http \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/i18n.png b/aio/content/images/marketing/concept-icons/i18n.png deleted file mode 100644 index 6c1c410b917..00000000000 Binary files a/aio/content/images/marketing/concept-icons/i18n.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/i18n.svg b/aio/content/images/marketing/concept-icons/i18n.svg deleted file mode 100644 index 8b8b596375a..00000000000 --- a/aio/content/images/marketing/concept-icons/i18n.svg +++ /dev/null @@ -1 +0,0 @@ -i18n \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/karma.png b/aio/content/images/marketing/concept-icons/karma.png deleted file mode 100644 index 81749c1da7b..00000000000 Binary files a/aio/content/images/marketing/concept-icons/karma.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/karma.svg b/aio/content/images/marketing/concept-icons/karma.svg deleted file mode 100644 index e668f91049f..00000000000 --- a/aio/content/images/marketing/concept-icons/karma.svg +++ /dev/null @@ -1 +0,0 @@ -karma \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/labs.png b/aio/content/images/marketing/concept-icons/labs.png deleted file mode 100644 index 1acf0afdae8..00000000000 Binary files a/aio/content/images/marketing/concept-icons/labs.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/labs.svg b/aio/content/images/marketing/concept-icons/labs.svg deleted file mode 100644 index 2c0229b705e..00000000000 --- a/aio/content/images/marketing/concept-icons/labs.svg +++ /dev/null @@ -1 +0,0 @@ -labs \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/language-services.png b/aio/content/images/marketing/concept-icons/language-services.png deleted file mode 100644 index f2c4973bc08..00000000000 Binary files a/aio/content/images/marketing/concept-icons/language-services.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/language-services.svg b/aio/content/images/marketing/concept-icons/language-services.svg deleted file mode 100644 index 5b3cbe23131..00000000000 --- a/aio/content/images/marketing/concept-icons/language-services.svg +++ /dev/null @@ -1 +0,0 @@ -language-services \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/lazy-loading.png b/aio/content/images/marketing/concept-icons/lazy-loading.png deleted file mode 100644 index bbb68345572..00000000000 Binary files a/aio/content/images/marketing/concept-icons/lazy-loading.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/lazy-loading.svg b/aio/content/images/marketing/concept-icons/lazy-loading.svg deleted file mode 100644 index 91f21c7df5f..00000000000 --- a/aio/content/images/marketing/concept-icons/lazy-loading.svg +++ /dev/null @@ -1 +0,0 @@ -lazy-loading \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/libraries.png b/aio/content/images/marketing/concept-icons/libraries.png deleted file mode 100644 index 60312c31cbf..00000000000 Binary files a/aio/content/images/marketing/concept-icons/libraries.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/libraries.svg b/aio/content/images/marketing/concept-icons/libraries.svg deleted file mode 100644 index 9f92fa72101..00000000000 --- a/aio/content/images/marketing/concept-icons/libraries.svg +++ /dev/null @@ -1 +0,0 @@ -libraries \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/material.png b/aio/content/images/marketing/concept-icons/material.png deleted file mode 100644 index 31d7287314b..00000000000 Binary files a/aio/content/images/marketing/concept-icons/material.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/material.svg b/aio/content/images/marketing/concept-icons/material.svg deleted file mode 100644 index 9ac28362700..00000000000 --- a/aio/content/images/marketing/concept-icons/material.svg +++ /dev/null @@ -1 +0,0 @@ -material \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/performance.png b/aio/content/images/marketing/concept-icons/performance.png deleted file mode 100644 index 3f059a6b36c..00000000000 Binary files a/aio/content/images/marketing/concept-icons/performance.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/performance.svg b/aio/content/images/marketing/concept-icons/performance.svg deleted file mode 100644 index 057e1b23cb2..00000000000 --- a/aio/content/images/marketing/concept-icons/performance.svg +++ /dev/null @@ -1 +0,0 @@ -performance \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/pwa.png b/aio/content/images/marketing/concept-icons/pwa.png deleted file mode 100644 index 334e1c2b97e..00000000000 Binary files a/aio/content/images/marketing/concept-icons/pwa.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/pwa.svg b/aio/content/images/marketing/concept-icons/pwa.svg deleted file mode 100644 index 70e9a79a8fe..00000000000 --- a/aio/content/images/marketing/concept-icons/pwa.svg +++ /dev/null @@ -1 +0,0 @@ -pwa \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/router.png b/aio/content/images/marketing/concept-icons/router.png deleted file mode 100644 index 67850bb4ff2..00000000000 Binary files a/aio/content/images/marketing/concept-icons/router.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/router.svg b/aio/content/images/marketing/concept-icons/router.svg deleted file mode 100644 index a2ef8b334e5..00000000000 --- a/aio/content/images/marketing/concept-icons/router.svg +++ /dev/null @@ -1 +0,0 @@ -router \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/templates.png b/aio/content/images/marketing/concept-icons/templates.png deleted file mode 100644 index 54128858f14..00000000000 Binary files a/aio/content/images/marketing/concept-icons/templates.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/templates.svg b/aio/content/images/marketing/concept-icons/templates.svg deleted file mode 100644 index fe789d48d67..00000000000 --- a/aio/content/images/marketing/concept-icons/templates.svg +++ /dev/null @@ -1 +0,0 @@ -templates \ No newline at end of file diff --git a/aio/content/images/marketing/concept-icons/universal.png b/aio/content/images/marketing/concept-icons/universal.png deleted file mode 100644 index 163a314da57..00000000000 Binary files a/aio/content/images/marketing/concept-icons/universal.png and /dev/null differ diff --git a/aio/content/images/marketing/concept-icons/universal.svg b/aio/content/images/marketing/concept-icons/universal.svg deleted file mode 100644 index 6093544f816..00000000000 --- a/aio/content/images/marketing/concept-icons/universal.svg +++ /dev/null @@ -1 +0,0 @@ -universal \ No newline at end of file diff --git a/aio/content/images/marketing/features/feature-icon.svg b/aio/content/images/marketing/features/feature-icon.svg deleted file mode 100644 index ae6cf46eb07..00000000000 --- a/aio/content/images/marketing/features/feature-icon.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/aio/content/images/marketing/home/angular-connect.png b/aio/content/images/marketing/home/angular-connect.png deleted file mode 100644 index 5b007b53dfc..00000000000 Binary files a/aio/content/images/marketing/home/angular-connect.png and /dev/null differ diff --git a/aio/content/images/marketing/home/angular-mix.png b/aio/content/images/marketing/home/angular-mix.png deleted file mode 100644 index 951ca03c9ef..00000000000 Binary files a/aio/content/images/marketing/home/angular-mix.png and /dev/null differ diff --git a/aio/content/images/marketing/home/any-size.svg b/aio/content/images/marketing/home/any-size.svg deleted file mode 100644 index d9a0089d330..00000000000 --- a/aio/content/images/marketing/home/any-size.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/aio/content/images/marketing/home/build-for-everyone.svg b/aio/content/images/marketing/home/build-for-everyone.svg deleted file mode 100644 index 8aa6e89b55a..00000000000 --- a/aio/content/images/marketing/home/build-for-everyone.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/aio/content/images/marketing/home/loved-by-millions.svg b/aio/content/images/marketing/home/loved-by-millions.svg deleted file mode 100644 index e8a2f0c19c1..00000000000 --- a/aio/content/images/marketing/home/loved-by-millions.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/aio/content/license.md b/aio/content/license.md deleted file mode 100644 index d1c3d9be631..00000000000 --- a/aio/content/license.md +++ /dev/null @@ -1,23 +0,0 @@ -@title -@description -The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.io/license - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files \(the "Software"\), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/aio/content/marketing/README.md b/aio/content/marketing/README.md deleted file mode 100644 index 4b2e4097712..00000000000 --- a/aio/content/marketing/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# Contributors page - -We have an official accounting of who is on the Angular Team \(see [this link](/about?group=Angular)\), who are "trusted collaborators" \(see [this link](/about?group=Collaborators)\), and so on. - -The `contributors.json` should be maintained to keep our "org chart" in a single consistent place. - -## GDE listings - -There are two pages: - -* https://developers.google.com/experts/all/technology/angular - - -* [Ours](/about?group=GDE) which is derived from `contributors.json`. - -## About the data - -* Keys in `contributors.json` should be GitHub handles. \(Most currently are, but not all.\) - This will allow us to use GitHub as the default source for things like name, avatar, etc. - -* Keys are sorted in alphabetical order, please keep the sorting order when adding new entries. -* Pictures are stored in `aio/content/images/bios/`. - -## Processing the data - -Install https://stedolan.github.io/jq/ which is amazing. - - - -for handle in $(jq keys[] --raw-output < aio/content/marketing/contributors.json) -do echo -e "\n$handle\n---------\n"; curl --silent -H "Authorization: token ${TOKEN}" https://api.github.com/users/$handle \ - | jq ".message,.name,.company,.blog,.bio" --raw-output -done - - - -Relevant scripts are stored in `aio/scripts/contributors/`. diff --git a/aio/content/marketing/about.html b/aio/content/marketing/about.html deleted file mode 100644 index a3d3dc1e328..00000000000 --- a/aio/content/marketing/about.html +++ /dev/null @@ -1,14 +0,0 @@ -
    -

    Angular Contributors

    -
    - -
    -

    Building For the Future

    -

    - Angular is built by a team of engineers who share a passion for making web development feel - effortless. We believe that writing beautiful apps should be joyful and fun. We're building a - platform for the future. -

    - - -
    diff --git a/aio/content/marketing/announcements.json b/aio/content/marketing/announcements.json deleted file mode 100644 index 78e961a32e6..00000000000 --- a/aio/content/marketing/announcements.json +++ /dev/null @@ -1,30 +0,0 @@ -[ - { - "startDate": "2020-01-01", - "endDate": "2020-03-31", - "message": "Join us for ng-conf
    April 1st-3rd, 2020", - "imageUrl": "generated/images/marketing/home/ng-conf.png", - "linkUrl": "https://ng-conf.org/?utm_source=angular.io&utm_medium=referral" - }, - { - "startDate": "2020-04-01", - "endDate": "2020-04-03", - "message": "ng-conf: Hardwired is happening!
    April 1st-3rd, 2020", - "imageUrl": "generated/images/marketing/home/ng-conf.png", - "linkUrl": "https://www.ng-conf.org" - }, - { - "startDate": "2019-05-03", - "endDate": "2019-06-01", - "message": "Join us for AngularMix
    June 11th-13th, 2019", - "imageUrl": "generated/images/marketing/home/angular-mix.png", - "linkUrl": "https://bit.ly/AngularMix_Reg" - }, - { - "startDate": "2019-06-02", - "endDate": "2019-09-18", - "message": "Join us for Angular Connect
    September 19th-20th, 2019", - "imageUrl": "generated/images/marketing/home/angular-connect.png", - "linkUrl": "https://www.angularconnect.com/?utm_source=angular.io&utm_medium=referral" - } -] diff --git a/aio/content/marketing/api.html b/aio/content/marketing/api.html deleted file mode 100755 index cc6c84787d6..00000000000 --- a/aio/content/marketing/api.html +++ /dev/null @@ -1,4 +0,0 @@ -
    -

    API List

    - -
    diff --git a/aio/content/marketing/contribute.html b/aio/content/marketing/contribute.html deleted file mode 100644 index 68702c22f3e..00000000000 --- a/aio/content/marketing/contribute.html +++ /dev/null @@ -1,73 +0,0 @@ -
    -

    Contribute to Angular

    -
    - -
    -
    - -

    Angular Projects

    - -

    We'd love for you to contribute to our source code and to make Angular projects even better.

    - -
    -
    -

    Angular

    - - Angular is the framework to use to deliver web apps with confidence. - - - Learn how to contribute to Angular - - -
    - -
    - -
    -
    -

    Angular CLI

    - - Angular CLI makes it easy to create an application that already works, right out of the box. - It already follows our best practices. - - - Learn how to contribute to the Angular CLI - - -
    - -
    - -
    -
    -

    Angular Material

    - - Our goal is to deliver a lean, lightweight set of Angular-based UI elements that implement the material design - specification for use in Angular single-page applications (SPAs). - - - Learn how to contribute to Angular Material - - -
    - -
    - -
    -
    -

    AngularFire

    - - AngularFire is the officially supported Angular binding for Firebase. - Firebase is a full backend so you don't need servers to build your Angular app. - - - Learn how to contribute to AngularFire - - -
    - - -
    - -
    -
    diff --git a/aio/content/marketing/contributors.json b/aio/content/marketing/contributors.json deleted file mode 100644 index eec6ca7f7c1..00000000000 --- a/aio/content/marketing/contributors.json +++ /dev/null @@ -1,1171 +0,0 @@ -{ - "achautard": { - "name": "Alain Chautard", - "picture": "alainchautard.png", - "twitter": "AlainChautard", - "website": "https://www.angulartraining.com/", - "bio": "Alain Chautard is a Google Developer Expert in Web Technologies / Angular. He started working with Angular JS in 2011. Since then he has worked with all Angular versions on a daily basis, both as a developer and as a technical trainer. He is the organizer of the Sacramento Angular Meetup group, co-organizer of the Google Developer Group chapter in Sacramento, California, and published author of the Packt video course 'Getting Started with Angular'", - "groups": ["GDE"] - }, - "adyngom": { - "name": "Ady Ngom", - "picture": "angom.jpg", - "twitter": "adyngom", - "website": "https://adyngom.com", - "bio": "Ady is a Google Developer Expert in Angular. His first interaction with a computer was playing PacMan but he was more interested in knowing how it was built than how much fun it was to play it. For the past 20 years, Ady has strived in building simple, engaging and very intuitive consumer facing products. As a JavaScript Teach Lead and UI Architect, he spends a bulk of his time producing intuitive systems that are easy to scale and maintain. When away from the keyboard, he enjoys the Georgia outdoors with his wife and three children. To him, the unpredictable weather is a known issue that simply adds to the overall charm and he would not have it otherwise.", - "groups": ["GDE"] - }, - "ahasall": { - "name": "Amadou Sall", - "picture": "ahasall.jpg", - "groups": ["GDE"], - "twitter": "ahasall", - "website": "https://www.amadousall.com", - "bio": "Amadou is a Frontend Software Engineer from Senegal based in France. He currently works at Air France where he helps developers build better Angular applications. Passionate about web technologies, Amadou is an international speaker, a technical writer, and a Google Developer Expert in Angular." - }, - "ahsanayaz": { - "name": "Muhammad Ahsan Ayaz", - "picture": "ahsanayaz.jpg", - "twitter": "ahsan_ayz", - "website": "https://medium.com/@ahsan.ayaz", - "bio": "Muhammad Ahsan Ayaz is Software Architect at Modus Create. He is absolutely passionate about Angular and Web Technologies. Uses Angular daily and talks about it everywhere. Runs NodeSchool Karachi and is a co-organizer of NgPakistan", - "groups": ["GDE"] - }, - "ajitsinghkaler": { - "name": "Ajit Singh", - "groups": ["Collaborators"], - "picture": "ajitsinghkaler.jpg", - "twitter": "ajitsinghkaler", - "bio": "Software Engineer in Bangalore, India who loves to learn something new and is interested in front end technologies" - }, - "alan-agius4": { - "name": "Alan Agius", - "groups": ["Angular"], - "lead": "dgp1130", - "picture": "alan-agius4.jpg", - "bio": "Angular CLI Member, Loves TypeScript, Build Tools, Food, Beer & Coffee :)" - }, - "alejandrocuba": { - "name": "Alejandro Cuba Ruiz", - "picture": "alejandrocuba.jpg", - "twitter": "zorphdark", - "website": "https://alejandrocuba.com/", - "bio": "Alejandro is a Principal Software Engineer, co-organizer of the Angular Community Meetup, and a member of the ng-Champions program at ng-conf. As the host of the Angularidades podcast, he engages in conversations with front-end developers and visual designers from the Spanish-speaking community.", - "groups": ["GDE"] - }, - "alisaduncan": { - "name": "Alisa Duncan", - "picture": "alisaduncan.jpg", - "twitter": "alisaduncan", - "website": "https://github.com/alisaduncan", - "bio": "Alisa is a software engineer and community builder who loves the thrill of learning new things. She is a core member of the ngGirls Team, co-organizes the local AngularKC meetup, and helps women learn web development as the Curriculum Director for the Coding & Cocktails program at Kansas City Women in Technology. When not coding, she enjoys drinking red wine with her husband while sitting on the patio.", - "groups": ["GDE"] - }, - "alvarocamillont": { - "name": "Alvaro Camillo Neto", - "picture": "alvarocamillont.png", - "twitter": "alvarocamillont", - "website": "https://alvarocamillont.dev/", - "bio": "Alvaro is a software engineer, speaker, and instructor in Brazil. He has worked in the technology industry for over 10 years and is dedicated to the development of enterprise business solutions.", - "groups": ["GDE"] - }, - "alxhub": { - "name": "Alex Rickabaugh", - "picture": "alex-rickabaugh.jpg", - "twitter": "synalx", - "website": "https://plus.google.com/+AlexRickabaugh/about", - "bio": "Core team member working to optimize the Angular platform for the next generation of applications, including mobile. Before joining the Angular team, Alex worked in the Google sales organization where he helped build the first large Angular application within Google.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "alyssa": { - "name": "Alyssa Nicoll", - "picture": "alyssa.jpg", - "twitter": "alyssanicoll", - "bio": "Alyssa is an Angular Developer Advocate for KUI and a GDE. Her two degrees (Web Design & Development and Psychology) feed her speaking career. She has spoken at over 35 conferences internationally. She is a weekly panelist on Adventures in Angular and Angular Air, which have a combined following of over 16,000 listeners. She enjoys gaming, scuba diving, and has a newborn that fondly goes by 'Mr. Milks'.", - "groups": ["GDE"] - }, - "andrewkushnir": { - "name": "Andrew Kushnir", - "picture": "andrew-kushnir.jpg", - "bio": "Andrew is a software engineer at Google on the Angular Core team.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "andrewseguin": { - "name": "Andrew Seguin", - "picture": "andrewseguin.jpg", - "website": "https://github.com/andrewseguin", - "bio": "Andrew is an engineer on the Angular Material team working on bringing material components to the world. When he’s not obsessing over pixels and design, he is probably off somewhere having adventures with his wife and daughters.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "anfibiacreativa": { - "name": "Natalia Venditto", - "picture": "natalia_venditto.jpg", - "twitter": "anfibiacreativa", - "website": "https://github.com/anfibiacreativa", - "bio": "Natalia started working professionally as a web software developer in the early 2000s. She now works in the role of technical lead and software/solutions architect. She is a public speaker, content creator, GDE for Angular and Web Technologies, Microsoft MVP Award (Developer Technologies), and a mentor with the RoadtoGDE program.", - "groups": ["GDE"] - }, - "AnkitSharma-007": { - "name": "Ankit Sharma", - "picture": "ankit-sharma.jpg", - "twitter": "ankitsharma_007", - "website": "https://ankitsharmablogs.com", - "bio": "SDE III @cisco | GDE for Angular | Microsoft MVP | Author | Speaker | Passionate Programmer", - "groups": ["GDE"] - }, - "ankitasood": { - "name": "Ankita Sood", - "picture": "ankita.jpg", - "groups": ["GDE"], - "twitter": "guacamoleankita", - "bio": "Ankita is an Angular developer, mentor and speaker. She is passionate about all things Angular and Design." - }, - "antoniocardenas": { - "name": "Antonio Cardenas", - "picture": "antonio-cardenas.jpg", - "twitter": "yeoudev", - "website": "https://yeou.dev", - "bio": "Antonio is a senior Angular developer from Honduras, focus on immersive experiences and Web Performance, He is a public Speaker, Mentor and Facilitator for entrepreneurship programs as Techstars Startup Weekend, Content Creator and tech writer Cofounder of non profit organization @Macaotech, Love to share knowledge Typescript Coffe and Cats 🐱.", - "groups": ["GDE"] - }, - "armenvardanyan95": { - "name": "Armen Vardanyan", - "picture": "armen-vardanyan.jpg", - "groups": ["GDE"], - "twitter": "armandotrue", - "bio": "Armen is a senior Angular developer from Armenia, tech writer, speaker, mentor and a Google Developer Expert for Angular." - }, - "arturovt": { - "name": "Artur Androsovych", - "picture": "artur-androsovych.jpg", - "groups": ["GDE"], - "website": "https://ng-guru.io", - "bio": "Artur is an Angular expert and OSS core developer of various projects as NGXS, NG-ZORRO, single-spa, ngneat, and RxAngular. He focuses on runtime performance and has taught teams about Angular internals for the past few years." - }, - "atscott": { - "name": "Andrew Scott", - "picture": "andrewscott.jpg", - "bio": "Andrew is a software engineer at Google on the Angular Core team", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "ayazhafiz": { - "name": "Ayaz Hafiz", - "groups": ["Collaborators"], - "picture": "hafiz.jpg", - "website": "https://github.com/ayazhafiz", - "bio": "Ayaz is an undergraduate student with interests in free software." - }, - "balramchavan": { - "name": "Balram Chavan", - "picture": "balram_chavan.jpg", - "twitter": "uvbrain", - "website": "https://balramchavan.com", - "bio": "Balram is a Google Developer Expert in Angular. He enjoys building complex web applications and cloud solutions. He is the author of the book Object Oriented Programming with Angular. He loves to write technical blogs mostly about Angular.", - "groups": ["GDE"] - }, - "bampakoa": { - "name": "Aristeidis Bampakos", - "picture": "aristeidis.jpg", - "twitter": "abampakos", - "bio": "Aristeidis works as a Web Development Team Leader @ Plex-Earth, specializing in Angular development. He is the author of Learning Angular and Angular Projects books and also works as an Angular Senior Tech Instructor @ Code.Hub where he nurtures aspiring Angular developers and professionals. Aristeidis is currently leading the effort of making Angular accessible to the Greek development community by maintaining the Greek translation of the Angular documentation.", - "groups": ["GDE"] - }, - "bbrennan": { - "name": "Bonnie Brennan", - "twitter": "bonnster75", - "groups": ["GDE"], - "picture": "bonnie.jpg", - "bio": "Bonnie has been specializing in Angular since 2013. She is the founder of ngHouston Angular Meetup and a regular panelist on Angular Air. She is also the very proud parent component of @thelittlestdev!" - }, - "bezael": { - "name": "Bezael Perez", - "picture": "bezael_perez.jpg", - "twitter": "bezaelperez", - "website": "https://medium.com/@bezael", - "bio": "Bezael is an Angular Developer and a GDE. He is a technical content creator on Youtube and Udemy. He has spoken at over 50 conferences internationally. He enjoys gaming, basketball, and soccer", - "groups": ["GDE"] - }, - "blove": { - "name": "Brian Love", - "picture": "brian-love.jpg", - "twitter": "brian_love", - "website": "https://brianflove.com", - "bio": "Brian is a software engineer and GDE in Angular with a passion for learning, writing, speaking, teaching and mentoring. Brian has been building web applications for over 20 years and has long been a fanboy of JavaScript. When not in front of his Macbook Pro Brian is in the Rocky Mountains skiing or hiking.", - "groups": ["GDE"] - }, - "bravery08": { - "name": "Brooke Avery", - "picture": "bravery_pic.png", - "twitter": "JediBravery", - "bio": "Brooke is a software engineer, GDE, & community builder. She is the director of the Angular Community Meetup, a co-producer/host of the Dev.Life Podcast, & has been a co-organizer for ng-conf. Brooke has a strong passion for education & helping others find success in their developer journeys. Outside of programming, Brooke loves to geek out on Star Wars and the Disney Parks.", - "groups": ["GDE"] - }, - "brocco": { - "name": "Mike Brocchi", - "picture": "mike-brocchi.jpg", - "twitter": "brocco", - "website": "https://github.com/Brocco", - "bio": "Mike (aka Brocco) is a Google Developer Expert in Web Technologies and Angular. He is passionate about teaching and helping others. You can find him online as half of the ngBS live stream and also as a panelist on the Angular Air video broadcast.", - "groups": ["GDE"] - }, - "caballerog": { - "name": "Carlos Caballero", - "picture": "carloscaballero.jpg", - "twitter": "Carlillo", - "website": "https://carloscaballero.io/", - "bio": "Carlos Caballero is a computer science engineer and a PhD in Computer Science from the University of Málaga. He earned his masters in Software Engineering and Artificial Intelligence. He is a full-time teacher in vocational training. He has written several teaching books and more than a dozen research articles in the first international journals.", - "groups": ["GDE"] - }, - "CaerusKaru": { - "name": "Adam Plumer", - "groups": ["Collaborators"], - "picture": "CaerusKaru.jpg" - }, - "cexbrayat": { - "name": "Cédric Exbrayat", - "groups": ["Collaborators"], - "picture": "cexbrayat.jpg", - "bio": "Author of `Become a ninja with Angular (2+)` https://books.ninja-squad.com/angular - Angular trainer and @Ninja-Squad co-founder" - }, - "chrisnoring": { - "name": "Christoffer Noring", - "picture": "chrisnoring.jpg", - "twitter": "chris_noring", - "website": "https://softchris.github.io", - "bio": "Chris is a Full Stack Developer at McKinsey. A Google Developer Expert in Web Technologies and Angular. He is also a Nativescript Developer Expert. He is one of the organizers of the Angular conference ngVikings and an author of the book RxJS 5 Ultimate", - "groups": ["GDE"] - }, - "christianliebel": { - "name": "Christian Liebel", - "picture": "christianliebel.jpg", - "twitter": "christianliebel", - "website": "https://christianliebel.com", - "bio": "Christian helps enterprises and independent software vendors to develop fast, modern, cross-platform business applications based on Angular. Being a Google GDE, Microsoft MVP and member of the W3C Web Applications working group, he speaks about Angular and Progressive Web Apps at user groups and conferences, both national and international.", - "groups": ["GDE"] - }, - "christianweyer": { - "name": "Christian Weyer", - "picture": "christianweyer.jpg", - "twitter": "ChristianWeyer", - "website": "https://www.thinktecture.com", - "bio": "Co-founder and CTO of Thinktecture AG, as well as Google GDE and Microsoft MVP. Since two decades active as an engaged and passionate speaker on several software conferences and events all over the world. Some people call him 'Mr. Cross-Platform'.", - "groups": ["GDE"] - }, - "cironunes": { - "name": "Ciro Nunes", - "picture": "cironunes.jpg", - "twitter": "cironunesdev", - "bio": "Ciro is the Lead Front-end Engineer of CrossEngage and Google Developer Expert in Web Technologies.", - "groups": ["GDE"] - }, - "clydin": { - "name": "Charles Lyding", - "groups": ["Angular"], - "lead": "dgp1130", - "picture": "clydin.jpg" - }, - "connieleung": { - "name": "Connie Leung", - "picture": "connieleung.jpg", - "twitter": "connieleung404", - "website": "https://www.blueskyconnie.com", - "bio": "Connie is a software architect who is passionate about Angular, NestJS and web technologies. She loves coding with Angular and NestJS, and blogging about these topics to share knowledge to members in the communities. Connie is the channel host of Angular Nation East where she hosts events and do talks to Angular developers in the APAC region.", - "groups": ["GDE"] - }, - "coryrylan": { - "name": "Cory Rylan", - "picture": "cory-rylan.jpg", - "twitter": "coryrylan", - "website": "https://coryrylan.com", - "bio": "Cory is a full time front end web developer. He works full time building responsive web applications and progressive web apps. When not building web apps he is busy teaching Angular and other web technologies in workshops and conferences. He loves the web and is optimistic of the places it can take us.", - "groups": ["GDE"] - }, - "crisbeto": { - "name": "Kristiyan Kostadinov", - "picture": "crisbeto.jpg", - "website": "http://crisbeto.com/", - "bio": "Kristiyan is a front-end developer, passionate open-source contributor and a core team member on Angular Material.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "danwahlin": { - "name": "Dan Wahlin", - "picture": "danwahlin.jpg", - "twitter": "DanWahlin", - "website": "https://codewithdan.com", - "bio": "Dan Wahlin founded Wahlin Consulting which provides consulting and onsite/online training services on Web technologies such as JavaScript, Angular, TypeScript, Node.js, C#, ASP.NET Core, Web API, and Docker. He’s also published many developer courses on Pluralsight.com and Udemy.com. Dan is a Google GDE, Docker Captain, and Microsoft MVP and Regional Director and speaks at conferences and user groups around the world. Dan has written several books on Web technologies, hundreds of technical articles and blog posts (https://blog.codewithdan.com) and runs the 'Code with Dan Web Weekly Newsletter' - a great way to stay up on the latest technologies. Follow Dan on Twitter @DanWahlin.", - "groups": ["GDE"] - }, - "danywalls": { - "name": "Dany Paredes", - "picture": "danyparedes.jpg", - "twitter": "danywalls", - "website": "https://www.danywalls.com", - "bio": "Dany is a Google Developer Expert on Angular and loves sharing content and writing articles about Angular, Typescript, and Testing. In his spare time, he watches NBA games and enjoys the Beach.", - "groups": ["GDE"] - }, - "deborah": { - "name": "Deborah Kurata", - "picture": "deborah.jpg", - "twitter": "deborahkurata", - "website": "https://blogs.msmvps.com/deborahk/", - "bio": "Deborah is a software developer, author, and Google Developer Expert. She is author of several Pluralsight courses including: 'Angular 2: Getting Started' and ‘Angular Routing’", - "groups": ["GDE"] - }, - "devpato": { - "name": "Patricio Vargas", - "picture": "patovargas.png", - "twitter": "devpato", - "website": "https://developers.google.com/community/experts/directory/profile/profile-patricio_vargas", - "bio": "Pato is Google Developer Expert on Angular & Web Technologies, Auth0 Ambassador, Women Techmaker Ambassador and Media Developer Expert at Cloudinary. He loves to mentor people in technology, write articles, contribute to open source, speak at conferences/meetups, and advocate technologies that he loves.", - "groups": ["GDE"] - }, - "devversion": { - "name": "Paul Gschwendtner", - "picture": "devversion.jpg", - "twitter": "devversion", - "website": "https://github.com/devversion", - "bio": "Paul is a Software Engineer at Google. He is part of the Angular team since 2016.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "dgp1130": { - "name": "Doug Parker", - "picture": "dgp1130.jpg", - "twitter": "develwoutacause", - "website": "https://github.com/dgp1130", - "bio": "Doug is an overly-opinionated software developer with a passion for making awesome developer tools. He is motivated primarily by his selfish desire to make his own life easier, but loves to share his tools and workflows with others to make everyone's lives easier.", - "groups": ["Angular"] - }, - "dmezhenskyi": { - "name": "Dmytro Mezhenskyi", - "picture": "dmytro-mezhenskyi.jpg", - "bio": "Dmytro is a self-taught Frontend Developer, originally from Ukraine and currently living in Vienna, Austria. He is also a content creator and author of a YouTube channel \"Decoded Frontend\".", - "groups": ["GDE"], - "twitter": "DecodedFrontend", - "website": "https://youtube.com/DecodedFrontend" - }, - "doguhan": { - "name": "Doguhan Uluca", - "picture": "doguhan.jpg", - "twitter": "duluca", - "website": "https://angularforenterprise.com", - "bio": "Doguhan is a GDE in Angular and Web Technologies. He is the author of Angular for Enterprise-Ready Web Applications, a speaker, organizer for AngularDC, and OSS contributor. When away from a screen, he enjoys playing Go, building legos, and claims to be an avid mixologist.", - "groups": ["GDE"] - }, - "dylhunn": { - "name": "Dylan Hunn", - "picture": "dylan-hunn.jpg", - "twitter": "dylhunn", - "bio": "Dylan is a software engineer at Google on the Angular Core team. He loves board games, the open web, and adorable rabbits.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "EladBezalel": { - "name": "Elad Bezalel", - "picture": "eladbezalel.jpg", - "website": "https://github.com/EladBezalel", - "bio": "Elad is a fullstack developer with a very strong love for design. Since 8 years old, he's been designing in Photoshop and later on fell in love with programing. This strong bond between design and computer programming gave birth to a new kind of love. And he is currently doing the combination of both, as a core member of the ngMaterial project.", - "groups": ["GDE"] - }, - "elecash": { - "name": "Raúl Jiménez", - "picture": "raul.jpg", - "twitter": "elecash", - "bio": "Raul works as a CEO and Front-end Architect at Byte Default for companies around the world helping them to build high-performance web apps. In his spare time he's usually working on Videogular, involved in local meetups, speaking at conferences and contributing to open source projects.", - "groups": ["GDE"] - }, - "eliraneliassy": { - "name": "Eliran Eliassy", - "picture": "eliraneliassy.jpg", - "twitter": "eliraneliassy", - "website": "https://eliassy.dev", - "bio": "Eliran is an Experienced FE developer, located in Tel Aviv, Israel. He is a developer, trainer, and consultant with a focus on Angular and the eco-system around it. He gives talks and workshops on Angular, RXJS, NGRX, and related technologies. As an active part of the community, he is constantly involved in growing it and interacting with the members. Eliran is one of the Organisers of AngularUP Annual Conference in Tel Aviv and also an organizer and leading the Angular meetup & community in Israel. He often speaks at conferences and meetups and also writes for AngualrInDepth.com.", - "groups": ["GDE"] - }, - "eneajahollari": { - "name": "Enea Jahollari", - "picture": "eneajahollari.jpeg", - "twitter": "enea_jahollari", - "website": "https://eneajaho.me", - "bio": "Software Engineer working with Angular every day. Having developed, audited, and optimized multiple kinds of Angular applications has made me appreciate Angular as a framework for its capabilities! I speak at conferences and meetups and enjoy participating in the dev community and OSS. I also blog and tweet a lot about Angular's latest news, updates, pull requests, best practices, and much more.", - "groups": ["GDE"] - }, - "eusoj": { - "name": "Josue Gutierrez", - "picture": "josue.jpg", - "twitter": "eusoj", - "bio": "Based in Mexico, Josue has been web developer since the last 10 years, he is part of the Google Developer Expert Program, passionate about teaching and building communities", - "groups": ["GDE"] - }, - "FabianGosebrink": { - "name": "Fabian Gosebrink", - "picture": "fabiangosebrink.jpg", - "twitter": "FabianGosebrink", - "website": "https://fabian-gosebrink.com", - "bio": "Fabian Gosebrink is a Google Developer Expert for Angular and Web Technologies, Microsoft MVP and Web Developer for ASP.NET Core and Angular. As a professional software engineer, consultant and trainer, he advises and supports customers in the implementation of frontend, backend, and mobile development of web applications.", - "groups": ["GDE"] - }, - "famzil": { - "name": "Fatima AMZIL", - "picture": "famzil.jpg", - "twitter": "fati_amzil", - "website": "https://fatimaamzil.com", - "bio": "Frontend software engineer and Google Developer Expert for Angular", - "groups": ["GDE"] - }, - "fmalcher": { - "name": "Ferdinand Malcher", - "picture": "fmalcher.jpg", - "twitter": "fmalcher01", - "website": "https://angular.schule", - "bio": "Ferdinand is a developer, trainer, and international speaker from Leipzig, Germany. He is co-author of the German Angular book and loves to share knowledge – that's why he writes books and blog posts, speaks at meetups and conferences, does Angular training and works as a consultant in his company \"Angular.Schule\".", - "groups": ["GDE"] - }, - "gerardsans": { - "name": "Gerard Sans", - "picture": "gerardsans.jpg", - "twitter": "gerardsans", - "bio": "Gerard is very excited about the future of the Web and JavaScript. Always happy Computer Science Engineer and humble Google Developer Expert. He loves to share his learnings by giving talks, trainings and writing about cool technologies. He loves running AngularZone and GraphQL London, mentoring students and giving back to the community.", - "groups": ["GDE"] - }, - "jbedard": { - "name": "Jason Bedard", - "groups": ["Collaborators"], - "mentor": "dgp1130", - "picture": "jbedard.jpg" - }, - "jeanmeche": { - "name": "Matthieu Riegler", - "picture": "jeanmeche.jpg", - "twitter": "jean__meche", - "bio": "Software engineer from the french Alps. Matthieu was born and raised with the web and now he love's building it! He currently works for Viseo.", - "groups": ["Collaborators"] - }, - "jecelynyeen": { - "name": "Jecelyn Yeen", - "picture": "jecelynyeen.jpg", - "twitter": "jecelynyeen", - "website": "https://developers.google.com/experts/people/jecelyn-yeen", - "bio": "GDE (Google Developer Expert) Angular and Web Technologies, Women Who Code KL Director, Jecelyn specializes in professional application development with technologies, including Angular, HTML5, Typescript, JavaScript, CSS, C#, NodeJs, Cloud and ASP.NET.", - "groups": ["GDE"] - }, - "jeffwhelpley": { - "name": "Jeff Whelpley", - "picture": "jeffwhelpley.jpg", - "twitter": "jeffwhelpley", - "website": "https://medium.com/@jeffwhelpley", - "bio": "Jeff Whelpley is a Google Developer Expert and the CTO of GetHuman. He is the co-organizer of the Angular Boston meetup group, co-creator of Angular Universal, former host of AngularAir and frequent speaker at Angular events.", - "groups": ["GDE"] - }, - "jelbourn": { - "name": "Jeremy Elbourn", - "picture": "jelbourn.jpg", - "twitter": "jelbourn", - "website": "https://plus.google.com/+JeremyElbourn/", - "bio": "Angular Material Team Lead. FE Engineer @ Google specializing in AngularJS, component design, and the cleanest of code.", - "groups": ["Angular"] - }, - "jeremywilken": { - "name": "Jeremy Wilken", - "picture": "jeremywilken.jpg", - "twitter": "gnomeontherun", - "bio": "Based in Austin Texas, Jeremy is an application architect and homebrewer. He is a Google Developer Expert in Web Technologies and Angular, with a focus on speaking and training and author of Angular in Action and Ionic in Action.", - "groups": ["GDE"] - }, - "jessicajaniuk": { - "name": "Jessica Janiuk", - "picture": "jessicajaniuk.jpg", - "twitter": "thepunderwoman", - "website": "https://github.com/jessicajaniuk", - "bio": "Jessica is a software engineer at Google. In her free time she is a historical fencer, astromech droid builder, photographer, pun purveyor, occasional cosplayer, and full time cat mom.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "jiali": { - "name": "Jia Li", - "groups": ["Collaborators"], - "mentor": "jelbourn", - "picture": "JiaLiPassion.jpg", - "twitter": "Jialipassion", - "website": "https://github.com/JiaLiPassion", - "bio": "A programmer with passion, angular/zone.js guy! Web frontend engineer @thisdot" - }, - "joeeames": { - "name": "Joe Eames", - "picture": "joeeames.jpg", - "twitter": "josepheames", - "bio": "Joe Eames is a developer and educator. He publishes course on Angular and JavaScript on Pluralsight.com. He is an organizer of ng-conf, a Google Developer Expert in Angular, gives lots of talks & workshops, and loves all things web.", - "groups": ["GDE"] - }, - "johanneshoppe": { - "name": "Johannes Hoppe", - "picture": "johanneshoppe.jpg", - "twitter": "johanneshoppe", - "website": "https://angular.schule", - "bio": "Johannes works as a software architect and consultant for Angular. He is co-author of the German Angular book and a passionate speaker. With his company \"Angular.Schule\" he offers public Angular training and consulting. Johannes is head of the Angular Meetup in Heidelberg, Germany, and is engaged in a couple of open source projects.", - "groups": ["GDE"] - }, - "JoostK": { - "name": "Joost Koehoorn", - "groups": ["Collaborators"], - "mentor": "alxhub", - "picture": "joostk.jpg", - "twitter": "devjoost", - "bio": "Joost is a Software Engineer from the Netherlands with an interest in open source software who likes to learn something new every day. He works at Blueriq during the day and contributes to Angular in his spare time, by working on the Angular compiler and runtime. He may review your PR even if you never asked for it ;)" - }, - "jordanpowell88": { - "name": "Jordan Powell", - "picture": "jordanpowell.jpg", - "twitter": "jordanpowell88", - "website": "https://jordanpowell.online", - "bio": "Jordan is a GDE (Google Developer Expert) and a self taught software engineer who is passionate about writing 'good code' that is easy to read, test and maintain over time. He has over a decade of freelance experience in software development, marketing, design and video production. He currently is a Developer Experience Engineer at Cypress.io and also serves as the CEO & Co-Founder for the non-profit Dream On: Global.", - "groups": ["GDE"] - }, - "jorgeucano": { - "name": "Jorge Cano", - "picture": "jorgeucano.jpg", - "twitter": "jorgeucano", - "website": "https://medium.com/@jorgeucano", - "bio": "After more than 10 years working in the tech industry, Jorge is a full stack developer with focus on JavaScript technologies. Today, Jorge is working at Hero Devs using Angular / RxJS / Firebase as well as other technologies. He delivered several courses and talks as well as write some tech articles on these subjects. Because of that, he was recognised as a Google Developer Expert in Angular & web technologies and Nativescript Developer Expert.", - "groups": ["GDE"] - }, - "josephperrott": { - "name": "Joey Perrott", - "picture": "josephperrott.jpeg", - "twitter": "joeyperrott", - "groups": ["Angular"] - }, - "joshuamorony": { - "name": "Joshua Morony", - "picture": "joshuamorony.jpg", - "twitter": "joshuamorony", - "website": "https://joshmorony.com", - "bio": "Josh is a Software Engineer, Google Developer Expert for Angular, and Ionic Developer Expert. He is a consultant and content creator focused on advancing the skills of Angular and Ionic developers. He is the author of multiple books and courses including Ionic Start and Modern Angular.", - "groups": ["GDE"] - }, - "jschwarty": { - "name": "Justin Schwartzenberger", - "picture": "justinschwartzenberger.jpg", - "twitter": "schwarty", - "website": "https://schwarty.com", - "bio": "Justin (aka Schwarty) is a Google Developer Expert in Web Technologies and Angular, the host and maintainer of the weekly AngularAir live video broadcast, educator, writer and content creator. He has Angular courses available on LinkedIn Learning and Pluralsight and loves passing on years of full stack development knowledge to help empower others to find their inner awesomeness!", - "groups": ["GDE"] - }, - "juristr": { - "name": "Juri Strumpflohner", - "picture": "juristr.jpg", - "twitter": "juristr", - "website": "https://juristr.com", - "bio": "Juri is a software engineer and freelance trainer and consultant currently mostly focusing on the frontend side using JavaScript, TypeScript and Angular. He has a passion for teaching and sharing his knowledge and experiences with others. This mostly happens by writing tech articles for his personal blog, by creating video courses for Egghead.io, during on-site workshops at companies or by speaking at conferences. In his free time he enjoys practicing Yoseikan Budo, a martial art where he currently owns the 3rd DAN black belt.", - "groups": ["GDE"] - }, - "kamilmysliwiec": { - "name": "Kamil Mysliwiec", - "picture": "kamilmysliwiec.jpg", - "twitter": "kammysliwiec", - "website": "https://github.com/kamilmysliwiec", - "bio": "Kamil Mysliwiec is a software engineer truly passionate about Web Technologies. Creator of NestJS, Co-Founder of Trilon.io, speaker, and trainer.", - "groups": ["GDE"] - }, - "katerina": { - "name": "Katerina Skroumpelou", - "picture": "katerina.jpg", - "twitter": "psybercity", - "website": "https://mandarini.github.io/", - "bio": "Katerina is a front end software engineer, a conference speaker and AngularAthens meetup organizer. She is obsessed with sharing knowledge about things she loves. She is also trying to support diversity in the community. She lives with her cat in Athens.", - "groups": ["GDE"] - }, - "keilla": { - "name": "Keilla Menezes Fernandes", - "picture": "keilla.jpg", - "twitter": "keillamenezes_", - "bio": "I am Senior Software Development Consultant in ThoughtWorks and GDE in Angular. Graduated in Computer Science from Federal University of Bahia, I have been worked with software development for more than 11 years. Since 2017, I started with Angular Framework and I went deep into front-end ecosystem and became more specialized in this area. I participate in a computer science community, Campinas Front-end, that promotes events in this area. In the end of 2016, I started to do technical talks. The passion for science is the engine that drives me to seek answers to the problems that computing aims to solve. Besides that, sharing knowledge and experiences is the path I choose to democratize the technology for all.", - "groups": ["GDE"] - }, - "kevindavila": { - "name": "Kevin Davila", - "picture": "kevindavila.jpg", - "twitter": "kevindaviladev", - "website": "https://github.com/kevindaviladev", - "bio": "Kevin is a Google Developer Expert with a passion for web development. Share content and knowledge with everyone and be ready to learn as much as possible. Lover of Angular, Postgresql and frogs.", - "groups": ["GDE"] - }, - "kevinyang": { - "name": "Kevin Yang", - "picture": "kevinyang.jpg", - "twitter": "chgc", - "website": "https://blog.kevinyang.net/", - "bio": "Kevin is a Angular Taiwan, Angular Girls Taiwan community organzier. He loves sharing knowledge with other developers through blogging, speaking, workshops.", - "groups": ["GDE"] - }, - "kimmaida": { - "name": "Kim Maida", - "picture": "kimmaida.jpg", - "twitter": "KimMaida", - "bio": "Kim is an an Angular consultant, developer, speaker, writer, and Google Developer Expert. She is passionate about learning from and sharing knowledge with other developers through blogging, speaking, workshops, and open source.", - "groups": ["GDE"] - }, - "kreuzercode": { - "name": "Kevin Kreuzer", - "picture": "kevin-kreuzer.jpg", - "twitter": "kreuzercode", - "website": "http://kreuzercode.com", - "bio": "Kevin is a passionate freelance front-end engineer and Google Developer Expert based in Switzerland. He is a JavaScript enthusiast and fascinated by Angular. Kevin always tries to learn new things, expand his knowledge, and share it with others in the form of blog posts, workshops, podcasts, or presentations. He is a writer for various publications and the most active writer on Angular in-depth in 2019. Contributing to multiple projects and maintaining 7 npm packages, Kevin is also a big believer in open source. Furthermore, Kevin is a big football fan. Since his childhood, he has supported Real Madrid, which you might notice in a lot of his blog posts and tutorials.", - "groups": ["GDE"] - }, - "kwintenpisman": { - "name": "Kwinten Pisman", - "picture": "kwintenpisman.jpg", - "twitter": "KwintenP", - "website": "https://strongbrew.io", - "bio": "Kwinten is a GDE for Angular with a passion for reactive coding. He works as a software engineer for Stackblitz. He shares his passion for Angular and coding through blogposts and training sessions with the company he co-founded called Strongbrew.", - "groups": ["GDE"] - }, - "lacolaco": { - "name": "Suguru Inatomi", - "picture": "lacolaco.jpg", - "twitter": "laco2net", - "website": "https://lacolaco.net", - "bio": "Suguru is a community-loving Frontend developer and a lead of Angular Japan User Group. He organizes the largest Angular event in Japan (ng-japan). And he is a contributor to Angular by sending patches, writing, speaking, and localizing resources in Japanese.", - "groups": ["GDE"] - }, - "laranewsom": { - "name": "Lara Newsom", - "picture": "laranewsom.jpg", - "twitter": "laranerdsom", - "website": "https://www.linkedin.com/in/lara-newsom", - "bio": "Lara is a Software Engineering Technical Leader on the Customer Experience Angular Team at Cisco. She is based in Des Moines, Iowa. In addition to speaking at conferences and talking about Angular and related technologies on the Angular Plus Show Podcast, Lara loves traveling with her husband and two teens. Much to the disappointment of her own two cats, Lara also enjoys fostering orphaned kittens. ", - "groups": ["GDE"] - }, - "leonardozizzamia": { - "name": "Leonardo Zizzamia", - "picture": "leonardo.jpg", - "twitter": "zizzamia", - "website": "https://medium.com/@zizzamia", - "bio": "Leonardo is a Senior Software Engineer at Coinbase. He is deeply passionate about web performance and most recently developed Perfume.js to help companies prioritize roadmaps and business, through performance analytics. From 2018, co-organizer of the Angular San Francisco Meetup group and NGRome Conference.", - "groups": ["GDE"] - }, - "luixaviles": { - "name": "Luis Aviles", - "picture": "luixaviles.jpg", - "twitter": "luixaviles", - "website": "https://luixaviles.com", - "bio": "Luis is an enthusiast of Open Source software and communities, as well as being a public speaker, a technology trainer and an author of courses and technical articles. He is the organizer of the Angular Bolivia community and NG Bolivia conference. When he's not coding, Luis is reading about Astronomy or nerding about outer space, photography or even doing Astrophotography.", - "groups": ["GDE"] - }, - "madleinas": { - "name": "Madleina Scheidegger", - "picture": "madleinas.jpg", - "bio": "Manager of the Angular Framework team @Google.", - "groups": ["Angular"], - "mentor": "jelbourn" - }, - "MainaWycliffe": { - "name": "Maina Wycliffe", - "picture": "MainaWycliffe.jpg", - "twitter": "mwycliffe_dev", - "website": "https://mainawycliffe.dev/", - "bio": "Wycliffe is a Software Engineer from Kenya passionate about Teaching, Speaking, Writing, Open Source, and Mentorship. On top of that, he is passionate about Typescript and loves teaching developers how to get the most out of it.", - "groups": ["GDE"] - }, - "manekinekko": { - "name": "Wassim Chegham", - "picture": "wassim.jpg", - "twitter": "manekinekko", - "website": "https://medium.com/@wassimchegham", - "bio": "Wassim (aka manekinekko on Twitter/Github) is a Developer Advocate at SFEIR, in Web technologies (Angular, Polymer, PWA, Web Components...). He is also a Developer Expert in Web technologies nominated by Google. He enjoys writing technical articles, meeting developers at events, speaking at conferences and contributing to open source projects. Wassim loves the Web Platform and works hard to move it forward.", - "groups": ["GDE"], - "mentor": "filipesilva" - }, - "manfredsteyer": { - "name": "Manfred Steyer", - "picture": "steyer.jpg", - "twitter": "ManfredSteyer", - "website": "https://www.softwarearchitekt.at", - "bio": "Trainer and Consultant with focus on Angular. Writes for O'Reilly, the German Java Magazine and Heise. Regularly speaks at conferences.", - "mentor": "mgechev", - "groups": ["GDE", "Collaborators"] - }, - "mariakorneeva": { - "name": "Maria Korneeva", - "picture": "korneeva.jpg", - "twitter": "BrowserPerson", - "website": "https://www.linkedin.com/in/maria-korneeva/", - "bio": "Maria is a trainer and consultant with focus on Angular. She writes for ng-conf and speaks at tech meetups and conferences. In her tweets and articles Maria likes to share her learnings from everyday coding. Fun fact: she illustrates her stories herself because she likes drawing.", - "groups": ["GDE"] - }, - "markostanimirovic": { - "name": "Marko Stanimirović", - "picture": "marko.jpg", - "twitter": "MarkoStDev", - "website": "https://github.com/markostanimirovic", - "bio": "Marko is a core member of the NgRx team, a Google Developer Expert in Angular, and an organizer of the Angular Belgrade group. He enjoys contributing to open source software, sharing knowledge through technical articles and talks, and playing guitar. He is also a Master of Science in Software Engineering from the University of Belgrade.", - "groups": ["GDE"] - }, - "marsibarsi": { - "name": "Roman Sedov", - "picture": "sedov.jpg", - "website": "http://marsibarsi.me/", - "twitter": "marsibarsi", - "bio": "Roman is an Angular Enthusiast and a Frontend Developer from Nizhny Novgorod, Russia. He writes tech articles, speaks at conferences, develops local GDG community and contributes to Open Source. He is also a co-creator of Taiga UI library and Ng Web APIs Open Source organization.", - "groups": ["GDE"] - }, - "martinakraus": { - "name": "Martina Kraus", - "picture": "martinakraus.jpg", - "twitter": "MartinaKraus11", - "bio": "Martina is a software engineer and an Angular enthusiast. As a trainer, mentor and speaker she loves sharing knowledge about Web Technologies and Angular. She is Organizer of ngGirls and the local Angular Meetup", - "groups": ["GDE"] - }, - "mashhoodr": { - "name": "Mashhood Rastgar", - "picture": "mashhood.jpg", - "twitter": "mashhoodr", - "website": "https://imars.info/", - "bio": "Mashhood is the principal technical consultant at Recurship and a Google Developer Expert. He works with different startups in US and EU to helps them crawl through the technical maze and quickly build amazing products focused around the problems they are trying to solve. He specializes in using the latest web technologies available to execute the best possible solutions.", - "groups": ["GDE"] - }, - "maximsalnikov": { - "name": "Maxim Salnikov", - "picture": "maximsalnikov.jpg", - "twitter": "webmaxru", - "website": "https://medium.com/@webmaxru", - "bio": "Oslo-based web front-end engineer, a Google Developer Expert in Angular, Web technologies and IoT. Active public speaker & trainer for the developer events. Leader of Norway’s largest meetups dedicated to web front-end and mobile development. Founder of ngVikings and Mobile Era conferences. Progressive Web Apps advocate.", - "groups": ["GDE"] - }, - "mgechev": { - "name": "Minko Gechev", - "picture": "minko.jpg", - "twitter": "mgechev", - "website": "https://blog.mgechev.com/", - "bio": "Software engineer who enjoys theoretical computer science and its practical applications. Speaker, author of the book 'Switching to Angular', codelyzer, Guess.js, and the Go linter revive. Working for faster and more reliable software.", - "groups": ["Angular"] - }, - "mhartington": { - "name": "Mike Hartington", - "picture": "mhartington.png", - "twitter": "mhartington", - "website": "https://mhartington.io", - "bio": "Mike is a Developer Advocate for the Ionic Framework and a GDE in Angular. He spends most of his time making fast PWAs and exploring emerging web standards. When not behind a keyboard, you'll probably find him with a guitar and beer.", - "groups": ["GDE"] - }, - "michaelhladky": { - "name": "Michael Hladky", - "picture": "michael-hladky.jpg", - "twitter": "Michael_Hladky", - "website": "https://github.com/BioPhoton", - "bio": "Michael is a self employed trainer, consultant and developer with the focus on Angular, and located in Vienna, Austria. He gives workshops on Angular, RxJS and Ionic. As Google Developer Expert, founder of Angular-Austria-Association and Angular-Vienna meetup, and speaker he is an active part of the community.", - "groups": ["GDE"] - }, - "mira": { - "name": "Stanimira Vlaeva", - "picture": "mira.jpg", - "twitter": "StanimiraVlaeva", - "website": "https://github.com/sis0k0", - "bio": "Software engineer on the NativeScript team at Progress, focused on NativeScript Angular, NativeScript schematics, and integrating webpack in the {N} build system. Co-organizing the Angular Sofia meetup. Speaking about Angular things at conferences here and there.", - "groups": ["GDE"] - }, - "mmalerba": { - "name": "Miles Malerba", - "picture": "mmalerba.jpg", - "bio": "Miles is a software engineer on the Angular Material team at Google. In addition to Javascripting he enjoys eating food and ogling cute puppies.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "nartc": { - "name": "Chau Tran", - "picture": "nartc.jpg", - "twitter": "Nartc1410", - "website": "https://nartc.me", - "bio": "Chau works to bring the best engineering practices to web application production. He is the creator of AutoMapper TypeScript, @ngneat/tailwind for Angular, and a core member of NestJS. Also, he is one of Angular Vietnam’s founders. He blogs, lives stream, and maintains open-source projects.", - "groups": ["GDE"] - }, - "nicobytes": { - "name": "Nicolas Molina", - "picture": "nicobytes.jpg", - "twitter": "nicobytes", - "website": "https://nicobytes.com", - "bio": "I'm Software Senior Developer. With more than 8 years of professional software development experience focusing in Web Development, Tech Management and skills for problem-solving. I'm passionate about sharing my knowledge with the community about Web Development and I do this through code contributions, videos, conferences, articles and, creating online content therefore I got recognized by Google like an GDE (Google Developer Expert) in Angular and by Microsoft like an MVP (Most Value Professional).", - "groups": ["GDE"] - }, - "nicoss54": { - "name": "Nicolas Frizzarin", - "picture": "nicolasfrizzarin.jpeg", - "twitter": "Nicooss54", - "website": "https://dev.to/nicoss54", - "bio": "Google Developer Expert in Web Technologies and Angular and OpenJs Foundation Member, Nicolas is a FontEnd specialist and user Interface Designer from Metz, France. He works as a Developer Advocate and Senior Staff Engineer at Sfeir Luxembourg. His daily mission is to help teams to make robust, powerful and beautiful web applications. Besides that, Nicolas is a speaker, and likes to contribute to the community by giving talks, trainings, writing articles or participating in open source projects.", - "groups": ["GDE"] - }, - "nirkaufman": { - "name": "Nir Kaufman", - "picture": "nirkaufman.jpg", - "twitter": "nirkaufman", - "bio": "Nir is a Principal Frontend Consultant & Head of the Angular department at 500Tech, Google Developer Expert and community leader. He organizes the largest Angular meetup group in Israel (Angular-IL), talks and teaches about front-end technologies around the world. He is also the author of two books about Angular and the founder of the 'Frontend Band'.", - "groups": ["GDE"] - }, - "nishugoel": { - "name": "Nishu Goel", - "picture": "nishugoel.jpg", - "twitter": "TheNishuGoel", - "website": "https://unravelweb.dev", - "bio": "Nishu is a Google Developer Expert for Angular and loves to share her learning with everyone. She is the author of the book Step by Step Angular Routing and has written a code-text based course on educative.io. She is a frontend engineer at The DataWorks, London and is recognized as a Microsoft MVP.", - "groups": ["GDE"] - }, - "pascalprecht": { - "name": "Pascal Precht", - "picture": "pascalprecht.jpg", - "bio": "Pascal is a software engineer, author and Google Developer Expert for the Angular team. He loves contributing to open source and is the creator of the popular angular-translate module. In his spare time he’s fiddling with EDM production.", - "groups": ["GDE"] - }, - "phenomnomnominal": { - "name": "Craig Spence", - "picture": "craig-spence.jpg", - "twitter": "phenomnominal", - "website": "https://github.com/phenomnomnominal", - "bio": "Craig is a Software Engineer from New Zealand, working at Spotify in Stockholm. He loves building cool things that help teams build cool things! He also loves punk rock, Disney’s Frozen, and his cat Cosy.", - "groups": ["GDE"] - }, - "pkozlowski-opensource": { - "name": "Pawel Kozlowski", - "picture": "pawel.jpg", - "twitter": "pkozlowski_os", - "bio": "Open source hacker, AngularJS book author, AngularUI lead developer. Pawel is an software-development addict who believes in free, open source software. He is a core contributor to the AngularJS framework, AngularUI, Karma-runner and several other projects. He is the co-author of the \"Mastering Web Application Development with AngularJS\" book. When not coding, Pawel can be spotted speaking at various software development conferences.", - "groups": ["Angular"], - "lead": "jelbourn" - }, - "prestonjlamb": { - "name": "Preston Lamb", - "picture": "prestonjlamb.png", - "twitter": "prestonjlamb", - "website": "https://github.com/pjlamb12", - "bio": "Preston is a JavaScript developer, husband, and father of four from Roy, UT. He also writes blog posts, creates training courses for Thinkster.io, and loves learning more about web development. In his free time he likes to spend time with his family and play or watch basketball (Go Jazz!). ", - "groups": ["GDE"] - }, - "profanis": { - "name": "Fanis Prodromou", - "picture": "profanis.jpg", - "twitter": "prodromouf", - "website": "https://blog.profanis.me", - "bio": "Fanis is a Full Stack JavaScript developer, Angular GDE, speaker at meetups, author of the book 'Mastering Angular Reactive Forms', and he constantly creates videos in his YouTube channel to share his knowledge with others. He also teaches Angular in Code.Hub institute and mentors other developers. When he is not behind a keyboard, he spends time with his lovely daughter and enjoys family time with his wife.", - "groups": ["GDE"] - }, - "ralph": { - "name": "Ralph Wang", - "picture": "ralph.jpg", - "twitter": "ralph_wang_gde", - "bio": "Ralph(Zhicheng Wang) is a senior consultant at ThoughtWorks and also a GDE. He is a technology enthusiast and he is a passionate advocate of 'Simplicity, Professionalism and Sharing'. In his eighteen years of R&D career, he worked as tester, R&D engineer, project manager, product manager and CTO. He is immersed in the excitement of the arrival of the baby.", - "groups": ["GDE"] - }, - "ricardochavarria": { - "name": "Ricardo Chavarria", - "picture": "ricardo-chavarria.jpg", - "twitter": "ricardo_chl", - "bio": "Ricardo Chavarria is a software developer with focus in frontend technologies. Organizer of Angular Honduras Community and Ng Conf Honduras. Also is Google Developer Expert in Angular and Auth0 ambassador.", - "groups": ["GDE"] - }, - "sajee": { - "name": "Sajeetharan Sinnathurai", - "picture": "sajee.jpg", - "twitter": "kokkisajee", - "website": "https://sajeetharan.com/", - "bio": "Sajeetharan is a Cloud Architect, Top contributor on stackoverflow for #Angular, ng-SriLanka organizer. He makes use of his extensive knowledge over the past years to contribute to community to make the world a better place.", - "groups": ["GDE"] - }, - "samjulien": { - "name": "Sam Julien", - "picture": "samjulien.jpg", - "twitter": "samjulien", - "website": "https://www.samjulien.com/", - "bio": "Sam Julien builds software, articles, video courses, and campfires. A developer, speaker, writer, and GDE in the Pacific Northwest, Sam's favorite thing in the world is changing someone's life by teaching them to code.", - "groups": ["Collaborators", "GDE"], - "mentor": "gkalpak" - }, - "samvloeberghs": { - "name": "Sam Vloeberghs", - "picture": "samvloeberghs.jpg", - "groups": ["GDE"], - "twitter": "samvloeberghs", - "website": "https://samvloeberghs.be", - "bio": "Sam is a freelance software architect and Internet entrepreneur, currently focusing on frontend technologies. Co-organiser of the Belgian Angular conference NG-BE and Angular Belgium Meetup group." - }, - "SanderElias": { - "name": "Sander Elias", - "picture": "sanderelias.jpg", - "twitter": "esoSanderElias", - "bio": "Sander is a versed developer with over 4 decades of practice under his belt. He is also an Google Developer Expert for web, specializing in Angular. Organizer of meetups and conferences. Helping out others wherever he can. When he is not breathing code, he is fiddling around with IOT, photography, science and anything that might vaguely is gadget-like! Thinks he a master of the grill, but in reality you probably don't get a food-poisoning ;) Also, and actually the most important thing to him, he is a father of 4, and has the most patient girlfriend in the universe.", - "groups": ["GDE"] - }, - "santosh": { - "name": "Santosh Yadav", - "picture": "santoshyadav.jpg", - "twitter": "SantoshYadavDev", - "website": "https://www.santoshyadav.dev", - "bio": "Santosh is a GDE for Angular and loves to contribute to Open Source. He is the creator of ng deploy for netlify and core team member for NestJS Addons. He writes for AngularInDepth, mentors for DotNetTricks, organizes Pune Tech Meetup, and conducts free workshops on Angular.", - "groups": ["GDE"] - }, - "selintunc": { - "name": "Selin Tunc", - "picture": "selin.jpeg", - "twitter": "selintunc_", - "website": "https://www.linkedin.com/in/selinkaragulletunc", - "bio": "Selin is a Software Developer Expert using Angular and Java at Garanti BBVA Technology in Turkey. She is the first woman Angular GDE in Turkey. She spends her spare time with her family, especially her little son, and by keeping herself up-to-date.", - "groups": ["GDE"] - }, - "shairez": { - "name": "Shai Reznik", - "picture": "shaireznik.jpg", - "twitter": "shai_reznik", - "website": "https://www.hirez.io", - "bio": "Teaches Angular at HiRez.io – the most entertaining online courses on the web. An experienced developer, consultant and speaker also known for his unusual crazy Angular talks such as ng-wat, ng-show, ng-rap, etc. Shai is also the organizer of the largest JavaScript group in Israel and a professional Improv performer.", - "groups": ["GDE"] - }, - "sharondio": { - "name": "Sharon DiOrio", - "picture": "sharon.jpg", - "twitter": "sharondio", - "website": "https://medium.com/@sharondio", - "bio": "Sharon is a mother to four teenagers, wife of a USMC veteran/police officer, and lead front-end engineer for an educational non-profit in Boston. In her spare time, she is the \"Head Instigator\" of the Angular-Boston Meetup and an active member of the Boston meetups community. She occasionally speaks on Angular and related topics at technology conferences across the country. She has a Bachelor of Fine Arts from SMU and a Masters with honors from RTFM.", - "groups": ["GDE"] - }, - "siddajmera": { - "name": "Siddharth Ajmera", - "picture": "sidd-ajmera.jpg", - "twitter": "SiddAjmera", - "bio": "Siddharth is a Full Stack JavaScript Developer and a GDE in Angular. He's passionate about sharing his knowledge on Angular, Firebase and the Web in general. He's the organizer of WebStack, a local community of developers focused on Web, Mobile, Voice and Server related technologies in general. WebStack hosts free monthly meetups every 2nd or 3rd Saturday of the month. Siddharth is also an avid photographer and loves traveling. Find him anywhere on the Web with `SiddAjmera`.", - "groups": ["GDE"] - }, - "simonaco": { - "name": "Simona Cotin", - "picture": "simonacotin.jpg", - "twitter": "simona_cotin", - "website": "https://github.com/simonaco", - "bio": "Engineering manager working on Angular Framework and Tooling", - "groups": ["Angular"], - "lead": "madleinas" - }, - "simpulton": { - "name": "Lukas Ruebbelke", - "picture": "lukas.jpg", - "twitter": "simpulton", - "bio": "Developer. Hacker. Community backer. Author and blogger. Console logger.", - "groups": ["GDE"] - }, - "sonukapoor": { - "name": "Sonu Kapoor", - "groups": ["Collaborators"], - "picture": "sonukapoor.jpg", - "website": "https://www.linkedin.com/in/sonu-kapoor/", - "bio": "Sonu is a Software Engineer from Toronto, with a high interest in front-end technologies and algorithms." - }, - "srashtisj": { - "name": "Srashti Jain", - "picture": "srashti_jain.jpg", - "twitter": "srashtisj", - "website": "https://github.com/srashtisj", - "bio": "Srashti is Senior Developer at Hvantage Technologies. She's also a Google Developer Expert for Angular and Microsoft MVP (Developer Technologies) based in India. Co-organiser All About Web (@itsAllAboutWeb) and Indore Technical Community (#ngIndore).", - "groups": ["GDE"] - }, - "stevermeister": { - "name": "Stepan Suvorov", - "picture": "stevermeister.jpg", - "twitter": "stevermeister", - "website": "https://stepansuvorov.com/blog/", - "bio": "Stepan is a CTO at Studytube, organizer of Angular Kharkiv(Ukraine), co-organizer Dutch Angular Group, teacher at javascript.info, creator of Angular Pro screencast (angular.ninja)", - "groups": ["GDE"] - }, - "tchatel": { - "name": "Thierry Chatel", - "picture": "thierrychatel.jpg", - "twitter": "ThierryChatel", - "website": "https://www.methotic.com/", - "bio": "Thierry is a senior consultant and trainer, specialized on Angular, and a Google Developer Expert.", - "groups": ["GDE"] - }, - "thekiba": { - "name": "Andrew Grekov", - "picture": "thekiba.jpg", - "twitter": "thekiba_io", - "website": "https://thekiba.io", - "bio": "Andrew is a software engineer using Angular and .NET. He spends most of his spare time staying up-to-date, helping other people, and experimenting with web tech.", - "groups": ["GDE"] - }, - "thesmiler": { - "name": "Jens Kuehlers", - "picture": "thesmiler.jpg", - "twitter": "cloudjens", - "groups": ["Angular"], - "bio": "Technical Program Manager for the Angular team. Previously Networking and Cloud @ Google. Loves coffee, injera and travel." - }, - "toddmotto": { - "name": "Todd Motto", - "picture": "toddmotto.jpg", - "twitter": "toddmotto", - "website": "https://ultimateangular.com", - "bio": "Owner and trainer at Ultimate Angular. Lives in England, UK. Has a love for teaching, OSS and speaking at conferences. Google Developer Expert for Web Technologies and Angular.", - "groups": ["GDE"] - }, - "thomaslaforge": { - "name": "Thomas Laforge", - "picture": "thomaslaforge.png", - "twitter": "laforge_toma", - "website": "https://thomaslaforge.dev/home", - "bio": "Thomas is a contractor with a strong passion for frontend development, specifically focusing on Angular. He is the creator and maintainer of Angular Challenges, a platform that gathers multiple challenges to help you improve your skills in Angular.", - "groups": ["GDE"] - }, - "tomastrajan": { - "name": "Tomas Trajan", - "picture": "tomastrajan.jpg", - "twitter": "tomastrajan", - "website": "https://medium.com/@tomastrajan", - "bio": "Tomas is a Senior Software Engineer with passion for frontend and especially Angular. He always strives to provide lots of value and to empower teams he is working with by sharing know-how, introducing best practices and automating mundane task to enable full focus on creating value for the users! He likes to share his Angular know-how by blogging, speaking and recording video content. He is a co-organizer of Angular Meetup Zurich.", - "groups": ["GDE"] - }, - "tracylee": { - "name": "Tracy Lee", - "picture": "tracylee.jpg", - "groups": ["GDE"], - "twitter": "ladyleet", - "website": "https://labs.thisdot.co/", - "bio": "Tracy is the Co-Founder of This Dot Labs, a consultancy focused on helping companies with digital transformations. She is also a Google Developer Expert, RxJS Core Team member, a Women Techmakers Lead, and a frequent keynote speaker at conferences. She heads up Community Relations for Node.js at OpenJS Foundation, is the host of the Modern Web podcast, organizer of This.JavaScript, Contributor Days, Google Developer Group Silicon Valley and Triangle, and RxWorkshop. You can find her on Twitter @ladyleet or at https://labs.thisdot.co/." - }, - "trungvose": { - "name": "Trung Vo", - "picture": "trungvo.jpg", - "groups": ["GDE"], - "twitter": "trungvose", - "website": "https://trungk18.com", - "bio": "Trung Vo is a web expert and a Google Developer Expert in Angular, recognized for his open-source projects like Angular Spotify and Jira Clone. He contributes significantly to web development communities in Vietnam and Singapore, particularly through Angular Vietnam and Angular Singapore. Additionally, Trung is a seasoned speaker, having presented at global tech events worldwide." - }, - "twerske": { - "name": "Emma Twersky", - "picture": "twerske.jpg", - "twitter": "twerske", - "bio": "Emma is a Developer Advocate at Google. She is passionate about good user experiences and design.", - "groups": ["Angular"], - "lead": "mgechev" - }, - "urish": { - "name": "Uri Shaked", - "picture": "urish.jpg", - "twitter": "UriShaked", - "website": "https://urish.org", - "bio": "Uri Shaked is a Google Developer Expert for Web Technologies. He regularly writes about Web and IoT related technologies in his medium blog, and speaks about these topics in conferences and meetup around the world. Among his interests are reverse engineering, hardware hacking, building 3d-printed robots and games, playing music and Salsa dancing.", - "groups": ["GDE"] - }, - "usergalileo": { - "name": "Michele Stieven", - "picture": "usergalileo.jpg", - "twitter": "MicheleStieven", - "website": "https://accademia.dev", - "bio": "Michele is an Angular GDE who’s always looking for technologies which allow people to create complex, dynamic and reactive applications. He helps teams of big and small companies with tools like Angular, RxJS, Redux and Web Components. He loves writing and making complex things easy, and he does so in his italian blog (https://accademia.dev) which also hosts his video courses. He’s taken part of many conferences, meetups and online events, and loves to help people in community groups. When he’s not working, he’s a musician.", - "groups": ["GDE"] - }, - "wardbell": { - "name": "Ward Bell", - "picture": "wardbell.jpg", - "website": "https://github.com/wardbell", - "twitter": "wardbell", - "bio": "Ward is an all-around developer with JavaScript, Node.js®, and .net chops. He's a frequent conference speaker and podcaster, trainer, Google Developer Expert for Angular, Microsoft MVP, and PluralSight author. He is also president of IdeaBlade, an enterprise software consulting firm and the makers of breeze.js. He would like to get more sleep and spend more time in the mountains.", - "groups": ["GDE"] - }, - "waterplea": { - "name": "Alexander Inkin", - "picture": "waterplea.jpg", - "twitter": "waterplea", - "website": "https://alexander.inkin.ru", - "bio": "Alex is a front end dev in love with Angular and declarative approach. He enjoys Web for it's multimedia nature and rich features. Actively creating and contributing to open source ecosystem he also does a lot of tech writing. He is a music and movies fan and a Montessori enthusiast father of two kids.", - "groups": ["GDE"] - }, - "webdave": { - "name": "David Muellerchen", - "picture": "webdave.jpg", - "twitter": "webdave_de", - "website": "https://github.com/web-dave", - "bio": "David is an Angular consultant who offers support for your Angular applications and projects. He’s also a trainer at angular.de, angular-college and swissangular. He loves to speak and teach at meetups and conferences. David also writes his own blog and reviews upcoming books and articles. During leisure time he jumps arround with his 3 boys and his wife. He is an organizer of Angular Hamburg and ng-de.", - "groups": ["GDE"] - }, - "wellwind": { - "name": "Mike Huang", - "picture": "wellwind.jpg", - "twitter": "wellwind", - "website": "https://wellwind.idv.tw/blog/", - "bio": "Mike is a full-stack developer, consultant, blogger, instructor, and conference speaker. He has over 10 years of web development experience and passion to share his knowledge.", - "groups": ["GDE"] - }, - "wesgrimes": { - "name": "Wes Grimes", - "picture": "wesgrimes.jpg", - "twitter": "wesgrimes", - "website": "https://wesleygrimes.com", - "bio": "Wes is a Senior Engineer at Nrwl, Core Team Member of NgRx, active open source contributor, speaker, writer, and mentor. Wes has well over a decade of experience in the insurance and disaster relief industries architecting and building full-stack enterprise software solutions. He has served in roles from tech support to business analysis, project management, and software development. Wes hails from sunny Central Florida and in his free time, he loves taking in sunsets, cooking BBQ, and spending time with his wife and 3 children.", - "groups": ["GDE"] - }, - "willmendesneto": { - "name": "Wilson Mendes", - "picture": "willmendesneto.jpg", - "twitter": "willmendesneto", - "website": "https://willmendesneto.github.io", - "bio": "GDE (Google Developer Expert) Angular and Web Technologies, GDG Salvador organizer, passionate about technology and active in communities with a focus on web development, including Angular, JavaScript, HTML5, CSS3, Workflow, web performance, security and Internet of things. Participates in events organization, speaker at conferences in Brazil and other countries and contributes to several open source projects.", - "groups": ["GDE"] - }, - "xocomil": { - "name": "Jason Warner", - "picture": "jasonwarner.jpg", - "twitter": "xocomil_1", - "website": "https://github.com/xocomil", - "bio": "Jason is a Senior Staff Engineer, Google Developer Expert in Angular and mentor. He enjoys code and is particularly passionate about front-end and Angular. Jason enjoys streaming on Twitch and interacting with community members. He loves to help others to achieve their goals.", - "groups": ["GDE"] - }, - "yannickbaron": { - "name": "Yannick Baron", - "picture": "yannickbaron.jpg", - "twitter": "yannick_baron", - "website": "https://thinktecture.com", - "bio": "Yannick is an Angular GDE (Google Developer Expert) and a consultant at Thinktecture in Germany. He has a passion for RxJS and reactive programming, and loves to help others improve their understanding of development with TypeScript and Angular. In his spare time, Yannick enjoys staying up-to-date with the latest trends and techniques in the world of web development. In addition to his work as a consultant, Yannick is also an active blogger and frequently speaks at conferences and meetups about topics related to Angular, RxJS, and reactive state management.", - "groups": ["GDE"] - }, - "yharaskrik": { - "name": "Jay Bell", - "picture": "jaybell.jpg", - "twitter": "jaycooperbell", - "website": "https://tech.trellis.org", - "bio": "Jay is the CTO and Co-Founder of a Social Enterprise in Canada that is using Angular and technology to empower global collective impact in the non-profit and charity industries. He is an avid contributor to Nx and loves Angular, NgRx and Nest. Jay loves to share knowledge he has learned from figuring out problems (complex or otherwise) so that others can solve them easier the next time.", - "groups": ["GDE"] - }, - "yjaaidi": { - "name": "Younes Jaaidi", - "picture": "younes.jpg", - "twitter": "yjaaidi", - "website": "https://marmicode.io", - "bio": "Younes is a software cook, trainer, and coach who loves the challenge of boosting teams' efficiency and helping everyone enjoy every part of their job. His experience convinced him that the key to making quality products is collective ownership, passion, and knowledge sharing. In his spare time, you will find him contributing to open-source software, writing articles or speaking at meetups or conferences… and sometimes sailing. His favorite trick? Adding features by removing code. He is also the co-creator of the JSCutlery open-source community.", - "groups": ["GDE"] - }, - "yurzui": { - "name": "Alexey Zuev", - "picture": "yurzui.jpg", - "twitter": "yurzui", - "website": "https://medium.com/@a.yurich.zuev", - "bio": "Alexey is a web development addict who likes diving deep into the source code and sharing his knowledge through visualization. Creator of ng-run.com", - "groups": ["GDE"] - }, - "zackderose": { - "name": "Zack DeRose", - "picture": "zack-derose.jpg", - "bio": "Zack DeRose is Senior Engineer for Narwhal Technologies, where he works to build a better world through tech! In addition to the enterprise consulting done at Narwhal, Zack is very interested in content creation and teaching others! When not building web applications at scale, Zack enjoys a robust family life at scale, living in Phoenix AZ with his wife and 6 kids.", - "groups": ["GDE"], - "twitter": "zackderose", - "website": "https://zackderose.dev" - }, - "zarend": { - "name": "Zach Arend", - "picture": "zach-arend.jpg", - "bio": "Zach is a software engineer at Google on the Angular Core team. He is passionate about a good user experience, burritos and puppies.", - "groups": ["Angular"], - "lead": "jelbourn" - } -} diff --git a/aio/content/marketing/docs.md b/aio/content/marketing/docs.md deleted file mode 100644 index 2d445fe0c63..00000000000 --- a/aio/content/marketing/docs.md +++ /dev/null @@ -1,53 +0,0 @@ -

    Introduction to the Angular docs

    - -Angular is an application-design framework and development platform for creating efficient and sophisticated single-page apps. - -These Angular docs help you learn and use the Angular framework and development platform, from your first application to optimizing complex single-page applications for enterprises. -Tutorials and guides include downloadable examples to help you start your projects. - - - -## Assumptions - -These docs assume that you are already familiar with [HTML](https://developer.mozilla.org/docs/Learn/HTML/Introduction_to_HTML "Learn HTML"), [CSS](https://developer.mozilla.org/docs/Learn/CSS/First_steps "Learn CSS"), [JavaScript](https://developer.mozilla.org/docs/Web/JavaScript/A_re-introduction_to_JavaScript "Learn JavaScript"), -and some of the tools from the [latest standards](https://developer.mozilla.org/docs/Web/JavaScript/Language_Resources "Latest JavaScript standards"), such as [classes](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Classes "ES2015 Classes") and [modules](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/import "ES2015 Modules"). -The code samples are written using [TypeScript](https://www.typescriptlang.org/ "TypeScript"). -Most Angular code can be written with just the latest JavaScript, using [types](https://www.typescriptlang.org/docs/handbook/classes.html "TypeScript Types") for dependency injection, and using [decorators](https://www.typescriptlang.org/docs/handbook/decorators.html "Decorators") for metadata. - -## Feedback - - - -We want to hear from you. [Report problems or submit suggestions for future docs](https://github.com/angular/angular/issues/new/choose "Angular GitHub repository new issue form"). - -Contribute to Angular docs by creating -[pull requests](https://github.com/angular/angular/pulls "Angular Github pull requests") -on the Angular GitHub repository. -See [Contributing to Angular](https://github.com/angular/angular/blob/main/CONTRIBUTING.md "Contributing guide") -for information about submission guidelines. - -Our community values respectful, supportive communication. -Please consult and adhere to the [Code of Conduct](https://github.com/angular/code-of-conduct/blob/main/CODE_OF_CONDUCT.md "Contributor code of conduct"). - - diff --git a/aio/content/marketing/events-contributing.md b/aio/content/marketing/events-contributing.md deleted file mode 100644 index 02d23bd009f..00000000000 --- a/aio/content/marketing/events-contributing.md +++ /dev/null @@ -1,17 +0,0 @@ -# Contributing to `events.json` - -## About this list - -We maintain a list of events (conferences, meetups, etc.) where our team has or will be presenting. -This data is stored in `events.json`. - -## How to get an event listed - -The `events.json` file is periodically generated from data stored in a Firebase database. -See [here](https://github.com/angular/angular/blob/main/aio/scripts/generate-events/README.md) for more details. - -If you want to get an event listed, please get in touch with the Angular DevRel team at [devrel@angular.io](mailto:devrel@angular.io). - -> WARNING: -> The `events.json` file is only intended to be updated via a [script](https://github.com/angular/angular/blob/main/aio/scripts/generate-events/index.mjs). -> Do not manually edit the file, because your changes will be overwritten the next time the script runs. diff --git a/aio/content/marketing/events.html b/aio/content/marketing/events.html deleted file mode 100755 index 9d7182f27c7..00000000000 --- a/aio/content/marketing/events.html +++ /dev/null @@ -1,7 +0,0 @@ -
    -

    Events

    -
    - -
    - -
    diff --git a/aio/content/marketing/events.json b/aio/content/marketing/events.json deleted file mode 100644 index 1173e7321ca..00000000000 --- a/aio/content/marketing/events.json +++ /dev/null @@ -1,1382 +0,0 @@ -[ - { - "date": { - "start": "2019-01-09" - }, - "name": "ngAtl" - }, - { - "date": { - "start": "2019-02-23" - }, - "name": "ngIndia" - }, - { - "date": { - "start": "2019-03-07" - }, - "name": "MVPMix" - }, - { - "date": { - "start": "2019-04-05" - }, - "name": "JSFest" - }, - { - "date": { - "start": "2019-04-09" - }, - "name": "Google Cloud Next" - }, - { - "date": { - "start": "2019-04-13" - }, - "name": "IT-KONEKT" - }, - { - "date": { - "start": "2019-05-01" - }, - "name": "ng-conf" - }, - { - "date": { - "start": "2019-05-07" - }, - "name": "Google I/O" - }, - { - "date": { - "start": "2019-05-16" - }, - "name": "FullStack" - }, - { - "date": { - "start": "2019-05-26" - }, - "name": "ng-vikings" - }, - { - "date": { - "start": "2019-06-06" - }, - "name": "WeRDevs" - }, - { - "date": { - "start": "2019-06-07" - }, - "name": "JSNation" - }, - { - "date": { - "start": "2019-06-11" - }, - "name": "AngularMix @ DevInt" - }, - { - "date": { - "start": "2019-06-12" - }, - "name": "AngularUp" - }, - { - "date": { - "start": "2019-06-19" - }, - "name": "Developer Week NYC" - }, - { - "date": { - "start": "2019-07-06" - }, - "name": "ng-MY" - }, - { - "date": { - "start": "2019-07-13" - }, - "name": "ng-Japan" - }, - { - "date": { - "start": "2019-08-01" - }, - "name": "Angular Denver" - }, - { - "date": { - "start": "2019-08-31" - }, - "name": "buildersconf" - }, - { - "date": { - "start": "2019-09-19" - }, - "name": "Angular Connect" - }, - { - "date": { - "start": "2019-08-11" - }, - "name": "JSConf US" - }, - { - "date": { - "start": "2019-10-07" - }, - "name": "ngRome" - }, - { - "date": { - "start": "2019-10-16" - }, - "name": "Connect Tech" - }, - { - "date": { - "start": "2019-10-21" - }, - "name": "NWA Tech Summit" - }, - { - "date": { - "start": "2019-10-27" - }, - "name": "GDE Summit" - }, - { - "date": { - "start": "2019-11-04" - }, - "name": "Devoxx BE" - }, - { - "date": { - "start": "2019-11-11" - }, - "name": "Chrome Dev Summit" - }, - { - "date": { - "start": "2019-11-14" - }, - "name": "ISTA" - }, - { - "date": { - "start": "2019-11-18" - }, - "name": "DevIntersections Vegas" - }, - { - "date": { - "start": "2019-11-21" - }, - "name": "ngPoland" - }, - { - "date": { - "start": "2019-11-22" - }, - "name": "jsPoland" - }, - { - "date": { - "start": "2019-11-23" - }, - "name": "ngChina" - }, - { - "date": { - "start": "2019-11-23" - }, - "name": "jsTalks" - }, - { - "date": { - "start": "2019-11-26" - }, - "name": "FrontEnd Con" - }, - { - "date": { - "start": "2019-12-05" - }, - "name": "ng-BE" - }, - { - "date": { - "start": "2020-02-23" - }, - "name": "ngIndia" - }, - { - "date": { - "start": "2020-04-01" - }, - "name": "ng-conf" - }, - { - "date": { - "start": "2020-04-07" - }, - "name": "Angular Toronto" - }, - { - "date": { - "start": "2020-04-09" - }, - "name": "Angular Sydney" - }, - { - "date": { - "start": "2020-04-15" - }, - "name": "SofiaJS" - }, - { - "date": { - "start": "2020-05-07" - }, - "name": "JS Vidcon" - }, - { - "date": { - "start": "2020-05-07" - }, - "name": "GDG Indore" - }, - { - "date": { - "start": "2020-05-14" - }, - "name": "ngMorocco" - }, - { - "date": { - "start": "2020-05-15" - }, - "name": "Web Day" - }, - { - "date": { - "start": "2020-05-20" - }, - "name": "Warsaw meetup" - }, - { - "date": { - "start": "2020-05-25" - }, - "name": "ngVikings" - }, - { - "date": { - "start": "2020-06-02" - }, - "name": "JNation" - }, - { - "date": { - "start": "2020-06-10" - }, - "name": "Angular Uruguay" - }, - { - "date": { - "start": "2020-06-15" - }, - "name": "ngTurkey" - }, - { - "date": { - "start": "2020-06-17" - }, - "name": "Angular San Diego" - }, - { - "date": { - "start": "2020-06-18" - }, - "name": "JSNation" - }, - { - "date": { - "start": "2020-06-19" - }, - "name": "GDG Reading" - }, - { - "date": { - "start": "2020-06-22" - }, - "name": "Angular Israel" - }, - { - "date": { - "start": "2020-06-24" - }, - "name": "ngHeidelberg" - }, - { - "date": { - "start": "2020-06-25" - }, - "name": "Angular Seattle (Reactive)" - }, - { - "date": { - "start": "2020-06-25" - }, - "name": "Angular Belarus" - }, - { - "date": { - "start": "2020-06-26" - }, - "name": "Kulkul Workshop" - }, - { - "date": { - "start": "2020-07-01" - }, - "name": "Angular Rome" - }, - { - "date": { - "start": "2020-07-08" - }, - "name": "Angular Birmingham" - }, - { - "date": { - "start": "2020-07-08" - }, - "name": "Angular-IL" - }, - { - "date": { - "start": "2020-07-09" - }, - "name": "Angular Bogota" - }, - { - "date": { - "start": "2020-07-10" - }, - "name": "web.dev Live India" - }, - { - "date": { - "start": "2020-07-13" - }, - "name": "Angular Kansas City" - }, - { - "date": { - "start": "2020-07-14" - }, - "name": "Angular MTV online" - }, - { - "date": { - "start": "2020-07-21" - }, - "name": "DevBG" - }, - { - "date": { - "start": "2020-07-21" - }, - "name": "Reactive Forms Barcelona" - }, - { - "date": { - "start": "2020-07-22" - }, - "linkUrl": "https://kommunity.com/ngturkey/events/build-like-google-with-stephen-fluin-angular-turkey-0e685d3b", - "name": "ngTurkey" - }, - { - "date": { - "start": "2020-07-24" - }, - "name": "Angular NL" - }, - { - "date": { - "start": "2020-07-25" - }, - "linkUrl": "https://ng-girls.org/kc-2020/", - "name": "ngGirls" - }, - { - "date": { - "start": "2020-07-29" - }, - "linkUrl": "https://techcommunity.microsoft.com/t5/azure-developer-community-blog/create-frontend-a-one-of-a-kind-live-event-from-microsoft-about/ba-p/1524677", - "name": "Create: Frontend" - }, - { - "date": { - "start": "2020-08-03" - }, - "name": "JavaScript Israel" - }, - { - "date": { - "start": "2020-08-04" - }, - "name": "Angular MTV" - }, - { - "date": { - "start": "2020-08-11" - }, - "name": "Angular Kharkiv" - }, - { - "date": { - "start": "2020-08-12" - }, - "name": "ngCopenhagen" - }, - { - "date": { - "start": "2020-08-14" - }, - "name": "NgConf Colombia" - }, - { - "date": { - "start": "2020-08-18" - }, - "name": "Angular Arizona" - }, - { - "date": { - "start": "2020-08-18" - }, - "name": "ng-be August session" - }, - { - "date": { - "start": "2020-08-20" - }, - "name": "Angular London" - }, - { - "date": { - "start": "2020-09-04" - }, - "name": "ThisDot State of Angular" - }, - { - "date": { - "start": "2020-09-16" - }, - "name": "Angular Warsaw" - }, - { - "date": { - "start": "2020-09-19" - }, - "name": "JavaScript LA" - }, - { - "date": { - "start": "2020-09-24" - }, - "name": "Dutch Angular" - }, - { - "date": { - "start": "2020-09-29" - }, - "linkUrl": "http://infoshare.pl/", - "name": "Infoshare.pl" - }, - { - "date": { - "start": "2020-10-01" - }, - "name": "GIDS.WEB Live 2020" - }, - { - "date": { - "start": "2020-10-01" - }, - "name": "Angular Online This Dot Labs" - }, - { - "date": { - "start": "2020-10-07" - }, - "name": "Astea Conference" - }, - { - "date": { - "start": "2020-10-09" - }, - "name": "TSConf" - }, - { - "date": { - "start": "2020-10-15" - }, - "name": "GDG DevFest Norway" - }, - { - "date": { - "start": "2020-10-16" - }, - "linkUrl": "https://devfestturkey.com/registration", - "name": "GDG Devfest Turkey (Anatolia)" - }, - { - "date": { - "start": "2020-10-17" - }, - "linkUrl": "https://gdg.community.dev/events/details/google-gdg-london-presents-devfest-uk-ireland-2020-with-google-developer-groups/", - "name": "GDG Devfest UK + Ireland" - }, - { - "date": { - "start": "2020-10-18" - }, - "linkUrl": "https://www.meetup.com/GCDCSaudi/events/273405502/", - "name": "GDG Devfest Saudi" - }, - { - "date": { - "start": "2020-10-20" - }, - "name": "ngrome" - }, - { - "date": { - "start": "2020-10-20" - }, - "linkUrl": "https://www.meetup.com/angular-heidelberg/events/273768194/", - "name": "ngHeidelberg" - }, - { - "date": { - "start": "2020-10-24" - }, - "name": "Angular Honduras" - }, - { - "date": { - "start": "2020-10-27" - }, - "name": "Firebase Summit" - }, - { - "date": { - "start": "2020-10-11" - }, - "linkUrl": "http://dev-con.ro/", - "name": "Dev-Con.ro" - }, - { - "date": { - "start": "2020-11-12" - }, - "linkUrl": "https://www.meetup.com/Dutch-Angular-group/events/", - "name": "Dutch Angular" - }, - { - "date": { - "start": "2020-11-20" - }, - "name": "ngChina" - }, - { - "date": { - "start": "2020-11-24" - }, - "name": "Allianz Developer Conference" - }, - { - "date": { - "start": "2021-01-21" - }, - "name": "NWC JS" - }, - { - "date": { - "start": "2021-01-26" - }, - "name": "Angular Utah" - }, - { - "date": { - "start": "2021-01-28" - }, - "name": "Discord Q&A" - }, - { - "date": { - "start": "2021-02-04" - }, - "name": "Contributor Days" - }, - { - "date": { - "start": "2021-02-09" - }, - "name": "Angular Nation" - }, - { - "date": { - "start": "2021-03-05" - }, - "name": "ng-conf Honduras" - }, - { - "date": { - "start": "2021-03-08" - }, - "name": "IWD/Techknow" - }, - { - "date": { - "start": "2021-03-16" - }, - "name": "SAP user group" - }, - { - "date": { - "start": "2021-03-30" - }, - "name": "College OSS Consortium" - }, - { - "date": { - "start": "2021-04-01" - }, - "name": "State of Angular" - }, - { - "date": { - "start": "2021-04-05" - }, - "name": "Adventures in Angular‌" - }, - { - "date": { - "start": "2021-04-21" - }, - "name": "ng-conf" - }, - { - "date": { - "start": "2021-05-18" - }, - "name": "Google I/O" - }, - { - "date": { - "start": "2021-05-23" - }, - "name": "dev.pro JSConf" - }, - { - "date": { - "start": "2021-05-25" - }, - "name": "Daily Dev" - }, - { - "date": { - "start": "2021-06-01" - }, - "name": "Angular Singapore" - }, - { - "date": { - "start": "2021-06-03" - }, - "name": "OpenJS World 2021" - }, - { - "date": { - "start": "2021-06-03" - }, - "name": "State of Angular EcoSystem" - }, - { - "date": { - "start": "2021-06-06" - }, - "name": "JSNation" - }, - { - "date": { - "start": "2021-06-25" - }, - "name": "I/O GDG North Lebanon" - }, - { - "date": { - "start": "2021-06-29" - }, - "name": "Future of Testing: Mobile" - }, - { - "date": { - "start": "2021-06-30" - }, - "name": "AngularRDU" - }, - { - "date": { - "start": "2021-07-09" - }, - "name": "ngRome" - }, - { - "date": { - "start": "2021-07-13" - }, - "name": "AWT: Angular KC" - }, - { - "date": { - "start": "2021-07-15" - }, - "name": "JUG BG" - }, - { - "date": { - "start": "2021-07-15" - }, - "name": "WebRush" - }, - { - "date": { - "start": "2021-07-19" - }, - "name": "AWT: Angular MTV" - }, - { - "date": { - "start": "2021-07-26" - }, - "name": "AWT: ATL Angular" - }, - { - "date": { - "start": "2021-08-17" - }, - "name": "AWT: Angular SF" - }, - { - "date": { - "start": "2021-08-20" - }, - "name": "Syntax 2021" - }, - { - "date": { - "start": "2021-08-30" - }, - "name": "Twitter Spaces: Web Performance & UX" - }, - { - "date": { - "start": "2021-08-26" - }, - "name": "AWT: Angular Nation" - }, - { - "date": { - "start": "2021-09-16" - }, - "name": "Web Rush" - }, - { - "date": { - "start": "2021-09-23" - }, - "name": "AWT: Angular Seattle" - }, - { - "date": { - "start": "2021-09-28" - }, - "name": "iJS" - }, - { - "date": { - "start": "2021-09-29" - }, - "name": "AWT: Angular Athens" - }, - { - "date": { - "start": "2021-10-13" - }, - "name": "AWT: GDG Memphis" - }, - { - "date": { - "start": "2021-10-14" - }, - "name": "State of Angular" - }, - { - "date": { - "start": "2021-10-26" - }, - "name": "DevReach" - }, - { - "date": { - "start": "2021-10-20" - }, - "name": "The Angular Podcast" - }, - { - "date": { - "start": "2021-10-20" - }, - "name": "Angular Copenhagen" - }, - { - "date": { - "start": "2021-11-10" - }, - "name": "Angular Sussex" - }, - { - "date": { - "start": "2021-11-12" - }, - "linkUrl": "http://angularday.it/", - "name": "AngularDay.it" - }, - { - "date": { - "start": "2021-11-17" - }, - "name": "Angular Cairo" - }, - { - "date": { - "start": "2021-12-02" - }, - "name": "EnterpriseNG" - }, - { - "date": { - "start": "2021-12-03" - }, - "name": "EnterpriseNG" - }, - { - "date": { - "start": "2021-12-01" - }, - "name": "Angular Tokyo" - }, - { - "date": { - "start": "2021-12-08" - }, - "name": "Angular Belgrade" - }, - { - "date": { - "start": "2021-12-15" - }, - "name": "Angular Mega Meetup (Athens, Dutch, UK)" - }, - { - "date": { - "start": "2021-12-10" - }, - "name": "Midwest DevFest" - }, - { - "date": { - "start": "2022-01-18" - }, - "name": "AWT: Europe & Africa" - }, - { - "date": { - "start": "2022-01-21" - }, - "name": "NGPoland" - }, - { - "date": { - "start": "2022-01-25" - }, - "name": "Angular World Tour: Kenya" - }, - { - "date": { - "start": "2022-01-28" - }, - "name": "ng-Keralam" - }, - { - "date": { - "start": "2022-02-22" - }, - "name": "NG Yerevan" - }, - { - "date": { - "start": "2022-02-22" - }, - "name": "The State of JS Survey Stream" - }, - { - "date": { - "start": "2022-03-01" - }, - "name": "State of Angular" - }, - { - "date": { - "start": "2022-03-22" - }, - "name": "Angular Pakistan" - }, - { - "date": { - "start": "2022-03-23" - }, - "name": "Munich Meetup" - }, - { - "date": { - "start": "2022-03-30" - }, - "name": "Hubs Web Conference" - }, - { - "date": { - "start": "2022-04-26" - }, - "name": "AWT: Isreal" - }, - { - "date": { - "start": "2022-05-11" - }, - "name": "Google I/O" - }, - { - "date": { - "start": "2022-05-18" - }, - "name": "Angular Belgrade" - }, - { - "date": { - "start": "2022-05-25" - }, - "name": "Ioniconf" - }, - { - "date": { - "start": "2022-05-25" - }, - "name": "Angular Athens x VueJS Athens" - }, - { - "date": { - "start": "2022-05-26" - }, - "name": "Google I/O Extended: GDG NYC" - }, - { - "date": { - "start": "2022-05-27" - }, - "name": "CityJS Greece" - }, - { - "date": { - "start": "2022-05-18" - }, - "name": "Angular World Tour: Hungary" - }, - { - "date": { - "start": "2022-06-03" - }, - "name": "RenderATL" - }, - { - "date": { - "start": "2022-06-16" - }, - "name": "OpenSource@Google" - }, - { - "date": { - "start": "2022-08-31" - }, - "linkUrl": "https://2022.ng-conf.org/", - "name": "ng-conf" - }, - { - "date": { - "start": "2022-09-12" - }, - "linkUrl": "https://www.telerik.com/devreach-2022", - "name": "DevReach" - }, - { - "date": { - "start": "2022-10-06" - }, - "linkUrl": "https://ng-de.org/", - "name": "NG-DE" - }, - { - "date": { - "start": "2022-10-06" - }, - "linkUrl": "https://nordicjs.com/2022", - "name": "Nordic.js" - }, - { - "date": { - "start": "2022-10-07" - }, - "linkUrl": "https://2022.angularday.it/", - "name": "angularday" - }, - { - "date": { - "start": "2022-10-18" - }, - "linkUrl": "https://firebase.google.com/summit", - "name": "Firebase Summit 22" - }, - { - "date": { - "start": "2022-10-18" - }, - "linkUrl": "https://extra.codemotion.com/conference-milan-2022", - "name": "Codemotion Milan" - }, - { - "date": { - "start": "2022-10-25" - }, - "linkUrl": "http://ng-poland.pl/", - "name": "NG-Poland" - }, - { - "date": { - "start": "2022-10-26" - }, - "linkUrl": "http://js-poland.pl/", - "name": "JS Poland" - }, - { - "date": { - "start": "2022-10-27" - }, - "linkUrl": "https://portotechhub.com/conference-2022", - "name": "Porto Tech Hub" - }, - { - "date": { - "start": "2022-11-07" - }, - "name": "Jamstack Conf" - }, - { - "date": { - "start": "2022-11-10" - }, - "name": "JavaScript Day (JetBrains)" - }, - { - "date": { - "start": "2022-11-16" - }, - "linkUrl": "https://www.meetup.com/angular-london/", - "name": "Angular London" - }, - { - "date": { - "start": "2022-11-17" - }, - "linkUrl": "https://www.modernfrontends.live/", - "name": "Modern Frontends Live!" - }, - { - "date": { - "start": "2022-12-02" - }, - "linkUrl": "https://ngrome.io/", - "name": "ngRome" - }, - { - "date": { - "start": "2022-12-06" - }, - "name": "Angular Contributor Days" - }, - { - "date": { - "start": "2023-01-24" - }, - "name": "Online Meetup: The Future of Angular" - }, - { - "date": { - "start": "2023-02-02" - }, - "name": "Angular Zurich Meetup" - }, - { - "date": { - "start": "2023-02-08" - }, - "name": "JSWorld" - }, - { - "date": { - "start": "2023-02-23" - }, - "name": "Agent Conf" - }, - { - "date": { - "start": "2023-03-24" - }, - "name": "ng-be" - }, - { - "date": { - "start": "2023-04-25" - }, - "name": "CityJS Brazil" - }, - { - "date": { - "start": "2023-04-03" - }, - "name": "Angular Athens" - }, - { - "date": { - "start": "2023-05-04" - }, - "name": "Devoxx Greece" - }, - { - "date": { - "start": "2023-05-18" - }, - "name": "JSHeroes" - }, - { - "date": { - "start": "2023-05-10" - }, - "name": "Google I/O" - }, - { - "date": { - "start": "2023-06-01" - }, - "name": "RenderATL" - }, - { - "date": { - "start": "2023-06-01" - }, - "name": "JSNation" - }, - { - "date": { - "start": "2023-06-02" - }, - "name": "JSConf India" - }, - { - "date": { - "start": "2023-06-14" - }, - "name": "ng-conf" - }, - { - "date": { - "start": "2023-06-21" - }, - "name": "Google I/O Extended: Amsterdam" - }, - { - "date": { - "start": "2023-07-03" - }, - "name": "FlutterCon" - }, - { - "date": { - "start": "2023-08-07" - }, - "name": "Citro Hacks" - }, - { - "date": { - "start": "2023-09-19" - }, - "name": "GraphQL SF" - }, - { - "date": { - "start": "2023-09-26" - }, - "name": "IJS New York" - }, - { - "date": { - "start": "2023-10-03" - }, - "name": "Angular London Meetup" - }, - { - "date": { - "start": "2023-10-05" - }, - "name": "ViteConf" - }, - { - "date": { - "start": "2023-10-15" - }, - "name": "All Things Open" - }, - { - "date": { - "start": "2023-10-26" - }, - "name": "Connect.tech" - }, - { - "date": { - "start": "2023-10-27" - }, - "name": "REFACTR.tech" - }, - { - "date": { - "start": "2023-11-08" - }, - "name": "NGPoland" - }, - { - "date": { - "start": "2023-11-09" - }, - "name": "JSPoland" - }, - { - "date": { - "start": "2023-11-16" - }, - "name": "NWCJS" - }, - { - "date": { - "start": "2023-12-01" - }, - "name": "ngRome" - }, - { - "date": { - "start": "2023-11-02" - }, - "name": "JetBrains JavaScript Day " - }, - { - "date": { - "start": "2023-09-26" - }, - "name": "JSDayIE" - }, - { - "date": { - "start": "2024-01-30" - }, - "name": "THAT Conf TX" - }, - { - "date": { - "start": "2024-02-29" - }, - "name": "DevWorld" - }, - { - "date": { - "start": "2024-03-18" - }, - "name": "ng-conf" - }, - { - "date": { - "start": "2024-04-10" - }, - "name": "Cloud Next" - }, - { - "date": { - "start": "2024-05-24" - }, - "name": "NG Belgrade Conf" - }, - { - "date": { - "start": "2024-05-30" - }, - "name": "Craft" - }, - { - "date": { - "start": "2024-06-12" - }, - "name": "RenderATL" - }, - { - "date": { - "start": "2024-06-13" - }, - "name": "JSNation" - }, - { - "date": { - "start": "2024-06-27" - }, - "name": "dotJS" - }, - { - "date": { - "start": "2024-07-29" - }, - "name": "THAT Conf WI" - }, - { - "date": { - "start": "2024-10-10" - }, - "name": "NG-DE" - } -] \ No newline at end of file diff --git a/aio/content/marketing/everyone.md b/aio/content/marketing/everyone.md deleted file mode 100644 index 70872ad09fe..00000000000 --- a/aio/content/marketing/everyone.md +++ /dev/null @@ -1,35 +0,0 @@ -# Angular applications for everyone - -Angular helps you build your application for everyone. -Angular includes native framework and tooling extensions that support accessibility. -Angular's built-in internationalization support helps you reach your users in different languages. - -## Accessibility (a11y) - -People with a range of abilities use web applications. -Some of your users might use assistive technologies to help them use your applications. -Angular supports accessible design and the attributes that these technologies use to make your applications available to them. - -Designing an application to be more accessible generally improves the user experience for all users. - -[Learn more about accessibility in Angular][angular-accy] - -## Internationalization (i18n) and localization (l10n) - -Angular's syntax supports localizing your app and its internationalization tools make your app easier to localize by: - -* Extracting the tagged text for translation into different languages -* Supporting International Components for Unicode (ICU) expressions for complex translation cases such as genders and plurals -* Supporting multiple translations -* Supporting locale-specific display formats for data - -Learn more about Angular's internationalization tools in our [documentation][internationalization-doc], which contains a short video. - - - -[internationalization-doc]: guide/i18n-overview "Angular internationalization" -[angular-accy]: guide/accessibility "Accessibility in Angular" - - - - diff --git a/aio/content/marketing/features.html b/aio/content/marketing/features.html deleted file mode 100755 index 3e75feb579b..00000000000 --- a/aio/content/marketing/features.html +++ /dev/null @@ -1,143 +0,0 @@ -
    -

    Angular features

    -
    - -
    -
    -
    -
    Any app size
    - Feature icon -
    -
    - -
    -
    Start quickly
    -

    You can start small knowing that Angular's tools support your apps as they grow. - Learn more -

    -
    - -
    -
    Enterprise capable
    -

    Angular supports you with an opinionated platform as your team and apps grow. - This allows you to build testable, and scalable user interfaces that perform well as they grow.

    -
    - -
    -
    Predictable releases
    -

    Angular's predictable release schedule and update tools help you keep your - app up-to-date with the latest advancements in the framework and the web platform. - Learn more

    -
    -
    -
    -
    - -
    -
    -
    A great community
    - Feature icon -
    -
    - -
    -
    Community resources
    -

    The Angular community is a global community that's - made up of many local organizations. - Learn more -

    -
    - -
    -
    Education resources
    -

    The Angular community offers books, workshops, and - formal training to help you get started. - Learn more -

    -
    - -
    -
    Development resources
    -

    The Angular community and team offer resources to - help all stages of your development. - Learn more -

    -
    - -
    -
    -
    - -
    -
    -
    Build productively
    - Feature icon -
    -
    - -
    -
    Powerful command-line interface
    -

    The Angular command-line interface (CLI) - supports starting a project and growing it to production, - maintaining consistency across teams and projects. - Learn more

    -
    - -
    -
    Forms and routing
    -

    Angular's forms and routing, developed and supported by the Angular team, - provide stability and integration with the rest of the platform. - Learn more about forms and - routing. -

    -
    - -
    -
    Development tools
    -

    Angular's integrated development environment (IDE) - tools offer autocompletion and type checking. - Profiling tools give a preview of your app's performance.

    -
    -
    -
    -
    - - -
    -
    -
    For everyone, everywhere
    - Feature icon -
    -
    - -
    -
    Internationalization tools
    -

    Angular's Internationalization (i18n) and Localization - (l10n) tools help your app reach people around the world. - Learn more

    -
    - -
    -
    Accessibility tools
    -

    Create accessible apps with ARIA-enabled components, developer guides, - and built-in Accessibility (a11y) test infrastructure. - Learn more

    -
    - -
    -
    Component libraries
    -

    Many component libraries are available for Angular apps to use. - Material component library is one library that thousands of Google apps use with - confidence. - Learn more about Angular Material. -

    -
    -
    -
    -
    - - - -
    diff --git a/aio/content/marketing/index.html b/aio/content/marketing/index.html deleted file mode 100755 index 5ff773c9040..00000000000 --- a/aio/content/marketing/index.html +++ /dev/null @@ -1,100 +0,0 @@ - -
    - -
    - - -
    - - - - -
    -

    - Deliver web apps
    with confidence -

    - -
    - -
    -
    -
    -
    - - -
    -
    - - -
    - -
    -
    -

    - The web development framework for building the future -

    -
    -
    -
    -
    - -
    -
    -

    Works at any scale

    -

    - Hero image -

    -

    - Angular lets you start small and supports you as your team and apps grow. -

    -

    Read how Angular helps you grow

    -
    -
    - -
    -
    -

    Loved by millions

    -

    - Hero image -

    -

    - Join the millions of developers building with Angular in a thriving and friendly - community. -

    -

    - Meet the Angular community -

    -
    -
    - -
    -
    -

    Build for everyone

    -

    - Hero image -

    -

    - Rely on Angular's internationalization tools, security, and accessibility to build for - everyone around the world. -

    -

    Learn more about Angular's tools

    -
    -
    -
    - -

    - Learn more -

    -
    - -
    diff --git a/aio/content/marketing/presskit.html b/aio/content/marketing/presskit.html deleted file mode 100644 index b9a24c6bbee..00000000000 --- a/aio/content/marketing/presskit.html +++ /dev/null @@ -1,561 +0,0 @@ -
    -

    Press kit

    -
    - -
    - -
    -

    Official Angular Logo

    - -

    - The logo graphics available for download on this page are provided under - CC BY 4.0. - This means that you can pretty much do what you like with it including printing it on shirts, creating your own - variations, or getting it tattooed over your navel. -

    -

    - We do ask that you not use the rest of the site graphics in other contexts to avoid confusion. -

    - -
    -
    -
    - Full color logo Angular -
    -
    -

    Full Color Logo

    - -
    -
    - -
    -
    - Black logo Angular -
    -
    -

    One Color Logo

    - -
    -
    - -
    -
    - Transparent logo Angular -
    -
    -

    One Color Inverse Logo

    - -
    -
    -
    -
    - - -
    -

    Brand Icons

    - -
    -
    -
    - Animations icon -
    -
    -

    Animations

    - -
    -
    - -
    -
    - CDK icon -
    -
    -

    Component Dev Kit (CDK)

    - -
    -
    - -
    -
    - CLI icon -
    -
    -

    CLI (Command Line Interface)

    - -
    -
    - -
    -
    - Compiler icon -
    -
    -

    Compiler

    - -
    -
    - -
    -
    - Components icon -
    -
    -

    Web Components

    - -
    -
    - -
    -
    - Forms icon -
    -
    -

    Forms

    - -
    -
    - -
    -
    - HTTP icon -
    -
    -

    HTTP

    - -
    -
    - -
    -
    - i18n icon -
    -
    -

    i18n

    - -
    -
    - -
    -
    - Karma icon -
    -
    -

    Karma

    - -
    -
    - -
    -
    - Labs icon -
    -
    -

    Angular Labs

    - -
    -
    - -
    -
    - Language services icon -
    -
    -

    Language Services

    - -
    -
    - -
    -
    - Angular Material icon -
    -
    -

    Angular Material

    - -
    -
    - -
    -
    - PWA icon -
    -
    -

    PWA (Progressive Web App)

    - -
    -
    - -
    -
    - Router icon -
    -
    -

    Router

    - -
    -
    - -
    -
    - Universal icon -
    -
    -

    Universal

    - -
    -
    -
    -
    - - -
    -

    Concept and Feature Icons

    - -
    -
    -
    - Dependency injection icon -
    -
    -

    Dependency Injection

    - -
    -
    - -
    -
    - Lazy loading icon -
    -
    -

    Lazy Loading

    - -
    -
    - -
    -
    - Libraries icon -
    -
    -

    Libraries

    - -
    -
    - -
    -
    - Performance icon -
    -
    -

    Performance

    - -
    -
    - -
    -
    - Templates icon -
    -
    -

    Templates

    - -
    -
    -
    -
    - - -
    -

    Press and Media

    - -

    - For inquiries regarding press and media please contact us at - press@angular.io. -

    -
    - - -
    -

    Brand Names

    - -

    Angular

    -

    - The name Angular represents the work and promises provided to you by the Angular team. -

    -

    - When not specified, Angular is assumed to be referring to the latest and greatest stable version from the Angular - Team. -

    - -

    Example

    -

    - Version v4.1 now available - We are pleased to announce that the latest release of Angular is now - available. Staying up to date is easy! -

    - -

    Example

    -

    - Correct: "New *ngIf capabilities—new in version 4.0 is the ability to ..." -

    -

    - Incorrect: "New *ngIf capabilities in Angular 4—Angular 4 introduces - the ability to ..." -

    -

    - Reasoning -

    -

    - By not using "Angular 4" in the title, the content still feels applicable and useful after version 5, 6, 7 have - been released, as the syntax is unlikely to change in the short and medium term. -

    - -

    AngularJS

    -

    - AngularJS is the v1.x series of work and promises provided by the Angular team. -

    - -

    Examples

    -
      -
    • AngularJS is one of the most used framework on the web today (by number of projects).
    • -
    • Millions of developers are currently building with AngularJS.
    • -
    • Developers are beginning to upgrade from AngularJS to Angular.
    • -
    • I’m upgrading my app from AngularJS to Angular.
    • -
    • I'm using AngularJS Material on this project.
    • -
    - -

    - AngularJS projects should use the - original AngularJS logo / - icon, and not the Angular icon: -

    - AngularJS logo - -

    Angular Material

    -

    - This is the work being performed by the Angular team to provide Material Design components for Angular - apps. -

    - -

    AngularJS Material

    -

    - This is the work being performed by the Angular team on Material Design components that are compatible with - AngularJS. -

    - -

    3rd Party Projects

    -

    - X for Angular -

    -

    - 3rd parties should use the terminology “X for Angular” or “ng-X” for software projects. Projects should avoid the - use of Angular X (e.g. Angular UI Toolkit), as it could create authorship confusion. This rule does not apply to - events or meetup groups. -

    -

    - Developers should avoid using Angular version numbers in project names, as this will artificially limit their - projects by tying them to a point in time of Angular, or will require renaming over time. -

    -

    - Where a codename or shortname is used, such as on npm or GitHub, some are acceptable, some are not acceptable. -

    - - Do not use -
      -
    • ng2-
    • -
    • angular2-
    • -
    - - OK to use -
      -
    • ng-
    • -
    • angular-
    • -
    - -

    - As always, component and directive selectors should not begin with “ng-” selectors as this will conflict with - components and directives provided by the Angular team. -

    - -

    Examples

    -
      -
    • The ng-BE team just launched ng-health to help developers track their own health.
    • -
    • I’m going to use NativeScript for Angular to take advantage of native UI widgets.
    • -
    • ReallyCoolTool for Angular.
    • -
    • ReallyCoolTool for AngularJS.
    • -
    -
    - - -
    -

    Terminology

    -

    - We often use terms that are not part of our brand, but we want to remain consistent on the styling and use of them - to prevent confusion and to appear unified. -

    - -
    -
    diff --git a/aio/content/marketing/quick-start.md b/aio/content/marketing/quick-start.md deleted file mode 100644 index 664ca644948..00000000000 --- a/aio/content/marketing/quick-start.md +++ /dev/null @@ -1,140 +0,0 @@ -

    Your first Angular app

    - -A few lines of TypeScript are all it takes to create your first Angular app. As your app grows, you can separate the markup and code into different files. - -## Try your first Angular app - -The code editor contains a complete Angular app. - - - -The Angular app in the code editor shows the TypeScript that makes a simple, but complete, Angular component. -It imports resources from existing libraries and defines the properties of the new component. - -## Explore further - -See more about [Angular features](/features) or try the following exercises for some hands-on experience with Angular. - -### Add features to your first Angular app - -To give your component a reset button that sets the counter back to 0: - -1. In the code editor, in the `template` value, after the line that starts with `