
In angular2 how to use CORS cross domain, it is necessary to set the response header at the server, how to set?

In angular2 how to use CORS cross domain, it is necessary to set the response header at the server, how to set?
You need to set the cross domain origin in only server side not in client side. So enable CORS in server side.
And if you are using Web Api for a server call . Enable CORS and Access-Control-Allow-Origin.