Hi viewers,
Parent Controller
$username ="xxxxxxxxxxxxx";
$rootScope.$broadcast("parentValue", $username);
Child Controller
$scope.childValue = $scope.$on('parentValue');
console.log($scope.childValue);
Parent Controller
$username ="xxxxxxxxxxxxx";
$rootScope.$broadcast("parentValue", $username);
Child Controller
$scope.childValue = $scope.$on('parentValue');
console.log($scope.childValue);
No comments:
Post a Comment