InterviewBuddy
All interview questions

What are request-scoped providers?

Advanced

Answer

A request-scoped provider gets a new instance for each incoming request, allowing it to carry request-specific context. Default singleton providers reuse an instance across requests.

Explanation

Request scope can propagate through dependencies and add overhead. Use it only when the state truly belongs to a request.

Example

@Injectable({ scope: Scope.REQUEST })