🔗 https://alobuuls.github.io/angular-observables-state-pattern/
Note
Angular 12 application that demonstrates multiple component communication patterns and state management techniques using RxJS and BehaviorSubject.
The project explores communication through @Input, @Output, shared services, manual subscriptions, and the Async Pipe while following Angular best practices and reusable component architecture.
Before running the project, make sure you have installed:
- 📦 Node.js:
v12.14.x – v14.x(recommended: v14.21.3 LTS) - 📦 npm:
v6+ 🅰️ Angular CLI:v12.x
Run the following commands in your terminal:
node -v
npm -v
ng versiongit clone git@github.com:alobuuls/angular-observables-state-pattern.git
cd angular-observables-state-patternnpm installStart the development server:
ng serveThen open:
http://localhost:4200
The application follows a modular communication architecture focused on RxJS observables and reusable Angular components.
Responsible for:
- Shared state management
- BehaviorSubject implementation
- Observable streams
- State updates
- Component synchronization
Responsible for:
- Data emission
- State updates
- Parent-child communication
Responsible for:
- Manual observable subscriptions
- Subscription lifecycle management
- Reactive data consumption
Responsible for:
- Async Pipe implementation
- Reactive state updates
- Observable-based rendering
Responsible for:
- User input management
- Event emission
- Reusable form logic
Responsible for:
- Data presentation
- Reusable UI rendering
- Input-based communication
- 🔄 Shared state with BehaviorSubject
- 📡 Observable-based communication
- 📤 @Output event emission
- 📥 @Input property binding
- ⚡ Async Pipe implementation
- 🔔 Manual subscription management
- 🧩 Reusable Angular components
- 🧠 Reactive state updates
- 📦 Service-based architecture
- 🎯 Strong typing with TypeScript
- 🚀 Component communication patterns
| Technology | Purpose |
|---|---|
| Angular 12 | Framework |
| TypeScript | Application Logic |
| RxJS | Reactive Programming |
| BehaviorSubject | State Management |
| Angular Forms | Form Handling |
| Angular Router | Navigation |
| HTML5 | Structure |
| CSS3 | Styling |
angular-observables-state-pattern/
├── src/
│
├── app/
│ │
│ ├── components/
│ │ ├── card/
│ │ └── form/
│ │
│ ├── pages/
│ │ ├── page-one/
│ │ ├── page-two/
│ │ └── page-three/
│ │
│ ├── services/
│ │ └── state.service.ts
│ │
│ ├── interfaces/
│ │ └── data.interface.ts
│ │
│ ├── routes.ts
│ └── app.module.ts
│
├── environments/
│ ├── environment.ts
│ └── environment.prod.ts
│
├── angular.json
├── package.json
├── tsconfig.json
└── README.md
- Reactive programming with RxJS
- Centralized state management
- Separation of concerns
- Component communication patterns
- Smart use of Async Pipe
- Subscription lifecycle management
- Strong typing with TypeScript interfaces
- Reusable component architecture
- Service abstraction
- Scalable Angular organization
Practice and strengthen Angular communication and state management concepts through the implementation of different reactive patterns:
- RxJS Fundamentals
- BehaviorSubject
- Shared State Management
- @Input / @Output Communication
- Async Pipe
- Observable Subscriptions
- Component Architecture
- Angular Services
- Dependency Injection
- Front-End Architecture
This project is intended for educational and portfolio purposes.
Created by Alondra Francisco.