angular-routing
БесплатноБез исполняемых скриптовНе проверенStandards for Angular Router, Lazy Loading, and Guards. Use when configuring Angular routes, lazy-loaded modules, route guards, or resolvers. (triggers…
от ComeOnOliver★ 67 звёзд на GitHubОб этом скилле
Routing
Priority: P0 (CRITICAL)
Principles
- Lazy Loading: All feature routes MUST be Lazy load all features with loadComponent (standalone) or loadChildren (route file).
- Example:
{ path: 'dashboard', loadComponent: () => import('./features/dashboard/dashboard.component').then(m => m.DashboardComponent) }.
- Example:
- Functional Guards: Use function-based guards (CanActivateFn) instead of class-based guards (guards are deprecated).
- Example:
export const authGuard: CanActivateFn = () => inject(AuthService).isAuthenticated() ? true : inject(Router).createUrlTree(['/login']). Register in routes:{ canActivate: [authGuard] }.
- Example:
- Component Inputs: Enable withComponentInputBinding() in provideRouter(routes, withComponentInputBinding()) to define input.required
() in components. Angular auto-maps route params, query params, and resolve data to matching inputs.
Guidelines
- Title Strategy: Provide a custom TitleStrategy service (extending
TitleStrategyand overriding updateTitle(snapshot)) or use simple title: 'Dashboard' in route data. - Resolvers: Create a ResolveFn
(e.g., inject(UserService).getUser(route.paramMap.get('id'))) to pre-fetch critical data before navigation completes (resolve: { user: userResolver }). Avoid blocking UI too long.
Anti-Patterns
- No logic in route config: no logic inside route config. Move guards for access control and data fetching to dedicated Guards and Resolvers.
- No eager feature imports: Use
loadComponentorloadChildrenfor all feature routes.
References
Установить angular-routing в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл 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)
Как установить скилл angular-routing?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл angular-routing запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic