search

Home  >  Q&A  >  body text

angular.js - AngularJS $http is used in Ionic. The Android version cannot connect, but the IOS version is normal.

The first 2 is what I used to distinguish the output. No matter where the get is, the array after 2 will be returned
Access-Control-Allow-Origin:*
was also added to the previous api header. It is normal on ios, but the real machine and simulator of Android return 404
How to solve this

高洛峰高洛峰2813 days ago518

reply all(1)I'll reply

  • 漂亮男人

    漂亮男人2017-05-15 16:56:54

    After checking cordova-plugin-whitelist, this situation is probably cross-domain, and then the program uses options to request first, but your server does not process the options, so 404 is displayed. (The above content is a guess)

    reply
    0
  • Cancelreply