Master Angular From Scratch

Learn Angular with clear, interactive, and structured lessons for beginners and developers.

ANGULAR COURSE SYLLABUS
1. Angular Introduction
Angular Introduction Angular History Angular Fundamentals Angular Architecture Component-Based Angular
2. Angular Setup
Angular Setup Introduction Installing Node.js Installing Angular CLI Creating an Angular Application Angular Project Structure
3. Components
Components Overview Component Anatomy Creating Components Component Selector Component Template Component Styles Component Metadata Standalone Components Parent and Child Components Reusable Components
4. Templates
Templates Introduction Template Syntax Template Expressions Template Statements Template Reference Variables ng-template ng-container ngTemplateOutlet Built-in Control Flow
5. Data Binding
Data Binding Introduction Interpolation Binding Property Binding Event Binding Two-Way Data Binding Class & Style Binding
6. Directives
Directives Introduction Attribute Directives Structural Directives Custom Directives
7. Pipes
Pipes Introduction Built-in Pipes Parameterized Pipes Chaining Pipes Custom Pipes
8. Event Handling
Event Handling Introduction DOM Events Event Binding Syntax Event Object Passing Data to Event Handlers
9. Input & Output
Component Communication @Input @Output EventEmitter
10. Lifecycle Hooks
Lifecycle Hooks Introduction ngOnInit ngOnChanges ngAfterViewInit ngOnDestroy
11. Services
Services Introduction Creating Angular Services Using Services in Components Sharing Data Through Services Service Scope
12. Dependency Injection
Dependency Injection Introduction Injecting Dependencies InjectionToken Provider Configuration
13. Routing
Routing Introduction Route Configuration RouterLink & Navigation Route Parameters Child Routes Route Guards
14. Forms
Angular Forms Introduction Template-Driven Forms Reactive Forms Form Validation Form Submission & Error Handling
15. HttpClient
HttpClient Introduction Configuring HttpClient GET Request POST, PUT & DELETE Requests Headers & Parameters HTTP Error Handling
16. Observables
Observables Introduction Creating & Subscribing to Observables Observable Data Streams Observable Operators Subscription Management
17. RxJS
RxJS Introduction RxJS Operators Transformation & Filtering Combining Observables Higher-Order Mapping Subjects
18. API Integration
API Integration Introduction Connecting Angular with REST API Consuming API Data CRUD API Integration API Response & Error Handling

Input & Output Introduction

Learn how Angular components communicate with each other using Input and Output.

CIIT Training Institute

Angular Input and Output are mainly used for communication between parent and child components.

What is Component Communication?

Angular applications are built using multiple components. Sometimes one component needs to send information to another component.

Angular provides Input and Output to make this communication simple and organized.

👨‍💼 Parent Component Contains data
→
📥 Input Sends data
→
👩‍💻 Child Component Receives data

Input vs Output

📥
Input

Used to pass data from a parent component to a child component.

@Input()
📤
Output

Used by a child component to communicate an event or value back to its parent.

@Output()
🔄
Communication

Components can exchange information in a structured way.

Parent ↔ Child
🧩
Reusable Design

Input and Output help create reusable Angular components.

Components

Parent to Child Communication

A parent component can send data to a child component using Input.

Parent Template
<app-course
    [courseName]="selectedCourse">
</app-course>
Child Component
@Input()
courseName = '';

Here the parent sends selectedCourse to the child component through the courseName Input property.

Child to Parent Communication

A child component can notify its parent about an event using Output.

Child Component
@Output()
courseSelected = new EventEmitter<string>();

selectCourse() {

    this.courseSelected.emit(
        'Angular Full Stack'
    );

}
Parent Template
<app-course
    (courseSelected)="onCourseSelected($event)">
</app-course>

Input & Output Communication Flow

Parent Has data
→
Input Passes data
→
Child Uses data
→
Output Sends event
→
Parent Handles event

Complete Example – CIIT Course Selection

Suppose the CIIT Training Institute has a parent component that displays available courses and a child component that displays the selected course.

parent.component.ts
selectedCourse = 'Angular Full Stack';

courseSelected(course: string) {

    this.selectedCourse = course;

}
parent.component.html
<app-course-card
    [courseName]="selectedCourse"
    (courseChange)="courseSelected($event)">
</app-course-card>
child component
@Input()
courseName = '';

@Output()
courseChange =
    new EventEmitter<string>();

selectCourse(course: string) {

    this.courseChange.emit(course);

}
Expected Output:

CIIT Training Institute

Available Courses:

Selected Course: Angular Full Stack

Communication Direction

Feature Direction Purpose Common Syntax
Input Parent → Child Pass data @Input()
Output Child → Parent Send event/data @Output()
EventEmitter Child → Parent Emit custom event EventEmitter

Why Use Input and Output?

🧩
Reusable Components

Components can receive different data and work in different situations.

🔗
Communication

Parent and child components can communicate clearly.

📦
Data Flow

Application data flow becomes easier to understand.

🛠️
Maintainability

Components remain focused on their individual responsibilities.

Input & Output Best Practices

  • Use Input for parent-to-child data communication.
  • Use Output for child-to-parent event communication.
  • Give Input and Output properties meaningful names.
  • Keep component communication simple and predictable.
  • Avoid tightly coupling unrelated components.
  • Use reusable child components whenever possible.
  • Keep business logic in the appropriate component or service.

Summary

Angular Input and Output provide a standard way for components to communicate with each other.

Input is generally used for Parent → Child communication, while Output is used for Child → Parent communication.

These features are important for building modular and reusable applications such as the course, enquiry and registration modules of CIIT Training Institute.