Currently, using angularjs 1, I use event mechanisms $onand $broadcast, which are available as part of $rootscopeand $scope, to handle communication between the controller and the service. However, with the introduction of AngularJS 2, $rootscopeboth $scopewill become unavailable. So, if I want to make the app AngularJS 2-compatible, what must I do to get the same effect as $onand $broadcast.
source
share