Adding Components
Add translations
Add the component selector as a key in all translation files:In In
public/i18n/en.json:public/i18n/ar.json and other language files as well.Adding Page Components
Page components are routable components that represent full pages in your application.Adding Services
Component Architecture Patterns
Using Signals
Jet uses Angular Signals for reactive state management:OnPush Change Detection
All components useChangeDetectionStrategy.OnPush for optimal performance:
- Change detection only runs when inputs change
- Use signals or explicitly mark for check when needed
- Better performance for large applications
Standalone Components
All components are standalone (no NgModules):Path Aliases
Jet uses the@jet path alias for imports:
tsconfig.json:
Best Practices
Use private fields with # prefix
Use private fields with # prefix
Use TypeScript private fields for internal implementation:
Inject dependencies with inject()
Inject dependencies with inject()
Use the functional inject() API instead of constructor injection:
Use readonly for injected services
Use readonly for injected services
Mark injected services as readonly:
Log component and service initialization
Log component and service initialization
Always log initialization in constructors:
Keep components focused
Keep components focused
- One component = one responsibility
- Extract reusable logic into services
- Use composition over inheritance