Angular · Senior · Question 67 of 75
In Angular SSR, where does user data typically leak between requests?
- ✓Correct answer: In module-level mutable variables shared by the Node process -
providedIn: 'root'services get a new instance per request - 2In every
providedIn: 'root'service, because they are global across requests - 3In the browser's HTTP cache
Explanation
Avoid module-level mutable state (like let cache = {} outside a class); keep state in services so it's scoped per request.