angular 是否有事件 pub/sub 框架?

Is there an event pub/sub framework for angular?

我来自 WPF 背景,在 Prism 中您有 IEventAggregator 接口。您定义可以从控制器订阅的事件,然后从另一个控制器发布该事件。这是一种在相互不了解的控制器之间进行通信的方式。

AngularJS 中有类似的东西吗?

即我有一个 index.html 页面的顶级控制器,该页面包含三个子面板,每个子面板都有自己的控制器。我希望顶级控制器能够在面板控制器上调用 refresh() 但它没有引用那些控制器。

我认为您可以使用 $scope.$broadcast 向儿童控制器发送动作;

通过

发送数据后
$scope.$broadcast('customEvent', {
  command: 'reload'
});

你可以在子控制器中设置监听器

$scope.$on('customEvent', function (event, data) {
  if(data === 'reload'){
     //reload
  }
});

很好的解释在这里: http://toddmotto.com/all-about-angulars-emit-broadcast-on-publish-subscribing/