A review is needed for a small notification panel PR in Angular 20.
Context:
NoticeFeedService.watchUnread() service returns an Observable<number> that immediately emits the current value and then publishes a new value every 1000 ms.*ngIf; the user may click the toggle button several times quickly.What to check in this PR:
Reproduction steps:
*ngIf and verify that no background updates continue after destruction.Find the problems in the PR changes and describe what is broken and why.
Node.js 22, Angular CLI 20.0.x, Angular 20 standalone API, RxJS 7.8, TypeScript 5.8. Change detection: OnPush. Zone mode: standard zoned Angular (no experimental zoneless). To run it, a normal Angular dev server is enough; no additional libraries are present.
Use line comments to explain the problem, its impact, the fix and how to test it.