If you only need to send data from one component to another, it would be best to create a service and inject it into both components.
You simply create a service.service.ts file, which contains the @Injectable decorator
import {Injectable} from '@angular/core';
@Injectable()
export class MiServicio {
// variable en la que puedes guardar informacion para acceder con el otro componente
variableServicio: {};
}
You declare it as a provider in your module:
components: [MiComponente, ChildAComponent, ChildBComponent],
providers: [MiServicio] // aqui declaras todos los servicios que vayas a usar
In your component you import the service and inject it into your constructor:
import {MiSericio} from './servicio.service';
constructor(public servicio: MiServicio){}
// y accedes a la variable dentro del servicio de la siguiente forma
// tambien puedes usar observables y funciones en el servicio y llamarlos usando this.servicio
miVar = this.servicio.variableServicio;
Here I leave articles about the use of services
link
link