Angular Cursor Rules
Cursor rules for Angular: standalone components, signals, OnPush strategy, and modern Angular 17+ patterns.
- Use standalone components; avoid NgModule for new code in Angular 17+ - Use signals (signal(), computed(), effect()) for reactive state management - Apply ChangeDetectionStrategy.OnPush to all components for performance - Use inject() function instead of constructor injection in new code - Use the new control flow syntax (@if, @for, @switch) over structural directives - Use NgRx SignalStore or plain services with signals over complex NgRx for simple state - Lazy load all feature routes; never import feature modules in AppModule - Use trackBy (or track in new syntax) for all @for loops
How to use with Cursor
Create a `.cursorrules` file in your project root and paste these rules. Cursor reads this automatically on every AI interaction.
Related Rules
Python Cursor Rules
Best Cursor AI coding rules for Python development. Enforce type hints, PEP 8, Pythonic patterns, and modern Python best practices in your .cursorrules file.
TypeScript Cursor Rules
Cursor rules for TypeScript: enforce strict mode, eliminate any types, and write type-safe code with these .cursorrules configurations.
React Cursor Rules
Cursor rules for React: component patterns, hooks best practices, performance optimization, and clean state management conventions.
Next.js Cursor Rules
Cursor rules for Next.js App Router: server components, data fetching, routing, and deployment best practices.