【发布时间】:2017-07-11 01:59:37
【问题描述】:
我正在开发一个 Angular4 应用程序,我的主要问题是我的应用程序中有不同的组件,例如
<app-layout>
<app-component-1></app-component-1>
<app-component-2></app-component-2>
</app-layout>
现在我的问题是下一个问题,如果我单击 component-1 中的某个元素,则应通知 app-layout 和 component-2,当我单击 component-2 时,应通知 app-layout 和 component-1也会收到通知。
想象一下打开侧边栏并选择类别和子类别的场景。
【问题讨论】:
-
请使用这些链接1.ngrx-store(redux for angular)2. shared services
-
@Aravind 如果项目很小,则不需要 redux。相信我,我的团队很难做到。
-
您需要教育您的团队。让我知道我会帮助你。
标签: angular