# 디렉티브와 Pipe (Angular) > Built-in directives, custom directives, attribute directives, structural directives, built-in pipes, custom pipes, pure vs impure pipes - 22 면접 질문 - Mid-Level - [면접 질문: Angular](https://sharpskill.dev/ko/technologies/angular/interview-questions.md) ## 1. Angular에서 구조 디렉티브란 무엇입니까? **답변** 구조 디렉티브는 요소를 추가, 제거 또는 조작하여 DOM 구조를 수정합니다. *가 접두사로 붙습니다 (예: *ngIf, *ngFor). 외관이나 동작을 수정하는 속성 디렉티브와 달리, 구조 디렉티브는 DOM에서 요소를 추가하거나 제거할 수 있습니다. ## 2. trackBy와 함께 ngFor를 사용하는 올바른 구문은 무엇입니까? **답변** 올바른 구문은 세미콜론을 사용하여 반복과 trackBy 함수를 구분합니다. trackBy 함수는 Angular가 변경, 추가 또는 제거된 항목을 식별할 수 있도록 하여 성능을 향상시킵니다. 두 개의 매개변수(index와 item)를 받아 고유 식별자를 반환합니다. ## 3. ngFor와 함께 trackBy를 사용하는 이유는 무엇입니까? **답변** trackBy는 Angular가 변경된 항목을 정확하게 식별할 수 있도록 하여 리스트 렌더링 성능을 향상시킵니다. trackBy가 없으면 Angular는 변경이 발생할 때 모든 DOM 요소를 다시 생성합니다. trackBy를 사용하면 수정된 항목만 업데이트되어 불필요한 재생성을 방지합니다. ## 19개 추가 질문 이용 가능 - 조건에 따라 요소를 조건부로 표시하려면 어떤 디렉티브를 사용해야 합니까? - *ngIf와 [hidden]의 차이점은 무엇입니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Angular 면접 주제 - [TypeScript 기초](https://sharpskill.dev/ko/technologies/angular/interview-questions/typescript-basics.md): 25개 질문, Junior - [TypeScript 고급](https://sharpskill.dev/ko/technologies/angular/interview-questions/typescript-advanced.md): 20개 질문, Junior - [Angular 기초](https://sharpskill.dev/ko/technologies/angular/interview-questions/angular-fundamentals.md): 20개 질문, Junior - [컴포넌트와 라이프사이클](https://sharpskill.dev/ko/technologies/angular/interview-questions/components-lifecycle.md): 20개 질문, Junior - [Services & Dependency Injection](https://sharpskill.dev/ko/technologies/angular/interview-questions/services-dependency-injection.md): 20개 질문, Junior - [Angular 모듈 구성](https://sharpskill.dev/ko/technologies/angular/interview-questions/modules-organization.md): 22개 질문, Mid-Level - [Angular CLI](https://sharpskill.dev/ko/technologies/angular/interview-questions/angular-cli.md): 18개 질문, Junior - [라우팅과 내비게이션](https://sharpskill.dev/ko/technologies/angular/interview-questions/routing-navigation.md): 24개 질문, Mid-Level - [리액티브 폼](https://sharpskill.dev/ko/technologies/angular/interview-questions/forms-reactive.md): 26개 질문, Mid-Level - [템플릿 기반 폼](https://sharpskill.dev/ko/technologies/angular/interview-questions/forms-template-driven.md): 16개 질문, Mid-Level - [RxJS 기초](https://sharpskill.dev/ko/technologies/angular/interview-questions/rxjs-fundamentals.md): 22개 질문, Mid-Level - [RxJS 연산자](https://sharpskill.dev/ko/technologies/angular/interview-questions/rxjs-operators.md): 24개 질문, Mid-Level - [HttpClient 및 API 호출](https://sharpskill.dev/ko/technologies/angular/interview-questions/http-client.md): 22개 질문, Mid-Level - [기본 상태 관리](https://sharpskill.dev/ko/technologies/angular/interview-questions/state-management-basics.md): 20개 질문, Mid-Level - [Change Detection](https://sharpskill.dev/ko/technologies/angular/interview-questions/change-detection.md): 20개 질문, Mid-Level - [Angular Signals](https://sharpskill.dev/ko/technologies/angular/interview-questions/angular-signals.md): 20개 질문, Mid-Level - [Standalone Components](https://sharpskill.dev/ko/technologies/angular/interview-questions/standalone-components.md): 18개 질문, Mid-Level - [Angular 단위 테스트](https://sharpskill.dev/ko/technologies/angular/interview-questions/testing-unit.md): 22개 질문, Mid-Level - [엔드투엔드 테스팅](https://sharpskill.dev/ko/technologies/angular/interview-questions/testing-e2e.md): 18개 질문, Mid-Level - [빌드 및 최적화](https://sharpskill.dev/ko/technologies/angular/interview-questions/build-optimization.md): 20개 질문, Mid-Level - [NgRx 기초](https://sharpskill.dev/ko/technologies/angular/interview-questions/ngrx-fundamentals.md): 24개 질문, Senior - [NgRx 고급](https://sharpskill.dev/ko/technologies/angular/interview-questions/ngrx-advanced.md): 24개 질문, Senior - [Angular 아키텍처](https://sharpskill.dev/ko/technologies/angular/interview-questions/angular-architecture.md): 22개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/angular/interview-questions/performance-optimization.md): 22개 질문, Senior - [보안 및 모범 사례](https://sharpskill.dev/ko/technologies/angular/interview-questions/security-best-practices.md): 20개 질문, Senior - [고급 RxJS 패턴](https://sharpskill.dev/ko/technologies/angular/interview-questions/advanced-rxjs-patterns.md): 22개 질문, Senior - [Angular Universal 및 SSR](https://sharpskill.dev/ko/technologies/angular/interview-questions/angular-universal-ssr.md): 20개 질문, Senior - [Angular 마이크로 프론트엔드](https://sharpskill.dev/ko/technologies/angular/interview-questions/micro-frontends-angular.md): 20개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/angular/interview-questions/directives-pipes