mcpbeat

Angular Routing

hoangnguyen0403/angular-routing

Configure Angular Router with lazy-loaded routes, functional guards, and component input binding. Use when defining routes, lazy-loading features, creating route guards, or setting up resolvers.

2k tokens
context cost
the whole folder, loaded on every use
3
files
instructions only
0
copies elsewhere
how many repositories repackaged it
536
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/HoangNguyen0403/agent-skills-standard --skill angular-routing

What comes with it

4 551 bytes besides the instruction
evals/evals.json
references/routing-patterns.md

The instruction itself

9 sections, as written by the author

Routing

Priority: P0 (CRITICAL)

1. Lazy Load All Feature Routes

  • Use loadComponent (standalone) or loadChildren (route file) for every feature route.

See routing patterns for lazy loading and guard examples.

2. Use Functional Guards

  • Create function-based guards (CanActivateFn) instead of deprecated class-based guards.

See routing patterns for functional guard implementation.

3. Enable Component Input Binding

  • Configure withComponentInputBinding() in provideRouter(routes, withComponentInputBinding()).
  • Define input.required<string>() in components — Angular auto-maps route params, query params, and resolve data.

4. Configure Resolvers and Titles

  • Create ResolveFn<T> to pre-fetch critical data before navigation.
  • Provide custom TitleStrategy or use title: 'Dashboard' in route data.

Anti-Patterns

  • No logic in route config: Move access control and data fetching to dedicated Guards and Resolvers.
  • No eager feature imports: Use loadComponent or loadChildren for all feature routes.

References

  • Routing Patterns

Canonical response anchors

When this skill applies, preserve the following domain terminology or equivalent concrete examples in the answer when relevant:

  • No logic
  • deprecated

How to use it

Copy the folder

Take hoangnguyen0403/angular-routing from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.