Skip to content
Discussion options

You must be logged in to vote

Hi!

For unrelated components, a Shared Service is the recommended approach for most apps.

Shared Service with RxJS or Signals: Best for small-to-medium apps. Create a service with a BehaviorSubject (or Angular signal()) and inject it into both components. It's lightweight and easy to maintain.

State Management (NgRx/Elf): Only use this if your app is large, highly complex, and needs global state debugging.

Tip: Start with a Shared Service first!

Replies: 3 comments

This comment was marked as spam.

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development source:ui Discussions created via Community GitHub templates
4 participants