I want to pass data between two independent components.
For example:
- I have first component with input text and submit button. Second component with input box
- When user enters data in text box of first component and clicks submit he will be routed to second component where data entered in input textbox of first component should come inside textbox of second component.
- I tried using @Input and @Output but this is for parent child hierarchy.
- In my case I have 2 separated components where user routes from one page to another were whole view changes
- I heard to make use of service but was not able to find proper example or documentation online.