angular
Installation
SKILL.md
Angular Code Review Rules
Security
- Avoid
bypassSecurityTrust*methods unless absolutely necessary; when used, require code comments justifying the bypass - Sanitize dynamic HTML with
DomSanitizeronly when needed; always prefer Angular's built-in sanitization - Validate route parameters and query strings to prevent injection attacks
- Use Angular's built-in CSRF protection with HttpClient
- Validate and sanitize data before binding it in templates, especially when displaying user-generated content in
*ngForloops or other directives - Never interpolate untrusted user input into templates without proper sanitization
Module Organization
- Feature modules should be lazy-loaded where possible
- Use
SharedModulefor reusable components/pipes/directives. Explicitly define exports to make the module's public API clear - Use
CoreModulefor singleton services (provided in root); import only once in AppModule - Avoid circular module dependencies