Monday, December 28, 2015

How to get the parent controller value using in angularjs

Hi viewers,

Parent Controller

$username ="xxxxxxxxxxxxx";

$rootScope.$broadcast("parentValue", $username);

Child Controller 

$scope.childValue = $scope.$on('parentValue');

console.log($scope.childValue);

No comments:

Post a Comment