Aug 22, 2017 · 1 min read
IMO, if you’re going to store state in a Service, it’s best to use a Subject or a BehaviorSubject, since a component that relies on SideBarService might not be initialized yet, and won’t receive the emitted event once it’s created.