Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

No 'Access-Control-Allow-Origin' header

$
0
0

@totofe wrote:

Hi,

I want get a List of places with a textsearch. I use this code :

var req = {
            method: 'GET',
            url: 'https://maps.googleapis.com/maps/api/place/textsearch/json?query=' + txtsearch + '&key=<Key>'
        }

        $http(req).success(function (res) {
            console.log(res);
            console.log('Success', angular.toJson(res.data));
        }).error(function (err) {
            console.error(angular.toJson(err))
        })

But, I have this error:

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8100' is therefore not allowed access.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>