Category Archives: AngularJS 2/Ionic 2

AngularJS2: Send HTTP Post request with parameters to PHP

After some troubles trying to reach an old PHP server (Using $_POST to retrieve parameters) with a new Ionic2 project (so using AngularJS2 Http). Here is what worked : var headers = new Headers(); headers.append(’Content-Type’, ‘application/x-www-form-urlencoded; charset=UTF-8′);   var params = ‘’;’’, params , {headers: headers}) .subscribe( data => console.log(’Received:’ + data), err […]