What problem does it solve?
Angular Router is built-in using the Angular router; route configuration for standalone and NgModule projects, functional guards (Angular 14.1+), lazy loading, route resolvers, typed params via signals/observables, programmatic navigation, route data and meta.
Use this skill to:
- Configure routes (standalone-style or NgModule-style).
- Use functional guards (canActivate as function, preferred over class-based in 17+).
- Lazy-load components or feature modules.
- Implement auth guards via route meta + functional guards.
- Read params/queries via inject(ActivatedRoute) + signals or RxJS.
Do NOT use this skill for:
- General conventions (see angular-conventions).
- State management (see angular-state-and-rx).
- Forms (see angular-forms).
- Testing routes (see angular-testing).
Core Features & Use Cases
- Configure routes in standalone-style or NgModule-style projects.
- Use functional guards (canActivate as function) and lazy-load components or feature modules.
- Implement auth guards via route meta and functional guards.
- Read params and queries via inject(ActivatedRoute) + signals or RxJS.
Quick Start
Create a routes file configuring standalone or NgModule style routes and bootstrap the router in your AppModule.