DCL Angular SSR Coding Standards
This skill enforces specific coding standards for DCL Angular SSR projects, ensuring consistency and best practices across the codebase.
Instructions
When writing or modifying Angular components and services in this project, follow these strict guidelines:
1. No Interfaces for Components and Services
Do NOT create or use TypeScript interfaces when creating components and servicesWork directly with class properties and types insteadExample: Use `data: any` or inline types rather than defining separate interfaces2. Direct API Binding in Templates
When binding data in HTML templates, bind directly to the API response structureAvoid creating unnecessary transformation functions in the componentDo NOT add wrapper methods just to access nested propertiesExample: Use `{{ apiResponse.data.items }}` directly instead of creating a `getItems()` method3. No Fallback Binding Operators
Do NOT use fallback binding with `||` operators in templates or componentsAvoid patterns like `{{ value || 'default' }}`Handle null/undefined cases explicitly if needed, but prefer direct binding4. Follow Existing Code Patterns
Before writing new code, examine the existing codebase patternsMatch the coding style, structure, and conventions already present in the projectMaintain consistency with existing component architecture and service implementations5. No Console Logs
Do NOT add `console.log()`, `console.error()`, or any console statements in componentsRemove any debug logging before finalizing codeUse proper error handling and logging services if needed6. No Emojis
Do NOT use emojis in code, comments, commit messages, or documentationKeep all text professional and emoji-freeExamples
**Bad:**
```typescript
interface UserData {
name: string;
email: string;
}
export class UserComponent {
userData: UserData;
getName() {
console.log('Getting name');
return this.userData?.name || 'Unknown';
}
}
```
**Good:**
```typescript
export class UserComponent {
userData: any;
// Template directly binds: {{ userData.name }}
}
```
Summary
Always prioritize direct binding, avoid unnecessary abstractions, follow existing patterns, and keep code clean without console logs or emojis.