I had a similar problem and for me it boiled down to adding the following HTTP headers at the response of the receiving end:
Access-Control-Allow-Methods: GET, POST, OPTIONS
You may prefer not to use the * at the end, but only the domainname of the host sending the data. Like *.example.com
But this is only feasible when you have access to the configuration of the server.
I am new in AngularJs. Please can you tell me where to implement this?
@Ankit You need to add these headers in the server, not in AngularJS.
Voted up for the last statement: "But this is only feasible when you have access to the configuration of the server"
@techcraver - You dont need operational access to the configuration of the server - just pass the headers from within your script. If you have a PHP backend it would be header('Access-Control-Allow-Origin: *');