angular/packages/examples
Alan Agius 7390af78b1 test(upgrade): exclude unit test files from E2E application sources
Exclude `**/*.spec.ts` files from the `srcs` glob of the `full_sources` target.

Previously, `module.spec.ts` was compiled as part of the application's main sources because the glob pattern only excluded `**/*_spec.ts` (E2E specs). Consequently, `module.spec.js` was generated and included in the runfiles of the E2E test target, causing the Protractor runner to load and execute it. This failed since the E2E testing runner does not have access to unit testing imports like `@angular/core/testing`.
2026-05-19 12:57:48 -07:00
..
common ci: reformat files 2025-12-16 14:44:19 -08:00
core feat(core): bootstrap via ApplicationRef with config 2026-04-07 12:48:53 -07:00
forms ci: reformat files 2025-12-16 14:44:19 -08:00
http build: switch example e2e tests to bazel (#28402) 2019-01-28 19:21:09 -08:00
injection-token docs(docs-infra): remove unused examples 2026-01-26 23:19:35 +00:00
platform-browser docs(docs-infra): remove unused examples 2026-01-26 23:19:35 +00:00
router fix(router): make currentSnapshot required in CanMatchFn (#67452) 2026-04-02 12:53:57 -07:00
service-worker refactor(common): update examples to align with Angular best practices 2025-11-19 14:29:49 -08:00
test-utils build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
testing build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
upgrade test(upgrade): exclude unit test files from E2E application sources 2026-05-19 12:57:48 -07:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63383) 2025-08-25 15:45:01 -07:00
index.html build: enable angular formatting on all html files 2025-12-08 10:19:45 -08:00
README.md build: format md files 2025-11-06 10:03:05 -08:00
tsconfig-e2e.json build: migrate examples to use rules_js (#61650) 2025-05-26 11:00:59 +00:00
tsconfig-test.json build: migrate examples to use rules_js (#61650) 2025-05-26 11:00:59 +00:00
tsconfig.json build: migrate examples to use rules_js (#61650) 2025-05-26 11:00:59 +00:00

API Examples

This folder contains small example apps that get in-lined into our API docs. Each example contains tests for application behavior (as opposed to testing Angular's behavior) just like an Angular application developer would write.

Running the examples

# Serving individual examples (e.g. common)
pnpm bazel run //packages/examples/common:devserver

# "core" examples
pnpm bazel run //packages/examples/core:devserver

Running the tests

pnpm bazel test //packages/examples/...