A learning-focused Angular 19 app that demonstrates TypeScript interfaces, types, Observable patterns, async operations, and state management using small standalone demo components.
- Angular 19 (standalone components)
- TypeScript 5
- RxJS 7
- SCSS
- Karma + Jasmine for unit tests
- Node.js 18+ (latest LTS recommended)
- npm
npm installnpm startThe app runs at http://localhost:4200/.
npm start- Run dev server (ng serve)npm run build- Production buildnpm run watch- Development build in watch modenpm test- Run unit tests
src/
app/
components/ # demo feature components
shared/ # reusable UI components (card)
models/ # shared interfaces and types
app.component.ts # main app component
app.config.ts # application configuration
app.routes.ts # route configuration
- The app is bootstrapped with
bootstrapApplicationinsrc/main.ts. AppComponentrenders demo components directly insrc/app/app.component.html.ComponentsModuleaggregates and exports all standalone demo components.- HTTP client is configured via
provideHttpClient()inapp.config.ts.
From src/app/app.component.html:
basic-interfaces- Demonstrates TypeScript interface definitions and usage patternshttp-observable- Shows HTTP calls usingHttpClientreturning observablesasync-pipe- Demonstrates theasyncpipe for subscribing to observables in templatesmap-transformation- RxJSmapoperator for transforming observable dataswitch-map- RxJSswitchMapoperator for switching between observablesgeneric-api-response- Generic types/interfaces for type-safe API responsespartial-pick-omit- TypeScript utility types (Partial,Pick,Omit) usagestate-pattern- State management pattern using observables and subjectscaching-forkjoin- Combines observables with caching usingforkJoinoperator
- Basic interface definitions
- Generic interfaces for API responses
- Utility types (
Partial,Pick,Omit,Readonly, etc.) - Type-safe data modeling
- Creating observables from HTTP calls
- Observable operators:
map,switchMap,forkJoin,tap - Subscribe and unsubscribe patterns
- Observable composition and chaining
asyncpipe for automatic subscription handling- OnPush change detection strategies
- Standalone components
- Template syntax for observable data
- Simple state patterns with subjects
- Observable-based state sharing
- Caching strategies
- Data fetching patterns
- Most demo components are standalone and imported through
ComponentsModulefor easy reuse. - Components demonstrate practical, real-world patterns used in Angular applications.
- The app is built for learning and experimentation with interfaces, types, and reactive patterns.
