title: ionic problem No 'Access-Control-Allow-Origin'
body: <p>I'm working on an ionic apps.
  My problem is: when I try to get data from server I got this:</p>
  
  <blockquote>
    <p>XMLHttpRequest cannot load <a href="https://mywebsite.com/api" rel="nofollow noreferrer">https://mywebsite.com/api</a>. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin '<a href="http://localhost" rel="nofollow noreferrer">http://localhost</a>' is therefore not allowed access. </p>
  </blockquote>
  
  <p>I already try to add this to .htaccess:</p>
  
  <pre><code>&lt;ifModule mod_headers.c&gt;
  Header set Access-Control-Allow-Origin: *
  &lt;/ifModule&gt;
  </code></pre>
  
  <p>And this to my api page (PHP): <code>header('Access-Control-Allow-Origin: *');</code></p>
  
  <p>but still not working</p>
  
  <p>$http.get(url).success(function(response) {...}</p>