Angular-specific coding standards and best practices
Instructions for generating high-quality Angular applications with TypeScript, using Angular Signals for state management, adhering to Angular best practices as outlined at https://angular.dev.
tsconfig.json for type safetycatchError)FormGroup, FormControl) for reactive formsinput() output(), viewChild(), viewChildren(), contentChild() and contentChildren() functions instead of decorators; otherwise use decoratorsOnPush for performance)signal(), computed(), and effect() for reactive state updatesAsyncPipe to handle observables in templates when combining signals with RxJSHttpClient for API calls with proper typinginject() function for dependency injection in standalone componentsshareReplay for observables)HttpInterceptor for CSRF protection and API authentication headersng build --prod for optimizationOnPush strategy and signals for fine-grained reactivityngFor loops to improve rendering performanceTestBed for component testing with mocked dependenciesprovideHttpClientTestingfeature.ts for components and feature-service.ts for services. For legacy codebases, maintain consistency with existing pattern.pnpm lint, pnpm format, and pnpm test frequently to maintain code quality and catch issues early