YUNOVA · Angular · Module 10: Advanced RxJS and state

Subject and BehaviorSubject

Notes for offline study · 30 November 2026

Subject and BehaviorSubject

Key points

  • A Subject is both an Observable and an Observer that multicasts values.
  • A BehaviorSubject needs a starting value and replays the latest to new subscribers.
  • Services often expose a BehaviorSubject as asObservable() to share state.

Free on YUNOVA · yunova.in · Sign in to add your own lesson notes to this sheet.