How can I get gmail contacts in angularjs2 and typescript?

22 views
Skip to first unread message

Steven Scott

unread,
Jun 24, 2017, 3:55:22 AM6/24/17
to Angular and AngularJS discussion
I tried to use followings, but get 404 error.
return this.http.get("https://www.googleapis.com/auth/contacts/"+data.email+"/full?alt=json&access_token=" + data.token + "&max-results=1000&v=3.0" ).map((response:Response) => response.json());

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. The response had HTTP status code 404.

Any ideas how to fix it? 

Anil Kurmi

unread,
Jun 25, 2017, 12:30:45 AM6/25/17
to Angular and AngularJS discussion
for testing we use 

PATH\\chrome.exe" --disable-web-security --user-agent="Android" --user-data-dir="C:\temp-chrome-eng"

to resove Access-Control-Allow-Origin
Reply all
Reply to author
Forward
0 new messages