I am doing a REST where I try to call in a function, a function of another controller, but with $parent I do not show the function in the console nor with $scope , the function that I try to call is this $scope.getInsuranceRequests(); :
$scope.example = function() {
$http.get(root + 'ruta/url', {
params: id
}).then(function(res) {
if (res.status === 200) {
Dialogs.infoToast("Correo enviado correctamente");
$scope.getInsuranceRequests();
}
}
}
I'm trying with this
angular.extend(this, $controller('OtroControladorQueTieneLafuncionQueNecesito', {
$scope: $scope
}));