Agent skill
Routing
Standards for Angular Router, Lazy Loading, and Guards.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/routing
Metadata
Additional technical details for this skill
- labels
-
angular routing guards lazy-loading
- triggers
-
{ "files": [ "*.routes.ts" ], "keywords": [ "angular router", "loadComponent", "canActivate", "resolver" ] }
SKILL.md
Routing
Priority: P0 (CRITICAL)
Principles
- Lazy Loading: Use
loadComponentfor standalone components andloadChildrenfor route files. - Functional Guards: Use function-based guards (
CanActivateFn) instead of class-based guards (Deprecated). - Component Inputs: Enable
withComponentInputBinding()to map route params directly to component inputs.
Guidelines
- Title Strategy: Use
TitleStrategyservice to auto-set page titles from route data. - Resolvers: Use
resolveto pre-fetch critical data before navigation completes, but avoid blocking UI for too long.
Anti-Patterns
- Logic in Routes: Keep route definitions clean. Move logic to Guards or Resolvers.
- Eager Loading features: Never direct import feature components in root routes.
References
- Routing Patterns
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?