π https://alobuuls.github.io/angular-observable-state/
Note
Angular 12 application that demonstrates state management using RxJS and BehaviorSubject to share information between components and pages.
The project showcases reactive programming concepts, centralized state management, component communication, and Angular architecture best practices through a simple but scalable implementation.
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-observable-state.git
cd angular-observable-statenpm installStart the development server:
ng serveThen open:
http://localhost:4200
The application follows a simple state management architecture based on RxJS observables and a centralized service.
Responsible for:
- Global state management
- BehaviorSubject implementation
- State updates
- Observable subscriptions
- Component communication
Responsible for:
- State emission
- User input handling
- Updating shared data
Responsible for:
- State subscription
- Reactive data display
- Observable consumption
Responsible for:
- Reading shared state
- Updating shared state
- Bidirectional communication
Responsible for:
- Application bootstrap
- Route configuration
- Dependency injection
- π Shared state between pages
- π‘ Communication with BehaviorSubject
- β‘ Reactive programming with RxJS
- π― Observable subscriptions
- π¦ Centralized state management
- π§© Decoupled component communication
- π Angular Forms with ngModel
- π Real-time data updates
- π§ Simple state management pattern
- π― Strong typing with TypeScript
| 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-observable-state/
βββ src/
β
βββ app/
β β
β βββ pages/
β β βββ page-1/
β β βββ page-2/
β β βββ page-3/
β β
β βββ services/
β β βββ state.service.ts
β β
β βββ app.component.ts
β βββ app.module.ts
β βββ app.routes.ts
β
βββ environments/
β βββ environment.ts
β βββ environment.prod.ts
β
βββ angular.json
βββ package.json
βββ tsconfig.json
βββ README.md
- Centralized state management
- Reactive programming with RxJS
- Separation of concerns
- Observable pattern implementation
- Service-based architecture
- Decoupled component communication
- Strong typing with TypeScript
- Dependency injection
- Scalable state management structure
- Angular modular organization
Practice and strengthen Angular state management concepts through the implementation of a reactive application:
- RxJS Fundamentals
- BehaviorSubject
- Observable Pattern
- Shared State Management
- Component Communication
- Angular Services
- Dependency Injection
- Reactive Programming
- TypeScript
- Front-End Architecture
This project is intended for educational and portfolio purposes.
Created by Alondra Francisco.