Instead of a component creating its own HttpClient or UserService, it asks for one, and Angular’s injector supplies it, usually the same shared instance.
Say it like this in the interview
“Services are marked @Injectable({ providedIn: 'root' }) and requested via constructor parameters or the inject() function. Angular has a hierarchy of injectors, so a service can be app-wide or scoped to a component subtree. It makes code testable because tests can provide mocks.”
Standalone components don’t need an NgModule: they import what they use directly. Signals are reactive values that tell Angular exactly what changed, so it updates only that part of the screen.
Say it like this in the interview
“Standalone components are now the default and simplify structure. Signals, signal, computed and effect, provide fine-grained reactivity, enabling zoneless change detection. I use signals for component state and RxJS for complex async streams, converting between them with toSignal.”
Methods Angular calls at certain moments: when inputs change, when the component starts, after the view is ready, and before it’s destroyed.
Say it like this in the interview
“ngOnChanges for input changes, ngOnInit for initialisation and fetching, ngAfterViewInit once the view and children exist, ngOnDestroy for cleanup. With signals and DestroyRef, many uses are simplified.”
Angular checks whether data changed and the screen needs updating. By default it checks every component after any event. OnPush says “only check me when my inputs change (by reference), an event happens inside me, or an observable I display emits.”
Say it like this in the interview
“Default change detection checks the whole tree after async events, historically triggered by Zone.js. OnPush limits checks to input reference changes, internal events, async pipe emissions or signals, which is much faster but requires immutable updates. Modern Angular uses signals and can run zoneless for fine-grained updates.”
Traps that make people fail
Mutating an array with push under OnPush and wondering why the view doesn’t update.
A subscription is like a phone call that stays open. When the component is destroyed, the interval call keeps going forever unless you hang up.
Say it like this in the interview
“The interval subscription never completes. I use the async pipe in templates, takeUntilDestroyed() from @angular/core/rxjs-interop, or unsubscribe in ngOnDestroy. Router param observables are cleaned up by Angular, but I don’t rely on knowing which ones do.”
Guards decide if you’re allowed to open a page (logged in? admin?). Resolvers load data before the page opens.
Say it like this in the interview
“Functional guards like canActivate and canMatch return a boolean or a UrlTree to redirect; resolvers pre-fetch data. Guards are UX, not security: the API must enforce permissions.”
Template-driven forms are defined mostly in HTML, good for simple forms. Reactive forms are defined in TypeScript, easier to validate, test and change dynamically.
Say it like this in the interview
“Reactive forms with typed FormGroup and FormControl for complex validation and dynamic fields; template-driven with ngModel for simple forms.”
Code that sees every HTTP request and response, perfect for adding the auth token or handling errors in one place.
Say it like this in the interview
“Functional interceptors via provideHttpClient(withInterceptors([...])), used for auth headers, global error handling, retries, logging and loading indicators.”
Pipes format values in templates, like {{ price | currency }}. Pure pipes only re-run when the input changes; impure ones run on every check.
Say it like this in the interview
“Pipes transform display values. Pure pipes, the default, recompute only on input reference change, which is efficient; impure pipes run every change detection cycle and should be avoided for heavy work. The async pipe subscribes and unsubscribes automatically.”