I am attempting to transfer data from $scope 1 to $scope 2. Here, I am trying to send either "project_data.title" or "$$scope.project_data.project_title" in $scope 1 to $scope.test in $scope 2.
[$scope A]
$scope.updateData = function(project_id){
$http.post("../crud/projects_update.php",{
project_id : $scope.project_data.project_id,
project_title : $scope.project_data.project_title // this needs to be transmitted to $scope B.
})
[$scope B]
$http.get('../crud/customers_read.php',{
}).then(function(response){
$scope.customer = [];
$scope.customers = response.data;
$scope.test = { name: $scope.project_data.project_title }; // This should originate from $scope A.
});
I initially assumed they were interchangeable, but it turns out that's not the case. How do you typically address this issue of binding data between different $scope variables?
Thank you in advance!