🌐 Web Development

Angular

Angular Framework

Google's frontend framework. Based on TypeScript. Strong for enterprise applications.

📖 Detailed Explanation

Angular is a TypeScript-based front-end framework developed and maintained by Google. Angular (version 2+), released in 2016 after a complete rewrite, has a different architecture from AngularJS (1.x), and with its "batteries included" philosophy it has everything built in, including routing, an HTTP client, form handling, and testing tools.

Angular adopts a component-based architecture and uses dependency injection (DI) and RxJS as its core. Its features include two-way data binding, a powerful template syntax, and project scaffolding through the Angular CLI. Major versions are updated on a six-month cycle, so it quickly adopts the latest web standards.

Components are defined with the @Component decorator, and services are managed as singletons with @Injectable. With the NgModule system (being gradually replaced by Standalone Components), you can modularize an application, and with Lazy Loading you can optimize initial loading speed.

In practice, Angular is widely used in large-scale enterprise applications, especially in finance, healthcare, and government systems. Thanks to its strong type system and consistent structure, it is easy to maintain code quality in large teams, and with Google's long-term support, companies choose it with confidence.

💻 Code Example

// Angular 컴포넌트 예제
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';

interface User {
  id: number;
  name: string;
  email: string;
}

@Component({
  selector: 'app-user-list',
  template: `
    <div class="user-list">
      <h2>사용자 목록</h2>
      <input [(ngModel)]="searchTerm" placeholder="검색..." />

      <ul *ngIf="users$ | async as users">
        <li *ngFor="let user of users | filter:searchTerm">
          {{ user.name }} - {{ user.email }}
        </li>
      </ul>

      <button (click)="loadMore()">더 보기</button>
    </div>
  `,
  styleUrls: ['./user-list.component.scss']
})
export class UserListComponent implements OnInit {
  users$: Observable<User[]>;
  searchTerm = '';

  constructor(private http: HttpClient) {}

  ngOnInit() {
    this.users$ = this.http.get<User[]>('/api/users');
  }

  loadMore() {
    // 추가 데이터 로드 로직
  }
}

🗣️ Say It Like This in Practice

💬 In a Meeting
"This project involves a large team and requires complex form handling and permission management. Angular looks like a good fit. TypeScript is enforced and the structure is consistent, so it's easy to maintain code quality even when more than 100 developers collaborate."
💬 In an Interview
"The core of Angular is dependency injection and RxJS. DI manages services as singletons, and RxJS Observables handle asynchronous data streams. Change detection through NgZone and AOT compilation also optimize runtime performance."
💬 In a code review
"Please don't make HTTP calls directly in this component; separate them into a service. In Angular, the convention is to put business logic in services and UI logic in components. It also becomes much easier to test."

Take a mock interview on this topic → WIA SOOM AI Interview · Start for free

⚠️ Common Mistakes & Cautions

❌
Not unsubscribing after subscribing to an Observable

If you don't unsubscribe in ngOnDestroy, a memory leak occurs. Use the async pipe or takeUntilDestroyed().

❌
Ignoring Change Detection

Using OnPush instead of the Default strategy greatly improves performance. Use it together with immutable data patterns.

✅
The right pattern

Use Standalone Components and manage reactive state with Signals. Angular 16+ enables more concise code.

🔗 Related Terms

📚 Learn More