> angular-routing
Standards for Angular Router, Lazy Loading, and Guards. Use when configuring Angular routes, lazy-loaded modules, route guards, or resolvers. (triggers: *.routes.ts, angular router, loadComponent, canActivate, resolver)
curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/angular-routing?format=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
> related_skills --same-repo
> typescript-tooling
Development tools, linting, and build config for TypeScript. Use when configuring ESLint, Prettier, Jest, Vitest, tsconfig, or any TS build tooling. (triggers: tsconfig.json, .eslintrc.*, jest.config.*, package.json, eslint, prettier, jest, vitest, build, compile, lint)
> typescript-security
Secure coding practices for TypeScript. Use when validating input, handling auth tokens, sanitizing data, or managing secrets and sensitive configuration. (triggers: **/*.ts, **/*.tsx, validate, sanitize, xss, injection, auth, password, secret, token)
> typescript-language
Modern TypeScript standards for type safety and maintainability. Use when working with types, interfaces, generics, enums, unions, or tsconfig settings. (triggers: **/*.ts, **/*.tsx, tsconfig.json, type, interface, generic, enum, union, intersection, readonly, const, namespace)
> typescript-best-practices
Idiomatic TypeScript patterns for clean, maintainable code. Use when writing or refactoring TypeScript classes, functions, modules, or async logic. (triggers: **/*.ts, **/*.tsx, class, function, module, import, export, async, promise)