I have a component that is created with a route and this component has an Output EventEmitter. How can I subscribe to this Output if the component was created on routing?
The component is created like this:
{ path: 'component-A',
component: ComponentAComponent
}
To know more go to this example
Update
You can create service to can communicate between two components. component 2 will subscribe on a event in the service. component 1 will push to this event in the service. example.