Generate production-ready Angular Cursor rules for Project Rules (.mdc), AGENTS.md, or legacy .cursorrules. This template encodes stack-specific conventions for projects using Angular. Full-featured TypeScript framework with dependency injection, RxJS, and strong conventions.
The template focuses Cursor AI on concrete Angular practices instead of generic coding advice. Required sections are always included; optional sections can be enabled when they match your project.
Required guidance
- Component Architecture
- Services & Dependency Injection
- Routing & Navigation
- Forms & Validation
Default style
- Indentation: 2 spaces
- Quotes: single
- Semicolons: enabled
- Naming: camelCase
Example Angular Rules
The generator turns these sections into Project Rules with frontmatter, AGENTS.md, or a single .cursorrules file depending on the output format you choose.
Component Architecture
- Use standalone components by default (no NgModules).
- Use the new control flow syntax (@if, @for, @switch).
- Use 2 spaces for indentation.
- Use camelCase for property and method names.
- Keep components small and focused on presentation logic.
- Delegate business logic to services.
Services & Dependency Injection
- Use providedIn: 'root' for singleton services.
- Use inject() function instead of constructor injection.
- Keep services focused on a single concern.
- Use signals (signal(), computed(), effect()) for reactive state.
- Use HttpClient with typed response generics.
- Use interceptors for cross-cutting concerns (auth, logging, error handling).
Routing & Navigation
- Use lazy loading with loadComponent for route-level code splitting.
- Use routerLink for internal navigation.
- Use route resolvers for pre-fetching data.
- Use route guards (canActivate, canDeactivate) for access control.
- Use withComponentInputBinding() for route params as component inputs.
- Define routes in a dedicated routes.ts file per feature module.
What does the Angular Cursor rules template include?
It includes 4 rule sections covering component architecture, services & dependency injection, routing & navigation and other Angular development conventions.
Can I generate Angular Project Rules and AGENTS.md from the same template?
Yes. The generator can export the same stack-specific guidance as modern Project Rules (.mdc), AGENTS.md, or a legacy .cursorrules file.
Should I combine Angular with other Cursor rules templates?
Yes. You can combine Angular with related templates such as TypeScript, Tailwind CSS, Docker, or backend frameworks when your project uses multiple technologies.