angular-routing

Configure Angular v20+ routing with lazy loading, functional guards, resolvers, and signal-based route parameters.

Updated Feb 9, 2026
One-click install
npx skills add https://github.com/Blotch-Smart-Frames/Board --skill angular-routing-blotch-smart-frames
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: angular-routing
Source: https://github.com/Blotch-Smart-Frames/Board/tree/main/packages/client/.claude/skills/angular-routing
Command: npx skills add https://github.com/Blotch-Smart-Frames/Board --skill angular-routing-blotch-smart-frames

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up navigation in modern Angular applications involves many moving parts—lazy loading, authentication guards, route parameters, resolvers, and nested routes—and getting the configuration right with the latest signal-based APIs can be error-prone without clear guidance. ## Core Features & Use Cases - Route Configuration & Lazy Loading: Set up routes with loadComponent and loadChildren for on-demand feature loading. - Functional Guards & Resolvers: Implement auth guards, role guards, unsaved-changes guards, and data resolvers using injectable functions. - Signal-Based Route Parameters: Read route and query parameters as signal inputs via withComponentInputBinding. - Use Case: When building an admin dashboard, use this Skill to create a lazy-loaded admin section protected by an auth guard and role guard, with user data pre-fetched by a resolver before the detail page renders. ## Quick Start Ask the AI to set up Angular routing for a new feature with lazy loading and an authentication guard protecting the dashboard route.

Frequently Asked Questions about angular-routing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I lazy load routes in Angular?▼

Use loadChildren to lazy load an entire feature's route file or loadComponent for a single component. Both accept a dynamic import function, and the referenced code is only downloaded when the user navigates to that route.

How to read route parameters as signals in Angular?▼

Enable withComponentInputBinding() in provideRouter, then declare route params as input.required<string>() in your component. Angular automatically binds path parameters, query parameters, and route data to matching component inputs.

How do I protect Angular routes with an auth guard?▼

Create a CanActivateFn function that injects your auth service and Router, returning true when authenticated or a UrlTree redirecting to login otherwise. Attach it to routes via the canActivate array.

What is the difference between a resolver and a guard in Angular?▼

A resolver (ResolveFn) pre-fetches data before route activation so the component receives ready data via inputs, while a guard (CanActivateFn) controls whether navigation is allowed at all. Resolvers fetch data; guards authorize access.

Does Angular support preloading lazy-loaded modules?▼

Yes, use withPreloading(PreloadAllModules) to preload all lazy routes, or implement a custom PreloadingStrategy to preload selectively based on route data flags or network conditions like connection speed and saveData.