用ionicframework做一个小应用,需要取数据,本地测试会遇到跨域问题。

查了好多资料,谷歌百度都用上了,服务器端也修改成*了,就是不起作用,还是提示“XMLHttpRequest cannot load http://xxx/api/feedback/send. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.”

实在没办法了,在模拟机上看又太慢,看ionic官网博客,有一个解决方案,这里继续阅读