Why the return value of angular $on cannot be assigned

problem description

angular broadcasts a data in the controller using $scope.$emit (), and accepts that assigning a variable to a variable is always undefined using $scope in other controllers.

related codes

$scope.$emit ("changeData", 0); / / broadcast a changeData variable upwards in controller 1 with a value of 0

$scope.$on ("changeData", function (event,data) {

    console.log(data);   //data
    $scope.componentRturn=data;   //

});
console.log ($scope.componentRturn); / / undefinde
/ / Controller 2 to accept

what is this situation, and what should I do when I use this broadcast value outside the $0n () method?

Aug.29,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb8d1f-2701.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb8d1f-2701.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?