title: ionic app ajax call works in browser with "ionic serve" but not on ios device with "ionic upload"
body: <p>Breaking my head on this one for 3 days already. The app works in the browser but not on the ios device. If I alert the data from the ajax call it is returned null on the ios device.</p>
  
  <p>REGISTER.HTML</p>
  
  <pre><code>&lt;div ng-controller='MainCtrl'&gt;
        &lt;div class="list"&gt;
          &lt;span&gt;test{{responseMessage}}&lt;/span&gt;
          &lt;label class="item item-input item-stacked-label"&gt;
            &lt;span class="input-label"&gt;Username&lt;/span&gt;
            &lt;input class="form-control" type="text" ng-model="username" placeholder="Username"&gt;
          &lt;/label&gt;
          &lt;label class="item item-input item-stacked-label"&gt;
            &lt;span class="input-label"&gt;Email&lt;/span&gt;
            &lt;input class="form-control" type="text" ng-model="email" placeholder="Email"&gt;
          &lt;/label&gt;
          &lt;label class="item item-input item-stacked-label"&gt;
            &lt;span class="input-label"&gt;Password&lt;/span&gt;
            &lt;input class="form-control" type="password" ng-model="password" placeholder="Password"&gt;
          &lt;/label&gt;
          &lt;label class="item item-input item-stacked-label"&gt;
            &lt;span class="input-label"&gt;Password retype&lt;/span&gt;
            &lt;input class="form-control" type="password" ng-model="retypepassword" placeholder="Retype password"&gt;
          &lt;/label&gt;
          &lt;button class="button button-block button-positive" ng-click="register()"&gt;Register&lt;/button&gt;&lt;br&gt;
        &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>APP.JS</p>
  
  <pre><code>.controller('MainCtrl', function($scope, $ionicSideMenuDelegate, $http) {
  
  $scope.register = function () {
  
          var request = $http({
              method: "post",
              url: "https://www.dummylink.com/app/php/register.php",
              data: {
                  username: $scope.username,
                  email: $scope.email,
                  password: $scope.password,
                  retypepassword: $scope.retypepassword
              },
              headers: { 'Content-Type': 'application/x-www-form-urlencoded'}
          });
          request.success(function (data) {
                $scope.responseMessage = data;
          });
          request.error(function (data) {
                alert(data);
          });
  }
  </code></pre>
  
  <p>})</p>