title: Repetevity dependency injection VS Input and Output for data handling in several components
body: <p>I'm building an app with lots of services and components and I decided an approach like this one: having each module, let's say 4 components, and all of them need the same service. I have a base Component responsible for service injection and data handling via Inputs and Outputs. Is this the best approach?</p>
  <p>The Base Component HTML:</p>
  <pre><code>&lt;div class=&quot;container&quot;&gt;
      &lt;div class=&quot;row&quot;&gt;
          &lt;div class=&quot;col-md-3&quot;&gt;
              &lt;app-left (selectedCamera)=&quot;receivedCamera($event)&quot;&gt;&lt;/app-left&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col-md-6&quot;&gt;
              &lt;app-content [pictureObject]=&quot;pictureObject&quot;&gt;&lt;/app-content&gt;
          &lt;/div&gt;
          &lt;div class=&quot;col-md-3&quot;&gt;
              &lt;app-right [cameraData]=&quot;cameraData&quot;&gt;&lt;/app-right&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>The base is like a ghost component but is the one distributing all data because its the only one with the service in the constructor. Then distributes data through Input and receives results through Output decorators. Is this the best approach? Or should I use dependency injection in all components?</p>
  <p>The Base TS:</p>
  <pre><code>export class BaseComponent implements OnInit {
  pictureObject: DayPicture[];
  cameraData:any[];
    constructor(private nasaService: NasaService) { }
  
    ngOnInit(): void {
      this.nasaService.getDayPictre()
      .subscribe((data:DayPicture)=&gt;{
        this.pictureObject=Array.of(data)
  
      })
        
    }
  getPicByCamera(){
  }
  
  receivedCamera(camera){
    this.nasaService.getPicByCamera(camera)
    .subscribe(data=&gt;{
  this.cameraData=data.map(x=&gt;x['img_src']);
  console.log(this.cameraData)
  
    })
  }
  </code></pre>
  <p>Any comments would be appreciated, thanks!</p>