Passing value between two components (pages) in Angular 2
问题 I am using Angular 2 (TypeScript) I have two components (actually they are two pages too). They are NOT parent and child relationship. I want to pass a value to second component(page) when I click the link in the first component(page). I know "URL parameters" way through router. But I don't want to show this parameter in the link. Is there any other way? Thank you! 回答1: The canonical way is to establish an injectable service and inject the service into any components that need the data. Since