File.js
scope.menuItemClick = function (def, callbackText, keepMenuOpen) {
console.log(def);
if(def.automationId === "Print"){
console.log("before send");
$scope.$root.$broadcast("printingData","my Data");
console.log("after send");
}
Next.js
$scope.$on("printingData",(event, data) => {
console.log(data);
console.log("receiving");
});
I am facing an issue where I am unable to receive the broadcasted event even though I am broadcasting it from the root scope. Can someone provide assistance? Thank you.