Angular Basics Learning Repository
Hands-on Angular practice projects for learning core concepts through small, focused examples.
This repository contains multiple standalone Angular projects. Each folder explores one topic or a small related set of topics so you can run the app, inspect the code, and experiment in isolation.
- Practical Angular examples organized by topic
- Separate runnable projects for focused learning
- Modern Angular project setup with TypeScript and SCSS
- Built around Angular 19-era project structure and patterns
- Project-level READMEs for deeper topic-specific notes
- Good mix of fundamentals and slightly more advanced concepts
The repository is organized as a collection of top-level Angular projects, with each folder focused on a specific topic.
1. Component Communication
- Folder: component.communication
- What you'll learn:
- Parent-to-child communication with @Input
- Child-to-parent communication with @Output and EventEmitter
- Template reference variables
- @ViewChild for parent-to-child method access
- Content projection with ng-content
- Sibling communication through parent and shared services
- BehaviorSubject and Signals-based communication
- A live API communication playground
- Tech stack: Angular 19, RxJS, Angular Signals, HttpClient
- API demo: JSONPlaceholder
- Folder: data.binding
- What you'll learn:
- Interpolation
- Property binding
- Event binding
- Two-way binding with ngModel
- Class, style, and attribute binding
- Pipe binding
- Safe navigation
- Async pipe usage
- Signal-based binding examples
- Tech stack: Angular 19, TypeScript, SCSS, RxJS, Angular Forms, Angular Signals
- API demo: JSONPlaceholder and Picsum Photos
- Folder: dependency.injection
- What you'll learn:
- Basic service injection
- The inject() function
- Root singleton behavior
- Component-scoped providers
- Injection tokens with useValue
- Factory providers with dependencies
- Hierarchical DI
- Optional dependency resolution
- Environment injector patterns
- Tech stack: Angular 19, TypeScript 5, RxJS 7, Karma, Jasmine
- Folder: httpclient
- What you'll learn:
- HttpClient GET, POST, PUT, and DELETE patterns
- Async pipe with HTTP data
- Error handling strategies
- forkJoin and switchMap
- Loading states
- Interceptors for logging, auth, and refresh behavior
- Caching, pagination, filtering, and search
- Fake JWT authentication flow
- Tech stack: Angular 19, HttpClient, RxJS, standalone components
- API demo: JSONPlaceholder
5. Internationalization (i18n)
- Folder: i18n
- What you'll learn:
- Runtime internationalization with ngx-translate
- JSON-based translation files
- Placeholder interpolation
- Language switching
- Basic RTL and LTR direction handling
- Tech stack: Angular 19, TypeScript, RxJS, @ngx-translate/core, @ngx-translate/http-loader
- Translation assets: src/assets/i18n/messages.<lang>.json
6. Interfaces, Types, and Observables
- Folder: interface.types.and.observables
- What you'll learn:
- TypeScript interfaces and reusable models
- Generic API response typing
- Observable-based HTTP calls
- Async pipe usage
- RxJS map and switchMap
- Utility types like Partial, Pick, and Omit
- State patterns with observables and subjects
- Caching and forkJoin
- Tech stack: Angular 19, TypeScript 5, RxJS 7, SCSS
- Folder: lifecycle.hooks
- What you'll learn:
- Angular lifecycle hook flow
- Change detection patterns
- Signal-driven updates
- Cleanup with destroy logic
- API-driven examples tied to lifecycle changes
- Tech stack: Angular 19, TypeScript, SCSS, RxJS
- API demo: REST Countries API
- Folder: notes.app
- What you'll learn:
- Standalone component architecture
- Angular Router with guards
- Service-based state management
- Template-driven and reactive form patterns
- Custom validators
- CRUD operations
- Modal confirmation flows
- Toast notifications
- Tech stack: Angular 19, TypeScript 5, SCSS, Angular Router, Karma, Jasmine
- Folder: pipes
- What you'll learn:
- Built-in pipes
- Custom pipe creation
- Async pipe usage
- Pure versus impure behavior
- Formatting and transformation patterns on live data
- Tech stack: Angular 19, TypeScript, SCSS, RxJS
- API demo: JSONPlaceholder
- Folder: reactive.forms
- What you'll learn:
- FormControl and FormGroup
- Form submission flow
- Built-in validators
- Nested groups
- Dynamic FormArray
- Custom and async validators
- Strongly typed forms
- valueChanges patterns
- Conditional validation
- Full CRUD with a local API
- Tech stack: Angular 19, Reactive Forms, HttpClient, json-server
- Local API: db.json served through json-server
- Folder: routing
- What you'll learn:
- Static routes
- Dynamic route parameters
- Nested routes
- Deeper child routing
- Lazy loading with loadComponent
- Wildcard routing
- Route params combined with API calls
- Tech stack: Angular 19, Angular Router, standalone components, HttpClient
- API demo: JSONPlaceholder
12. Template-Driven Forms
- Folder: template.driven.forms
- What you'll learn:
- [(ngModel)] two-way binding
- ngForm state and values
- (ngSubmit) submit handling
- Required and pattern validations
- Disable-on-invalid patterns
- ngModelGroup nested form objects
- Custom validation rules
- Typed model usage
- Reset behavior
- Full CRUD with template-driven forms
- Tech stack: Angular 19, FormsModule, HttpClient, json-server
- Local API: db.json served through json-server
Tech Stack (Common Across All Projects)
- Angular 19
- TypeScript
- SCSS
- npm (v9+)
- Angular CLI (v19+)
- Node.js (v18+)
- Karma and Jasmine for unit testing
- RxJS in projects that work with async streams and state
Most project folders follow a structure close to this:
project-name/
|-- src/
| |-- app/
| |-- index.html
| |-- main.ts
| `-- styles.scss
|-- public/
|-- angular.json
|-- package.json
|-- tsconfig.json
|-- tsconfig.app.json
|-- tsconfig.spec.json
|-- package-lock.json
`-- README.md
Some projects also include extras such as:
- db.json for mock API data
- screenshots/ for UI snapshots
- src/assets/ for static assets and translation files
- Node.js
- npm
- Angular CLI 19 or later
-
Move into a project folder:
cd component.communication
-
Install dependencies:
-
Start the app:
-
Open:
Some projects include a db.json file for mock backend data. When needed, start a local mock server from inside that project folder:
npx json-server --watch db.json
Projects currently using db.json:
- reactive.forms
- template.driven.forms
How to Use This Repository
- Choose a topic you want to study.
- Open the matching project folder.
- Read that project's README.md.
- Run the project locally.
- Explore src/app/ to understand the implementation.
- Modify the examples and observe the results in the browser.
- Start with data.binding to get comfortable with templates and interaction basics.
- Move to component.communication to understand how components talk to each other.
- Study lifecycle.hooks to see when Angular runs component logic.
- Continue with dependency.injection to understand services and providers.
- Explore routing to learn app navigation.
- Compare template.driven.forms and reactive.forms.
- Review httpclient, pipes, and i18n.
- Use notes.app as a larger practical example.
- Runnable Angular examples
- Topic-focused project organization
- Shared Angular CLI-based workflow across projects
- UI examples that make concepts easier to inspect
- Room to compare patterns between projects
- Project-specific README.md files inside each folder
- screenshots/ folders in projects that include UI snapshots
- db.json files in projects that use mock API data
- src/assets/ for static files such as translations and other assets
- Every top-level project currently includes its own package.json.
- Every top-level project currently includes its own README.md.
- Some projects use mock backend data and may require json-server or similar local setup, depending on the example.
Each project folder is intended to include:
- A README.md with topic-specific notes
- Source code under src/
- Angular configuration files such as angular.json and tsconfig*.json
- Supporting assets such as screenshots or mock data where needed
- Run one project at a time and keep the topic narrow.
- Read the template and component files together to connect UI and logic.
- Make small edits and refresh often to learn by observation.
- Compare similar concepts across projects, especially forms and communication patterns.
- Use the browser console and Angular errors as part of the learning process.
- Create it as a separate top-level Angular project folder.
- Include a local README.md that explains the concept and examples.
- Follow the existing naming convention already used in this repository, such as routing, reactive.forms, or component.communication.
- Update this root README.md so the new project appears in the project list and learning path where appropriate.
The goal of this repository is to build a practical understanding of Angular by keeping examples focused, runnable, and easy to compare across topics.
Happy learning!