docs(examples): add standalone Angular project

Merged
KA
21d ago
+531-8

Adds examples/with-angular, the same greeter demo as the other web examples, built as one standalone Angular 22 component.

  • src/app/app.ts holds the whole app: signals for state and @if for the error and greeting. It uses no router and no forms package.
  • The tests, styles.css, and brand assets are copied unchanged from with-vite.
  • typescript ~6.0.2 instead of the siblings' ^7: @angular/compiler-cli 22.2 requires >=6.0 <6.1.
  • The README asks for Node 24.15+ rather than 24.8+, because Angular 22 declares ^22.22.3 || ^24.15.0 || >=26.0.0.
  • angular.json turns off CLI analytics so ng serve never stops for a prompt when the runner starts it.
  • Wiring:
    • e2e init --example with-angular (packages/e2e/src/cli/init/examples.ts, with a changeset)
    • the nightly examples.yml web matrix
    • the Angular card on docs/example-projects.mdx (with an angular.svg logo) and the --example list in docs/reference/cli.mdx
    • the stack lists in README.md, skills/e2e/SKILL.md, examples/README.md, and AGENTS.md

The logo is the shield from the Angular logo on the Angular CLI's welcome page, with its gradient fitted to the shield. Its source is noted in docs/images/examples/README.md.

with-angular

Verified

Ran it locally: yes

  • Example project against the published e2e 0.21.3 and @e2e-dev/web 0.15.3: tsc --noEmit and ng build pass.
  • AI_GATEWAY_API_KEY=... npm run test:e2e -- --no-cache: all 5 tests pass, agent steps included (7 model calls, $0.0021).
 ✓ target "web" command ready 1.16s
 ✓ |web| tests/deterministic.e2e.ts (3 tests) 967ms
   ✓ the agent gets a greeting > agent.act "get the app to greet {name}" 13.76s · 3 model calls
   ✓ the agent gets a greeting > agent.assert "the app greets Grace by name" 2.03s · 1 model call
   ✓ the agent finds the empty-name error > agent.act "press Greet without typing a name" 4.39s · 2 model calls
   ✓ the agent finds the empty-name error > agent.assert "the app asks for a name" 2.09s · 1 model call
 ✓ |web| tests/agentic.e2e.ts (2 tests) 22.89s ai 22.4k tokens · 70% cached · $0.0021

      Tests  5 passed (5)
  • Not run: e2e init --example with-angular end to end. It downloads the folder from GitHub, which has no copy of it until this merges. tests/unit/init-examples.test.ts checks that every folder under examples/ has a preset and a config.