Angular - Services and Dependency Injection
You want to share user login status across multiple components using a singleton service. Which approach correctly ensures the service is singleton and updates are reflected everywhere?
providedIn: 'root' makes the service singleton app-wide.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions