DEV Community

Discussion on: The Principles for Writing Awesome Angular Components

Collapse
 
gc_psk profile image
Giancarlo Buomprisco

Hi Andrew!

I think it depends a lot on what data you're passing. First of all, if your component is dumb, then it shouldn't require a service. That's where it's ideal to use inputs and outputs for communication. Watch our for this kind of situations.

If your container requires some state from a service, then by all means that's exactly how it should be done.