Project Structure
The application follows a clear separation between page components and reusable shared components:Pages vs Shared Components
Pages
Page components are route-level components that represent different views in the application. Each page is mapped to a specific route inapp.routes.ts and serves as a container for feature-specific functionality.
Shared Components
Shared components are reusable across multiple pages. In this project, the Navbar is a shared component used in the main App layout.Available Components
Counter Page
Demonstrates signal usage, OnPush change detection, and basic state management
Hero Page
Shows reactive form handling with signals and dynamic data updates
Dragonball Pages
Character list management with signal arrays and conditional rendering
Navbar
Navigation component with RouterLink and active route highlighting
Key Angular Patterns
This project demonstrates several modern Angular patterns:- Signals: All components use Angular signals for reactive state management
- Standalone Components: No NgModules required
- OnPush Change Detection: Optimized performance with
ChangeDetectionStrategy.OnPush - Template Syntax: New
@ifand@forcontrol flow syntax - Router Integration: RouterLink and RouterLinkActive directives
All components in this project use the new Angular standalone component architecture, eliminating the need for NgModules.
Component Architecture
Each page component follows a consistent structure:- TypeScript file (
.ts) - Component logic with signals and methods - HTML template (
.html) - Separated template file for better organization - Inline styles (optional) - Component-specific styles when needed