title: Angular Call to a remote PHP document not working in Phonegap Application
body: <p>I am writing a database driven mobile application using AngularJS as an MVC, and to handle the data scopes etc. in Ripple and viewing the code as a web page, my methods work flawless. database data appears without issue, however when running the application on a device all the database-data areas are blank.</p>
  
  <p>I stripped the php and angular down the the worlds simplest example thingking maybe my calls were no good, or the php wasnt returning data properly, but even then the areas are blank when i debug it on the device. Below is my code for the simple trial. keep in mind, I KNOW it isnt secure, its not the production code, just an oversimplified example for proof of concept.</p>
  
  <p>Angular (ng-init.js)</p>
  
  <pre><code>//Whitelist myserver.com
  $sceDelegateProvider.resourceUrlWhitelist(['self', 'http://myserver.com:xxxx/**', 'https://myserver.com:xxxx/**']);
  $httpProvider.defaults.useXDomain = true;
  delete $httpProvider.defaults.headers.common["X-Requested-With"];
  $httpProvider.defaults.headers.common["Accept"] = "application/json";
  $httpProvider.defaults.headers.common["Content-Type"] = "application/json";
  // ======= View Controller ======== //
  app.controller('DashController', function($scope, ScheduleFactory) {
   function initSchedule() {
      ScheduleFactory.getSchedule().success(function(data) {
       console.log(data);
       $scope.schedules = data;  
      });
    }
  initSchedule();
  });
  // =========== Factories ========== //
  app.factory('ScheduleFactory', function($http) {
      var factory = {};
      factory.getSchedule = function() {
          return $http.get('http://myserver.com:xxx/user/schedule/simpleschedulequery.php');
      };
      return factory;
  });
  </code></pre>
  
  <p>simpleschedulequery.php</p>
  
  <pre><code>&lt;?php 
  
  // mysqli connection declaration
  //No offence, but ill not be posting that online :P
  //The variable created for it is $scheduleconnect
  
  // mysqli connect statement
  $fetch = mysqli_query($scheduleconnect, "SELECT * FROM schedules");
  
  //set up the array creator
  $return_arr = array(); //array variable declaration
  while ($row = mysqli_fetch_array($fetch, MYSQL_ASSOC)) {
  $row_array['name'] = $row['name'];
  $row_array['atime'] = $row['atime'];
  
  //push the output of all the row array statements to the array variable
  array_push($return_arr, $row_array);
  }
  
  //encode the array variable as json
  echo json_encode($return_arr);
  ?&gt;
  </code></pre>
  
  <p>and finally my display code Dash.html</p>
  
  <p>Note: this view is handled by ng-view and the controller is attached there.</p>
  
  <pre><code>&lt;table&gt;
      &lt;tbody&gt;
          &lt;tr ng-repeat="schedule in schedules"&gt;
              &lt;td&gt;{{schedule.name}}&lt;/td&gt;
              &lt;td&gt;{{schedule.atime}}&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Can Anyone let me know what might be going wrong here? Thanks in advance!</p>