Skip to content

Commit 3036982

Browse files
authored
Fix typos and modernize Angular instructions
- Fix missing `contentChildren()` reference - Push instructions towards more standalone - Update file naming conventions according to Angular's style guide
1 parent 33cab83 commit 3036982

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

instructions/angular.instructions.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Instructions for generating high-quality Angular applications with TypeScript, u
1818

1919
### Architecture
2020
- Use standalone components unless modules are explicitly required
21-
- Organize code by feature modules or domains for scalability
21+
- Organize code by standalone feature modules or domains for scalability
2222
- Implement lazy loading for feature modules to optimize performance
2323
- Use Angular's built-in dependency injection system effectively
2424
- Structure components with a clear separation of concerns (smart vs. presentational components)
@@ -32,7 +32,7 @@ Instructions for generating high-quality Angular applications with TypeScript, u
3232

3333
### Component Design
3434
- Follow Angular's component lifecycle hooks best practices
35-
- When using Angular >= 19, Use `input()` `output()`, `viewChild()`, `viewChildren()`, `contentChild()` and `viewChildren()` functions instead of decorators; otherwise use decorators
35+
- When using Angular >= 19, Use `input()` `output()`, `viewChild()`, `viewChildren()`, `contentChild()` and `contentChildren()` functions instead of decorators; otherwise use decorators
3636
- Leverage Angular's change detection strategy (default or `OnPush` for performance)
3737
- Keep templates clean and logic in component classes or services
3838
- Use Angular directives and pipes for reusable functionality
@@ -78,7 +78,7 @@ Instructions for generating high-quality Angular applications with TypeScript, u
7878
- Use Angular's `TestBed` for component testing with mocked dependencies
7979
- Test signal-based state updates using Angular's testing utilities
8080
- Write end-to-end tests with Cypress or Playwright (if specified)
81-
- Mock HTTP requests using `HttpClientTestingModule`
81+
- Mock HTTP requests using `provideHttpClientTesting`
8282
- Ensure high test coverage for critical functionality
8383

8484
## Implementation Process
@@ -95,7 +95,7 @@ Instructions for generating high-quality Angular applications with TypeScript, u
9595
11. Optimize performance and bundle size
9696

9797
## Additional Guidelines
98-
- Follow Angular's naming conventions (e.g., `feature.component.ts`, `feature.service.ts`)
98+
- Follow Angular's old naming conventions (e.g., `feature.component.ts`, `feature.service.ts`) or new naming convention (e.g., `feature.ts`, `feature-service.ts`) depending on what the project already uses
9999
- Use Angular CLI commands for generating boilerplate code
100100
- Document components and services with clear JSDoc comments
101101
- Ensure accessibility compliance (WCAG 2.1) where applicable

0 commit comments

Comments
 (0)