user1790682
user1790682

Reputation: 71

Angular 2 are nested routes components children of the parent route component

Are nested routes components children of the parent route component? i.e. am I able to communicate using an Output from a child route component to the parent route component? If not what would the recommended strategy be? As if the components when routing don't have a parent\child relationship then they wouldn't be sharing the same service singleton object either?

Upvotes: 2

Views: 439

Answers (1)

Jarek
Jarek

Reputation: 987

A good solution is to use the service to communicate between components/routes.

Services are the same throughout the application, read about:

Angular2 - Component Interaction (Communication via a service)

Angular2 - Dependency injection

Upvotes: 1

Related Questions