There is no need to change your code when you get a CORS error. This error happens because when the server blocks http requests if they are on another domain or a subdomain.
you can’t make a get request from to http://www.google.com from http://localhost.
this is not the case when you’ll install the app on the device since in the device the address is file://localhost.
bottom line: try to install this on your device. if you want to test your app on your computer see this thread:[SOLVED] CORS with Ionic