title: Angular & Ionic, HTTP Get not working in real device IOS
body: <p>I have problem in my app , when I run the app in local host it's working without problem and I can see the channel list but when I try to test the app by physical device it doesn't show anything. I think the problem comes from the method that I'm using to send json data through http.</p>
  
  <pre><code>(function () {
  'use strict';
  
  angular.module('testApp').controller('ChannelCtrl', ['$state', 'testApi', ChannelCtrl]);
  
  function ChannelCtrl($state, testApi) {
      var vm = this;
  
  myscreenApi.getChannels().then(function(data){
           vm.channels = data;
       });
  
      vm.selectLeague = function(id){
          testApi.setChannelId(id);
          $state.go("app.video");
      }
  
  };
  })();
  </code></pre>
  
  <p>and this my function to get channeldata</p>
  
  <pre><code>function getChannels() {
          var deferred = $q.defer(),
              cacheKey = "leagues",
              ChannelsData = null;
  
          if (ChannelsData) {
              console.log("Found data inside cache", ChannelsData);
              deferred.resolve(ChannelsData);
              $window.alert("From Cache");
          } else {
              $http.get("http://example.com/api/videos/getchannels")
                  .success(function(data) {
                      console.log("Received data via HTTP");
                      self.leaguesCache.put(cacheKey, data);
                      $window.alert("From HTTP");
                      deferred.resolve(data);
                  })
                  .error(function(dataerr) {
                      console.log("Error while making HTTP call.");
                      $window.alert("Error baba daram " + dataerr);
                      deferred.reject();
                  });
          }
          return deferred.promise;
      }
  </code></pre>
  
  <p>when i send data with JSON.parse()  , it works right.</p>
  
  <pre><code>vm.channels = JSON.parse('[{"Name":"MyScreen News","ID":46,"Thumbnail":"CB46.jpg","Videos":null}]');
  </code></pre>
  
  <p>The overall, I used the ASP.NET Web API which is send data by JSON. The App works well in our desktop however the running application can not retrieve data from our host. Moreover, when I inject data in program directly it works in both platform. In addition the ionic config file presented below:</p>
  
  <pre><code>  &lt;content src="index.html"/&gt;
    &lt;access origin="*"/&gt;
    &lt;preference name="webviewbounce" value="false"/&gt;
    &lt;preference name="UIWebViewBounce" value="false"/&gt;
    &lt;preference name="DisallowOverscroll" value="true"/&gt;
    &lt;preference name="BackupWebStorage" value="none"/&gt;
    &lt;feature name="StatusBar"&gt;
      &lt;param name="ios-package" value="CDVStatusBar" onload="true"/&gt;
    &lt;/feature&gt;
  </code></pre>
  
  <p>That's all. ;)</p>