Files
ECC/pi/core/skills/angular-developer/references/show-routes-with-outlets.md
T
Affaan Mustafa c70874fae9 feat(pi): curated pi/core skills+prompts profile, CI load test, and 2.2.2 release sync (#3264)
Adds a curated, Pi-native, skills+prompts-only profile at pi/core/ for downstream packagers that mirror GitHub Releases.

- manifests/pi-core.json: explicit include lists, per-item exclusion reasons, curation rules, safety allowlists; every root skill and command must be classified.
- scripts/build-pi-core.js regenerates pi/core deterministically (package.json from VERSION, LICENSE, README.md, CURATION.md, skills/, commands/); --check fails CI on drift. council is renamed ecc-council inside pi/core only.
- Safety checks: no callable endpoints outside the allowlist, no npx/curl|sh/pip install, no secrets, no absolute home paths, no symlinks, valid frontmatter, no duplicate names.
- CI: build + drift check and an offline Pi CLI load test of pi/core.
- Release: VERSION, package.json and pi/core/package.json at 2.2.2, CHANGELOG, tag-triggered release verification, and a two-week cadence in CONTRIBUTING.md.

pi/core: 123 of 293 skills and 24 of 94 commands; 35,006 characters of skill description text.
2026-09-29 20:24:05 -05:00

1.6 KiB

Show Routes with Outlets

The RouterOutlet directive is a placeholder where Angular renders the component for the current URL.

Basic Usage

Include <router-outlet /> in your template. Angular inserts the routed component as a sibling immediately following the outlet.

<app-header /> <router-outlet />
<!-- Route content appears here -->
<app-footer />

Nested Outlets

Child routes require their own <router-outlet /> within the parent component's template.

// Parent component template
<h1>Settings</h1>
<router-outlet /> <!-- Child components like Profile or Security render here -->

Named Outlets (Secondary Routes)

Pages can have multiple outlets. Assign a name to an outlet to target it specifically. The default name is 'primary'.

<router-outlet />
<!-- Primary -->
<router-outlet name="sidebar" />
<!-- Secondary -->

Define the outlet in the route config:

{
  path: 'chat',
  component: Chat,
  outlet: 'sidebar'
}

Outlet Lifecycle Events

RouterOutlet emits events when components are changed:

  • activate: New component instantiated.
  • deactivate: Component destroyed.
  • attach / detach: Used with RouteReuseStrategy.
<router-outlet (activate)="onActivate($event)" />

Passing Data via routerOutletData

You can pass contextual data to the routed component using the routerOutletData input. The component accesses this via the ROUTER_OUTLET_DATA injection token as a signal.

// In Parent
<router-outlet [routerOutletData]="{ theme: 'dark' }" />

// In Routed Component
outletData = inject(ROUTER_OUTLET_DATA) as Signal<{ theme: string }>;