Passing @Input and subscribing to @Output while navigating to a Route in Angular 2 Component

后端 未结 1 603
-上瘾入骨i
-上瘾入骨i 2021-01-22 10:43

When we navigate to a route and load components,

  1. Can we pass variable decorated with @Input in loaded child component and can we subscribe to Ev
相关标签:
1条回答
  • 2021-01-22 11:13

    Just use a shared service for communication between components. See also https://angular.io/docs/ts/latest/cookbook/component-communication.html#!#bidirectional-service

    Inputs and outputs can't be used for routed components.

    0 讨论(0)
提交回复
热议问题