সম্পাদনা
<!DOCTYPE html> <html ng-app="app"> <body> <div ng-controller="app"> <button ng-click="send()">সেন্ড</button> <div ng-controller="child"> <p>{{message}}</p> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.3/angular.min.js"></script> <script> angular.module("app", []) .controller("app", function($scope) { $scope.send = function() { $scope.$broadcast("message", "হ্যালো"); }; }) .controller("child", function($scope) { $scope.$on("message", function(event, data) { $scope.message = data; }); }); </script> </body> </html>
পূর্বরূপ