I have a network.component which opens my dialog send-tx-dialog.component. The user fills the send-tx-dialog with information. I want to send that information to another com
In your shared service you can do:
public transaction = new Subject();
emitTransaction(val) {
this.transaction.next(val);
}
And after your subribe of the closed dialog do:
dialogRef.afterClosed().subscribe(
data => this.sharedService.emitTransaction(data);
);
And in your other component:
this.sharedService.transaction.subscribe(transaction => {
this.transaction = transaction;
})
It should look something like this.