Every component goes through a well‑defined series of lifecycle events:

"How does Angular detect changes?"

// This component will NOT look up the parent tree. // If it doesn't have its own, it throws null (not a parent one). constructor(@Self() @Optional() public config: AppConfigService) {}

This layered approach is precisely what the Decoded Frontend "Interview Hacking" course emphasizes, with each topic tiered from Junior to Senior levels.

| Problem | Operator | Why it wins | | :--- | :--- | :--- | | Cancel pending HTTP requests | switchMap | Prevents race conditions in search bars. | | Run parallel requests | forkJoin | Like Promise.all for Observables. | | Get both old + new value | pairwise | Perfect for form dirty-checking. | | Debounce user input | debounceTime | Stop firing API calls on every keystroke. | | Handle errors gracefully | catchError | Don’t let one failed request crash the UI. |

Before diving into the technical details, it's worth understanding why "Angular Interview Hacking" has gained such traction in the developer community.

ngOnInit() this.userService.getData().subscribe(...); // Bad