Create a Feature-Flagged Analytics Service
Return either a real analytics service or a stub based on a feature flag, using only factory logic.
We'll cover the following...
We'll cover the following...
Problem statement
You’re rolling out a new analytics module, but it’s not yet available to all users. It’s gated behind a flags.analyticsEnabled feature flag. The team needs a factory that returns either: