# 버그를 찾아라: Angular > 코드 한 조각. 버그를 찾거나, 버그가 없음을 증명하세요. 데일리 챌린지: 2026-08-19 (UTC) · Mid-Level ```typescript import { Injectable, Component } from '@angular/core'; import { BehaviorSubject } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class CartService { private itemsSubject = new BehaviorSubject([]); items$ = this.itemsSubject.asObservable(); add(item: string) { this.itemsSubject.next([...this.itemsSubject.value, item]); } } @Component({ selector: 'app-cart-badge', template: `{{ (items$ | async)?.length }}`, providers: [CartService], }) export class CartBadgeComponent { items$ = this.cart.items$; constructor(private cart: CartService) {} } ``` ## 당신의 판단 - 보안 취약점 - 로직 버그 - 코드 스타일 - 문제 없음 하루 한 번. 제출하면 바로 정답이 표시됩니다. --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/daily/angular