Angular 2 - send textarea value to a shared component
问题 I have a textarea in the first page and when i go to next page i need this value to show in a notepad component that is shared in the next pages but at the same time i need that when i write new info in the shared component first and new information can be saved and displayed. i need to use angular2 and i cant use any stuff from github.enter image description here 回答1: Since its not a parent-child relation, you can use shared service and pass the textarea value using setter and getter .