Form in Ionic App send Http post to Server

Hi, I have a problem.
I can not connect my app to an external server, specifically I can not send data from a form to the server with a post method.

I found the Ionic guide (https://docs.usecreator.com/docs/using-apis-with-http-part-1) that showed how to send data to the server by writing code in the service.js and js page of the page in question.
I followed the page to the letter but the button that should send the data does not do anything.

The only way to send data to the server is to insert a post call in html in the form. The problem is that then I get stuck on an open page with the inappbrowser and I can not go back or exit.

I thank you in advance for the help.
Andrea

Registrati.js
function ($scope, $stateParams, $state, $ionicPopup, Registrati) {
$scope.user = {
‘nome’ : ‘’,
‘cognome’ : ‘’,
‘indirizzo’ : ‘’,
‘telefono’ : ‘’,
‘email’ : ‘’,
‘password’ : ‘’,
‘password2’ : ‘’,
‘checkPassw’ : false,
‘giorno’ : $scope.giorni[0].id,
‘mese’ : $scope.mesi[0].id,
‘anno’ : $scope.anni[0].id,
‘terms’ : false
};

$scope.iscrizione = function() {
Registrati.add($scope.user).then(function(){

$ionicPopup.alert({
title: ‘Registrazione effettuata con successo!’,
template: ‘Riceverai una mail di conferma’
});
});
}; //end func bott
}

service.js
angular.module(‘app.services’, [])
.service(‘Registrati’, [’$http’, function($http){
var quickeat_url = ‘https://www…/registration_script.php’;
var ret = {
add: function(user){
$http.post(quickeat_url, user);
}
};
return ret;
}]);