Making REST call from Ionic

These are problems specific to AngularJS in general. They aren’t made better or worse by Ionic. Look at these:



http://better-inter.net/enabling-cors-in-angular-js/
http://blog.bulte.net/12-24-2013/angular-wordpress-cors.html

If you are using iOS, you also need to consider limiiting resources in your config.xml file. By default, it is wide open - not very safe.

You should probably limit it like :

    <access origin="http://myAppsApiUrlGoesHere.com" />
3 Likes